@redocly/openapi-docs 3.0.0-alpha.53 → 3.0.0-alpha.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,72 +1,72 @@
1
- (()=>{var o0=(S,N)=>()=>(N||S((N={exports:{}}).exports,N),N.exports);var fv=(S,N,c)=>new Promise((m,O)=>{var k=V=>{try{R(c.next(V))}catch(X){O(X)}},L=V=>{try{R(c.throw(V))}catch(X){O(X)}},R=V=>V.done?m(V.value):Promise.resolve(V.value).then(k,L);R((c=c.apply(S,N)).next())});var s0=o0(Gd=>{/*!
1
+ /*!
2
2
  * Redocly OpenAPI Docs
3
3
  * (c) Copyright 2018 Redocly LLC, all rights reserved.
4
4
  * -------------------------------------------------------------
5
- * Version: "3.0.0-alpha.53"
6
- */(Gd.webpackChunkRedoclyOpenAPIDocs=Gd.webpackChunkRedoclyOpenAPIDocs||[]).push([[290],{29641:(S,N,c)=>{(function(m){m(c(46944))})(function(m){var O={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},k=m.Pos;m.defineOption("autoCloseBrackets",!1,function(D,w,M){M&&M!=m.Init&&(D.removeKeyMap(R),D.state.closeBrackets=null),w&&(V(L(w,"pairs")),D.state.closeBrackets=w,D.addKeyMap(R))});function L(D,w){return w=="pairs"&&typeof D=="string"?D:typeof D=="object"&&D[w]!=null?D[w]:O[w]}var R={Backspace:re,Enter:he};function V(D){for(var w=0;w<D.length;w++){var M=D.charAt(w),B="'"+M+"'";R[B]||(R[B]=X(M))}}V(O.pairs+"`");function X(D){return function(w){return J(w,D)}}function te(D){var w=D.state.closeBrackets;if(!w||w.override)return w;var M=D.getModeAt(D.getCursor());return M.closeBrackets||w}function re(D){var w=te(D);if(!w||D.getOption("disableInput"))return m.Pass;for(var M=L(w,"pairs"),B=D.listSelections(),Z=0;Z<B.length;Z++){if(!B[Z].empty())return m.Pass;var ae=F(D,B[Z].head);if(!ae||M.indexOf(ae)%2!=0)return m.Pass}for(var Z=B.length-1;Z>=0;Z--){var H=B[Z].head;D.replaceRange("",k(H.line,H.ch-1),k(H.line,H.ch+1),"+delete")}}function he(D){var w=te(D),M=w&&L(w,"explode");if(!M||D.getOption("disableInput"))return m.Pass;for(var B=D.listSelections(),Z=0;Z<B.length;Z++){if(!B[Z].empty())return m.Pass;var ae=F(D,B[Z].head);if(!ae||M.indexOf(ae)%2!=0)return m.Pass}D.operation(function(){var H=D.lineSeparator()||`
7
- `;D.replaceSelection(H+H,null),oe(D,-1),B=D.listSelections();for(var le=0;le<B.length;le++){var z=B[le].head.line;D.indentLine(z,null,!0),D.indentLine(z+1,null,!0)}})}function oe(D,w){for(var M=[],B=D.listSelections(),Z=0,ae=0;ae<B.length;ae++){var H=B[ae];H.head==D.getCursor()&&(Z=ae);var le=H.head.ch||w>0?{line:H.head.line,ch:H.head.ch+w}:{line:H.head.line-1};M.push({anchor:le,head:le})}D.setSelections(M,Z)}function fe(D){var w=m.cmpPos(D.anchor,D.head)>0;return{anchor:new k(D.anchor.line,D.anchor.ch+(w?-1:1)),head:new k(D.head.line,D.head.ch+(w?1:-1))}}function J(D,w){var M=te(D);if(!M||D.getOption("disableInput"))return m.Pass;var B=L(M,"pairs"),Z=B.indexOf(w);if(Z==-1)return m.Pass;for(var ae=L(M,"closeBefore"),H=L(M,"triples"),le=B.charAt(Z+1)==w,z=D.listSelections(),q=Z%2==0,pe,xe=0;xe<z.length;xe++){var Q=z[xe],ye=Q.head,ie,je=D.getRange(ye,k(ye.line,ye.ch+1));if(q&&!Q.empty())ie="surround";else if((le||!q)&&je==w)le&&ee(D,ye)?ie="both":H.indexOf(w)>=0&&D.getRange(ye,k(ye.line,ye.ch+3))==w+w+w?ie="skipThree":ie="skip";else if(le&&ye.ch>1&&H.indexOf(w)>=0&&D.getRange(k(ye.line,ye.ch-2),ye)==w+w){if(ye.ch>2&&/\bstring/.test(D.getTokenTypeAt(k(ye.line,ye.ch-2))))return m.Pass;ie="addFour"}else if(le){var ze=ye.ch==0?" ":D.getRange(k(ye.line,ye.ch-1),ye);if(!m.isWordChar(je)&&ze!=w&&!m.isWordChar(ze))ie="both";else return m.Pass}else if(q&&(je.length===0||/\s/.test(je)||ae.indexOf(je)>-1))ie="both";else return m.Pass;if(!pe)pe=ie;else if(pe!=ie)return m.Pass}var Ue=Z%2?B.charAt(Z-1):w,vt=Z%2?w:B.charAt(Z+1);D.operation(function(){if(pe=="skip")oe(D,1);else if(pe=="skipThree")oe(D,3);else if(pe=="surround"){for(var pt=D.getSelections(),ut=0;ut<pt.length;ut++)pt[ut]=Ue+pt[ut]+vt;D.replaceSelections(pt,"around"),pt=D.listSelections().slice();for(var ut=0;ut<pt.length;ut++)pt[ut]=fe(pt[ut]);D.setSelections(pt)}else pe=="both"?(D.replaceSelection(Ue+vt,null),D.triggerElectric(Ue+vt),oe(D,-1)):pe=="addFour"&&(D.replaceSelection(Ue+Ue+Ue+Ue,"before"),oe(D,1))})}function F(D,w){var M=D.getRange(k(w.line,w.ch-1),k(w.line,w.ch+1));return M.length==2?M:null}function ee(D,w){var M=D.getTokenAt(k(w.line,w.ch+1));return/\bstring/.test(M.type)&&M.start==w.ch&&(w.ch==0||!/\bstring/.test(D.getTokenTypeAt(w)))}})},82518:(S,N,c)=>{(function(m){m(c(46944))})(function(m){var O=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),k=m.Pos,L={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function R(oe){return oe&&oe.bracketRegex||/[(){}[\]]/}function V(oe,fe,J){var F=oe.getLineHandle(fe.line),ee=fe.ch-1,D=J&&J.afterCursor;D==null&&(D=/(^| )cm-fat-cursor($| )/.test(oe.getWrapperElement().className));var w=R(J),M=!D&&ee>=0&&w.test(F.text.charAt(ee))&&L[F.text.charAt(ee)]||w.test(F.text.charAt(ee+1))&&L[F.text.charAt(++ee)];if(!M)return null;var B=M.charAt(1)==">"?1:-1;if(J&&J.strict&&B>0!=(ee==fe.ch))return null;var Z=oe.getTokenTypeAt(k(fe.line,ee+1)),ae=X(oe,k(fe.line,ee+(B>0?1:0)),B,Z,J);return ae==null?null:{from:k(fe.line,ee),to:ae&&ae.pos,match:ae&&ae.ch==M.charAt(0),forward:B>0}}function X(oe,fe,J,F,ee){for(var D=ee&&ee.maxScanLineLength||1e4,w=ee&&ee.maxScanLines||1e3,M=[],B=R(ee),Z=J>0?Math.min(fe.line+w,oe.lastLine()+1):Math.max(oe.firstLine()-1,fe.line-w),ae=fe.line;ae!=Z;ae+=J){var H=oe.getLine(ae);if(H){var le=J>0?0:H.length-1,z=J>0?H.length:-1;if(!(H.length>D))for(ae==fe.line&&(le=fe.ch-(J<0?1:0));le!=z;le+=J){var q=H.charAt(le);if(B.test(q)&&(F===void 0||(oe.getTokenTypeAt(k(ae,le+1))||"")==(F||""))){var pe=L[q];if(pe&&pe.charAt(1)==">"==J>0)M.push(q);else if(M.length)M.pop();else return{pos:k(ae,le),ch:q}}}}}return ae-J==(J>0?oe.lastLine():oe.firstLine())?!1:null}function te(oe,fe,J){for(var F=oe.state.matchBrackets.maxHighlightLineLength||1e3,ee=J&&J.highlightNonMatching,D=[],w=oe.listSelections(),M=0;M<w.length;M++){var B=w[M].empty()&&V(oe,w[M].head,J);if(B&&(B.match||ee!==!1)&&oe.getLine(B.from.line).length<=F){var Z=B.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";D.push(oe.markText(B.from,k(B.from.line,B.from.ch+1),{className:Z})),B.to&&oe.getLine(B.to.line).length<=F&&D.push(oe.markText(B.to,k(B.to.line,B.to.ch+1),{className:Z}))}}if(D.length){O&&oe.state.focused&&oe.focus();var ae=function(){oe.operation(function(){for(var H=0;H<D.length;H++)D[H].clear()})};if(fe)setTimeout(ae,800);else return ae}}function re(oe){oe.operation(function(){oe.state.matchBrackets.currentlyHighlighted&&(oe.state.matchBrackets.currentlyHighlighted(),oe.state.matchBrackets.currentlyHighlighted=null),oe.state.matchBrackets.currentlyHighlighted=te(oe,!1,oe.state.matchBrackets)})}function he(oe){oe.state.matchBrackets&&oe.state.matchBrackets.currentlyHighlighted&&(oe.state.matchBrackets.currentlyHighlighted(),oe.state.matchBrackets.currentlyHighlighted=null)}m.defineOption("matchBrackets",!1,function(oe,fe,J){J&&J!=m.Init&&(oe.off("cursorActivity",re),oe.off("focus",re),oe.off("blur",he),he(oe)),fe&&(oe.state.matchBrackets=typeof fe=="object"?fe:{},oe.on("cursorActivity",re),oe.on("focus",re),oe.on("blur",he))}),m.defineExtension("matchBrackets",function(){te(this,!0)}),m.defineExtension("findMatchingBracket",function(oe,fe,J){return(J||typeof fe=="boolean")&&(J?(J.strict=fe,fe=J):fe=fe?{strict:!0}:null),V(this,oe,fe)}),m.defineExtension("scanForBracket",function(oe,fe,J,F){return X(this,oe,fe,J,F)})})},77436:(S,N,c)=>{(function(m){m(c(46944))})(function(m){"use strict";var O="CodeMirror-hint",k="CodeMirror-hint-active";m.showHint=function(D,w,M){if(!w)return D.showHint(M);M&&M.async&&(w.async=!0);var B={hint:w};if(M)for(var Z in M)B[Z]=M[Z];return D.showHint(B)},m.defineExtension("showHint",function(D){D=X(this,this.getCursor("start"),D);var w=this.listSelections();if(!(w.length>1)){if(this.somethingSelected()){if(!D.hint.supportsSelection)return;for(var M=0;M<w.length;M++)if(w[M].head.line!=w[M].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var B=this.state.completionActive=new L(this,D);B.options.hint&&(m.signal(this,"startCompletion",this),B.update(!0))}}),m.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});function L(D,w){if(this.cm=D,this.options=w,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var M=this;D.on("cursorActivity",this.activityFunc=function(){M.cursorActivity()})}}var R=window.requestAnimationFrame||function(D){return setTimeout(D,1e3/60)},V=window.cancelAnimationFrame||clearTimeout;L.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&m.signal(this.data,"close"),this.widget&&this.widget.close(),m.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(D,w){var M=D.list[w],B=this;this.cm.operation(function(){M.hint?M.hint(B.cm,D,M):B.cm.replaceRange(te(M),M.from||D.from,M.to||D.to,"complete"),m.signal(D,"pick",M),B.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(V(this.debounce),this.debounce=0);var D=this.startPos;this.data&&(D=this.data.from);var w=this.cm.getCursor(),M=this.cm.getLine(w.line);if(w.line!=this.startPos.line||M.length-w.ch!=this.startLen-this.startPos.ch||w.ch<D.ch||this.cm.somethingSelected()||!w.ch||this.options.closeCharacters.test(M.charAt(w.ch-1)))this.close();else{var B=this;this.debounce=R(function(){B.update()}),this.widget&&this.widget.disable()}},update:function(D){if(this.tick!=null){var w=this,M=++this.tick;J(this.options.hint,this.cm,this.options,function(B){w.tick==M&&w.finishUpdate(B,D)})}},finishUpdate:function(D,w){this.data&&m.signal(this.data,"update");var M=this.widget&&this.widget.picked||w&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=D,D&&D.list.length&&(M&&D.list.length==1?this.pick(D,0):(this.widget=new oe(this,D),m.signal(D,"shown")))}};function X(D,w,M){var B=D.options.hintOptions,Z={};for(var ae in ee)Z[ae]=ee[ae];if(B)for(var ae in B)B[ae]!==void 0&&(Z[ae]=B[ae]);if(M)for(var ae in M)M[ae]!==void 0&&(Z[ae]=M[ae]);return Z.hint.resolve&&(Z.hint=Z.hint.resolve(D,w)),Z}function te(D){return typeof D=="string"?D:D.text}function re(D,w){var M={Up:function(){w.moveFocus(-1)},Down:function(){w.moveFocus(1)},PageUp:function(){w.moveFocus(-w.menuSize()+1,!0)},PageDown:function(){w.moveFocus(w.menuSize()-1,!0)},Home:function(){w.setFocus(0)},End:function(){w.setFocus(w.length-1)},Enter:w.pick,Tab:w.pick,Esc:w.close},B=/Mac/.test(navigator.platform);B&&(M["Ctrl-P"]=function(){w.moveFocus(-1)},M["Ctrl-N"]=function(){w.moveFocus(1)});var Z=D.options.customKeys,ae=Z?{}:M;function H(q,pe){var xe;typeof pe!="string"?xe=function(Q){return pe(Q,w)}:M.hasOwnProperty(pe)?xe=M[pe]:xe=pe,ae[q]=xe}if(Z)for(var le in Z)Z.hasOwnProperty(le)&&H(le,Z[le]);var z=D.options.extraKeys;if(z)for(var le in z)z.hasOwnProperty(le)&&H(le,z[le]);return ae}function he(D,w){for(;w&&w!=D;){if(w.nodeName.toUpperCase()==="LI"&&w.parentNode==D)return w;w=w.parentNode}}function oe(D,w){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=D,this.data=w,this.picked=!1;var M=this,B=D.cm,Z=B.getInputField().ownerDocument,ae=Z.defaultView||Z.parentWindow,H=this.hints=Z.createElement("ul");H.setAttribute("role","listbox"),H.setAttribute("aria-expanded","true"),H.id=this.id;var le=D.cm.options.theme;H.className="CodeMirror-hints "+le,this.selectedHint=w.selectedHint||0;for(var z=w.list,q=0;q<z.length;++q){var pe=H.appendChild(Z.createElement("li")),xe=z[q],Q=O+(q!=this.selectedHint?"":" "+k);xe.className!=null&&(Q=xe.className+" "+Q),pe.className=Q,q==this.selectedHint&&pe.setAttribute("aria-selected","true"),pe.id=this.id+"-"+q,pe.setAttribute("role","option"),xe.render?xe.render(pe,w,xe):pe.appendChild(Z.createTextNode(xe.displayText||te(xe))),pe.hintId=q}var ye=D.options.container||Z.body,ie=B.cursorCoords(D.options.alignWithWord?w.from:null),je=ie.left,ze=ie.bottom,Ue=!0,vt=0,pt=0;if(ye!==Z.body){var ut=["absolute","relative","fixed"].indexOf(ae.getComputedStyle(ye).position)!==-1,er=ut?ye:ye.offsetParent,gt=er.getBoundingClientRect(),Rt=Z.body.getBoundingClientRect();vt=gt.left-Rt.left-er.scrollLeft,pt=gt.top-Rt.top-er.scrollTop}H.style.left=je-vt+"px",H.style.top=ze-pt+"px";var st=ae.innerWidth||Math.max(Z.body.offsetWidth,Z.documentElement.offsetWidth),He=ae.innerHeight||Math.max(Z.body.offsetHeight,Z.documentElement.offsetHeight);ye.appendChild(H),B.getInputField().setAttribute("aria-autocomplete","list"),B.getInputField().setAttribute("aria-owns",this.id),B.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var Re=D.options.moveOnOverlap?H.getBoundingClientRect():new DOMRect,Be=D.options.paddingForScrollbar?H.scrollHeight>H.clientHeight+1:!1,lt;setTimeout(function(){lt=B.getScrollInfo()});var _t=Re.bottom-He;if(_t>0){var rt=Re.bottom-Re.top,Pt=Re.top-(ie.bottom-ie.top)-2;He-Re.top<Pt?(rt>Pt&&(H.style.height=(rt=Pt)+"px"),H.style.top=(ze=ie.top-rt)+pt+"px",Ue=!1):H.style.height=He-Re.top-2+"px"}var tr=Re.right-st;if(Be&&(tr+=B.display.nativeBarWidth),tr>0&&(Re.right-Re.left>st&&(H.style.width=st-5+"px",tr-=Re.right-Re.left-st),H.style.left=(je=Math.max(ie.left-tr-vt,0))+"px"),Be)for(var or=H.firstChild;or;or=or.nextSibling)or.style.paddingRight=B.display.nativeBarWidth+"px";if(B.addKeyMap(this.keyMap=re(D,{moveFocus:function(Et,jt){M.changeActive(M.selectedHint+Et,jt)},setFocus:function(Et){M.changeActive(Et)},menuSize:function(){return M.screenAmount()},length:z.length,close:function(){D.close()},pick:function(){M.pick()},data:w})),D.options.closeOnUnfocus){var kr;B.on("blur",this.onBlur=function(){kr=setTimeout(function(){D.close()},100)}),B.on("focus",this.onFocus=function(){clearTimeout(kr)})}B.on("scroll",this.onScroll=function(){var Et=B.getScrollInfo(),jt=B.getWrapperElement().getBoundingClientRect();lt||(lt=B.getScrollInfo());var _r=ze+lt.top-Et.top,zt=_r-(ae.pageYOffset||(Z.documentElement||Z.body).scrollTop);if(Ue||(zt+=H.offsetHeight),zt<=jt.top||zt>=jt.bottom)return D.close();H.style.top=_r+"px",H.style.left=je+lt.left-Et.left+"px"}),m.on(H,"dblclick",function(Et){var jt=he(H,Et.target||Et.srcElement);jt&&jt.hintId!=null&&(M.changeActive(jt.hintId),M.pick())}),m.on(H,"click",function(Et){var jt=he(H,Et.target||Et.srcElement);jt&&jt.hintId!=null&&(M.changeActive(jt.hintId),D.options.completeOnSingleClick&&M.pick())}),m.on(H,"mousedown",function(){setTimeout(function(){B.focus()},20)});var et=this.getSelectedHintRange();return(et.from!==0||et.to!==0)&&this.scrollToActive(),m.signal(w,"select",z[this.selectedHint],H.childNodes[this.selectedHint]),!0}oe.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var D=this.completion.cm.getInputField();D.removeAttribute("aria-activedescendant"),D.removeAttribute("aria-owns");var w=this.completion.cm;this.completion.options.closeOnUnfocus&&(w.off("blur",this.onBlur),w.off("focus",this.onFocus)),w.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var D=this;this.keyMap={Enter:function(){D.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(D,w){if(D>=this.data.list.length?D=w?this.data.list.length-1:0:D<0&&(D=w?0:this.data.list.length-1),this.selectedHint!=D){var M=this.hints.childNodes[this.selectedHint];M&&(M.className=M.className.replace(" "+k,""),M.removeAttribute("aria-selected")),M=this.hints.childNodes[this.selectedHint=D],M.className+=" "+k,M.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",M.id),this.scrollToActive(),m.signal(this.data,"select",this.data.list[this.selectedHint],M)}},scrollToActive:function(){var D=this.getSelectedHintRange(),w=this.hints.childNodes[D.from],M=this.hints.childNodes[D.to],B=this.hints.firstChild;w.offsetTop<this.hints.scrollTop?this.hints.scrollTop=w.offsetTop-B.offsetTop:M.offsetTop+M.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=M.offsetTop+M.offsetHeight-this.hints.clientHeight+B.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var D=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-D),to:Math.min(this.data.list.length-1,this.selectedHint+D)}}};function fe(D,w){if(!D.somethingSelected())return w;for(var M=[],B=0;B<w.length;B++)w[B].supportsSelection&&M.push(w[B]);return M}function J(D,w,M,B){if(D.async)D(w,B,M);else{var Z=D(w,M);Z&&Z.then?Z.then(B):B(Z)}}function F(D,w){var M=D.getHelpers(w,"hint"),B;if(M.length){var Z=function(ae,H,le){var z=fe(ae,M);function q(pe){if(pe==z.length)return H(null);J(z[pe],ae,le,function(xe){xe&&xe.list.length>0?H(xe):q(pe+1)})}q(0)};return Z.async=!0,Z.supportsSelection=!0,Z}else return(B=D.getHelper(D.getCursor(),"hintWords"))?function(ae){return m.hint.fromList(ae,{words:B})}:m.hint.anyword?function(ae,H){return m.hint.anyword(ae,H)}:function(){}}m.registerHelper("hint","auto",{resolve:F}),m.registerHelper("hint","fromList",function(D,w){var M=D.getCursor(),B=D.getTokenAt(M),Z,ae=m.Pos(M.line,B.start),H=M;B.start<M.ch&&/\w/.test(B.string.charAt(M.ch-B.start-1))?Z=B.string.substr(0,M.ch-B.start):(Z="",ae=M);for(var le=[],z=0;z<w.words.length;z++){var q=w.words[z];q.slice(0,Z.length)==Z&&le.push(q)}if(le.length)return{list:le,from:ae,to:H}}),m.commands.autocomplete=m.showHint;var ee={hint:m.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};m.defineOption("hintOptions",null)})},33201:(S,N,c)=>{(function(m){m(c(46944))})(function(m){"use strict";var O="CodeMirror-lint-markers",k="CodeMirror-lint-line-";function L(H,le,z){var q=document.createElement("div");q.className="CodeMirror-lint-tooltip cm-s-"+H.options.theme,q.appendChild(z.cloneNode(!0)),H.state.lint.options.selfContain?H.getWrapperElement().appendChild(q):document.body.appendChild(q);function pe(xe){if(!q.parentNode)return m.off(document,"mousemove",pe);q.style.top=Math.max(0,xe.clientY-q.offsetHeight-5)+"px",q.style.left=xe.clientX+5+"px"}return m.on(document,"mousemove",pe),pe(le),q.style.opacity!=null&&(q.style.opacity=1),q}function R(H){H.parentNode&&H.parentNode.removeChild(H)}function V(H){H.parentNode&&(H.style.opacity==null&&R(H),H.style.opacity=0,setTimeout(function(){R(H)},600))}function X(H,le,z,q){var pe=L(H,le,z);function xe(){m.off(q,"mouseout",xe),pe&&(V(pe),pe=null)}var Q=setInterval(function(){if(pe)for(var ye=q;;ye=ye.parentNode){if(ye&&ye.nodeType==11&&(ye=ye.host),ye==document.body)return;if(!ye){xe();break}}if(!pe)return clearInterval(Q)},400);m.on(q,"mouseout",xe)}function te(H,le,z){this.marked=[],le instanceof Function&&(le={getAnnotations:le}),(!le||le===!0)&&(le={}),this.options={},this.linterOptions=le.options||{};for(var q in re)this.options[q]=re[q];for(var q in le)re.hasOwnProperty(q)?le[q]!=null&&(this.options[q]=le[q]):le.options||(this.linterOptions[q]=le[q]);this.timeout=null,this.hasGutter=z,this.onMouseOver=function(pe){ae(H,pe)},this.waitingFor=0}var re={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function he(H){var le=H.state.lint;le.hasGutter&&H.clearGutter(O),le.options.highlightLines&&oe(H);for(var z=0;z<le.marked.length;++z)le.marked[z].clear();le.marked.length=0}function oe(H){H.eachLine(function(le){var z=le.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(le.wrapClass);z&&H.removeLineClass(le,"wrap",z[0])})}function fe(H,le,z,q,pe){var xe=document.createElement("div"),Q=xe;return xe.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+z,q&&(Q=xe.appendChild(document.createElement("div")),Q.className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),pe!=!1&&m.on(Q,"mouseover",function(ye){X(H,ye,le,Q)}),xe}function J(H,le){return H=="error"?H:le}function F(H){for(var le=[],z=0;z<H.length;++z){var q=H[z],pe=q.from.line;(le[pe]||(le[pe]=[])).push(q)}return le}function ee(H){var le=H.severity;le||(le="error");var z=document.createElement("div");return z.className="CodeMirror-lint-message CodeMirror-lint-message-"+le,typeof H.messageHTML!="undefined"?z.innerHTML=H.messageHTML:z.appendChild(document.createTextNode(H.message)),z}function D(H,le){var z=H.state.lint,q=++z.waitingFor;function pe(){q=-1,H.off("change",pe)}H.on("change",pe),le(H.getValue(),function(xe,Q){H.off("change",pe),z.waitingFor==q&&(Q&&xe instanceof m&&(xe=Q),H.operation(function(){M(H,xe)}))},z.linterOptions,H)}function w(H){var le=H.state.lint;if(le){var z=le.options,q=z.getAnnotations||H.getHelper(m.Pos(0,0),"lint");if(q)if(z.async||q.async)D(H,q);else{var pe=q(H.getValue(),le.linterOptions,H);if(!pe)return;pe.then?pe.then(function(xe){H.operation(function(){M(H,xe)})}):H.operation(function(){M(H,pe)})}}}function M(H,le){var z=H.state.lint;if(z){var q=z.options;he(H);for(var pe=F(le),xe=0;xe<pe.length;++xe){var Q=pe[xe];if(Q){var ye=[];Q=Q.filter(function(pt){return ye.indexOf(pt.message)>-1?!1:ye.push(pt.message)});for(var ie=null,je=z.hasGutter&&document.createDocumentFragment(),ze=0;ze<Q.length;++ze){var Ue=Q[ze],vt=Ue.severity;vt||(vt="error"),ie=J(ie,vt),q.formatAnnotation&&(Ue=q.formatAnnotation(Ue)),z.hasGutter&&je.appendChild(ee(Ue)),Ue.to&&z.marked.push(H.markText(Ue.from,Ue.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+vt,__annotation:Ue}))}z.hasGutter&&H.setGutterMarker(xe,O,fe(H,je,ie,pe[xe].length>1,q.tooltips)),q.highlightLines&&H.addLineClass(xe,"wrap",k+ie)}}q.onUpdateLinting&&q.onUpdateLinting(le,pe,H)}}function B(H){var le=H.state.lint;le&&(clearTimeout(le.timeout),le.timeout=setTimeout(function(){w(H)},le.options.delay))}function Z(H,le,z){for(var q=z.target||z.srcElement,pe=document.createDocumentFragment(),xe=0;xe<le.length;xe++){var Q=le[xe];pe.appendChild(ee(Q))}X(H,z,pe,q)}function ae(H,le){var z=le.target||le.srcElement;if(/\bCodeMirror-lint-mark-/.test(z.className)){for(var q=z.getBoundingClientRect(),pe=(q.left+q.right)/2,xe=(q.top+q.bottom)/2,Q=H.findMarksAt(H.coordsChar({left:pe,top:xe},"client")),ye=[],ie=0;ie<Q.length;++ie){var je=Q[ie].__annotation;je&&ye.push(je)}ye.length&&Z(H,ye,le)}}m.defineOption("lint",!1,function(H,le,z){if(z&&z!=m.Init&&(he(H),H.state.lint.options.lintOnChange!==!1&&H.off("change",B),m.off(H.getWrapperElement(),"mouseover",H.state.lint.onMouseOver),clearTimeout(H.state.lint.timeout),delete H.state.lint),le){for(var q=H.getOption("gutters"),pe=!1,xe=0;xe<q.length;++xe)q[xe]==O&&(pe=!0);var Q=H.state.lint=new te(H,le,pe);Q.options.lintOnChange&&H.on("change",B),Q.options.tooltips!=!1&&Q.options.tooltips!="gutter"&&m.on(H.getWrapperElement(),"mouseover",Q.onMouseOver),w(H)}}),m.defineExtension("performLint",function(){w(this)})})},71628:(S,N,c)=>{(function(m){m(c(46944))})(function(m){"use strict";var O=m.Pos;function k(w){var M=w.flags;return M!=null?M:(w.ignoreCase?"i":"")+(w.global?"g":"")+(w.multiline?"m":"")}function L(w,M){for(var B=k(w),Z=B,ae=0;ae<M.length;ae++)Z.indexOf(M.charAt(ae))==-1&&(Z+=M.charAt(ae));return B==Z?w:new RegExp(w.source,Z)}function R(w){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(w.source)}function V(w,M,B){M=L(M,"g");for(var Z=B.line,ae=B.ch,H=w.lastLine();Z<=H;Z++,ae=0){M.lastIndex=ae;var le=w.getLine(Z),z=M.exec(le);if(z)return{from:O(Z,z.index),to:O(Z,z.index+z[0].length),match:z}}}function X(w,M,B){if(!R(M))return V(w,M,B);M=L(M,"gm");for(var Z,ae=1,H=B.line,le=w.lastLine();H<=le;){for(var z=0;z<ae&&!(H>le);z++){var q=w.getLine(H++);Z=Z==null?q:Z+`
5
+ * Version: "3.0.0-alpha.55"
6
+ */(this.webpackChunkRedoclyOpenAPIDocs=this.webpackChunkRedoclyOpenAPIDocs||[]).push([[290],{29641:(S,R,c)=>{(function(m){m(c(46944))})(function(m){var O={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},k=m.Pos;m.defineOption("autoCloseBrackets",!1,function(N,w,M){M&&M!=m.Init&&(N.removeKeyMap(D),N.state.closeBrackets=null),w&&(j(L(w,"pairs")),N.state.closeBrackets=w,N.addKeyMap(D))});function L(N,w){return w=="pairs"&&typeof N=="string"?N:typeof N=="object"&&N[w]!=null?N[w]:O[w]}var D={Backspace:re,Enter:he};function j(N){for(var w=0;w<N.length;w++){var M=N.charAt(w),B="'"+M+"'";D[B]||(D[B]=X(M))}}j(O.pairs+"`");function X(N){return function(w){return J(w,N)}}function te(N){var w=N.state.closeBrackets;if(!w||w.override)return w;var M=N.getModeAt(N.getCursor());return M.closeBrackets||w}function re(N){var w=te(N);if(!w||N.getOption("disableInput"))return m.Pass;for(var M=L(w,"pairs"),B=N.listSelections(),Z=0;Z<B.length;Z++){if(!B[Z].empty())return m.Pass;var ae=F(N,B[Z].head);if(!ae||M.indexOf(ae)%2!=0)return m.Pass}for(var Z=B.length-1;Z>=0;Z--){var H=B[Z].head;N.replaceRange("",k(H.line,H.ch-1),k(H.line,H.ch+1),"+delete")}}function he(N){var w=te(N),M=w&&L(w,"explode");if(!M||N.getOption("disableInput"))return m.Pass;for(var B=N.listSelections(),Z=0;Z<B.length;Z++){if(!B[Z].empty())return m.Pass;var ae=F(N,B[Z].head);if(!ae||M.indexOf(ae)%2!=0)return m.Pass}N.operation(function(){var H=N.lineSeparator()||`
7
+ `;N.replaceSelection(H+H,null),oe(N,-1),B=N.listSelections();for(var le=0;le<B.length;le++){var z=B[le].head.line;N.indentLine(z,null,!0),N.indentLine(z+1,null,!0)}})}function oe(N,w){for(var M=[],B=N.listSelections(),Z=0,ae=0;ae<B.length;ae++){var H=B[ae];H.head==N.getCursor()&&(Z=ae);var le=H.head.ch||w>0?{line:H.head.line,ch:H.head.ch+w}:{line:H.head.line-1};M.push({anchor:le,head:le})}N.setSelections(M,Z)}function fe(N){var w=m.cmpPos(N.anchor,N.head)>0;return{anchor:new k(N.anchor.line,N.anchor.ch+(w?-1:1)),head:new k(N.head.line,N.head.ch+(w?1:-1))}}function J(N,w){var M=te(N);if(!M||N.getOption("disableInput"))return m.Pass;var B=L(M,"pairs"),Z=B.indexOf(w);if(Z==-1)return m.Pass;for(var ae=L(M,"closeBefore"),H=L(M,"triples"),le=B.charAt(Z+1)==w,z=N.listSelections(),q=Z%2==0,pe,xe=0;xe<z.length;xe++){var Q=z[xe],ye=Q.head,ie,je=N.getRange(ye,k(ye.line,ye.ch+1));if(q&&!Q.empty())ie="surround";else if((le||!q)&&je==w)le&&ee(N,ye)?ie="both":H.indexOf(w)>=0&&N.getRange(ye,k(ye.line,ye.ch+3))==w+w+w?ie="skipThree":ie="skip";else if(le&&ye.ch>1&&H.indexOf(w)>=0&&N.getRange(k(ye.line,ye.ch-2),ye)==w+w){if(ye.ch>2&&/\bstring/.test(N.getTokenTypeAt(k(ye.line,ye.ch-2))))return m.Pass;ie="addFour"}else if(le){var ze=ye.ch==0?" ":N.getRange(k(ye.line,ye.ch-1),ye);if(!m.isWordChar(je)&&ze!=w&&!m.isWordChar(ze))ie="both";else return m.Pass}else if(q&&(je.length===0||/\s/.test(je)||ae.indexOf(je)>-1))ie="both";else return m.Pass;if(!pe)pe=ie;else if(pe!=ie)return m.Pass}var Ue=Z%2?B.charAt(Z-1):w,vt=Z%2?w:B.charAt(Z+1);N.operation(function(){if(pe=="skip")oe(N,1);else if(pe=="skipThree")oe(N,3);else if(pe=="surround"){for(var pt=N.getSelections(),ut=0;ut<pt.length;ut++)pt[ut]=Ue+pt[ut]+vt;N.replaceSelections(pt,"around"),pt=N.listSelections().slice();for(var ut=0;ut<pt.length;ut++)pt[ut]=fe(pt[ut]);N.setSelections(pt)}else pe=="both"?(N.replaceSelection(Ue+vt,null),N.triggerElectric(Ue+vt),oe(N,-1)):pe=="addFour"&&(N.replaceSelection(Ue+Ue+Ue+Ue,"before"),oe(N,1))})}function F(N,w){var M=N.getRange(k(w.line,w.ch-1),k(w.line,w.ch+1));return M.length==2?M:null}function ee(N,w){var M=N.getTokenAt(k(w.line,w.ch+1));return/\bstring/.test(M.type)&&M.start==w.ch&&(w.ch==0||!/\bstring/.test(N.getTokenTypeAt(w)))}})},82518:(S,R,c)=>{(function(m){m(c(46944))})(function(m){var O=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),k=m.Pos,L={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function D(oe){return oe&&oe.bracketRegex||/[(){}[\]]/}function j(oe,fe,J){var F=oe.getLineHandle(fe.line),ee=fe.ch-1,N=J&&J.afterCursor;N==null&&(N=/(^| )cm-fat-cursor($| )/.test(oe.getWrapperElement().className));var w=D(J),M=!N&&ee>=0&&w.test(F.text.charAt(ee))&&L[F.text.charAt(ee)]||w.test(F.text.charAt(ee+1))&&L[F.text.charAt(++ee)];if(!M)return null;var B=M.charAt(1)==">"?1:-1;if(J&&J.strict&&B>0!=(ee==fe.ch))return null;var Z=oe.getTokenTypeAt(k(fe.line,ee+1)),ae=X(oe,k(fe.line,ee+(B>0?1:0)),B,Z,J);return ae==null?null:{from:k(fe.line,ee),to:ae&&ae.pos,match:ae&&ae.ch==M.charAt(0),forward:B>0}}function X(oe,fe,J,F,ee){for(var N=ee&&ee.maxScanLineLength||1e4,w=ee&&ee.maxScanLines||1e3,M=[],B=D(ee),Z=J>0?Math.min(fe.line+w,oe.lastLine()+1):Math.max(oe.firstLine()-1,fe.line-w),ae=fe.line;ae!=Z;ae+=J){var H=oe.getLine(ae);if(H){var le=J>0?0:H.length-1,z=J>0?H.length:-1;if(!(H.length>N))for(ae==fe.line&&(le=fe.ch-(J<0?1:0));le!=z;le+=J){var q=H.charAt(le);if(B.test(q)&&(F===void 0||(oe.getTokenTypeAt(k(ae,le+1))||"")==(F||""))){var pe=L[q];if(pe&&pe.charAt(1)==">"==J>0)M.push(q);else if(M.length)M.pop();else return{pos:k(ae,le),ch:q}}}}}return ae-J==(J>0?oe.lastLine():oe.firstLine())?!1:null}function te(oe,fe,J){for(var F=oe.state.matchBrackets.maxHighlightLineLength||1e3,ee=J&&J.highlightNonMatching,N=[],w=oe.listSelections(),M=0;M<w.length;M++){var B=w[M].empty()&&j(oe,w[M].head,J);if(B&&(B.match||ee!==!1)&&oe.getLine(B.from.line).length<=F){var Z=B.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";N.push(oe.markText(B.from,k(B.from.line,B.from.ch+1),{className:Z})),B.to&&oe.getLine(B.to.line).length<=F&&N.push(oe.markText(B.to,k(B.to.line,B.to.ch+1),{className:Z}))}}if(N.length){O&&oe.state.focused&&oe.focus();var ae=function(){oe.operation(function(){for(var H=0;H<N.length;H++)N[H].clear()})};if(fe)setTimeout(ae,800);else return ae}}function re(oe){oe.operation(function(){oe.state.matchBrackets.currentlyHighlighted&&(oe.state.matchBrackets.currentlyHighlighted(),oe.state.matchBrackets.currentlyHighlighted=null),oe.state.matchBrackets.currentlyHighlighted=te(oe,!1,oe.state.matchBrackets)})}function he(oe){oe.state.matchBrackets&&oe.state.matchBrackets.currentlyHighlighted&&(oe.state.matchBrackets.currentlyHighlighted(),oe.state.matchBrackets.currentlyHighlighted=null)}m.defineOption("matchBrackets",!1,function(oe,fe,J){J&&J!=m.Init&&(oe.off("cursorActivity",re),oe.off("focus",re),oe.off("blur",he),he(oe)),fe&&(oe.state.matchBrackets=typeof fe=="object"?fe:{},oe.on("cursorActivity",re),oe.on("focus",re),oe.on("blur",he))}),m.defineExtension("matchBrackets",function(){te(this,!0)}),m.defineExtension("findMatchingBracket",function(oe,fe,J){return(J||typeof fe=="boolean")&&(J?(J.strict=fe,fe=J):fe=fe?{strict:!0}:null),j(this,oe,fe)}),m.defineExtension("scanForBracket",function(oe,fe,J,F){return X(this,oe,fe,J,F)})})},77436:(S,R,c)=>{(function(m){m(c(46944))})(function(m){"use strict";var O="CodeMirror-hint",k="CodeMirror-hint-active";m.showHint=function(N,w,M){if(!w)return N.showHint(M);M&&M.async&&(w.async=!0);var B={hint:w};if(M)for(var Z in M)B[Z]=M[Z];return N.showHint(B)},m.defineExtension("showHint",function(N){N=X(this,this.getCursor("start"),N);var w=this.listSelections();if(!(w.length>1)){if(this.somethingSelected()){if(!N.hint.supportsSelection)return;for(var M=0;M<w.length;M++)if(w[M].head.line!=w[M].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var B=this.state.completionActive=new L(this,N);B.options.hint&&(m.signal(this,"startCompletion",this),B.update(!0))}}),m.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});function L(N,w){if(this.cm=N,this.options=w,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var M=this;N.on("cursorActivity",this.activityFunc=function(){M.cursorActivity()})}}var D=window.requestAnimationFrame||function(N){return setTimeout(N,1e3/60)},j=window.cancelAnimationFrame||clearTimeout;L.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&m.signal(this.data,"close"),this.widget&&this.widget.close(),m.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(N,w){var M=N.list[w],B=this;this.cm.operation(function(){M.hint?M.hint(B.cm,N,M):B.cm.replaceRange(te(M),M.from||N.from,M.to||N.to,"complete"),m.signal(N,"pick",M),B.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(j(this.debounce),this.debounce=0);var N=this.startPos;this.data&&(N=this.data.from);var w=this.cm.getCursor(),M=this.cm.getLine(w.line);if(w.line!=this.startPos.line||M.length-w.ch!=this.startLen-this.startPos.ch||w.ch<N.ch||this.cm.somethingSelected()||!w.ch||this.options.closeCharacters.test(M.charAt(w.ch-1)))this.close();else{var B=this;this.debounce=D(function(){B.update()}),this.widget&&this.widget.disable()}},update:function(N){if(this.tick!=null){var w=this,M=++this.tick;J(this.options.hint,this.cm,this.options,function(B){w.tick==M&&w.finishUpdate(B,N)})}},finishUpdate:function(N,w){this.data&&m.signal(this.data,"update");var M=this.widget&&this.widget.picked||w&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=N,N&&N.list.length&&(M&&N.list.length==1?this.pick(N,0):(this.widget=new oe(this,N),m.signal(N,"shown")))}};function X(N,w,M){var B=N.options.hintOptions,Z={};for(var ae in ee)Z[ae]=ee[ae];if(B)for(var ae in B)B[ae]!==void 0&&(Z[ae]=B[ae]);if(M)for(var ae in M)M[ae]!==void 0&&(Z[ae]=M[ae]);return Z.hint.resolve&&(Z.hint=Z.hint.resolve(N,w)),Z}function te(N){return typeof N=="string"?N:N.text}function re(N,w){var M={Up:function(){w.moveFocus(-1)},Down:function(){w.moveFocus(1)},PageUp:function(){w.moveFocus(-w.menuSize()+1,!0)},PageDown:function(){w.moveFocus(w.menuSize()-1,!0)},Home:function(){w.setFocus(0)},End:function(){w.setFocus(w.length-1)},Enter:w.pick,Tab:w.pick,Esc:w.close},B=/Mac/.test(navigator.platform);B&&(M["Ctrl-P"]=function(){w.moveFocus(-1)},M["Ctrl-N"]=function(){w.moveFocus(1)});var Z=N.options.customKeys,ae=Z?{}:M;function H(q,pe){var xe;typeof pe!="string"?xe=function(Q){return pe(Q,w)}:M.hasOwnProperty(pe)?xe=M[pe]:xe=pe,ae[q]=xe}if(Z)for(var le in Z)Z.hasOwnProperty(le)&&H(le,Z[le]);var z=N.options.extraKeys;if(z)for(var le in z)z.hasOwnProperty(le)&&H(le,z[le]);return ae}function he(N,w){for(;w&&w!=N;){if(w.nodeName.toUpperCase()==="LI"&&w.parentNode==N)return w;w=w.parentNode}}function oe(N,w){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=N,this.data=w,this.picked=!1;var M=this,B=N.cm,Z=B.getInputField().ownerDocument,ae=Z.defaultView||Z.parentWindow,H=this.hints=Z.createElement("ul");H.setAttribute("role","listbox"),H.setAttribute("aria-expanded","true"),H.id=this.id;var le=N.cm.options.theme;H.className="CodeMirror-hints "+le,this.selectedHint=w.selectedHint||0;for(var z=w.list,q=0;q<z.length;++q){var pe=H.appendChild(Z.createElement("li")),xe=z[q],Q=O+(q!=this.selectedHint?"":" "+k);xe.className!=null&&(Q=xe.className+" "+Q),pe.className=Q,q==this.selectedHint&&pe.setAttribute("aria-selected","true"),pe.id=this.id+"-"+q,pe.setAttribute("role","option"),xe.render?xe.render(pe,w,xe):pe.appendChild(Z.createTextNode(xe.displayText||te(xe))),pe.hintId=q}var ye=N.options.container||Z.body,ie=B.cursorCoords(N.options.alignWithWord?w.from:null),je=ie.left,ze=ie.bottom,Ue=!0,vt=0,pt=0;if(ye!==Z.body){var ut=["absolute","relative","fixed"].indexOf(ae.getComputedStyle(ye).position)!==-1,er=ut?ye:ye.offsetParent,gt=er.getBoundingClientRect(),Rt=Z.body.getBoundingClientRect();vt=gt.left-Rt.left-er.scrollLeft,pt=gt.top-Rt.top-er.scrollTop}H.style.left=je-vt+"px",H.style.top=ze-pt+"px";var st=ae.innerWidth||Math.max(Z.body.offsetWidth,Z.documentElement.offsetWidth),He=ae.innerHeight||Math.max(Z.body.offsetHeight,Z.documentElement.offsetHeight);ye.appendChild(H),B.getInputField().setAttribute("aria-autocomplete","list"),B.getInputField().setAttribute("aria-owns",this.id),B.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var Re=N.options.moveOnOverlap?H.getBoundingClientRect():new DOMRect,Be=N.options.paddingForScrollbar?H.scrollHeight>H.clientHeight+1:!1,lt;setTimeout(function(){lt=B.getScrollInfo()});var _t=Re.bottom-He;if(_t>0){var rt=Re.bottom-Re.top,Pt=Re.top-(ie.bottom-ie.top)-2;He-Re.top<Pt?(rt>Pt&&(H.style.height=(rt=Pt)+"px"),H.style.top=(ze=ie.top-rt)+pt+"px",Ue=!1):H.style.height=He-Re.top-2+"px"}var tr=Re.right-st;if(Be&&(tr+=B.display.nativeBarWidth),tr>0&&(Re.right-Re.left>st&&(H.style.width=st-5+"px",tr-=Re.right-Re.left-st),H.style.left=(je=Math.max(ie.left-tr-vt,0))+"px"),Be)for(var or=H.firstChild;or;or=or.nextSibling)or.style.paddingRight=B.display.nativeBarWidth+"px";if(B.addKeyMap(this.keyMap=re(N,{moveFocus:function(Et,jt){M.changeActive(M.selectedHint+Et,jt)},setFocus:function(Et){M.changeActive(Et)},menuSize:function(){return M.screenAmount()},length:z.length,close:function(){N.close()},pick:function(){M.pick()},data:w})),N.options.closeOnUnfocus){var kr;B.on("blur",this.onBlur=function(){kr=setTimeout(function(){N.close()},100)}),B.on("focus",this.onFocus=function(){clearTimeout(kr)})}B.on("scroll",this.onScroll=function(){var Et=B.getScrollInfo(),jt=B.getWrapperElement().getBoundingClientRect();lt||(lt=B.getScrollInfo());var _r=ze+lt.top-Et.top,zt=_r-(ae.pageYOffset||(Z.documentElement||Z.body).scrollTop);if(Ue||(zt+=H.offsetHeight),zt<=jt.top||zt>=jt.bottom)return N.close();H.style.top=_r+"px",H.style.left=je+lt.left-Et.left+"px"}),m.on(H,"dblclick",function(Et){var jt=he(H,Et.target||Et.srcElement);jt&&jt.hintId!=null&&(M.changeActive(jt.hintId),M.pick())}),m.on(H,"click",function(Et){var jt=he(H,Et.target||Et.srcElement);jt&&jt.hintId!=null&&(M.changeActive(jt.hintId),N.options.completeOnSingleClick&&M.pick())}),m.on(H,"mousedown",function(){setTimeout(function(){B.focus()},20)});var et=this.getSelectedHintRange();return(et.from!==0||et.to!==0)&&this.scrollToActive(),m.signal(w,"select",z[this.selectedHint],H.childNodes[this.selectedHint]),!0}oe.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var N=this.completion.cm.getInputField();N.removeAttribute("aria-activedescendant"),N.removeAttribute("aria-owns");var w=this.completion.cm;this.completion.options.closeOnUnfocus&&(w.off("blur",this.onBlur),w.off("focus",this.onFocus)),w.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var N=this;this.keyMap={Enter:function(){N.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(N,w){if(N>=this.data.list.length?N=w?this.data.list.length-1:0:N<0&&(N=w?0:this.data.list.length-1),this.selectedHint!=N){var M=this.hints.childNodes[this.selectedHint];M&&(M.className=M.className.replace(" "+k,""),M.removeAttribute("aria-selected")),M=this.hints.childNodes[this.selectedHint=N],M.className+=" "+k,M.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",M.id),this.scrollToActive(),m.signal(this.data,"select",this.data.list[this.selectedHint],M)}},scrollToActive:function(){var N=this.getSelectedHintRange(),w=this.hints.childNodes[N.from],M=this.hints.childNodes[N.to],B=this.hints.firstChild;w.offsetTop<this.hints.scrollTop?this.hints.scrollTop=w.offsetTop-B.offsetTop:M.offsetTop+M.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=M.offsetTop+M.offsetHeight-this.hints.clientHeight+B.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var N=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-N),to:Math.min(this.data.list.length-1,this.selectedHint+N)}}};function fe(N,w){if(!N.somethingSelected())return w;for(var M=[],B=0;B<w.length;B++)w[B].supportsSelection&&M.push(w[B]);return M}function J(N,w,M,B){if(N.async)N(w,B,M);else{var Z=N(w,M);Z&&Z.then?Z.then(B):B(Z)}}function F(N,w){var M=N.getHelpers(w,"hint"),B;if(M.length){var Z=function(ae,H,le){var z=fe(ae,M);function q(pe){if(pe==z.length)return H(null);J(z[pe],ae,le,function(xe){xe&&xe.list.length>0?H(xe):q(pe+1)})}q(0)};return Z.async=!0,Z.supportsSelection=!0,Z}else return(B=N.getHelper(N.getCursor(),"hintWords"))?function(ae){return m.hint.fromList(ae,{words:B})}:m.hint.anyword?function(ae,H){return m.hint.anyword(ae,H)}:function(){}}m.registerHelper("hint","auto",{resolve:F}),m.registerHelper("hint","fromList",function(N,w){var M=N.getCursor(),B=N.getTokenAt(M),Z,ae=m.Pos(M.line,B.start),H=M;B.start<M.ch&&/\w/.test(B.string.charAt(M.ch-B.start-1))?Z=B.string.substr(0,M.ch-B.start):(Z="",ae=M);for(var le=[],z=0;z<w.words.length;z++){var q=w.words[z];q.slice(0,Z.length)==Z&&le.push(q)}if(le.length)return{list:le,from:ae,to:H}}),m.commands.autocomplete=m.showHint;var ee={hint:m.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};m.defineOption("hintOptions",null)})},33201:(S,R,c)=>{(function(m){m(c(46944))})(function(m){"use strict";var O="CodeMirror-lint-markers",k="CodeMirror-lint-line-";function L(H,le,z){var q=document.createElement("div");q.className="CodeMirror-lint-tooltip cm-s-"+H.options.theme,q.appendChild(z.cloneNode(!0)),H.state.lint.options.selfContain?H.getWrapperElement().appendChild(q):document.body.appendChild(q);function pe(xe){if(!q.parentNode)return m.off(document,"mousemove",pe);q.style.top=Math.max(0,xe.clientY-q.offsetHeight-5)+"px",q.style.left=xe.clientX+5+"px"}return m.on(document,"mousemove",pe),pe(le),q.style.opacity!=null&&(q.style.opacity=1),q}function D(H){H.parentNode&&H.parentNode.removeChild(H)}function j(H){H.parentNode&&(H.style.opacity==null&&D(H),H.style.opacity=0,setTimeout(function(){D(H)},600))}function X(H,le,z,q){var pe=L(H,le,z);function xe(){m.off(q,"mouseout",xe),pe&&(j(pe),pe=null)}var Q=setInterval(function(){if(pe)for(var ye=q;;ye=ye.parentNode){if(ye&&ye.nodeType==11&&(ye=ye.host),ye==document.body)return;if(!ye){xe();break}}if(!pe)return clearInterval(Q)},400);m.on(q,"mouseout",xe)}function te(H,le,z){this.marked=[],le instanceof Function&&(le={getAnnotations:le}),(!le||le===!0)&&(le={}),this.options={},this.linterOptions=le.options||{};for(var q in re)this.options[q]=re[q];for(var q in le)re.hasOwnProperty(q)?le[q]!=null&&(this.options[q]=le[q]):le.options||(this.linterOptions[q]=le[q]);this.timeout=null,this.hasGutter=z,this.onMouseOver=function(pe){ae(H,pe)},this.waitingFor=0}var re={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function he(H){var le=H.state.lint;le.hasGutter&&H.clearGutter(O),le.options.highlightLines&&oe(H);for(var z=0;z<le.marked.length;++z)le.marked[z].clear();le.marked.length=0}function oe(H){H.eachLine(function(le){var z=le.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(le.wrapClass);z&&H.removeLineClass(le,"wrap",z[0])})}function fe(H,le,z,q,pe){var xe=document.createElement("div"),Q=xe;return xe.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+z,q&&(Q=xe.appendChild(document.createElement("div")),Q.className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),pe!=!1&&m.on(Q,"mouseover",function(ye){X(H,ye,le,Q)}),xe}function J(H,le){return H=="error"?H:le}function F(H){for(var le=[],z=0;z<H.length;++z){var q=H[z],pe=q.from.line;(le[pe]||(le[pe]=[])).push(q)}return le}function ee(H){var le=H.severity;le||(le="error");var z=document.createElement("div");return z.className="CodeMirror-lint-message CodeMirror-lint-message-"+le,typeof H.messageHTML<"u"?z.innerHTML=H.messageHTML:z.appendChild(document.createTextNode(H.message)),z}function N(H,le){var z=H.state.lint,q=++z.waitingFor;function pe(){q=-1,H.off("change",pe)}H.on("change",pe),le(H.getValue(),function(xe,Q){H.off("change",pe),z.waitingFor==q&&(Q&&xe instanceof m&&(xe=Q),H.operation(function(){M(H,xe)}))},z.linterOptions,H)}function w(H){var le=H.state.lint;if(le){var z=le.options,q=z.getAnnotations||H.getHelper(m.Pos(0,0),"lint");if(q)if(z.async||q.async)N(H,q);else{var pe=q(H.getValue(),le.linterOptions,H);if(!pe)return;pe.then?pe.then(function(xe){H.operation(function(){M(H,xe)})}):H.operation(function(){M(H,pe)})}}}function M(H,le){var z=H.state.lint;if(z){var q=z.options;he(H);for(var pe=F(le),xe=0;xe<pe.length;++xe){var Q=pe[xe];if(Q){var ye=[];Q=Q.filter(function(pt){return ye.indexOf(pt.message)>-1?!1:ye.push(pt.message)});for(var ie=null,je=z.hasGutter&&document.createDocumentFragment(),ze=0;ze<Q.length;++ze){var Ue=Q[ze],vt=Ue.severity;vt||(vt="error"),ie=J(ie,vt),q.formatAnnotation&&(Ue=q.formatAnnotation(Ue)),z.hasGutter&&je.appendChild(ee(Ue)),Ue.to&&z.marked.push(H.markText(Ue.from,Ue.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+vt,__annotation:Ue}))}z.hasGutter&&H.setGutterMarker(xe,O,fe(H,je,ie,pe[xe].length>1,q.tooltips)),q.highlightLines&&H.addLineClass(xe,"wrap",k+ie)}}q.onUpdateLinting&&q.onUpdateLinting(le,pe,H)}}function B(H){var le=H.state.lint;le&&(clearTimeout(le.timeout),le.timeout=setTimeout(function(){w(H)},le.options.delay))}function Z(H,le,z){for(var q=z.target||z.srcElement,pe=document.createDocumentFragment(),xe=0;xe<le.length;xe++){var Q=le[xe];pe.appendChild(ee(Q))}X(H,z,pe,q)}function ae(H,le){var z=le.target||le.srcElement;if(/\bCodeMirror-lint-mark-/.test(z.className)){for(var q=z.getBoundingClientRect(),pe=(q.left+q.right)/2,xe=(q.top+q.bottom)/2,Q=H.findMarksAt(H.coordsChar({left:pe,top:xe},"client")),ye=[],ie=0;ie<Q.length;++ie){var je=Q[ie].__annotation;je&&ye.push(je)}ye.length&&Z(H,ye,le)}}m.defineOption("lint",!1,function(H,le,z){if(z&&z!=m.Init&&(he(H),H.state.lint.options.lintOnChange!==!1&&H.off("change",B),m.off(H.getWrapperElement(),"mouseover",H.state.lint.onMouseOver),clearTimeout(H.state.lint.timeout),delete H.state.lint),le){for(var q=H.getOption("gutters"),pe=!1,xe=0;xe<q.length;++xe)q[xe]==O&&(pe=!0);var Q=H.state.lint=new te(H,le,pe);Q.options.lintOnChange&&H.on("change",B),Q.options.tooltips!=!1&&Q.options.tooltips!="gutter"&&m.on(H.getWrapperElement(),"mouseover",Q.onMouseOver),w(H)}}),m.defineExtension("performLint",function(){w(this)})})},71628:(S,R,c)=>{(function(m){m(c(46944))})(function(m){"use strict";var O=m.Pos;function k(w){var M=w.flags;return M??(w.ignoreCase?"i":"")+(w.global?"g":"")+(w.multiline?"m":"")}function L(w,M){for(var B=k(w),Z=B,ae=0;ae<M.length;ae++)Z.indexOf(M.charAt(ae))==-1&&(Z+=M.charAt(ae));return B==Z?w:new RegExp(w.source,Z)}function D(w){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(w.source)}function j(w,M,B){M=L(M,"g");for(var Z=B.line,ae=B.ch,H=w.lastLine();Z<=H;Z++,ae=0){M.lastIndex=ae;var le=w.getLine(Z),z=M.exec(le);if(z)return{from:O(Z,z.index),to:O(Z,z.index+z[0].length),match:z}}}function X(w,M,B){if(!D(M))return j(w,M,B);M=L(M,"gm");for(var Z,ae=1,H=B.line,le=w.lastLine();H<=le;){for(var z=0;z<ae&&!(H>le);z++){var q=w.getLine(H++);Z=Z==null?q:Z+`
8
8
  `+q}ae=ae*2,M.lastIndex=B.ch;var pe=M.exec(Z);if(pe){var xe=Z.slice(0,pe.index).split(`
9
9
  `),Q=pe[0].split(`
10
- `),ye=B.line+xe.length-1,ie=xe[xe.length-1].length;return{from:O(ye,ie),to:O(ye+Q.length-1,Q.length==1?ie+Q[0].length:Q[Q.length-1].length),match:pe}}}}function te(w,M,B){for(var Z,ae=0;ae<=w.length;){M.lastIndex=ae;var H=M.exec(w);if(!H)break;var le=H.index+H[0].length;if(le>w.length-B)break;(!Z||le>Z.index+Z[0].length)&&(Z=H),ae=H.index+1}return Z}function re(w,M,B){M=L(M,"g");for(var Z=B.line,ae=B.ch,H=w.firstLine();Z>=H;Z--,ae=-1){var le=w.getLine(Z),z=te(le,M,ae<0?0:le.length-ae);if(z)return{from:O(Z,z.index),to:O(Z,z.index+z[0].length),match:z}}}function he(w,M,B){if(!R(M))return re(w,M,B);M=L(M,"gm");for(var Z,ae=1,H=w.getLine(B.line).length-B.ch,le=B.line,z=w.firstLine();le>=z;){for(var q=0;q<ae&&le>=z;q++){var pe=w.getLine(le--);Z=Z==null?pe:pe+`
10
+ `),ye=B.line+xe.length-1,ie=xe[xe.length-1].length;return{from:O(ye,ie),to:O(ye+Q.length-1,Q.length==1?ie+Q[0].length:Q[Q.length-1].length),match:pe}}}}function te(w,M,B){for(var Z,ae=0;ae<=w.length;){M.lastIndex=ae;var H=M.exec(w);if(!H)break;var le=H.index+H[0].length;if(le>w.length-B)break;(!Z||le>Z.index+Z[0].length)&&(Z=H),ae=H.index+1}return Z}function re(w,M,B){M=L(M,"g");for(var Z=B.line,ae=B.ch,H=w.firstLine();Z>=H;Z--,ae=-1){var le=w.getLine(Z),z=te(le,M,ae<0?0:le.length-ae);if(z)return{from:O(Z,z.index),to:O(Z,z.index+z[0].length),match:z}}}function he(w,M,B){if(!D(M))return re(w,M,B);M=L(M,"gm");for(var Z,ae=1,H=w.getLine(B.line).length-B.ch,le=B.line,z=w.firstLine();le>=z;){for(var q=0;q<ae&&le>=z;q++){var pe=w.getLine(le--);Z=Z==null?pe:pe+`
11
11
  `+Z}ae*=2;var xe=te(Z,M,H);if(xe){var Q=Z.slice(0,xe.index).split(`
12
12
  `),ye=xe[0].split(`
13
- `),ie=le+Q.length,je=Q[Q.length-1].length;return{from:O(ie,je),to:O(ie+ye.length-1,ye.length==1?je+ye[0].length:ye[ye.length-1].length),match:xe}}}}var oe,fe;String.prototype.normalize?(oe=function(w){return w.normalize("NFD").toLowerCase()},fe=function(w){return w.normalize("NFD")}):(oe=function(w){return w.toLowerCase()},fe=function(w){return w});function J(w,M,B,Z){if(w.length==M.length)return B;for(var ae=0,H=B+Math.max(0,w.length-M.length);;){if(ae==H)return ae;var le=ae+H>>1,z=Z(w.slice(0,le)).length;if(z==B)return le;z>B?H=le:ae=le+1}}function F(w,M,B,Z){if(!M.length)return null;var ae=Z?oe:fe,H=ae(M).split(/\r|\n\r?/);e:for(var le=B.line,z=B.ch,q=w.lastLine()+1-H.length;le<=q;le++,z=0){var pe=w.getLine(le).slice(z),xe=ae(pe);if(H.length==1){var Q=xe.indexOf(H[0]);if(Q==-1)continue e;var B=J(pe,xe,Q,ae)+z;return{from:O(le,J(pe,xe,Q,ae)+z),to:O(le,J(pe,xe,Q+H[0].length,ae)+z)}}else{var ye=xe.length-H[0].length;if(xe.slice(ye)!=H[0])continue e;for(var ie=1;ie<H.length-1;ie++)if(ae(w.getLine(le+ie))!=H[ie])continue e;var je=w.getLine(le+H.length-1),ze=ae(je),Ue=H[H.length-1];if(ze.slice(0,Ue.length)!=Ue)continue e;return{from:O(le,J(pe,xe,ye,ae)+z),to:O(le+H.length-1,J(je,ze,Ue.length,ae))}}}}function ee(w,M,B,Z){if(!M.length)return null;var ae=Z?oe:fe,H=ae(M).split(/\r|\n\r?/);e:for(var le=B.line,z=B.ch,q=w.firstLine()-1+H.length;le>=q;le--,z=-1){var pe=w.getLine(le);z>-1&&(pe=pe.slice(0,z));var xe=ae(pe);if(H.length==1){var Q=xe.lastIndexOf(H[0]);if(Q==-1)continue e;return{from:O(le,J(pe,xe,Q,ae)),to:O(le,J(pe,xe,Q+H[0].length,ae))}}else{var ye=H[H.length-1];if(xe.slice(0,ye.length)!=ye)continue e;for(var ie=1,B=le-H.length+1;ie<H.length-1;ie++)if(ae(w.getLine(B+ie))!=H[ie])continue e;var je=w.getLine(le+1-H.length),ze=ae(je);if(ze.slice(ze.length-H[0].length)!=H[0])continue e;return{from:O(le+1-H.length,J(je,ze,je.length-H[0].length,ae)),to:O(le,J(pe,xe,ye.length,ae))}}}}function D(w,M,B,Z){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=w,B=B?w.clipPos(B):O(0,0),this.pos={from:B,to:B};var ae;typeof Z=="object"?ae=Z.caseFold:(ae=Z,Z=null),typeof M=="string"?(ae==null&&(ae=!1),this.matches=function(H,le){return(H?ee:F)(w,M,le,ae)}):(M=L(M,"gm"),!Z||Z.multiline!==!1?this.matches=function(H,le){return(H?he:X)(w,M,le)}:this.matches=function(H,le){return(H?re:V)(w,M,le)})}D.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(w){var M=this.doc.clipPos(w?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(M=O(M.line,M.ch),w?(M.ch--,M.ch<0&&(M.line--,M.ch=(this.doc.getLine(M.line)||"").length)):(M.ch++,M.ch>(this.doc.getLine(M.line)||"").length&&(M.ch=0,M.line++)),m.cmpPos(M,this.doc.clipPos(M))!=0))return this.atOccurrence=!1;var B=this.matches(w,M);if(this.afterEmptyMatch=B&&m.cmpPos(B.from,B.to)==0,B)return this.pos=B,this.atOccurrence=!0,this.pos.match||!0;var Z=O(w?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:Z,to:Z},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(w,M){if(this.atOccurrence){var B=m.splitLines(w);this.doc.replaceRange(B,this.pos.from,this.pos.to,M),this.pos.to=O(this.pos.from.line+B.length-1,B[B.length-1].length+(B.length==1?this.pos.from.ch:0))}}},m.defineExtension("getSearchCursor",function(w,M,B){return new D(this.doc,w,M,B)}),m.defineDocExtension("getSearchCursor",function(w,M,B){return new D(this,w,M,B)}),m.defineExtension("selectMatches",function(w,M){for(var B=[],Z=this.getSearchCursor(w,this.getCursor("from"),M);Z.findNext()&&!(m.cmpPos(Z.to(),this.getCursor("to"))>0);)B.push({anchor:Z.from(),head:Z.to()});B.length&&this.setSelections(B,0)})})},46944:function(S){(function(N,c){S.exports=c()})(this,function(){"use strict";var N=navigator.userAgent,c=navigator.platform,m=/gecko\/\d/i.test(N),O=/MSIE \d/.test(N),k=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(N),L=/Edge\/(\d+)/.exec(N),R=O||k||L,V=R&&(O?document.documentMode||6:+(L||k)[1]),X=!L&&/WebKit\//.test(N),te=X&&/Qt\/\d+\.\d+/.test(N),re=!L&&/Chrome\/(\d+)/.exec(N),he=re&&+re[1],oe=/Opera\//.test(N),fe=/Apple Computer/.test(navigator.vendor),J=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(N),F=/PhantomJS/.test(N),ee=fe&&(/Mobile\/\w+/.test(N)||navigator.maxTouchPoints>2),D=/Android/.test(N),w=ee||D||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(N),M=ee||/Mac/.test(c),B=/\bCrOS\b/.test(N),Z=/win/i.test(c),ae=oe&&N.match(/Version\/(\d*\.\d*)/);ae&&(ae=Number(ae[1])),ae&&ae>=15&&(oe=!1,X=!0);var H=M&&(te||oe&&(ae==null||ae<12.11)),le=m||R&&V>=9;function z(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var q=function(t,n){var l=t.className,s=z(n).exec(l);if(s){var u=l.slice(s.index+s[0].length);t.className=l.slice(0,s.index)+(u?s[1]+u:"")}};function pe(t){for(var n=t.childNodes.length;n>0;--n)t.removeChild(t.firstChild);return t}function xe(t,n){return pe(t).appendChild(n)}function Q(t,n,l,s){var u=document.createElement(t);if(l&&(u.className=l),s&&(u.style.cssText=s),typeof n=="string")u.appendChild(document.createTextNode(n));else if(n)for(var p=0;p<n.length;++p)u.appendChild(n[p]);return u}function ye(t,n,l,s){var u=Q(t,n,l,s);return u.setAttribute("role","presentation"),u}var ie;document.createRange?ie=function(t,n,l,s){var u=document.createRange();return u.setEnd(s||t,l),u.setStart(t,n),u}:ie=function(t,n,l){var s=document.body.createTextRange();try{s.moveToElementText(t.parentNode)}catch(u){return s}return s.collapse(!0),s.moveEnd("character",l),s.moveStart("character",n),s};function je(t,n){if(n.nodeType==3&&(n=n.parentNode),t.contains)return t.contains(n);do if(n.nodeType==11&&(n=n.host),n==t)return!0;while(n=n.parentNode)}function ze(t){var n;try{n=t.activeElement}catch(l){n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function Ue(t,n){var l=t.className;z(n).test(l)||(t.className+=(l?" ":"")+n)}function vt(t,n){for(var l=t.split(" "),s=0;s<l.length;s++)l[s]&&!z(l[s]).test(n)&&(n+=" "+l[s]);return n}var pt=function(t){t.select()};ee?pt=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:R&&(pt=function(t){try{t.select()}catch(n){}});function ut(t){return t.display.wrapper.ownerDocument}function er(t){return ut(t).defaultView}function gt(t){var n=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,n)}}function Rt(t,n,l){n||(n={});for(var s in t)t.hasOwnProperty(s)&&(l!==!1||!n.hasOwnProperty(s))&&(n[s]=t[s]);return n}function st(t,n,l,s,u){n==null&&(n=t.search(/[^\s\u00a0]/),n==-1&&(n=t.length));for(var p=s||0,y=u||0;;){var x=t.indexOf(" ",p);if(x<0||x>=n)return y+(n-p);y+=x-p,y+=l-y%l,p=x+1}}var He=function(){this.id=null,this.f=null,this.time=0,this.handler=gt(this.onTimeout,this)};He.prototype.onTimeout=function(t){t.id=0,t.time<=+new Date?t.f():setTimeout(t.handler,t.time-+new Date)},He.prototype.set=function(t,n){this.f=n;var l=+new Date+t;(!this.id||l<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,t),this.time=l)};function Re(t,n){for(var l=0;l<t.length;++l)if(t[l]==n)return l;return-1}var Be=50,lt={toString:function(){return"CodeMirror.Pass"}},_t={scroll:!1},rt={origin:"*mouse"},Pt={origin:"+move"};function tr(t,n,l){for(var s=0,u=0;;){var p=t.indexOf(" ",s);p==-1&&(p=t.length);var y=p-s;if(p==t.length||u+y>=n)return s+Math.min(y,n-u);if(u+=p-s,u+=l-u%l,s=p+1,u>=n)return s}}var or=[""];function kr(t){for(;or.length<=t;)or.push(et(or)+" ");return or[t]}function et(t){return t[t.length-1]}function Et(t,n){for(var l=[],s=0;s<t.length;s++)l[s]=n(t[s],s);return l}function jt(t,n,l){for(var s=0,u=l(n);s<t.length&&l(t[s])<=u;)s++;t.splice(s,0,n)}function _r(){}function zt(t,n){var l;return Object.create?l=Object.create(t):(_r.prototype=t,l=new _r),n&&Rt(n,l),l}var Bn=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Vn(t){return/\w/.test(t)||t>"\x80"&&(t.toUpperCase()!=t.toLowerCase()||Bn.test(t))}function nn(t,n){return n?n.source.indexOf("\\w")>-1&&Vn(t)?!0:n.test(t):Vn(t)}function Cn(t){for(var n in t)if(t.hasOwnProperty(n)&&t[n])return!1;return!0}var ri=/[\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 jn(t){return t.charCodeAt(0)>=768&&ri.test(t)}function an(t,n,l){for(;(l<0?n>0:n<t.length)&&jn(t.charAt(n));)n+=l;return n}function Mr(t,n,l){for(var s=n>l?-1:1;;){if(n==l)return n;var u=(n+l)/2,p=s<0?Math.ceil(u):Math.floor(u);if(p==n)return t(p)?n:l;t(p)?l=p:n=p+s}}function zr(t,n,l,s){if(!t)return s(n,l,"ltr",0);for(var u=!1,p=0;p<t.length;++p){var y=t[p];(y.from<l&&y.to>n||n==l&&y.to==n)&&(s(Math.max(y.from,n),Math.min(y.to,l),y.level==1?"rtl":"ltr",p),u=!0)}u||s(n,l,"ltr")}var Gt=null;function St(t,n,l){var s;Gt=null;for(var u=0;u<t.length;++u){var p=t[u];if(p.from<n&&p.to>n)return u;p.to==n&&(p.from!=p.to&&l=="before"?s=u:Gt=u),p.from==n&&(p.from!=p.to&&l!="before"?s=u:Gt=u)}return s!=null?s:Gt}var ft=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function l(P){return P<=247?t.charAt(P):1424<=P&&P<=1524?"R":1536<=P&&P<=1785?n.charAt(P-1536):1774<=P&&P<=2220?"r":8192<=P&&P<=8203?"w":P==8204?"b":"L"}var s=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,u=/[stwN]/,p=/[LRr]/,y=/[Lb1n]/,x=/[1n]/;function C(P,K,ne){this.level=P,this.from=K,this.to=ne}return function(P,K){var ne=K=="ltr"?"L":"R";if(P.length==0||K=="ltr"&&!s.test(P))return!1;for(var ve=P.length,de=[],Ee=0;Ee<ve;++Ee)de.push(l(P.charCodeAt(Ee)));for(var Ae=0,Ie=ne;Ae<ve;++Ae){var Le=de[Ae];Le=="m"?de[Ae]=Ie:Ie=Le}for(var De=0,Ne=ne;De<ve;++De){var We=de[De];We=="1"&&Ne=="r"?de[De]="n":p.test(We)&&(Ne=We,We=="r"&&(de[De]="R"))}for(var Qe=1,Ke=de[0];Qe<ve-1;++Qe){var bt=de[Qe];bt=="+"&&Ke=="1"&&de[Qe+1]=="1"?de[Qe]="1":bt==","&&Ke==de[Qe+1]&&(Ke=="1"||Ke=="n")&&(de[Qe]=Ke),Ke=bt}for(var $t=0;$t<ve;++$t){var wr=de[$t];if(wr==",")de[$t]="N";else if(wr=="%"){var rr=void 0;for(rr=$t+1;rr<ve&&de[rr]=="%";++rr);for(var Sn=$t&&de[$t-1]=="!"||rr<ve&&de[rr]=="1"?"1":"N",fn=$t;fn<rr;++fn)de[fn]=Sn;$t=rr-1}}for(var vr=0,tn=ne;vr<ve;++vr){var Ir=de[vr];tn=="L"&&Ir=="1"?de[vr]="L":p.test(Ir)&&(tn=Ir)}for(var mr=0;mr<ve;++mr)if(u.test(de[mr])){var gr=void 0;for(gr=mr+1;gr<ve&&u.test(de[gr]);++gr);for(var ur=(mr?de[mr-1]:ne)=="L",cn=(gr<ve?de[gr]:ne)=="L",Po=ur==cn?ur?"L":"R":ne,Sa=mr;Sa<gr;++Sa)de[Sa]=Po;mr=gr-1}for(var jr=[],Jn,Cr=0;Cr<ve;)if(y.test(de[Cr])){var Lf=Cr;for(++Cr;Cr<ve&&y.test(de[Cr]);++Cr);jr.push(new C(0,Lf,Cr))}else{var zi=Cr,no=jr.length,io=K=="rtl"?1:0;for(++Cr;Cr<ve&&de[Cr]!="L";++Cr);for(var Wr=zi;Wr<Cr;)if(x.test(de[Wr])){zi<Wr&&(jr.splice(no,0,new C(1,zi,Wr)),no+=io);var Fn=Wr;for(++Wr;Wr<Cr&&x.test(de[Wr]);++Wr);jr.splice(no,0,new C(2,Fn,Wr)),no+=io,zi=Wr}else++Wr;zi<Cr&&jr.splice(no,0,new C(1,zi,Cr))}return K=="ltr"&&(jr[0].level==1&&(Jn=P.match(/^\s+/))&&(jr[0].from=Jn[0].length,jr.unshift(new C(0,0,Jn[0].length))),et(jr).level==1&&(Jn=P.match(/\s+$/))&&(et(jr).to-=Jn[0].length,jr.push(new C(0,ve-Jn[0].length,ve)))),K=="rtl"?jr.reverse():jr}}();function tt(t,n){var l=t.order;return l==null&&(l=t.order=ft(t.text,n)),l}var mt=[],se=function(t,n,l){if(t.addEventListener)t.addEventListener(n,l,!1);else if(t.attachEvent)t.attachEvent("on"+n,l);else{var s=t._handlers||(t._handlers={});s[n]=(s[n]||mt).concat(l)}};function we(t,n){return t._handlers&&t._handlers[n]||mt}function Ve(t,n,l){if(t.removeEventListener)t.removeEventListener(n,l,!1);else if(t.detachEvent)t.detachEvent("on"+n,l);else{var s=t._handlers,u=s&&s[n];if(u){var p=Re(u,l);p>-1&&(s[n]=u.slice(0,p).concat(u.slice(p+1)))}}}function nt(t,n){var l=we(t,n);if(l.length)for(var s=Array.prototype.slice.call(arguments,2),u=0;u<l.length;++u)l[u].apply(null,s)}function ht(t,n,l){return typeof n=="string"&&(n={type:n,preventDefault:function(){this.defaultPrevented=!0}}),nt(t,l||n.type,t,n),vi(n)||n.codemirrorIgnore}function ct(t){var n=t._handlers&&t._handlers.cursorActivity;if(n)for(var l=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),s=0;s<n.length;++s)Re(l,n[s])==-1&&l.push(n[s])}function Qt(t,n){return we(t,n).length>0}function Gr(t){t.prototype.on=function(n,l){se(this,n,l)},t.prototype.off=function(n,l){Ve(this,n,l)}}function Ft(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function dr(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function vi(t){return t.defaultPrevented!=null?t.defaultPrevented:t.returnValue==!1}function Nr(t){Ft(t),dr(t)}function Rr(t){return t.target||t.srcElement}function gi(t){var n=t.which;return n==null&&(t.button&1?n=1:t.button&2?n=3:t.button&4&&(n=2)),M&&t.ctrlKey&&n==1&&(n=3),n}var $r=function(){if(R&&V<9)return!1;var t=Q("div");return"draggable"in t||"dragDrop"in t}(),ni;function ii(t){if(ni==null){var n=Q("span","\u200B");xe(t,Q("span",[n,document.createTextNode("x")])),t.firstChild.offsetHeight!=0&&(ni=n.offsetWidth<=1&&n.offsetHeight>2&&!(R&&V<8))}var l=ni?Q("span","\u200B"):Q("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return l.setAttribute("cm-text",""),l}var Dr;function mi(t){if(Dr!=null)return Dr;var n=xe(t,document.createTextNode("A\u062EA")),l=ie(n,0,1).getBoundingClientRect(),s=ie(n,1,2).getBoundingClientRect();return pe(t),!l||l.left==l.right?!1:Dr=s.right-l.right<3}var Wn=`
13
+ `),ie=le+Q.length,je=Q[Q.length-1].length;return{from:O(ie,je),to:O(ie+ye.length-1,ye.length==1?je+ye[0].length:ye[ye.length-1].length),match:xe}}}}var oe,fe;String.prototype.normalize?(oe=function(w){return w.normalize("NFD").toLowerCase()},fe=function(w){return w.normalize("NFD")}):(oe=function(w){return w.toLowerCase()},fe=function(w){return w});function J(w,M,B,Z){if(w.length==M.length)return B;for(var ae=0,H=B+Math.max(0,w.length-M.length);;){if(ae==H)return ae;var le=ae+H>>1,z=Z(w.slice(0,le)).length;if(z==B)return le;z>B?H=le:ae=le+1}}function F(w,M,B,Z){if(!M.length)return null;var ae=Z?oe:fe,H=ae(M).split(/\r|\n\r?/);e:for(var le=B.line,z=B.ch,q=w.lastLine()+1-H.length;le<=q;le++,z=0){var pe=w.getLine(le).slice(z),xe=ae(pe);if(H.length==1){var Q=xe.indexOf(H[0]);if(Q==-1)continue e;var B=J(pe,xe,Q,ae)+z;return{from:O(le,J(pe,xe,Q,ae)+z),to:O(le,J(pe,xe,Q+H[0].length,ae)+z)}}else{var ye=xe.length-H[0].length;if(xe.slice(ye)!=H[0])continue e;for(var ie=1;ie<H.length-1;ie++)if(ae(w.getLine(le+ie))!=H[ie])continue e;var je=w.getLine(le+H.length-1),ze=ae(je),Ue=H[H.length-1];if(ze.slice(0,Ue.length)!=Ue)continue e;return{from:O(le,J(pe,xe,ye,ae)+z),to:O(le+H.length-1,J(je,ze,Ue.length,ae))}}}}function ee(w,M,B,Z){if(!M.length)return null;var ae=Z?oe:fe,H=ae(M).split(/\r|\n\r?/);e:for(var le=B.line,z=B.ch,q=w.firstLine()-1+H.length;le>=q;le--,z=-1){var pe=w.getLine(le);z>-1&&(pe=pe.slice(0,z));var xe=ae(pe);if(H.length==1){var Q=xe.lastIndexOf(H[0]);if(Q==-1)continue e;return{from:O(le,J(pe,xe,Q,ae)),to:O(le,J(pe,xe,Q+H[0].length,ae))}}else{var ye=H[H.length-1];if(xe.slice(0,ye.length)!=ye)continue e;for(var ie=1,B=le-H.length+1;ie<H.length-1;ie++)if(ae(w.getLine(B+ie))!=H[ie])continue e;var je=w.getLine(le+1-H.length),ze=ae(je);if(ze.slice(ze.length-H[0].length)!=H[0])continue e;return{from:O(le+1-H.length,J(je,ze,je.length-H[0].length,ae)),to:O(le,J(pe,xe,ye.length,ae))}}}}function N(w,M,B,Z){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=w,B=B?w.clipPos(B):O(0,0),this.pos={from:B,to:B};var ae;typeof Z=="object"?ae=Z.caseFold:(ae=Z,Z=null),typeof M=="string"?(ae==null&&(ae=!1),this.matches=function(H,le){return(H?ee:F)(w,M,le,ae)}):(M=L(M,"gm"),!Z||Z.multiline!==!1?this.matches=function(H,le){return(H?he:X)(w,M,le)}:this.matches=function(H,le){return(H?re:j)(w,M,le)})}N.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(w){var M=this.doc.clipPos(w?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(M=O(M.line,M.ch),w?(M.ch--,M.ch<0&&(M.line--,M.ch=(this.doc.getLine(M.line)||"").length)):(M.ch++,M.ch>(this.doc.getLine(M.line)||"").length&&(M.ch=0,M.line++)),m.cmpPos(M,this.doc.clipPos(M))!=0))return this.atOccurrence=!1;var B=this.matches(w,M);if(this.afterEmptyMatch=B&&m.cmpPos(B.from,B.to)==0,B)return this.pos=B,this.atOccurrence=!0,this.pos.match||!0;var Z=O(w?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:Z,to:Z},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(w,M){if(this.atOccurrence){var B=m.splitLines(w);this.doc.replaceRange(B,this.pos.from,this.pos.to,M),this.pos.to=O(this.pos.from.line+B.length-1,B[B.length-1].length+(B.length==1?this.pos.from.ch:0))}}},m.defineExtension("getSearchCursor",function(w,M,B){return new N(this.doc,w,M,B)}),m.defineDocExtension("getSearchCursor",function(w,M,B){return new N(this,w,M,B)}),m.defineExtension("selectMatches",function(w,M){for(var B=[],Z=this.getSearchCursor(w,this.getCursor("from"),M);Z.findNext()&&!(m.cmpPos(Z.to(),this.getCursor("to"))>0);)B.push({anchor:Z.from(),head:Z.to()});B.length&&this.setSelections(B,0)})})},46944:function(S){(function(R,c){S.exports=c()})(this,function(){"use strict";var R=navigator.userAgent,c=navigator.platform,m=/gecko\/\d/i.test(R),O=/MSIE \d/.test(R),k=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(R),L=/Edge\/(\d+)/.exec(R),D=O||k||L,j=D&&(O?document.documentMode||6:+(L||k)[1]),X=!L&&/WebKit\//.test(R),te=X&&/Qt\/\d+\.\d+/.test(R),re=!L&&/Chrome\/(\d+)/.exec(R),he=re&&+re[1],oe=/Opera\//.test(R),fe=/Apple Computer/.test(navigator.vendor),J=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(R),F=/PhantomJS/.test(R),ee=fe&&(/Mobile\/\w+/.test(R)||navigator.maxTouchPoints>2),N=/Android/.test(R),w=ee||N||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(R),M=ee||/Mac/.test(c),B=/\bCrOS\b/.test(R),Z=/win/i.test(c),ae=oe&&R.match(/Version\/(\d*\.\d*)/);ae&&(ae=Number(ae[1])),ae&&ae>=15&&(oe=!1,X=!0);var H=M&&(te||oe&&(ae==null||ae<12.11)),le=m||D&&j>=9;function z(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var q=function(t,n){var l=t.className,s=z(n).exec(l);if(s){var u=l.slice(s.index+s[0].length);t.className=l.slice(0,s.index)+(u?s[1]+u:"")}};function pe(t){for(var n=t.childNodes.length;n>0;--n)t.removeChild(t.firstChild);return t}function xe(t,n){return pe(t).appendChild(n)}function Q(t,n,l,s){var u=document.createElement(t);if(l&&(u.className=l),s&&(u.style.cssText=s),typeof n=="string")u.appendChild(document.createTextNode(n));else if(n)for(var p=0;p<n.length;++p)u.appendChild(n[p]);return u}function ye(t,n,l,s){var u=Q(t,n,l,s);return u.setAttribute("role","presentation"),u}var ie;document.createRange?ie=function(t,n,l,s){var u=document.createRange();return u.setEnd(s||t,l),u.setStart(t,n),u}:ie=function(t,n,l){var s=document.body.createTextRange();try{s.moveToElementText(t.parentNode)}catch{return s}return s.collapse(!0),s.moveEnd("character",l),s.moveStart("character",n),s};function je(t,n){if(n.nodeType==3&&(n=n.parentNode),t.contains)return t.contains(n);do if(n.nodeType==11&&(n=n.host),n==t)return!0;while(n=n.parentNode)}function ze(t){var n;try{n=t.activeElement}catch{n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function Ue(t,n){var l=t.className;z(n).test(l)||(t.className+=(l?" ":"")+n)}function vt(t,n){for(var l=t.split(" "),s=0;s<l.length;s++)l[s]&&!z(l[s]).test(n)&&(n+=" "+l[s]);return n}var pt=function(t){t.select()};ee?pt=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:D&&(pt=function(t){try{t.select()}catch{}});function ut(t){return t.display.wrapper.ownerDocument}function er(t){return ut(t).defaultView}function gt(t){var n=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,n)}}function Rt(t,n,l){n||(n={});for(var s in t)t.hasOwnProperty(s)&&(l!==!1||!n.hasOwnProperty(s))&&(n[s]=t[s]);return n}function st(t,n,l,s,u){n==null&&(n=t.search(/[^\s\u00a0]/),n==-1&&(n=t.length));for(var p=s||0,y=u||0;;){var x=t.indexOf(" ",p);if(x<0||x>=n)return y+(n-p);y+=x-p,y+=l-y%l,p=x+1}}var He=function(){this.id=null,this.f=null,this.time=0,this.handler=gt(this.onTimeout,this)};He.prototype.onTimeout=function(t){t.id=0,t.time<=+new Date?t.f():setTimeout(t.handler,t.time-+new Date)},He.prototype.set=function(t,n){this.f=n;var l=+new Date+t;(!this.id||l<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,t),this.time=l)};function Re(t,n){for(var l=0;l<t.length;++l)if(t[l]==n)return l;return-1}var Be=50,lt={toString:function(){return"CodeMirror.Pass"}},_t={scroll:!1},rt={origin:"*mouse"},Pt={origin:"+move"};function tr(t,n,l){for(var s=0,u=0;;){var p=t.indexOf(" ",s);p==-1&&(p=t.length);var y=p-s;if(p==t.length||u+y>=n)return s+Math.min(y,n-u);if(u+=p-s,u+=l-u%l,s=p+1,u>=n)return s}}var or=[""];function kr(t){for(;or.length<=t;)or.push(et(or)+" ");return or[t]}function et(t){return t[t.length-1]}function Et(t,n){for(var l=[],s=0;s<t.length;s++)l[s]=n(t[s],s);return l}function jt(t,n,l){for(var s=0,u=l(n);s<t.length&&l(t[s])<=u;)s++;t.splice(s,0,n)}function _r(){}function zt(t,n){var l;return Object.create?l=Object.create(t):(_r.prototype=t,l=new _r),n&&Rt(n,l),l}var Bn=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Vn(t){return/\w/.test(t)||t>"\x80"&&(t.toUpperCase()!=t.toLowerCase()||Bn.test(t))}function nn(t,n){return n?n.source.indexOf("\\w")>-1&&Vn(t)?!0:n.test(t):Vn(t)}function Cn(t){for(var n in t)if(t.hasOwnProperty(n)&&t[n])return!1;return!0}var ri=/[\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 jn(t){return t.charCodeAt(0)>=768&&ri.test(t)}function an(t,n,l){for(;(l<0?n>0:n<t.length)&&jn(t.charAt(n));)n+=l;return n}function Mr(t,n,l){for(var s=n>l?-1:1;;){if(n==l)return n;var u=(n+l)/2,p=s<0?Math.ceil(u):Math.floor(u);if(p==n)return t(p)?n:l;t(p)?l=p:n=p+s}}function zr(t,n,l,s){if(!t)return s(n,l,"ltr",0);for(var u=!1,p=0;p<t.length;++p){var y=t[p];(y.from<l&&y.to>n||n==l&&y.to==n)&&(s(Math.max(y.from,n),Math.min(y.to,l),y.level==1?"rtl":"ltr",p),u=!0)}u||s(n,l,"ltr")}var Gt=null;function St(t,n,l){var s;Gt=null;for(var u=0;u<t.length;++u){var p=t[u];if(p.from<n&&p.to>n)return u;p.to==n&&(p.from!=p.to&&l=="before"?s=u:Gt=u),p.from==n&&(p.from!=p.to&&l!="before"?s=u:Gt=u)}return s??Gt}var ft=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function l(P){return P<=247?t.charAt(P):1424<=P&&P<=1524?"R":1536<=P&&P<=1785?n.charAt(P-1536):1774<=P&&P<=2220?"r":8192<=P&&P<=8203?"w":P==8204?"b":"L"}var s=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,u=/[stwN]/,p=/[LRr]/,y=/[Lb1n]/,x=/[1n]/;function C(P,K,ne){this.level=P,this.from=K,this.to=ne}return function(P,K){var ne=K=="ltr"?"L":"R";if(P.length==0||K=="ltr"&&!s.test(P))return!1;for(var ve=P.length,de=[],Ee=0;Ee<ve;++Ee)de.push(l(P.charCodeAt(Ee)));for(var Ae=0,Ie=ne;Ae<ve;++Ae){var Le=de[Ae];Le=="m"?de[Ae]=Ie:Ie=Le}for(var De=0,Ne=ne;De<ve;++De){var We=de[De];We=="1"&&Ne=="r"?de[De]="n":p.test(We)&&(Ne=We,We=="r"&&(de[De]="R"))}for(var Qe=1,Ke=de[0];Qe<ve-1;++Qe){var bt=de[Qe];bt=="+"&&Ke=="1"&&de[Qe+1]=="1"?de[Qe]="1":bt==","&&Ke==de[Qe+1]&&(Ke=="1"||Ke=="n")&&(de[Qe]=Ke),Ke=bt}for(var $t=0;$t<ve;++$t){var wr=de[$t];if(wr==",")de[$t]="N";else if(wr=="%"){var rr=void 0;for(rr=$t+1;rr<ve&&de[rr]=="%";++rr);for(var Sn=$t&&de[$t-1]=="!"||rr<ve&&de[rr]=="1"?"1":"N",fn=$t;fn<rr;++fn)de[fn]=Sn;$t=rr-1}}for(var vr=0,tn=ne;vr<ve;++vr){var Ir=de[vr];tn=="L"&&Ir=="1"?de[vr]="L":p.test(Ir)&&(tn=Ir)}for(var mr=0;mr<ve;++mr)if(u.test(de[mr])){var gr=void 0;for(gr=mr+1;gr<ve&&u.test(de[gr]);++gr);for(var ur=(mr?de[mr-1]:ne)=="L",cn=(gr<ve?de[gr]:ne)=="L",Po=ur==cn?ur?"L":"R":ne,Sa=mr;Sa<gr;++Sa)de[Sa]=Po;mr=gr-1}for(var jr=[],Jn,Cr=0;Cr<ve;)if(y.test(de[Cr])){var Lf=Cr;for(++Cr;Cr<ve&&y.test(de[Cr]);++Cr);jr.push(new C(0,Lf,Cr))}else{var zi=Cr,no=jr.length,io=K=="rtl"?1:0;for(++Cr;Cr<ve&&de[Cr]!="L";++Cr);for(var Wr=zi;Wr<Cr;)if(x.test(de[Wr])){zi<Wr&&(jr.splice(no,0,new C(1,zi,Wr)),no+=io);var Fn=Wr;for(++Wr;Wr<Cr&&x.test(de[Wr]);++Wr);jr.splice(no,0,new C(2,Fn,Wr)),no+=io,zi=Wr}else++Wr;zi<Cr&&jr.splice(no,0,new C(1,zi,Cr))}return K=="ltr"&&(jr[0].level==1&&(Jn=P.match(/^\s+/))&&(jr[0].from=Jn[0].length,jr.unshift(new C(0,0,Jn[0].length))),et(jr).level==1&&(Jn=P.match(/\s+$/))&&(et(jr).to-=Jn[0].length,jr.push(new C(0,ve-Jn[0].length,ve)))),K=="rtl"?jr.reverse():jr}}();function tt(t,n){var l=t.order;return l==null&&(l=t.order=ft(t.text,n)),l}var mt=[],se=function(t,n,l){if(t.addEventListener)t.addEventListener(n,l,!1);else if(t.attachEvent)t.attachEvent("on"+n,l);else{var s=t._handlers||(t._handlers={});s[n]=(s[n]||mt).concat(l)}};function we(t,n){return t._handlers&&t._handlers[n]||mt}function Ve(t,n,l){if(t.removeEventListener)t.removeEventListener(n,l,!1);else if(t.detachEvent)t.detachEvent("on"+n,l);else{var s=t._handlers,u=s&&s[n];if(u){var p=Re(u,l);p>-1&&(s[n]=u.slice(0,p).concat(u.slice(p+1)))}}}function nt(t,n){var l=we(t,n);if(l.length)for(var s=Array.prototype.slice.call(arguments,2),u=0;u<l.length;++u)l[u].apply(null,s)}function ht(t,n,l){return typeof n=="string"&&(n={type:n,preventDefault:function(){this.defaultPrevented=!0}}),nt(t,l||n.type,t,n),vi(n)||n.codemirrorIgnore}function ct(t){var n=t._handlers&&t._handlers.cursorActivity;if(n)for(var l=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),s=0;s<n.length;++s)Re(l,n[s])==-1&&l.push(n[s])}function Qt(t,n){return we(t,n).length>0}function Gr(t){t.prototype.on=function(n,l){se(this,n,l)},t.prototype.off=function(n,l){Ve(this,n,l)}}function Ft(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function dr(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function vi(t){return t.defaultPrevented!=null?t.defaultPrevented:t.returnValue==!1}function Nr(t){Ft(t),dr(t)}function Rr(t){return t.target||t.srcElement}function gi(t){var n=t.which;return n==null&&(t.button&1?n=1:t.button&2?n=3:t.button&4&&(n=2)),M&&t.ctrlKey&&n==1&&(n=3),n}var $r=function(){if(D&&j<9)return!1;var t=Q("div");return"draggable"in t||"dragDrop"in t}(),ni;function ii(t){if(ni==null){var n=Q("span","\u200B");xe(t,Q("span",[n,document.createTextNode("x")])),t.firstChild.offsetHeight!=0&&(ni=n.offsetWidth<=1&&n.offsetHeight>2&&!(D&&j<8))}var l=ni?Q("span","\u200B"):Q("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return l.setAttribute("cm-text",""),l}var Dr;function mi(t){if(Dr!=null)return Dr;var n=xe(t,document.createTextNode("A\u062EA")),l=ie(n,0,1).getBoundingClientRect(),s=ie(n,1,2).getBoundingClientRect();return pe(t),!l||l.left==l.right?!1:Dr=s.right-l.right<3}var Wn=`
14
14
 
15
15
  b`.split(/\n/).length!=3?function(t){for(var n=0,l=[],s=t.length;n<=s;){var u=t.indexOf(`
16
- `,n);u==-1&&(u=t.length);var p=t.slice(n,t.charAt(u-1)=="\r"?u-1:u),y=p.indexOf("\r");y!=-1?(l.push(p.slice(0,y)),n+=y+1):(l.push(p),n=u+1)}return l}:function(t){return t.split(/\r\n?|\n/)},Ii=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(n){return!1}}:function(t){var n;try{n=t.ownerDocument.selection.createRange()}catch(l){}return!n||n.parentElement()!=t?!1:n.compareEndPoints("StartToEnd",n)!=0},Ta=function(){var t=Q("div");return"oncopy"in t?!0:(t.setAttribute("oncopy","return;"),typeof t.oncopy=="function")}(),hn=null;function Jr(t){if(hn!=null)return hn;var n=xe(t,Q("span","x")),l=n.getBoundingClientRect(),s=ie(n,0,1).getBoundingClientRect();return hn=Math.abs(l.left-s.left)>1}var vn={},on={};function sn(t,n){arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),vn[t]=n}function fo(t,n){on[t]=n}function Hn(t){if(typeof t=="string"&&on.hasOwnProperty(t))t=on[t];else if(t&&typeof t.name=="string"&&on.hasOwnProperty(t.name)){var n=on[t.name];typeof n=="string"&&(n={name:n}),t=zt(n,t),t.name=n.name}else{if(typeof t=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Hn("application/xml");if(typeof t=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Hn("application/json")}return typeof t=="string"?{name:t}:t||{name:"null"}}function Qr(t,n){n=Hn(n);var l=vn[n.name];if(!l)return Qr(t,"text/plain");var s=l(t,n);if(pr.hasOwnProperty(n.name)){var u=pr[n.name];for(var p in u)u.hasOwnProperty(p)&&(s.hasOwnProperty(p)&&(s["_"+p]=s[p]),s[p]=u[p])}if(s.name=n.name,n.helperType&&(s.helperType=n.helperType),n.modeProps)for(var y in n.modeProps)s[y]=n.modeProps[y];return s}var pr={};function ai(t,n){var l=pr.hasOwnProperty(t)?pr[t]:pr[t]={};Rt(n,l)}function An(t,n){if(n===!0)return n;if(t.copyState)return t.copyState(n);var l={};for(var s in n){var u=n[s];u instanceof Array&&(u=u.concat([])),l[s]=u}return l}function ka(t,n){for(var l;t.innerMode&&(l=t.innerMode(n),!(!l||l.mode==t));)n=l.state,t=l.mode;return l||{mode:t,state:n}}function Vo(t,n,l){return t.startState?t.startState(n,l):!0}var Xt=function(t,n,l){this.pos=this.start=0,this.string=t,this.tabSize=n||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=l};Xt.prototype.eol=function(){return this.pos>=this.string.length},Xt.prototype.sol=function(){return this.pos==this.lineStart},Xt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Xt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Xt.prototype.eat=function(t){var n=this.string.charAt(this.pos),l;if(typeof t=="string"?l=n==t:l=n&&(t.test?t.test(n):t(n)),l)return++this.pos,n},Xt.prototype.eatWhile=function(t){for(var n=this.pos;this.eat(t););return this.pos>n},Xt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Xt.prototype.skipToEnd=function(){this.pos=this.string.length},Xt.prototype.skipTo=function(t){var n=this.string.indexOf(t,this.pos);if(n>-1)return this.pos=n,!0},Xt.prototype.backUp=function(t){this.pos-=t},Xt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=st(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?st(this.string,this.lineStart,this.tabSize):0)},Xt.prototype.indentation=function(){return st(this.string,null,this.tabSize)-(this.lineStart?st(this.string,this.lineStart,this.tabSize):0)},Xt.prototype.match=function(t,n,l){if(typeof t=="string"){var s=function(y){return l?y.toLowerCase():y},u=this.string.substr(this.pos,t.length);if(s(u)==s(t))return n!==!1&&(this.pos+=t.length),!0}else{var p=this.string.slice(this.pos).match(t);return p&&p.index>0?null:(p&&n!==!1&&(this.pos+=p[0].length),p)}},Xt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Xt.prototype.hideFirstChars=function(t,n){this.lineStart+=t;try{return n()}finally{this.lineStart-=t}},Xt.prototype.lookAhead=function(t){var n=this.lineOracle;return n&&n.lookAhead(t)},Xt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};function Ge(t,n){if(n-=t.first,n<0||n>=t.size)throw new Error("There is no line "+(n+t.first)+" in the document.");for(var l=t;!l.lines;)for(var s=0;;++s){var u=l.children[s],p=u.chunkSize();if(n<p){l=u;break}n-=p}return l.lines[n]}function yi(t,n,l){var s=[],u=n.line;return t.iter(n.line,l.line+1,function(p){var y=p.text;u==l.line&&(y=y.slice(0,l.ch)),u==n.line&&(y=y.slice(n.ch)),s.push(y),++u}),s}function Qi(t,n,l){var s=[];return t.iter(n,l,function(u){s.push(u.text)}),s}function On(t,n){var l=n-t.height;if(l)for(var s=t;s;s=s.parent)s.height+=l}function It(t){if(t.parent==null)return null;for(var n=t.parent,l=Re(n.lines,t),s=n.parent;s;n=s,s=s.parent)for(var u=0;s.children[u]!=n;++u)l+=s.children[u].chunkSize();return l+n.first}function bi(t,n){var l=t.first;e:do{for(var s=0;s<t.children.length;++s){var u=t.children[s],p=u.height;if(n<p){t=u;continue e}n-=p,l+=u.chunkSize()}return l}while(!t.lines);for(var y=0;y<t.lines.length;++y){var x=t.lines[y],C=x.height;if(n<C)break;n-=C}return l+y}function Zi(t,n){return n>=t.first&&n<t.first+t.size}function Pa(t,n){return String(t.lineNumberFormatter(n+t.firstLineNumber))}function T(t,n,l){if(l===void 0&&(l=null),!(this instanceof T))return new T(t,n,l);this.line=t,this.ch=n,this.sticky=l}function $(t,n){return t.line-n.line||t.ch-n.ch}function Pe(t,n){return t.sticky==n.sticky&&$(t,n)==0}function Fe(t){return T(t.line,t.ch)}function it(t,n){return $(t,n)<0?n:t}function wt(t,n){return $(t,n)<0?t:n}function Lt(t,n){return Math.max(t.first,Math.min(n,t.first+t.size-1))}function $e(t,n){if(n.line<t.first)return T(t.first,0);var l=t.first+t.size-1;return n.line>l?T(l,Ge(t,l).text.length):En(n,Ge(t,n.line).text.length)}function En(t,n){var l=t.ch;return l==null||l>n?T(t.line,n):l<0?T(t.line,0):t}function co(t,n){for(var l=[],s=0;s<n.length;s++)l[s]=$e(t,n[s]);return l}var jo=function(t,n){this.state=t,this.lookAhead=n},oi=function(t,n,l,s){this.state=n,this.doc=t,this.line=l,this.maxLookAhead=s||0,this.baseTokens=null,this.baseTokenPos=1};oi.prototype.lookAhead=function(t){var n=this.doc.getLine(this.line+t);return n!=null&&t>this.maxLookAhead&&(this.maxLookAhead=t),n},oi.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},oi.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oi.fromSaved=function(t,n,l){return n instanceof jo?new oi(t,An(t.mode,n.state),l,n.lookAhead):new oi(t,An(t.mode,n),l)},oi.prototype.save=function(t){var n=t!==!1?An(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new jo(n,this.maxLookAhead):n};function ru(t,n,l,s){var u=[t.state.modeGen],p={};iu(t,n.text,t.doc.mode,l,function(P,K){return u.push(P,K)},p,s);for(var y=l.state,x=function(P){l.baseTokens=u;var K=t.state.overlays[P],ne=1,ve=0;l.state=!0,iu(t,n.text,K.mode,l,function(de,Ee){for(var Ae=ne;ve<de;){var Ie=u[ne];Ie>de&&u.splice(ne,1,de,u[ne+1],Ie),ne+=2,ve=Math.min(de,Ie)}if(Ee)if(K.opaque)u.splice(Ae,ne-Ae,de,"overlay "+Ee),ne=Ae+2;else for(;Ae<ne;Ae+=2){var Le=u[Ae+1];u[Ae+1]=(Le?Le+" ":"")+"overlay "+Ee}},p),l.state=y,l.baseTokens=null,l.baseTokenPos=1},C=0;C<t.state.overlays.length;++C)x(C);return{styles:u,classes:p.bgClass||p.textClass?p:null}}function Ws(t,n,l){if(!n.styles||n.styles[0]!=t.state.modeGen){var s=Fa(t,It(n)),u=n.text.length>t.options.maxHighlightLength&&An(t.doc.mode,s.state),p=ru(t,n,s);u&&(s.state=u),n.stateAfter=s.save(!u),n.styles=p.styles,p.classes?n.styleClasses=p.classes:n.styleClasses&&(n.styleClasses=null),l===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return n.styles}function Fa(t,n,l){var s=t.doc,u=t.display;if(!s.mode.startState)return new oi(s,!0,n);var p=nc(t,n,l),y=p>s.first&&Ge(s,p-1).stateAfter,x=y?oi.fromSaved(s,y,p):new oi(s,Vo(s.mode),p);return s.iter(p,n,function(C){Wo(t,C.text,x);var P=x.line;C.stateAfter=P==n-1||P%5==0||P>=u.viewFrom&&P<u.viewTo?x.save():null,x.nextLine()}),l&&(s.modeFrontier=x.line),x}function Wo(t,n,l,s){var u=t.doc.mode,p=new Xt(n,t.options.tabSize,l);for(p.start=p.pos=s||0,n==""&&Un(u,l.state);!p.eol();)xi(u,p,l.state),p.start=p.pos}function Un(t,n){if(t.blankLine)return t.blankLine(n);if(t.innerMode){var l=ka(t,n);if(l.mode.blankLine)return l.mode.blankLine(l.state)}}function xi(t,n,l,s){for(var u=0;u<10;u++){s&&(s[0]=ka(t,l).mode);var p=t.token(n,l);if(n.pos>n.start)return p}throw new Error("Mode "+t.name+" failed to advance stream.")}var Zr=function(t,n,l){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=n||null,this.state=l};function qi(t,n,l,s){var u=t.doc,p=u.mode,y;n=$e(u,n);var x=Ge(u,n.line),C=Fa(t,n.line,l),P=new Xt(x.text,t.options.tabSize,C),K;for(s&&(K=[]);(s||P.pos<n.ch)&&!P.eol();)P.start=P.pos,y=xi(p,P,C.state),s&&K.push(new Zr(P,y,An(u.mode,C.state)));return s?K:new Zr(P,y,C.state)}function nu(t,n){if(t)for(;;){var l=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!l)break;t=t.slice(0,l.index)+t.slice(l.index+l[0].length);var s=l[1]?"bgClass":"textClass";n[s]==null?n[s]=l[2]:new RegExp("(?:^|\\s)"+l[2]+"(?:$|\\s)").test(n[s])||(n[s]+=" "+l[2])}return t}function iu(t,n,l,s,u,p,y){var x=l.flattenSpans;x==null&&(x=t.options.flattenSpans);var C=0,P=null,K=new Xt(n,t.options.tabSize,s),ne,ve=t.options.addModeClass&&[null];for(n==""&&nu(Un(l,s.state),p);!K.eol();){if(K.pos>t.options.maxHighlightLength?(x=!1,y&&Wo(t,n,s,K.pos),K.pos=n.length,ne=null):ne=nu(xi(l,K,s.state,ve),p),ve){var de=ve[0].name;de&&(ne="m-"+(ne?de+" "+ne:de))}if(!x||P!=ne){for(;C<K.start;)C=Math.min(K.start,C+5e3),u(C,P);P=ne}K.start=K.pos}for(;C<K.pos;){var Ee=Math.min(K.pos,C+5e3);u(Ee,P),C=Ee}}function nc(t,n,l){for(var s,u,p=t.doc,y=l?-1:n-(t.doc.mode.innerMode?1e3:100),x=n;x>y;--x){if(x<=p.first)return p.first;var C=Ge(p,x-1),P=C.stateAfter;if(P&&(!l||x+(P instanceof jo?P.lookAhead:0)<=p.modeFrontier))return x;var K=st(C.text,null,t.options.tabSize);(u==null||s>K)&&(u=x-1,s=K)}return u}function au(t,n){if(t.modeFrontier=Math.min(t.modeFrontier,n),!(t.highlightFrontier<n-10)){for(var l=t.first,s=n-1;s>l;s--){var u=Ge(t,s).stateAfter;if(u&&(!(u instanceof jo)||s+u.lookAhead<n)){l=s+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,l)}}var ou=!1,si=!1;function su(){ou=!0}function Ia(){si=!0}function Ho(t,n,l){this.marker=t,this.from=n,this.to=l}function La(t,n){if(t)for(var l=0;l<t.length;++l){var s=t[l];if(s.marker==n)return s}}function Ze(t,n){for(var l,s=0;s<t.length;++s)t[s]!=n&&(l||(l=[])).push(t[s]);return l}function Uo(t,n,l){var s=l&&window.WeakSet&&(l.markedSpans||(l.markedSpans=new WeakSet));s&&t.markedSpans&&s.has(t.markedSpans)?t.markedSpans.push(n):(t.markedSpans=t.markedSpans?t.markedSpans.concat([n]):[n],s&&s.add(t.markedSpans)),n.marker.attachLine(t)}function lu(t,n,l){var s;if(t)for(var u=0;u<t.length;++u){var p=t[u],y=p.marker,x=p.from==null||(y.inclusiveLeft?p.from<=n:p.from<n);if(x||p.from==n&&y.type=="bookmark"&&(!l||!p.marker.insertLeft)){var C=p.to==null||(y.inclusiveRight?p.to>=n:p.to>n);(s||(s=[])).push(new Ho(y,p.from,C?null:p.to))}}return s}function Li(t,n,l){var s;if(t)for(var u=0;u<t.length;++u){var p=t[u],y=p.marker,x=p.to==null||(y.inclusiveRight?p.to>=n:p.to>n);if(x||p.from==n&&y.type=="bookmark"&&(!l||p.marker.insertLeft)){var C=p.from==null||(y.inclusiveLeft?p.from<=n:p.from<n);(s||(s=[])).push(new Ho(y,C?null:p.from-n,p.to==null?null:p.to-n))}}return s}function _o(t,n){if(n.full)return null;var l=Zi(t,n.from.line)&&Ge(t,n.from.line).markedSpans,s=Zi(t,n.to.line)&&Ge(t,n.to.line).markedSpans;if(!l&&!s)return null;var u=n.from.ch,p=n.to.ch,y=$(n.from,n.to)==0,x=lu(l,u,y),C=Li(s,p,y),P=n.text.length==1,K=et(n.text).length+(P?u:0);if(x)for(var ne=0;ne<x.length;++ne){var ve=x[ne];if(ve.to==null){var de=La(C,ve.marker);de?P&&(ve.to=de.to==null?null:de.to+K):ve.to=u}}if(C)for(var Ee=0;Ee<C.length;++Ee){var Ae=C[Ee];if(Ae.to!=null&&(Ae.to+=K),Ae.from==null){var Ie=La(x,Ae.marker);Ie||(Ae.from=K,P&&(x||(x=[])).push(Ae))}else Ae.from+=K,P&&(x||(x=[])).push(Ae)}x&&(x=ea(x)),C&&C!=x&&(C=ea(C));var Le=[x];if(!P){var De=n.text.length-2,Ne;if(De>0&&x)for(var We=0;We<x.length;++We)x[We].to==null&&(Ne||(Ne=[])).push(new Ho(x[We].marker,null,null));for(var Qe=0;Qe<De;++Qe)Le.push(Ne);Le.push(C)}return Le}function ea(t){for(var n=0;n<t.length;++n){var l=t[n];l.from!=null&&l.from==l.to&&l.marker.clearWhenEmpty!==!1&&t.splice(n--,1)}return t.length?t:null}function Hs(t,n,l){var s=null;if(t.iter(n.line,l.line+1,function(de){if(de.markedSpans)for(var Ee=0;Ee<de.markedSpans.length;++Ee){var Ae=de.markedSpans[Ee].marker;Ae.readOnly&&(!s||Re(s,Ae)==-1)&&(s||(s=[])).push(Ae)}}),!s)return null;for(var u=[{from:n,to:l}],p=0;p<s.length;++p)for(var y=s[p],x=y.find(0),C=0;C<u.length;++C){var P=u[C];if(!($(P.to,x.from)<0||$(P.from,x.to)>0)){var K=[C,1],ne=$(P.from,x.from),ve=$(P.to,x.to);(ne<0||!y.inclusiveLeft&&!ne)&&K.push({from:P.from,to:x.from}),(ve>0||!y.inclusiveRight&&!ve)&&K.push({from:x.to,to:P.to}),u.splice.apply(u,K),C+=K.length-3}}return u}function hr(t){var n=t.markedSpans;if(n){for(var l=0;l<n.length;++l)n[l].marker.detachLine(t);t.markedSpans=null}}function po(t,n){if(n){for(var l=0;l<n.length;++l)n[l].marker.attachLine(t);t.markedSpans=n}}function Ma(t){return t.inclusiveLeft?-1:0}function zo(t){return t.inclusiveRight?1:0}function Us(t,n){var l=t.lines.length-n.lines.length;if(l!=0)return l;var s=t.find(),u=n.find(),p=$(s.from,u.from)||Ma(t)-Ma(n);if(p)return-p;var y=$(s.to,u.to)||zo(t)-zo(n);return y||n.id-t.id}function uu(t,n){var l=si&&t.markedSpans,s;if(l)for(var u=void 0,p=0;p<l.length;++p)u=l[p],u.marker.collapsed&&(n?u.from:u.to)==null&&(!s||Us(s,u.marker)<0)&&(s=u.marker);return s}function fu(t){return uu(t,!0)}function Go(t){return uu(t,!1)}function cu(t,n){var l=si&&t.markedSpans,s;if(l)for(var u=0;u<l.length;++u){var p=l[u];p.marker.collapsed&&(p.from==null||p.from<n)&&(p.to==null||p.to>n)&&(!s||Us(s,p.marker)<0)&&(s=p.marker)}return s}function du(t,n,l,s,u){var p=Ge(t,n),y=si&&p.markedSpans;if(y)for(var x=0;x<y.length;++x){var C=y[x];if(C.marker.collapsed){var P=C.marker.find(0),K=$(P.from,l)||Ma(C.marker)-Ma(u),ne=$(P.to,s)||zo(C.marker)-zo(u);if(!(K>=0&&ne<=0||K<=0&&ne>=0)&&(K<=0&&(C.marker.inclusiveRight&&u.inclusiveLeft?$(P.to,l)>=0:$(P.to,l)>0)||K>=0&&(C.marker.inclusiveRight&&u.inclusiveLeft?$(P.from,s)<=0:$(P.from,s)<0)))return!0}}}function _n(t){for(var n;n=fu(t);)t=n.find(-1,!0).line;return t}function ic(t){for(var n;n=Go(t);)t=n.find(1,!0).line;return t}function ac(t){for(var n,l;n=Go(t);)t=n.find(1,!0).line,(l||(l=[])).push(t);return l}function Mi(t,n){var l=Ge(t,n),s=_n(l);return l==s?n:It(s)}function pu(t,n){if(n>t.lastLine())return n;var l=Ge(t,n),s;if(!Si(t,l))return n;for(;s=Go(l);)l=s.find(1,!0).line;return It(l)+1}function Si(t,n){var l=si&&n.markedSpans;if(l){for(var s=void 0,u=0;u<l.length;++u)if(s=l[u],!!s.marker.collapsed){if(s.from==null)return!0;if(!s.marker.widgetNode&&s.from==0&&s.marker.inclusiveLeft&&_s(t,n,s))return!0}}}function _s(t,n,l){if(l.to==null){var s=l.marker.find(1,!0);return _s(t,s.line,La(s.line.markedSpans,l.marker))}if(l.marker.inclusiveRight&&l.to==n.text.length)return!0;for(var u=void 0,p=0;p<n.markedSpans.length;++p)if(u=n.markedSpans[p],u.marker.collapsed&&!u.marker.widgetNode&&u.from==l.to&&(u.to==null||u.to!=l.from)&&(u.marker.inclusiveLeft||l.marker.inclusiveRight)&&_s(t,n,u))return!0}function wi(t){t=_n(t);for(var n=0,l=t.parent,s=0;s<l.lines.length;++s){var u=l.lines[s];if(u==t)break;n+=u.height}for(var p=l.parent;p;l=p,p=l.parent)for(var y=0;y<p.children.length;++y){var x=p.children[y];if(x==l)break;n+=x.height}return n}function $o(t){if(t.height==0)return 0;for(var n=t.text.length,l,s=t;l=fu(s);){var u=l.find(0,!0);s=u.from.line,n+=u.from.ch-u.to.ch}for(s=t;l=Go(s);){var p=l.find(0,!0);n-=s.text.length-p.from.ch,s=p.to.line,n+=s.text.length-p.to.ch}return n}function zs(t){var n=t.display,l=t.doc;n.maxLine=Ge(l,l.first),n.maxLineLength=$o(n.maxLine),n.maxLineChanged=!0,l.iter(function(s){var u=$o(s);u>n.maxLineLength&&(n.maxLineLength=u,n.maxLine=s)})}var ta=function(t,n,l){this.text=t,po(this,n),this.height=l?l(this):1};ta.prototype.lineNo=function(){return It(this)},Gr(ta);function hu(t,n,l,s){t.text=n,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),t.order!=null&&(t.order=null),hr(t),po(t,l);var u=s?s(t):1;u!=t.height&&On(t,u)}function vu(t){t.parent=null,hr(t)}var Gs={},oc={};function Na(t,n){if(!t||/^\s*$/.test(t))return null;var l=n.addModeClass?oc:Gs;return l[t]||(l[t]=t.replace(/\S+/g,"cm-$&"))}function gu(t,n){var l=ye("span",null,null,X?"padding-right: .1px":null),s={pre:ye("pre",[l],"CodeMirror-line"),content:l,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};n.measure={};for(var u=0;u<=(n.rest?n.rest.length:0);u++){var p=u?n.rest[u-1]:n.line,y=void 0;s.pos=0,s.addToken=lc,mi(t.display.measure)&&(y=tt(p,t.doc.direction))&&(s.addToken=$s(s.addToken,y)),s.map=[];var x=n!=t.display.externalMeasured&&It(p);fc(p,s,Ws(t,p,x)),p.styleClasses&&(p.styleClasses.bgClass&&(s.bgClass=vt(p.styleClasses.bgClass,s.bgClass||"")),p.styleClasses.textClass&&(s.textClass=vt(p.styleClasses.textClass,s.textClass||""))),s.map.length==0&&s.map.push(0,0,s.content.appendChild(ii(t.display.measure))),u==0?(n.measure.map=s.map,n.measure.cache={}):((n.measure.maps||(n.measure.maps=[])).push(s.map),(n.measure.caches||(n.measure.caches=[])).push({}))}if(X){var C=s.content.lastChild;(/\bcm-tab\b/.test(C.className)||C.querySelector&&C.querySelector(".cm-tab"))&&(s.content.className="cm-tab-wrap-hack")}return nt(t,"renderLine",t,n.line,s.pre),s.pre.className&&(s.textClass=vt(s.pre.className,s.textClass||"")),s}function sc(t){var n=Q("span","\u2022","cm-invalidchar");return n.title="\\u"+t.charCodeAt(0).toString(16),n.setAttribute("aria-label",n.title),n}function lc(t,n,l,s,u,p,y){if(n){var x=t.splitSpaces?uc(n,t.trailingSpace):n,C=t.cm.state.specialChars,P=!1,K;if(!C.test(n))t.col+=n.length,K=document.createTextNode(x),t.map.push(t.pos,t.pos+n.length,K),R&&V<9&&(P=!0),t.pos+=n.length;else{K=document.createDocumentFragment();for(var ne=0;;){C.lastIndex=ne;var ve=C.exec(n),de=ve?ve.index-ne:n.length-ne;if(de){var Ee=document.createTextNode(x.slice(ne,ne+de));R&&V<9?K.appendChild(Q("span",[Ee])):K.appendChild(Ee),t.map.push(t.pos,t.pos+de,Ee),t.col+=de,t.pos+=de}if(!ve)break;ne+=de+1;var Ae=void 0;if(ve[0]==" "){var Ie=t.cm.options.tabSize,Le=Ie-t.col%Ie;Ae=K.appendChild(Q("span",kr(Le),"cm-tab")),Ae.setAttribute("role","presentation"),Ae.setAttribute("cm-text"," "),t.col+=Le}else ve[0]=="\r"||ve[0]==`
17
- `?(Ae=K.appendChild(Q("span",ve[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ae.setAttribute("cm-text",ve[0]),t.col+=1):(Ae=t.cm.options.specialCharPlaceholder(ve[0]),Ae.setAttribute("cm-text",ve[0]),R&&V<9?K.appendChild(Q("span",[Ae])):K.appendChild(Ae),t.col+=1);t.map.push(t.pos,t.pos+1,Ae),t.pos++}}if(t.trailingSpace=x.charCodeAt(n.length-1)==32,l||s||u||P||p||y){var De=l||"";s&&(De+=s),u&&(De+=u);var Ne=Q("span",[K],De,p);if(y)for(var We in y)y.hasOwnProperty(We)&&We!="style"&&We!="class"&&Ne.setAttribute(We,y[We]);return t.content.appendChild(Ne)}t.content.appendChild(K)}}function uc(t,n){if(t.length>1&&!/ /.test(t))return t;for(var l=n,s="",u=0;u<t.length;u++){var p=t.charAt(u);p==" "&&l&&(u==t.length-1||t.charCodeAt(u+1)==32)&&(p="\xA0"),s+=p,l=p==" "}return s}function $s(t,n){return function(l,s,u,p,y,x,C){u=u?u+" cm-force-border":"cm-force-border";for(var P=l.pos,K=P+s.length;;){for(var ne=void 0,ve=0;ve<n.length&&(ne=n[ve],!(ne.to>P&&ne.from<=P));ve++);if(ne.to>=K)return t(l,s,u,p,y,x,C);t(l,s.slice(0,ne.to-P),u,p,null,x,C),p=null,s=s.slice(ne.to-P),P=ne.to}}}function mu(t,n,l,s){var u=!s&&l.widgetNode;u&&t.map.push(t.pos,t.pos+n,u),!s&&t.cm.display.input.needsContentAttribute&&(u||(u=t.content.appendChild(document.createElement("span"))),u.setAttribute("cm-marker",l.id)),u&&(t.cm.display.input.setUneditable(u),t.content.appendChild(u)),t.pos+=n,t.trailingSpace=!1}function fc(t,n,l){var s=t.markedSpans,u=t.text,p=0;if(!s){for(var y=1;y<l.length;y+=2)n.addToken(n,u.slice(p,p=l[y]),Na(l[y+1],n.cm.options));return}for(var x=u.length,C=0,P=1,K="",ne,ve,de=0,Ee,Ae,Ie,Le,De;;){if(de==C){Ee=Ae=Ie=ve="",De=null,Le=null,de=1/0;for(var Ne=[],We=void 0,Qe=0;Qe<s.length;++Qe){var Ke=s[Qe],bt=Ke.marker;if(bt.type=="bookmark"&&Ke.from==C&&bt.widgetNode)Ne.push(bt);else if(Ke.from<=C&&(Ke.to==null||Ke.to>C||bt.collapsed&&Ke.to==C&&Ke.from==C)){if(Ke.to!=null&&Ke.to!=C&&de>Ke.to&&(de=Ke.to,Ae=""),bt.className&&(Ee+=" "+bt.className),bt.css&&(ve=(ve?ve+";":"")+bt.css),bt.startStyle&&Ke.from==C&&(Ie+=" "+bt.startStyle),bt.endStyle&&Ke.to==de&&(We||(We=[])).push(bt.endStyle,Ke.to),bt.title&&((De||(De={})).title=bt.title),bt.attributes)for(var $t in bt.attributes)(De||(De={}))[$t]=bt.attributes[$t];bt.collapsed&&(!Le||Us(Le.marker,bt)<0)&&(Le=Ke)}else Ke.from>C&&de>Ke.from&&(de=Ke.from)}if(We)for(var wr=0;wr<We.length;wr+=2)We[wr+1]==de&&(Ae+=" "+We[wr]);if(!Le||Le.from==C)for(var rr=0;rr<Ne.length;++rr)mu(n,0,Ne[rr]);if(Le&&(Le.from||0)==C){if(mu(n,(Le.to==null?x+1:Le.to)-C,Le.marker,Le.from==null),Le.to==null)return;Le.to==C&&(Le=!1)}}if(C>=x)break;for(var Sn=Math.min(x,de);;){if(K){var fn=C+K.length;if(!Le){var vr=fn>Sn?K.slice(0,Sn-C):K;n.addToken(n,vr,ne?ne+Ee:Ee,Ie,C+vr.length==de?Ae:"",ve,De)}if(fn>=Sn){K=K.slice(Sn-C),C=Sn;break}C=fn,Ie=""}K=u.slice(p,p=l[P++]),ne=Na(l[P++],n.cm.options)}}}function yu(t,n,l){this.line=n,this.rest=ac(n),this.size=this.rest?It(et(this.rest))-l+1:1,this.node=this.text=null,this.hidden=Si(t,n)}function Ko(t,n,l){for(var s=[],u,p=n;p<l;p=u){var y=new yu(t.doc,Ge(t.doc,p),p);u=p+y.size,s.push(y)}return s}var ra=null;function cc(t){ra?ra.ops.push(t):t.ownsGroup=ra={ops:[t],delayedCallbacks:[]}}function Yo(t){var n=t.delayedCallbacks,l=0;do{for(;l<n.length;l++)n[l].call(null);for(var s=0;s<t.ops.length;s++){var u=t.ops[s];if(u.cursorActivityHandlers)for(;u.cursorActivityCalled<u.cursorActivityHandlers.length;)u.cursorActivityHandlers[u.cursorActivityCalled++].call(null,u.cm)}}while(l<n.length)}function dc(t,n){var l=t.ownsGroup;if(l)try{Yo(l)}finally{ra=null,n(l)}}var ho=null;function yr(t,n){var l=we(t,n);if(l.length){var s=Array.prototype.slice.call(arguments,2),u;ra?u=ra.delayedCallbacks:ho?u=ho:(u=ho=[],setTimeout(pc,0));for(var p=function(x){u.push(function(){return l[x].apply(null,s)})},y=0;y<l.length;++y)p(y)}}function pc(){var t=ho;ho=null;for(var n=0;n<t.length;++n)t[n]()}function Ks(t,n,l,s){for(var u=0;u<n.changes.length;u++){var p=n.changes[u];p=="text"?vc(t,n):p=="gutter"?Br(t,n,l,s):p=="class"?Xo(t,n):p=="widget"&&gc(t,n,s)}n.changes=null}function Ra(t){return t.node==t.text&&(t.node=Q("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),R&&V<8&&(t.node.style.zIndex=2)),t.node}function hc(t,n){var l=n.bgClass?n.bgClass+" "+(n.line.bgClass||""):n.line.bgClass;if(l&&(l+=" CodeMirror-linebackground"),n.background)l?n.background.className=l:(n.background.parentNode.removeChild(n.background),n.background=null);else if(l){var s=Ra(n);n.background=s.insertBefore(Q("div",null,l),s.firstChild),t.display.input.setUneditable(n.background)}}function Ys(t,n){var l=t.display.externalMeasured;return l&&l.line==n.line?(t.display.externalMeasured=null,n.measure=l.measure,l.built):gu(t,n)}function vc(t,n){var l=n.text.className,s=Ys(t,n);n.text==n.node&&(n.node=s.pre),n.text.parentNode.replaceChild(s.pre,n.text),n.text=s.pre,s.bgClass!=n.bgClass||s.textClass!=n.textClass?(n.bgClass=s.bgClass,n.textClass=s.textClass,Xo(t,n)):l&&(n.text.className=l)}function Xo(t,n){hc(t,n),n.line.wrapClass?Ra(n).className=n.line.wrapClass:n.node!=n.text&&(n.node.className="");var l=n.textClass?n.textClass+" "+(n.line.textClass||""):n.line.textClass;n.text.className=l||""}function Br(t,n,l,s){if(n.gutter&&(n.node.removeChild(n.gutter),n.gutter=null),n.gutterBackground&&(n.node.removeChild(n.gutterBackground),n.gutterBackground=null),n.line.gutterClass){var u=Ra(n);n.gutterBackground=Q("div",null,"CodeMirror-gutter-background "+n.line.gutterClass,"left: "+(t.options.fixedGutter?s.fixedPos:-s.gutterTotalWidth)+"px; width: "+s.gutterTotalWidth+"px"),t.display.input.setUneditable(n.gutterBackground),u.insertBefore(n.gutterBackground,n.text)}var p=n.line.gutterMarkers;if(t.options.lineNumbers||p){var y=Ra(n),x=n.gutter=Q("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?s.fixedPos:-s.gutterTotalWidth)+"px");if(x.setAttribute("aria-hidden","true"),t.display.input.setUneditable(x),y.insertBefore(x,n.text),n.line.gutterClass&&(x.className+=" "+n.line.gutterClass),t.options.lineNumbers&&(!p||!p["CodeMirror-linenumbers"])&&(n.lineNumber=x.appendChild(Q("div",Pa(t.options,l),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+s.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),p)for(var C=0;C<t.display.gutterSpecs.length;++C){var P=t.display.gutterSpecs[C].className,K=p.hasOwnProperty(P)&&p[P];K&&x.appendChild(Q("div",[K],"CodeMirror-gutter-elt","left: "+s.gutterLeft[P]+"px; width: "+s.gutterWidth[P]+"px"))}}}function gc(t,n,l){n.alignable&&(n.alignable=null);for(var s=z("CodeMirror-linewidget"),u=n.node.firstChild,p=void 0;u;u=p)p=u.nextSibling,s.test(u.className)&&n.node.removeChild(u);bu(t,n,l)}function mc(t,n,l,s){var u=Ys(t,n);return n.text=n.node=u.pre,u.bgClass&&(n.bgClass=u.bgClass),u.textClass&&(n.textClass=u.textClass),Xo(t,n),Br(t,n,l,s),bu(t,n,s),n.node}function bu(t,n,l){if(xu(t,n.line,n,l,!0),n.rest)for(var s=0;s<n.rest.length;s++)xu(t,n.rest[s],n,l,!1)}function xu(t,n,l,s,u){if(n.widgets)for(var p=Ra(l),y=0,x=n.widgets;y<x.length;++y){var C=x[y],P=Q("div",[C.node],"CodeMirror-linewidget"+(C.className?" "+C.className:""));C.handleMouseEvents||P.setAttribute("cm-ignore-events","true"),yc(C,P,l,s),t.display.input.setUneditable(P),u&&C.above?p.insertBefore(P,l.gutter||l.text):p.appendChild(P),yr(C,"redraw")}}function yc(t,n,l,s){if(t.noHScroll){(l.alignable||(l.alignable=[])).push(n);var u=s.wrapperWidth;n.style.left=s.fixedPos+"px",t.coverGutter||(u-=s.gutterTotalWidth,n.style.paddingLeft=s.gutterTotalWidth+"px"),n.style.width=u+"px"}t.coverGutter&&(n.style.zIndex=5,n.style.position="relative",t.noHScroll||(n.style.marginLeft=-s.gutterTotalWidth+"px"))}function Ci(t){if(t.height!=null)return t.height;var n=t.doc.cm;if(!n)return 0;if(!je(document.body,t.node)){var l="position: relative;";t.coverGutter&&(l+="margin-left: -"+n.display.gutters.offsetWidth+"px;"),t.noHScroll&&(l+="width: "+n.display.wrapper.clientWidth+"px;"),xe(n.display.measure,Q("div",[t.node],null,l))}return t.height=t.node.parentNode.offsetHeight}function Ai(t,n){for(var l=Rr(n);l!=t.wrapper;l=l.parentNode)if(!l||l.nodeType==1&&l.getAttribute("cm-ignore-events")=="true"||l.parentNode==t.sizer&&l!=t.mover)return!0}function vo(t){return t.lineSpace.offsetTop}function go(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function Su(t){if(t.cachedPaddingH)return t.cachedPaddingH;var n=xe(t.measure,Q("pre","x","CodeMirror-line-like")),l=window.getComputedStyle?window.getComputedStyle(n):n.currentStyle,s={left:parseInt(l.paddingLeft),right:parseInt(l.paddingRight)};return!isNaN(s.left)&&!isNaN(s.right)&&(t.cachedPaddingH=s),s}function gn(t){return Be-t.display.nativeBarWidth}function zn(t){return t.display.scroller.clientWidth-gn(t)-t.display.barWidth}function Jo(t){return t.display.scroller.clientHeight-gn(t)-t.display.barHeight}function wu(t,n,l){var s=t.options.lineWrapping,u=s&&zn(t);if(!n.measure.heights||s&&n.measure.width!=u){var p=n.measure.heights=[];if(s){n.measure.width=u;for(var y=n.text.firstChild.getClientRects(),x=0;x<y.length-1;x++){var C=y[x],P=y[x+1];Math.abs(C.bottom-P.bottom)>2&&p.push((C.bottom+P.top)/2-l.top)}}p.push(l.bottom-l.top)}}function Cu(t,n,l){if(t.line==n)return{map:t.measure.map,cache:t.measure.cache};if(t.rest){for(var s=0;s<t.rest.length;s++)if(t.rest[s]==n)return{map:t.measure.maps[s],cache:t.measure.caches[s]};for(var u=0;u<t.rest.length;u++)if(It(t.rest[u])>l)return{map:t.measure.maps[u],cache:t.measure.caches[u],before:!0}}}function bc(t,n){n=_n(n);var l=It(n),s=t.display.externalMeasured=new yu(t.doc,n,l);s.lineN=l;var u=s.built=gu(t,s);return s.text=u.pre,xe(t.display.lineMeasure,u.pre),s}function Da(t,n,l,s){return Tn(t,na(t,n),l,s)}function Qo(t,n){if(n>=t.display.viewFrom&&n<t.display.viewTo)return t.display.view[oa(t,n)];var l=t.display.externalMeasured;if(l&&n>=l.lineN&&n<l.lineN+l.size)return l}function na(t,n){var l=It(n),s=Qo(t,l);s&&!s.text?s=null:s&&s.changes&&(Ks(t,s,l,il(t)),t.curOp.forceUpdate=!0),s||(s=bc(t,n));var u=Cu(s,n,l);return{line:n,view:s,rect:null,map:u.map,cache:u.cache,before:u.before,hasHeights:!1}}function Tn(t,n,l,s,u){n.before&&(l=-1);var p=l+(s||""),y;return n.cache.hasOwnProperty(p)?y=n.cache[p]:(n.rect||(n.rect=n.view.text.getBoundingClientRect()),n.hasHeights||(wu(t,n.view,n.rect),n.hasHeights=!0),y=xc(t,n,l,s),y.bogus||(n.cache[p]=y)),{left:y.left,right:y.right,top:u?y.rtop:y.top,bottom:u?y.rbottom:y.bottom}}var Xs={left:0,right:0,top:0,bottom:0};function Js(t,n,l){for(var s,u,p,y,x,C,P=0;P<t.length;P+=3)if(x=t[P],C=t[P+1],n<x?(u=0,p=1,y="left"):n<C?(u=n-x,p=u+1):(P==t.length-3||n==C&&t[P+3]>n)&&(p=C-x,u=p-1,n>=C&&(y="right")),u!=null){if(s=t[P+2],x==C&&l==(s.insertLeft?"left":"right")&&(y=l),l=="left"&&u==0)for(;P&&t[P-2]==t[P-3]&&t[P-1].insertLeft;)s=t[(P-=3)+2],y="left";if(l=="right"&&u==C-x)for(;P<t.length-3&&t[P+3]==t[P+4]&&!t[P+5].insertLeft;)s=t[(P+=3)+2],y="right";break}return{node:s,start:u,end:p,collapse:y,coverStart:x,coverEnd:C}}function Ba(t,n){var l=Xs;if(n=="left")for(var s=0;s<t.length&&(l=t[s]).left==l.right;s++);else for(var u=t.length-1;u>=0&&(l=t[u]).left==l.right;u--);return l}function xc(t,n,l,s){var u=Js(n.map,l,s),p=u.node,y=u.start,x=u.end,C=u.collapse,P;if(p.nodeType==3){for(var K=0;K<4;K++){for(;y&&jn(n.line.text.charAt(u.coverStart+y));)--y;for(;u.coverStart+x<u.coverEnd&&jn(n.line.text.charAt(u.coverStart+x));)++x;if(R&&V<9&&y==0&&x==u.coverEnd-u.coverStart?P=p.parentNode.getBoundingClientRect():P=Ba(ie(p,y,x).getClientRects(),s),P.left||P.right||y==0)break;x=y,y=y-1,C="right"}R&&V<11&&(P=Sc(t.display.measure,P))}else{y>0&&(C=s="right");var ne;t.options.lineWrapping&&(ne=p.getClientRects()).length>1?P=ne[s=="right"?ne.length-1:0]:P=p.getBoundingClientRect()}if(R&&V<9&&!y&&(!P||!P.left&&!P.right)){var ve=p.parentNode.getClientRects()[0];ve?P={left:ve.left,right:ve.left+ja(t.display),top:ve.top,bottom:ve.bottom}:P=Xs}for(var de=P.top-n.rect.top,Ee=P.bottom-n.rect.top,Ae=(de+Ee)/2,Ie=n.view.measure.heights,Le=0;Le<Ie.length-1&&!(Ae<Ie[Le]);Le++);var De=Le?Ie[Le-1]:0,Ne=Ie[Le],We={left:(C=="right"?P.right:P.left)-n.rect.left,right:(C=="left"?P.left:P.right)-n.rect.left,top:De,bottom:Ne};return!P.left&&!P.right&&(We.bogus=!0),t.options.singleCursorHeightPerLine||(We.rtop=de,We.rbottom=Ee),We}function Sc(t,n){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Jr(t))return n;var l=screen.logicalXDPI/screen.deviceXDPI,s=screen.logicalYDPI/screen.deviceYDPI;return{left:n.left*l,right:n.right*l,top:n.top*s,bottom:n.bottom*s}}function Qs(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var n=0;n<t.rest.length;n++)t.measure.caches[n]={}}function Zs(t){t.display.externalMeasure=null,pe(t.display.lineMeasure);for(var n=0;n<t.display.view.length;n++)Qs(t.display.view[n])}function mo(t){Zs(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function qs(t){return re&&D?-(t.body.getBoundingClientRect().left-parseInt(getComputedStyle(t.body).marginLeft)):t.defaultView.pageXOffset||(t.documentElement||t.body).scrollLeft}function Au(t){return re&&D?-(t.body.getBoundingClientRect().top-parseInt(getComputedStyle(t.body).marginTop)):t.defaultView.pageYOffset||(t.documentElement||t.body).scrollTop}function el(t){var n=_n(t),l=n.widgets,s=0;if(l)for(var u=0;u<l.length;++u)l[u].above&&(s+=Ci(l[u]));return s}function yo(t,n,l,s,u){if(!u){var p=el(n);l.top+=p,l.bottom+=p}if(s=="line")return l;s||(s="local");var y=wi(n);if(s=="local"?y+=vo(t.display):y-=t.display.viewOffset,s=="page"||s=="window"){var x=t.display.lineSpace.getBoundingClientRect();y+=x.top+(s=="window"?0:Au(ut(t)));var C=x.left+(s=="window"?0:qs(ut(t)));l.left+=C,l.right+=C}return l.top+=y,l.bottom+=y,l}function Ou(t,n,l){if(l=="div")return n;var s=n.left,u=n.top;if(l=="page")s-=qs(ut(t)),u-=Au(ut(t));else if(l=="local"||!l){var p=t.display.sizer.getBoundingClientRect();s+=p.left,u+=p.top}var y=t.display.lineSpace.getBoundingClientRect();return{left:s-y.left,top:u-y.top}}function Zo(t,n,l,s,u){return s||(s=Ge(t.doc,n.line)),yo(t,s,Da(t,s,n.ch,u),l)}function kn(t,n,l,s,u,p){s=s||Ge(t.doc,n.line),u||(u=na(t,s));function y(Ee,Ae){var Ie=Tn(t,u,Ee,Ae?"right":"left",p);return Ae?Ie.left=Ie.right:Ie.right=Ie.left,yo(t,s,Ie,l)}var x=tt(s,t.doc.direction),C=n.ch,P=n.sticky;if(C>=s.text.length?(C=s.text.length,P="before"):C<=0&&(C=0,P="after"),!x)return y(P=="before"?C-1:C,P=="before");function K(Ee,Ae,Ie){var Le=x[Ae],De=Le.level==1;return y(Ie?Ee-1:Ee,De!=Ie)}var ne=St(x,C,P),ve=Gt,de=K(C,ne,P=="before");return ve!=null&&(de.other=K(C,ve,P!="before")),de}function li(t,n){var l=0;n=$e(t.doc,n),t.options.lineWrapping||(l=ja(t.display)*n.ch);var s=Ge(t.doc,n.line),u=wi(s)+vo(t.display);return{left:l,right:l,top:u,bottom:u+s.height}}function tl(t,n,l,s,u){var p=T(t,n,l);return p.xRel=u,s&&(p.outside=s),p}function bo(t,n,l){var s=t.doc;if(l+=t.display.viewOffset,l<0)return tl(s.first,0,null,-1,-1);var u=bi(s,l),p=s.first+s.size-1;if(u>p)return tl(s.first+s.size-1,Ge(s,p).text.length,null,1,1);n<0&&(n=0);for(var y=Ge(s,u);;){var x=nl(t,y,u,n,l),C=cu(y,x.ch+(x.xRel>0||x.outside>0?1:0));if(!C)return x;var P=C.find(1);if(P.line==u)return P;y=Ge(s,u=P.line)}}function Eu(t,n,l,s){s-=el(n);var u=n.text.length,p=Mr(function(y){return Tn(t,l,y-1).bottom<=s},u,0);return u=Mr(function(y){return Tn(t,l,y).top>s},p,u),{begin:p,end:u}}function Tu(t,n,l,s){l||(l=na(t,n));var u=yo(t,n,Tn(t,l,s),"line").top;return Eu(t,n,l,u)}function rl(t,n,l,s){return t.bottom<=l?!1:t.top>l?!0:(s?t.left:t.right)>n}function nl(t,n,l,s,u){u-=wi(n);var p=na(t,n),y=el(n),x=0,C=n.text.length,P=!0,K=tt(n,t.doc.direction);if(K){var ne=(t.options.lineWrapping?Cc:wc)(t,n,l,p,K,s,u);P=ne.level!=1,x=P?ne.from:ne.to-1,C=P?ne.to:ne.from-1}var ve=null,de=null,Ee=Mr(function(Qe){var Ke=Tn(t,p,Qe);return Ke.top+=y,Ke.bottom+=y,rl(Ke,s,u,!1)?(Ke.top<=u&&Ke.left<=s&&(ve=Qe,de=Ke),!0):!1},x,C),Ae,Ie,Le=!1;if(de){var De=s-de.left<de.right-s,Ne=De==P;Ee=ve+(Ne?0:1),Ie=Ne?"after":"before",Ae=De?de.left:de.right}else{!P&&(Ee==C||Ee==x)&&Ee++,Ie=Ee==0?"after":Ee==n.text.length?"before":Tn(t,p,Ee-(P?1:0)).bottom+y<=u==P?"after":"before";var We=kn(t,T(l,Ee,Ie),"line",n,p);Ae=We.left,Le=u<We.top?-1:u>=We.bottom?1:0}return Ee=an(n.text,Ee,1),tl(l,Ee,Ie,Le,s-Ae)}function wc(t,n,l,s,u,p,y){var x=Mr(function(ne){var ve=u[ne],de=ve.level!=1;return rl(kn(t,T(l,de?ve.to:ve.from,de?"before":"after"),"line",n,s),p,y,!0)},0,u.length-1),C=u[x];if(x>0){var P=C.level!=1,K=kn(t,T(l,P?C.from:C.to,P?"after":"before"),"line",n,s);rl(K,p,y,!0)&&K.top>y&&(C=u[x-1])}return C}function Cc(t,n,l,s,u,p,y){var x=Eu(t,n,s,y),C=x.begin,P=x.end;/\s/.test(n.text.charAt(P-1))&&P--;for(var K=null,ne=null,ve=0;ve<u.length;ve++){var de=u[ve];if(!(de.from>=P||de.to<=C)){var Ee=de.level!=1,Ae=Tn(t,s,Ee?Math.min(P,de.to)-1:Math.max(C,de.from)).right,Ie=Ae<p?p-Ae+1e9:Ae-p;(!K||ne>Ie)&&(K=de,ne=Ie)}}return K||(K=u[u.length-1]),K.from<C&&(K={from:C,to:K.to,level:K.level}),K.to>P&&(K={from:K.from,to:P,level:K.level}),K}var ia;function Va(t){if(t.cachedTextHeight!=null)return t.cachedTextHeight;if(ia==null){ia=Q("pre",null,"CodeMirror-line-like");for(var n=0;n<49;++n)ia.appendChild(document.createTextNode("x")),ia.appendChild(Q("br"));ia.appendChild(document.createTextNode("x"))}xe(t.measure,ia);var l=ia.offsetHeight/50;return l>3&&(t.cachedTextHeight=l),pe(t.measure),l||1}function ja(t){if(t.cachedCharWidth!=null)return t.cachedCharWidth;var n=Q("span","xxxxxxxxxx"),l=Q("pre",[n],"CodeMirror-line-like");xe(t.measure,l);var s=n.getBoundingClientRect(),u=(s.right-s.left)/10;return u>2&&(t.cachedCharWidth=u),u||10}function il(t){for(var n=t.display,l={},s={},u=n.gutters.clientLeft,p=n.gutters.firstChild,y=0;p;p=p.nextSibling,++y){var x=t.display.gutterSpecs[y].className;l[x]=p.offsetLeft+p.clientLeft+u,s[x]=p.clientWidth}return{fixedPos:al(n),gutterTotalWidth:n.gutters.offsetWidth,gutterLeft:l,gutterWidth:s,wrapperWidth:n.wrapper.clientWidth}}function al(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function ku(t){var n=Va(t.display),l=t.options.lineWrapping,s=l&&Math.max(5,t.display.scroller.clientWidth/ja(t.display)-3);return function(u){if(Si(t.doc,u))return 0;var p=0;if(u.widgets)for(var y=0;y<u.widgets.length;y++)u.widgets[y].height&&(p+=u.widgets[y].height);return l?p+(Math.ceil(u.text.length/s)||1)*n:p+n}}function ol(t){var n=t.doc,l=ku(t);n.iter(function(s){var u=l(s);u!=s.height&&On(s,u)})}function aa(t,n,l,s){var u=t.display;if(!l&&Rr(n).getAttribute("cm-not-content")=="true")return null;var p,y,x=u.lineSpace.getBoundingClientRect();try{p=n.clientX-x.left,y=n.clientY-x.top}catch(ne){return null}var C=bo(t,p,y),P;if(s&&C.xRel>0&&(P=Ge(t.doc,C.line).text).length==C.ch){var K=st(P,P.length,t.options.tabSize)-P.length;C=T(C.line,Math.max(0,Math.round((p-Su(t.display).left)/ja(t.display))-K))}return C}function oa(t,n){if(n>=t.display.viewTo||(n-=t.display.viewFrom,n<0))return null;for(var l=t.display.view,s=0;s<l.length;s++)if(n-=l[s].size,n<0)return s}function qr(t,n,l,s){n==null&&(n=t.doc.first),l==null&&(l=t.doc.first+t.doc.size),s||(s=0);var u=t.display;if(s&&l<u.viewTo&&(u.updateLineNumbers==null||u.updateLineNumbers>n)&&(u.updateLineNumbers=n),t.curOp.viewChanged=!0,n>=u.viewTo)si&&Mi(t.doc,n)<u.viewTo&&Ri(t);else if(l<=u.viewFrom)si&&pu(t.doc,l+s)>u.viewFrom?Ri(t):(u.viewFrom+=s,u.viewTo+=s);else if(n<=u.viewFrom&&l>=u.viewTo)Ri(t);else if(n<=u.viewFrom){var p=qo(t,l,l+s,1);p?(u.view=u.view.slice(p.index),u.viewFrom=p.lineN,u.viewTo+=s):Ri(t)}else if(l>=u.viewTo){var y=qo(t,n,n,-1);y?(u.view=u.view.slice(0,y.index),u.viewTo=y.lineN):Ri(t)}else{var x=qo(t,n,n,-1),C=qo(t,l,l+s,1);x&&C?(u.view=u.view.slice(0,x.index).concat(Ko(t,x.lineN,C.lineN)).concat(u.view.slice(C.index)),u.viewTo+=s):Ri(t)}var P=u.externalMeasured;P&&(l<P.lineN?P.lineN+=s:n<P.lineN+P.size&&(u.externalMeasured=null))}function Ni(t,n,l){t.curOp.viewChanged=!0;var s=t.display,u=t.display.externalMeasured;if(u&&n>=u.lineN&&n<u.lineN+u.size&&(s.externalMeasured=null),!(n<s.viewFrom||n>=s.viewTo)){var p=s.view[oa(t,n)];if(p.node!=null){var y=p.changes||(p.changes=[]);Re(y,l)==-1&&y.push(l)}}}function Ri(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function qo(t,n,l,s){var u=oa(t,n),p,y=t.display.view;if(!si||l==t.doc.first+t.doc.size)return{index:u,lineN:l};for(var x=t.display.viewFrom,C=0;C<u;C++)x+=y[C].size;if(x!=n){if(s>0){if(u==y.length-1)return null;p=x+y[u].size-n,u++}else p=x-n;n+=p,l+=p}for(;Mi(t.doc,l)!=l;){if(u==(s<0?0:y.length-1))return null;l+=s*y[u-(s<0?1:0)].size,u+=s}return{index:u,lineN:l}}function Ac(t,n,l){var s=t.display,u=s.view;u.length==0||n>=s.viewTo||l<=s.viewFrom?(s.view=Ko(t,n,l),s.viewFrom=n):(s.viewFrom>n?s.view=Ko(t,n,s.viewFrom).concat(s.view):s.viewFrom<n&&(s.view=s.view.slice(oa(t,n))),s.viewFrom=n,s.viewTo<l?s.view=s.view.concat(Ko(t,s.viewTo,l)):s.viewTo>l&&(s.view=s.view.slice(0,oa(t,l)))),s.viewTo=l}function Pu(t){for(var n=t.display.view,l=0,s=0;s<n.length;s++){var u=n[s];!u.hidden&&(!u.node||u.changes)&&++l}return l}function Wa(t){t.display.input.showSelection(t.display.input.prepareSelection())}function xo(t,n){n===void 0&&(n=!0);var l=t.doc,s={},u=s.cursors=document.createDocumentFragment(),p=s.selection=document.createDocumentFragment(),y=t.options.$customCursor;y&&(n=!0);for(var x=0;x<l.sel.ranges.length;x++)if(!(!n&&x==l.sel.primIndex)){var C=l.sel.ranges[x];if(!(C.from().line>=t.display.viewTo||C.to().line<t.display.viewFrom)){var P=C.empty();if(y){var K=y(t,C);K&&es(t,K,u)}else(P||t.options.showCursorWhenSelecting)&&es(t,C.head,u);P||Oc(t,C,p)}}return s}function es(t,n,l){var s=kn(t,n,"div",null,null,!t.options.singleCursorHeightPerLine),u=l.appendChild(Q("div","\xA0","CodeMirror-cursor"));if(u.style.left=s.left+"px",u.style.top=s.top+"px",u.style.height=Math.max(0,s.bottom-s.top)*t.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(t.getWrapperElement().className)){var p=Zo(t,n,"div",null,null),y=p.right-p.left;u.style.width=(y>0?y:t.defaultCharWidth())+"px"}if(s.other){var x=l.appendChild(Q("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));x.style.display="",x.style.left=s.other.left+"px",x.style.top=s.other.top+"px",x.style.height=(s.other.bottom-s.other.top)*.85+"px"}}function ts(t,n){return t.top-n.top||t.left-n.left}function Oc(t,n,l){var s=t.display,u=t.doc,p=document.createDocumentFragment(),y=Su(t.display),x=y.left,C=Math.max(s.sizerWidth,zn(t)-s.sizer.offsetLeft)-y.right,P=u.direction=="ltr";function K(Ne,We,Qe,Ke){We<0&&(We=0),We=Math.round(We),Ke=Math.round(Ke),p.appendChild(Q("div",null,"CodeMirror-selected","position: absolute; left: "+Ne+`px;
18
- top: `+We+"px; width: "+(Qe==null?C-Ne:Qe)+`px;
19
- height: `+(Ke-We)+"px"))}function ne(Ne,We,Qe){var Ke=Ge(u,Ne),bt=Ke.text.length,$t,wr;function rr(vr,tn){return Zo(t,T(Ne,vr),"div",Ke,tn)}function Sn(vr,tn,Ir){var mr=Tu(t,Ke,null,vr),gr=tn=="ltr"==(Ir=="after")?"left":"right",ur=Ir=="after"?mr.begin:mr.end-(/\s/.test(Ke.text.charAt(mr.end-1))?2:1);return rr(ur,gr)[gr]}var fn=tt(Ke,u.direction);return zr(fn,We||0,Qe==null?bt:Qe,function(vr,tn,Ir,mr){var gr=Ir=="ltr",ur=rr(vr,gr?"left":"right"),cn=rr(tn-1,gr?"right":"left"),Po=We==null&&vr==0,Sa=Qe==null&&tn==bt,jr=mr==0,Jn=!fn||mr==fn.length-1;if(cn.top-ur.top<=3){var Cr=(P?Po:Sa)&&jr,Lf=(P?Sa:Po)&&Jn,zi=Cr?x:(gr?ur:cn).left,no=Lf?C:(gr?cn:ur).right;K(zi,ur.top,no-zi,ur.bottom)}else{var io,Wr,Fn,Rl;gr?(io=P&&Po&&jr?x:ur.left,Wr=P?C:Sn(vr,Ir,"before"),Fn=P?x:Sn(tn,Ir,"after"),Rl=P&&Sa&&Jn?C:cn.right):(io=P?Sn(vr,Ir,"before"):x,Wr=!P&&Po&&jr?C:ur.right,Fn=!P&&Sa&&Jn?x:cn.left,Rl=P?Sn(tn,Ir,"after"):C),K(io,ur.top,Wr-io,ur.bottom),ur.bottom<cn.top&&K(x,ur.bottom,null,cn.top),K(Fn,cn.top,Rl-Fn,cn.bottom)}(!$t||ts(ur,$t)<0)&&($t=ur),ts(cn,$t)<0&&($t=cn),(!wr||ts(ur,wr)<0)&&(wr=ur),ts(cn,wr)<0&&(wr=cn)}),{start:$t,end:wr}}var ve=n.from(),de=n.to();if(ve.line==de.line)ne(ve.line,ve.ch,de.ch);else{var Ee=Ge(u,ve.line),Ae=Ge(u,de.line),Ie=_n(Ee)==_n(Ae),Le=ne(ve.line,ve.ch,Ie?Ee.text.length+1:null).end,De=ne(de.line,Ie?0:null,de.ch).start;Ie&&(Le.top<De.top-2?(K(Le.right,Le.top,null,Le.bottom),K(x,De.top,De.left,De.bottom)):K(Le.right,Le.top,De.left-Le.right,Le.bottom)),Le.bottom<De.top&&K(x,Le.bottom,null,De.top)}l.appendChild(p)}function Di(t){if(t.state.focused){var n=t.display;clearInterval(n.blinker);var l=!0;n.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?n.blinker=setInterval(function(){t.hasFocus()||Ha(t),n.cursorDiv.style.visibility=(l=!l)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(n.cursorDiv.style.visibility="hidden")}}function rs(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||ll(t))}function sl(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&Ha(t))},100)}function ll(t,n){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),t.options.readOnly!="nocursor"&&(t.state.focused||(nt(t,"focus",t,n),t.state.focused=!0,Ue(t.display.wrapper,"CodeMirror-focused"),!t.curOp&&t.display.selForContextMenu!=t.doc.sel&&(t.display.input.reset(),X&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Di(t))}function Ha(t,n){t.state.delayingBlurEvent||(t.state.focused&&(nt(t,"blur",t,n),t.state.focused=!1,q(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function ul(t){for(var n=t.display,l=n.lineDiv.offsetTop,s=Math.max(0,n.scroller.getBoundingClientRect().top),u=n.lineDiv.getBoundingClientRect().top,p=0,y=0;y<n.view.length;y++){var x=n.view[y],C=t.options.lineWrapping,P=void 0,K=0;if(!x.hidden){if(u+=x.line.height,R&&V<8){var ne=x.node.offsetTop+x.node.offsetHeight;P=ne-l,l=ne}else{var ve=x.node.getBoundingClientRect();P=ve.bottom-ve.top,!C&&x.text.firstChild&&(K=x.text.firstChild.getBoundingClientRect().right-ve.left-1)}var de=x.line.height-P;if((de>.005||de<-.005)&&(u<s&&(p-=de),On(x.line,P),Fu(x.line),x.rest))for(var Ee=0;Ee<x.rest.length;Ee++)Fu(x.rest[Ee]);if(K>t.display.sizerWidth){var Ae=Math.ceil(K/ja(t.display));Ae>t.display.maxLineLength&&(t.display.maxLineLength=Ae,t.display.maxLine=x.line,t.display.maxLineChanged=!0)}}}Math.abs(p)>2&&(n.scroller.scrollTop+=p)}function Fu(t){if(t.widgets)for(var n=0;n<t.widgets.length;++n){var l=t.widgets[n],s=l.node.parentNode;s&&(l.height=s.offsetHeight)}}function Ua(t,n,l){var s=l&&l.top!=null?Math.max(0,l.top):t.scroller.scrollTop;s=Math.floor(s-vo(t));var u=l&&l.bottom!=null?l.bottom:s+t.wrapper.clientHeight,p=bi(n,s),y=bi(n,u);if(l&&l.ensure){var x=l.ensure.from.line,C=l.ensure.to.line;x<p?(p=x,y=bi(n,wi(Ge(n,x))+t.wrapper.clientHeight)):Math.min(C,n.lastLine())>=y&&(p=bi(n,wi(Ge(n,C))-t.wrapper.clientHeight),y=C)}return{from:p,to:Math.max(y,p+1)}}function Ec(t,n){if(!ht(t,"scrollCursorIntoView")){var l=t.display,s=l.sizer.getBoundingClientRect(),u=null,p=l.wrapper.ownerDocument;if(n.top+s.top<0?u=!0:n.bottom+s.top>(p.defaultView.innerHeight||p.documentElement.clientHeight)&&(u=!1),u!=null&&!F){var y=Q("div","\u200B",null,`position: absolute;
16
+ `,n);u==-1&&(u=t.length);var p=t.slice(n,t.charAt(u-1)=="\r"?u-1:u),y=p.indexOf("\r");y!=-1?(l.push(p.slice(0,y)),n+=y+1):(l.push(p),n=u+1)}return l}:function(t){return t.split(/\r\n?|\n/)},Ii=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch{return!1}}:function(t){var n;try{n=t.ownerDocument.selection.createRange()}catch{}return!n||n.parentElement()!=t?!1:n.compareEndPoints("StartToEnd",n)!=0},Ta=function(){var t=Q("div");return"oncopy"in t?!0:(t.setAttribute("oncopy","return;"),typeof t.oncopy=="function")}(),hn=null;function Jr(t){if(hn!=null)return hn;var n=xe(t,Q("span","x")),l=n.getBoundingClientRect(),s=ie(n,0,1).getBoundingClientRect();return hn=Math.abs(l.left-s.left)>1}var vn={},on={};function sn(t,n){arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),vn[t]=n}function fo(t,n){on[t]=n}function Hn(t){if(typeof t=="string"&&on.hasOwnProperty(t))t=on[t];else if(t&&typeof t.name=="string"&&on.hasOwnProperty(t.name)){var n=on[t.name];typeof n=="string"&&(n={name:n}),t=zt(n,t),t.name=n.name}else{if(typeof t=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Hn("application/xml");if(typeof t=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Hn("application/json")}return typeof t=="string"?{name:t}:t||{name:"null"}}function Qr(t,n){n=Hn(n);var l=vn[n.name];if(!l)return Qr(t,"text/plain");var s=l(t,n);if(pr.hasOwnProperty(n.name)){var u=pr[n.name];for(var p in u)u.hasOwnProperty(p)&&(s.hasOwnProperty(p)&&(s["_"+p]=s[p]),s[p]=u[p])}if(s.name=n.name,n.helperType&&(s.helperType=n.helperType),n.modeProps)for(var y in n.modeProps)s[y]=n.modeProps[y];return s}var pr={};function ai(t,n){var l=pr.hasOwnProperty(t)?pr[t]:pr[t]={};Rt(n,l)}function An(t,n){if(n===!0)return n;if(t.copyState)return t.copyState(n);var l={};for(var s in n){var u=n[s];u instanceof Array&&(u=u.concat([])),l[s]=u}return l}function ka(t,n){for(var l;t.innerMode&&(l=t.innerMode(n),!(!l||l.mode==t));)n=l.state,t=l.mode;return l||{mode:t,state:n}}function Vo(t,n,l){return t.startState?t.startState(n,l):!0}var Xt=function(t,n,l){this.pos=this.start=0,this.string=t,this.tabSize=n||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=l};Xt.prototype.eol=function(){return this.pos>=this.string.length},Xt.prototype.sol=function(){return this.pos==this.lineStart},Xt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Xt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Xt.prototype.eat=function(t){var n=this.string.charAt(this.pos),l;if(typeof t=="string"?l=n==t:l=n&&(t.test?t.test(n):t(n)),l)return++this.pos,n},Xt.prototype.eatWhile=function(t){for(var n=this.pos;this.eat(t););return this.pos>n},Xt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Xt.prototype.skipToEnd=function(){this.pos=this.string.length},Xt.prototype.skipTo=function(t){var n=this.string.indexOf(t,this.pos);if(n>-1)return this.pos=n,!0},Xt.prototype.backUp=function(t){this.pos-=t},Xt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=st(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?st(this.string,this.lineStart,this.tabSize):0)},Xt.prototype.indentation=function(){return st(this.string,null,this.tabSize)-(this.lineStart?st(this.string,this.lineStart,this.tabSize):0)},Xt.prototype.match=function(t,n,l){if(typeof t=="string"){var s=function(y){return l?y.toLowerCase():y},u=this.string.substr(this.pos,t.length);if(s(u)==s(t))return n!==!1&&(this.pos+=t.length),!0}else{var p=this.string.slice(this.pos).match(t);return p&&p.index>0?null:(p&&n!==!1&&(this.pos+=p[0].length),p)}},Xt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Xt.prototype.hideFirstChars=function(t,n){this.lineStart+=t;try{return n()}finally{this.lineStart-=t}},Xt.prototype.lookAhead=function(t){var n=this.lineOracle;return n&&n.lookAhead(t)},Xt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};function Ge(t,n){if(n-=t.first,n<0||n>=t.size)throw new Error("There is no line "+(n+t.first)+" in the document.");for(var l=t;!l.lines;)for(var s=0;;++s){var u=l.children[s],p=u.chunkSize();if(n<p){l=u;break}n-=p}return l.lines[n]}function yi(t,n,l){var s=[],u=n.line;return t.iter(n.line,l.line+1,function(p){var y=p.text;u==l.line&&(y=y.slice(0,l.ch)),u==n.line&&(y=y.slice(n.ch)),s.push(y),++u}),s}function Qi(t,n,l){var s=[];return t.iter(n,l,function(u){s.push(u.text)}),s}function On(t,n){var l=n-t.height;if(l)for(var s=t;s;s=s.parent)s.height+=l}function It(t){if(t.parent==null)return null;for(var n=t.parent,l=Re(n.lines,t),s=n.parent;s;n=s,s=s.parent)for(var u=0;s.children[u]!=n;++u)l+=s.children[u].chunkSize();return l+n.first}function bi(t,n){var l=t.first;e:do{for(var s=0;s<t.children.length;++s){var u=t.children[s],p=u.height;if(n<p){t=u;continue e}n-=p,l+=u.chunkSize()}return l}while(!t.lines);for(var y=0;y<t.lines.length;++y){var x=t.lines[y],C=x.height;if(n<C)break;n-=C}return l+y}function Zi(t,n){return n>=t.first&&n<t.first+t.size}function Pa(t,n){return String(t.lineNumberFormatter(n+t.firstLineNumber))}function T(t,n,l){if(l===void 0&&(l=null),!(this instanceof T))return new T(t,n,l);this.line=t,this.ch=n,this.sticky=l}function $(t,n){return t.line-n.line||t.ch-n.ch}function Pe(t,n){return t.sticky==n.sticky&&$(t,n)==0}function Fe(t){return T(t.line,t.ch)}function it(t,n){return $(t,n)<0?n:t}function wt(t,n){return $(t,n)<0?t:n}function Lt(t,n){return Math.max(t.first,Math.min(n,t.first+t.size-1))}function $e(t,n){if(n.line<t.first)return T(t.first,0);var l=t.first+t.size-1;return n.line>l?T(l,Ge(t,l).text.length):En(n,Ge(t,n.line).text.length)}function En(t,n){var l=t.ch;return l==null||l>n?T(t.line,n):l<0?T(t.line,0):t}function co(t,n){for(var l=[],s=0;s<n.length;s++)l[s]=$e(t,n[s]);return l}var jo=function(t,n){this.state=t,this.lookAhead=n},oi=function(t,n,l,s){this.state=n,this.doc=t,this.line=l,this.maxLookAhead=s||0,this.baseTokens=null,this.baseTokenPos=1};oi.prototype.lookAhead=function(t){var n=this.doc.getLine(this.line+t);return n!=null&&t>this.maxLookAhead&&(this.maxLookAhead=t),n},oi.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},oi.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oi.fromSaved=function(t,n,l){return n instanceof jo?new oi(t,An(t.mode,n.state),l,n.lookAhead):new oi(t,An(t.mode,n),l)},oi.prototype.save=function(t){var n=t!==!1?An(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new jo(n,this.maxLookAhead):n};function ru(t,n,l,s){var u=[t.state.modeGen],p={};iu(t,n.text,t.doc.mode,l,function(P,K){return u.push(P,K)},p,s);for(var y=l.state,x=function(P){l.baseTokens=u;var K=t.state.overlays[P],ne=1,ve=0;l.state=!0,iu(t,n.text,K.mode,l,function(de,Ee){for(var Ae=ne;ve<de;){var Ie=u[ne];Ie>de&&u.splice(ne,1,de,u[ne+1],Ie),ne+=2,ve=Math.min(de,Ie)}if(Ee)if(K.opaque)u.splice(Ae,ne-Ae,de,"overlay "+Ee),ne=Ae+2;else for(;Ae<ne;Ae+=2){var Le=u[Ae+1];u[Ae+1]=(Le?Le+" ":"")+"overlay "+Ee}},p),l.state=y,l.baseTokens=null,l.baseTokenPos=1},C=0;C<t.state.overlays.length;++C)x(C);return{styles:u,classes:p.bgClass||p.textClass?p:null}}function Ws(t,n,l){if(!n.styles||n.styles[0]!=t.state.modeGen){var s=Fa(t,It(n)),u=n.text.length>t.options.maxHighlightLength&&An(t.doc.mode,s.state),p=ru(t,n,s);u&&(s.state=u),n.stateAfter=s.save(!u),n.styles=p.styles,p.classes?n.styleClasses=p.classes:n.styleClasses&&(n.styleClasses=null),l===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return n.styles}function Fa(t,n,l){var s=t.doc,u=t.display;if(!s.mode.startState)return new oi(s,!0,n);var p=nc(t,n,l),y=p>s.first&&Ge(s,p-1).stateAfter,x=y?oi.fromSaved(s,y,p):new oi(s,Vo(s.mode),p);return s.iter(p,n,function(C){Wo(t,C.text,x);var P=x.line;C.stateAfter=P==n-1||P%5==0||P>=u.viewFrom&&P<u.viewTo?x.save():null,x.nextLine()}),l&&(s.modeFrontier=x.line),x}function Wo(t,n,l,s){var u=t.doc.mode,p=new Xt(n,t.options.tabSize,l);for(p.start=p.pos=s||0,n==""&&Un(u,l.state);!p.eol();)xi(u,p,l.state),p.start=p.pos}function Un(t,n){if(t.blankLine)return t.blankLine(n);if(t.innerMode){var l=ka(t,n);if(l.mode.blankLine)return l.mode.blankLine(l.state)}}function xi(t,n,l,s){for(var u=0;u<10;u++){s&&(s[0]=ka(t,l).mode);var p=t.token(n,l);if(n.pos>n.start)return p}throw new Error("Mode "+t.name+" failed to advance stream.")}var Zr=function(t,n,l){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=n||null,this.state=l};function qi(t,n,l,s){var u=t.doc,p=u.mode,y;n=$e(u,n);var x=Ge(u,n.line),C=Fa(t,n.line,l),P=new Xt(x.text,t.options.tabSize,C),K;for(s&&(K=[]);(s||P.pos<n.ch)&&!P.eol();)P.start=P.pos,y=xi(p,P,C.state),s&&K.push(new Zr(P,y,An(u.mode,C.state)));return s?K:new Zr(P,y,C.state)}function nu(t,n){if(t)for(;;){var l=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!l)break;t=t.slice(0,l.index)+t.slice(l.index+l[0].length);var s=l[1]?"bgClass":"textClass";n[s]==null?n[s]=l[2]:new RegExp("(?:^|\\s)"+l[2]+"(?:$|\\s)").test(n[s])||(n[s]+=" "+l[2])}return t}function iu(t,n,l,s,u,p,y){var x=l.flattenSpans;x==null&&(x=t.options.flattenSpans);var C=0,P=null,K=new Xt(n,t.options.tabSize,s),ne,ve=t.options.addModeClass&&[null];for(n==""&&nu(Un(l,s.state),p);!K.eol();){if(K.pos>t.options.maxHighlightLength?(x=!1,y&&Wo(t,n,s,K.pos),K.pos=n.length,ne=null):ne=nu(xi(l,K,s.state,ve),p),ve){var de=ve[0].name;de&&(ne="m-"+(ne?de+" "+ne:de))}if(!x||P!=ne){for(;C<K.start;)C=Math.min(K.start,C+5e3),u(C,P);P=ne}K.start=K.pos}for(;C<K.pos;){var Ee=Math.min(K.pos,C+5e3);u(Ee,P),C=Ee}}function nc(t,n,l){for(var s,u,p=t.doc,y=l?-1:n-(t.doc.mode.innerMode?1e3:100),x=n;x>y;--x){if(x<=p.first)return p.first;var C=Ge(p,x-1),P=C.stateAfter;if(P&&(!l||x+(P instanceof jo?P.lookAhead:0)<=p.modeFrontier))return x;var K=st(C.text,null,t.options.tabSize);(u==null||s>K)&&(u=x-1,s=K)}return u}function au(t,n){if(t.modeFrontier=Math.min(t.modeFrontier,n),!(t.highlightFrontier<n-10)){for(var l=t.first,s=n-1;s>l;s--){var u=Ge(t,s).stateAfter;if(u&&(!(u instanceof jo)||s+u.lookAhead<n)){l=s+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,l)}}var ou=!1,si=!1;function su(){ou=!0}function Ia(){si=!0}function Ho(t,n,l){this.marker=t,this.from=n,this.to=l}function La(t,n){if(t)for(var l=0;l<t.length;++l){var s=t[l];if(s.marker==n)return s}}function Ze(t,n){for(var l,s=0;s<t.length;++s)t[s]!=n&&(l||(l=[])).push(t[s]);return l}function Uo(t,n,l){var s=l&&window.WeakSet&&(l.markedSpans||(l.markedSpans=new WeakSet));s&&t.markedSpans&&s.has(t.markedSpans)?t.markedSpans.push(n):(t.markedSpans=t.markedSpans?t.markedSpans.concat([n]):[n],s&&s.add(t.markedSpans)),n.marker.attachLine(t)}function lu(t,n,l){var s;if(t)for(var u=0;u<t.length;++u){var p=t[u],y=p.marker,x=p.from==null||(y.inclusiveLeft?p.from<=n:p.from<n);if(x||p.from==n&&y.type=="bookmark"&&(!l||!p.marker.insertLeft)){var C=p.to==null||(y.inclusiveRight?p.to>=n:p.to>n);(s||(s=[])).push(new Ho(y,p.from,C?null:p.to))}}return s}function Li(t,n,l){var s;if(t)for(var u=0;u<t.length;++u){var p=t[u],y=p.marker,x=p.to==null||(y.inclusiveRight?p.to>=n:p.to>n);if(x||p.from==n&&y.type=="bookmark"&&(!l||p.marker.insertLeft)){var C=p.from==null||(y.inclusiveLeft?p.from<=n:p.from<n);(s||(s=[])).push(new Ho(y,C?null:p.from-n,p.to==null?null:p.to-n))}}return s}function _o(t,n){if(n.full)return null;var l=Zi(t,n.from.line)&&Ge(t,n.from.line).markedSpans,s=Zi(t,n.to.line)&&Ge(t,n.to.line).markedSpans;if(!l&&!s)return null;var u=n.from.ch,p=n.to.ch,y=$(n.from,n.to)==0,x=lu(l,u,y),C=Li(s,p,y),P=n.text.length==1,K=et(n.text).length+(P?u:0);if(x)for(var ne=0;ne<x.length;++ne){var ve=x[ne];if(ve.to==null){var de=La(C,ve.marker);de?P&&(ve.to=de.to==null?null:de.to+K):ve.to=u}}if(C)for(var Ee=0;Ee<C.length;++Ee){var Ae=C[Ee];if(Ae.to!=null&&(Ae.to+=K),Ae.from==null){var Ie=La(x,Ae.marker);Ie||(Ae.from=K,P&&(x||(x=[])).push(Ae))}else Ae.from+=K,P&&(x||(x=[])).push(Ae)}x&&(x=ea(x)),C&&C!=x&&(C=ea(C));var Le=[x];if(!P){var De=n.text.length-2,Ne;if(De>0&&x)for(var We=0;We<x.length;++We)x[We].to==null&&(Ne||(Ne=[])).push(new Ho(x[We].marker,null,null));for(var Qe=0;Qe<De;++Qe)Le.push(Ne);Le.push(C)}return Le}function ea(t){for(var n=0;n<t.length;++n){var l=t[n];l.from!=null&&l.from==l.to&&l.marker.clearWhenEmpty!==!1&&t.splice(n--,1)}return t.length?t:null}function Hs(t,n,l){var s=null;if(t.iter(n.line,l.line+1,function(de){if(de.markedSpans)for(var Ee=0;Ee<de.markedSpans.length;++Ee){var Ae=de.markedSpans[Ee].marker;Ae.readOnly&&(!s||Re(s,Ae)==-1)&&(s||(s=[])).push(Ae)}}),!s)return null;for(var u=[{from:n,to:l}],p=0;p<s.length;++p)for(var y=s[p],x=y.find(0),C=0;C<u.length;++C){var P=u[C];if(!($(P.to,x.from)<0||$(P.from,x.to)>0)){var K=[C,1],ne=$(P.from,x.from),ve=$(P.to,x.to);(ne<0||!y.inclusiveLeft&&!ne)&&K.push({from:P.from,to:x.from}),(ve>0||!y.inclusiveRight&&!ve)&&K.push({from:x.to,to:P.to}),u.splice.apply(u,K),C+=K.length-3}}return u}function hr(t){var n=t.markedSpans;if(n){for(var l=0;l<n.length;++l)n[l].marker.detachLine(t);t.markedSpans=null}}function po(t,n){if(n){for(var l=0;l<n.length;++l)n[l].marker.attachLine(t);t.markedSpans=n}}function Ma(t){return t.inclusiveLeft?-1:0}function zo(t){return t.inclusiveRight?1:0}function Us(t,n){var l=t.lines.length-n.lines.length;if(l!=0)return l;var s=t.find(),u=n.find(),p=$(s.from,u.from)||Ma(t)-Ma(n);if(p)return-p;var y=$(s.to,u.to)||zo(t)-zo(n);return y||n.id-t.id}function uu(t,n){var l=si&&t.markedSpans,s;if(l)for(var u=void 0,p=0;p<l.length;++p)u=l[p],u.marker.collapsed&&(n?u.from:u.to)==null&&(!s||Us(s,u.marker)<0)&&(s=u.marker);return s}function fu(t){return uu(t,!0)}function Go(t){return uu(t,!1)}function cu(t,n){var l=si&&t.markedSpans,s;if(l)for(var u=0;u<l.length;++u){var p=l[u];p.marker.collapsed&&(p.from==null||p.from<n)&&(p.to==null||p.to>n)&&(!s||Us(s,p.marker)<0)&&(s=p.marker)}return s}function du(t,n,l,s,u){var p=Ge(t,n),y=si&&p.markedSpans;if(y)for(var x=0;x<y.length;++x){var C=y[x];if(C.marker.collapsed){var P=C.marker.find(0),K=$(P.from,l)||Ma(C.marker)-Ma(u),ne=$(P.to,s)||zo(C.marker)-zo(u);if(!(K>=0&&ne<=0||K<=0&&ne>=0)&&(K<=0&&(C.marker.inclusiveRight&&u.inclusiveLeft?$(P.to,l)>=0:$(P.to,l)>0)||K>=0&&(C.marker.inclusiveRight&&u.inclusiveLeft?$(P.from,s)<=0:$(P.from,s)<0)))return!0}}}function _n(t){for(var n;n=fu(t);)t=n.find(-1,!0).line;return t}function ic(t){for(var n;n=Go(t);)t=n.find(1,!0).line;return t}function ac(t){for(var n,l;n=Go(t);)t=n.find(1,!0).line,(l||(l=[])).push(t);return l}function Mi(t,n){var l=Ge(t,n),s=_n(l);return l==s?n:It(s)}function pu(t,n){if(n>t.lastLine())return n;var l=Ge(t,n),s;if(!Si(t,l))return n;for(;s=Go(l);)l=s.find(1,!0).line;return It(l)+1}function Si(t,n){var l=si&&n.markedSpans;if(l){for(var s=void 0,u=0;u<l.length;++u)if(s=l[u],!!s.marker.collapsed){if(s.from==null)return!0;if(!s.marker.widgetNode&&s.from==0&&s.marker.inclusiveLeft&&_s(t,n,s))return!0}}}function _s(t,n,l){if(l.to==null){var s=l.marker.find(1,!0);return _s(t,s.line,La(s.line.markedSpans,l.marker))}if(l.marker.inclusiveRight&&l.to==n.text.length)return!0;for(var u=void 0,p=0;p<n.markedSpans.length;++p)if(u=n.markedSpans[p],u.marker.collapsed&&!u.marker.widgetNode&&u.from==l.to&&(u.to==null||u.to!=l.from)&&(u.marker.inclusiveLeft||l.marker.inclusiveRight)&&_s(t,n,u))return!0}function wi(t){t=_n(t);for(var n=0,l=t.parent,s=0;s<l.lines.length;++s){var u=l.lines[s];if(u==t)break;n+=u.height}for(var p=l.parent;p;l=p,p=l.parent)for(var y=0;y<p.children.length;++y){var x=p.children[y];if(x==l)break;n+=x.height}return n}function $o(t){if(t.height==0)return 0;for(var n=t.text.length,l,s=t;l=fu(s);){var u=l.find(0,!0);s=u.from.line,n+=u.from.ch-u.to.ch}for(s=t;l=Go(s);){var p=l.find(0,!0);n-=s.text.length-p.from.ch,s=p.to.line,n+=s.text.length-p.to.ch}return n}function zs(t){var n=t.display,l=t.doc;n.maxLine=Ge(l,l.first),n.maxLineLength=$o(n.maxLine),n.maxLineChanged=!0,l.iter(function(s){var u=$o(s);u>n.maxLineLength&&(n.maxLineLength=u,n.maxLine=s)})}var ta=function(t,n,l){this.text=t,po(this,n),this.height=l?l(this):1};ta.prototype.lineNo=function(){return It(this)},Gr(ta);function hu(t,n,l,s){t.text=n,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),t.order!=null&&(t.order=null),hr(t),po(t,l);var u=s?s(t):1;u!=t.height&&On(t,u)}function vu(t){t.parent=null,hr(t)}var Gs={},oc={};function Na(t,n){if(!t||/^\s*$/.test(t))return null;var l=n.addModeClass?oc:Gs;return l[t]||(l[t]=t.replace(/\S+/g,"cm-$&"))}function gu(t,n){var l=ye("span",null,null,X?"padding-right: .1px":null),s={pre:ye("pre",[l],"CodeMirror-line"),content:l,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};n.measure={};for(var u=0;u<=(n.rest?n.rest.length:0);u++){var p=u?n.rest[u-1]:n.line,y=void 0;s.pos=0,s.addToken=lc,mi(t.display.measure)&&(y=tt(p,t.doc.direction))&&(s.addToken=$s(s.addToken,y)),s.map=[];var x=n!=t.display.externalMeasured&&It(p);fc(p,s,Ws(t,p,x)),p.styleClasses&&(p.styleClasses.bgClass&&(s.bgClass=vt(p.styleClasses.bgClass,s.bgClass||"")),p.styleClasses.textClass&&(s.textClass=vt(p.styleClasses.textClass,s.textClass||""))),s.map.length==0&&s.map.push(0,0,s.content.appendChild(ii(t.display.measure))),u==0?(n.measure.map=s.map,n.measure.cache={}):((n.measure.maps||(n.measure.maps=[])).push(s.map),(n.measure.caches||(n.measure.caches=[])).push({}))}if(X){var C=s.content.lastChild;(/\bcm-tab\b/.test(C.className)||C.querySelector&&C.querySelector(".cm-tab"))&&(s.content.className="cm-tab-wrap-hack")}return nt(t,"renderLine",t,n.line,s.pre),s.pre.className&&(s.textClass=vt(s.pre.className,s.textClass||"")),s}function sc(t){var n=Q("span","\u2022","cm-invalidchar");return n.title="\\u"+t.charCodeAt(0).toString(16),n.setAttribute("aria-label",n.title),n}function lc(t,n,l,s,u,p,y){if(n){var x=t.splitSpaces?uc(n,t.trailingSpace):n,C=t.cm.state.specialChars,P=!1,K;if(!C.test(n))t.col+=n.length,K=document.createTextNode(x),t.map.push(t.pos,t.pos+n.length,K),D&&j<9&&(P=!0),t.pos+=n.length;else{K=document.createDocumentFragment();for(var ne=0;;){C.lastIndex=ne;var ve=C.exec(n),de=ve?ve.index-ne:n.length-ne;if(de){var Ee=document.createTextNode(x.slice(ne,ne+de));D&&j<9?K.appendChild(Q("span",[Ee])):K.appendChild(Ee),t.map.push(t.pos,t.pos+de,Ee),t.col+=de,t.pos+=de}if(!ve)break;ne+=de+1;var Ae=void 0;if(ve[0]==" "){var Ie=t.cm.options.tabSize,Le=Ie-t.col%Ie;Ae=K.appendChild(Q("span",kr(Le),"cm-tab")),Ae.setAttribute("role","presentation"),Ae.setAttribute("cm-text"," "),t.col+=Le}else ve[0]=="\r"||ve[0]==`
17
+ `?(Ae=K.appendChild(Q("span",ve[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ae.setAttribute("cm-text",ve[0]),t.col+=1):(Ae=t.cm.options.specialCharPlaceholder(ve[0]),Ae.setAttribute("cm-text",ve[0]),D&&j<9?K.appendChild(Q("span",[Ae])):K.appendChild(Ae),t.col+=1);t.map.push(t.pos,t.pos+1,Ae),t.pos++}}if(t.trailingSpace=x.charCodeAt(n.length-1)==32,l||s||u||P||p||y){var De=l||"";s&&(De+=s),u&&(De+=u);var Ne=Q("span",[K],De,p);if(y)for(var We in y)y.hasOwnProperty(We)&&We!="style"&&We!="class"&&Ne.setAttribute(We,y[We]);return t.content.appendChild(Ne)}t.content.appendChild(K)}}function uc(t,n){if(t.length>1&&!/ /.test(t))return t;for(var l=n,s="",u=0;u<t.length;u++){var p=t.charAt(u);p==" "&&l&&(u==t.length-1||t.charCodeAt(u+1)==32)&&(p="\xA0"),s+=p,l=p==" "}return s}function $s(t,n){return function(l,s,u,p,y,x,C){u=u?u+" cm-force-border":"cm-force-border";for(var P=l.pos,K=P+s.length;;){for(var ne=void 0,ve=0;ve<n.length&&(ne=n[ve],!(ne.to>P&&ne.from<=P));ve++);if(ne.to>=K)return t(l,s,u,p,y,x,C);t(l,s.slice(0,ne.to-P),u,p,null,x,C),p=null,s=s.slice(ne.to-P),P=ne.to}}}function mu(t,n,l,s){var u=!s&&l.widgetNode;u&&t.map.push(t.pos,t.pos+n,u),!s&&t.cm.display.input.needsContentAttribute&&(u||(u=t.content.appendChild(document.createElement("span"))),u.setAttribute("cm-marker",l.id)),u&&(t.cm.display.input.setUneditable(u),t.content.appendChild(u)),t.pos+=n,t.trailingSpace=!1}function fc(t,n,l){var s=t.markedSpans,u=t.text,p=0;if(!s){for(var y=1;y<l.length;y+=2)n.addToken(n,u.slice(p,p=l[y]),Na(l[y+1],n.cm.options));return}for(var x=u.length,C=0,P=1,K="",ne,ve,de=0,Ee,Ae,Ie,Le,De;;){if(de==C){Ee=Ae=Ie=ve="",De=null,Le=null,de=1/0;for(var Ne=[],We=void 0,Qe=0;Qe<s.length;++Qe){var Ke=s[Qe],bt=Ke.marker;if(bt.type=="bookmark"&&Ke.from==C&&bt.widgetNode)Ne.push(bt);else if(Ke.from<=C&&(Ke.to==null||Ke.to>C||bt.collapsed&&Ke.to==C&&Ke.from==C)){if(Ke.to!=null&&Ke.to!=C&&de>Ke.to&&(de=Ke.to,Ae=""),bt.className&&(Ee+=" "+bt.className),bt.css&&(ve=(ve?ve+";":"")+bt.css),bt.startStyle&&Ke.from==C&&(Ie+=" "+bt.startStyle),bt.endStyle&&Ke.to==de&&(We||(We=[])).push(bt.endStyle,Ke.to),bt.title&&((De||(De={})).title=bt.title),bt.attributes)for(var $t in bt.attributes)(De||(De={}))[$t]=bt.attributes[$t];bt.collapsed&&(!Le||Us(Le.marker,bt)<0)&&(Le=Ke)}else Ke.from>C&&de>Ke.from&&(de=Ke.from)}if(We)for(var wr=0;wr<We.length;wr+=2)We[wr+1]==de&&(Ae+=" "+We[wr]);if(!Le||Le.from==C)for(var rr=0;rr<Ne.length;++rr)mu(n,0,Ne[rr]);if(Le&&(Le.from||0)==C){if(mu(n,(Le.to==null?x+1:Le.to)-C,Le.marker,Le.from==null),Le.to==null)return;Le.to==C&&(Le=!1)}}if(C>=x)break;for(var Sn=Math.min(x,de);;){if(K){var fn=C+K.length;if(!Le){var vr=fn>Sn?K.slice(0,Sn-C):K;n.addToken(n,vr,ne?ne+Ee:Ee,Ie,C+vr.length==de?Ae:"",ve,De)}if(fn>=Sn){K=K.slice(Sn-C),C=Sn;break}C=fn,Ie=""}K=u.slice(p,p=l[P++]),ne=Na(l[P++],n.cm.options)}}}function yu(t,n,l){this.line=n,this.rest=ac(n),this.size=this.rest?It(et(this.rest))-l+1:1,this.node=this.text=null,this.hidden=Si(t,n)}function Ko(t,n,l){for(var s=[],u,p=n;p<l;p=u){var y=new yu(t.doc,Ge(t.doc,p),p);u=p+y.size,s.push(y)}return s}var ra=null;function cc(t){ra?ra.ops.push(t):t.ownsGroup=ra={ops:[t],delayedCallbacks:[]}}function Yo(t){var n=t.delayedCallbacks,l=0;do{for(;l<n.length;l++)n[l].call(null);for(var s=0;s<t.ops.length;s++){var u=t.ops[s];if(u.cursorActivityHandlers)for(;u.cursorActivityCalled<u.cursorActivityHandlers.length;)u.cursorActivityHandlers[u.cursorActivityCalled++].call(null,u.cm)}}while(l<n.length)}function dc(t,n){var l=t.ownsGroup;if(l)try{Yo(l)}finally{ra=null,n(l)}}var ho=null;function yr(t,n){var l=we(t,n);if(l.length){var s=Array.prototype.slice.call(arguments,2),u;ra?u=ra.delayedCallbacks:ho?u=ho:(u=ho=[],setTimeout(pc,0));for(var p=function(x){u.push(function(){return l[x].apply(null,s)})},y=0;y<l.length;++y)p(y)}}function pc(){var t=ho;ho=null;for(var n=0;n<t.length;++n)t[n]()}function Ks(t,n,l,s){for(var u=0;u<n.changes.length;u++){var p=n.changes[u];p=="text"?vc(t,n):p=="gutter"?Br(t,n,l,s):p=="class"?Xo(t,n):p=="widget"&&gc(t,n,s)}n.changes=null}function Ra(t){return t.node==t.text&&(t.node=Q("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),D&&j<8&&(t.node.style.zIndex=2)),t.node}function hc(t,n){var l=n.bgClass?n.bgClass+" "+(n.line.bgClass||""):n.line.bgClass;if(l&&(l+=" CodeMirror-linebackground"),n.background)l?n.background.className=l:(n.background.parentNode.removeChild(n.background),n.background=null);else if(l){var s=Ra(n);n.background=s.insertBefore(Q("div",null,l),s.firstChild),t.display.input.setUneditable(n.background)}}function Ys(t,n){var l=t.display.externalMeasured;return l&&l.line==n.line?(t.display.externalMeasured=null,n.measure=l.measure,l.built):gu(t,n)}function vc(t,n){var l=n.text.className,s=Ys(t,n);n.text==n.node&&(n.node=s.pre),n.text.parentNode.replaceChild(s.pre,n.text),n.text=s.pre,s.bgClass!=n.bgClass||s.textClass!=n.textClass?(n.bgClass=s.bgClass,n.textClass=s.textClass,Xo(t,n)):l&&(n.text.className=l)}function Xo(t,n){hc(t,n),n.line.wrapClass?Ra(n).className=n.line.wrapClass:n.node!=n.text&&(n.node.className="");var l=n.textClass?n.textClass+" "+(n.line.textClass||""):n.line.textClass;n.text.className=l||""}function Br(t,n,l,s){if(n.gutter&&(n.node.removeChild(n.gutter),n.gutter=null),n.gutterBackground&&(n.node.removeChild(n.gutterBackground),n.gutterBackground=null),n.line.gutterClass){var u=Ra(n);n.gutterBackground=Q("div",null,"CodeMirror-gutter-background "+n.line.gutterClass,"left: "+(t.options.fixedGutter?s.fixedPos:-s.gutterTotalWidth)+"px; width: "+s.gutterTotalWidth+"px"),t.display.input.setUneditable(n.gutterBackground),u.insertBefore(n.gutterBackground,n.text)}var p=n.line.gutterMarkers;if(t.options.lineNumbers||p){var y=Ra(n),x=n.gutter=Q("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?s.fixedPos:-s.gutterTotalWidth)+"px");if(x.setAttribute("aria-hidden","true"),t.display.input.setUneditable(x),y.insertBefore(x,n.text),n.line.gutterClass&&(x.className+=" "+n.line.gutterClass),t.options.lineNumbers&&(!p||!p["CodeMirror-linenumbers"])&&(n.lineNumber=x.appendChild(Q("div",Pa(t.options,l),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+s.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),p)for(var C=0;C<t.display.gutterSpecs.length;++C){var P=t.display.gutterSpecs[C].className,K=p.hasOwnProperty(P)&&p[P];K&&x.appendChild(Q("div",[K],"CodeMirror-gutter-elt","left: "+s.gutterLeft[P]+"px; width: "+s.gutterWidth[P]+"px"))}}}function gc(t,n,l){n.alignable&&(n.alignable=null);for(var s=z("CodeMirror-linewidget"),u=n.node.firstChild,p=void 0;u;u=p)p=u.nextSibling,s.test(u.className)&&n.node.removeChild(u);bu(t,n,l)}function mc(t,n,l,s){var u=Ys(t,n);return n.text=n.node=u.pre,u.bgClass&&(n.bgClass=u.bgClass),u.textClass&&(n.textClass=u.textClass),Xo(t,n),Br(t,n,l,s),bu(t,n,s),n.node}function bu(t,n,l){if(xu(t,n.line,n,l,!0),n.rest)for(var s=0;s<n.rest.length;s++)xu(t,n.rest[s],n,l,!1)}function xu(t,n,l,s,u){if(n.widgets)for(var p=Ra(l),y=0,x=n.widgets;y<x.length;++y){var C=x[y],P=Q("div",[C.node],"CodeMirror-linewidget"+(C.className?" "+C.className:""));C.handleMouseEvents||P.setAttribute("cm-ignore-events","true"),yc(C,P,l,s),t.display.input.setUneditable(P),u&&C.above?p.insertBefore(P,l.gutter||l.text):p.appendChild(P),yr(C,"redraw")}}function yc(t,n,l,s){if(t.noHScroll){(l.alignable||(l.alignable=[])).push(n);var u=s.wrapperWidth;n.style.left=s.fixedPos+"px",t.coverGutter||(u-=s.gutterTotalWidth,n.style.paddingLeft=s.gutterTotalWidth+"px"),n.style.width=u+"px"}t.coverGutter&&(n.style.zIndex=5,n.style.position="relative",t.noHScroll||(n.style.marginLeft=-s.gutterTotalWidth+"px"))}function Ci(t){if(t.height!=null)return t.height;var n=t.doc.cm;if(!n)return 0;if(!je(document.body,t.node)){var l="position: relative;";t.coverGutter&&(l+="margin-left: -"+n.display.gutters.offsetWidth+"px;"),t.noHScroll&&(l+="width: "+n.display.wrapper.clientWidth+"px;"),xe(n.display.measure,Q("div",[t.node],null,l))}return t.height=t.node.parentNode.offsetHeight}function Ai(t,n){for(var l=Rr(n);l!=t.wrapper;l=l.parentNode)if(!l||l.nodeType==1&&l.getAttribute("cm-ignore-events")=="true"||l.parentNode==t.sizer&&l!=t.mover)return!0}function vo(t){return t.lineSpace.offsetTop}function go(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function Su(t){if(t.cachedPaddingH)return t.cachedPaddingH;var n=xe(t.measure,Q("pre","x","CodeMirror-line-like")),l=window.getComputedStyle?window.getComputedStyle(n):n.currentStyle,s={left:parseInt(l.paddingLeft),right:parseInt(l.paddingRight)};return!isNaN(s.left)&&!isNaN(s.right)&&(t.cachedPaddingH=s),s}function gn(t){return Be-t.display.nativeBarWidth}function zn(t){return t.display.scroller.clientWidth-gn(t)-t.display.barWidth}function Jo(t){return t.display.scroller.clientHeight-gn(t)-t.display.barHeight}function wu(t,n,l){var s=t.options.lineWrapping,u=s&&zn(t);if(!n.measure.heights||s&&n.measure.width!=u){var p=n.measure.heights=[];if(s){n.measure.width=u;for(var y=n.text.firstChild.getClientRects(),x=0;x<y.length-1;x++){var C=y[x],P=y[x+1];Math.abs(C.bottom-P.bottom)>2&&p.push((C.bottom+P.top)/2-l.top)}}p.push(l.bottom-l.top)}}function Cu(t,n,l){if(t.line==n)return{map:t.measure.map,cache:t.measure.cache};if(t.rest){for(var s=0;s<t.rest.length;s++)if(t.rest[s]==n)return{map:t.measure.maps[s],cache:t.measure.caches[s]};for(var u=0;u<t.rest.length;u++)if(It(t.rest[u])>l)return{map:t.measure.maps[u],cache:t.measure.caches[u],before:!0}}}function bc(t,n){n=_n(n);var l=It(n),s=t.display.externalMeasured=new yu(t.doc,n,l);s.lineN=l;var u=s.built=gu(t,s);return s.text=u.pre,xe(t.display.lineMeasure,u.pre),s}function Da(t,n,l,s){return Tn(t,na(t,n),l,s)}function Qo(t,n){if(n>=t.display.viewFrom&&n<t.display.viewTo)return t.display.view[oa(t,n)];var l=t.display.externalMeasured;if(l&&n>=l.lineN&&n<l.lineN+l.size)return l}function na(t,n){var l=It(n),s=Qo(t,l);s&&!s.text?s=null:s&&s.changes&&(Ks(t,s,l,il(t)),t.curOp.forceUpdate=!0),s||(s=bc(t,n));var u=Cu(s,n,l);return{line:n,view:s,rect:null,map:u.map,cache:u.cache,before:u.before,hasHeights:!1}}function Tn(t,n,l,s,u){n.before&&(l=-1);var p=l+(s||""),y;return n.cache.hasOwnProperty(p)?y=n.cache[p]:(n.rect||(n.rect=n.view.text.getBoundingClientRect()),n.hasHeights||(wu(t,n.view,n.rect),n.hasHeights=!0),y=xc(t,n,l,s),y.bogus||(n.cache[p]=y)),{left:y.left,right:y.right,top:u?y.rtop:y.top,bottom:u?y.rbottom:y.bottom}}var Xs={left:0,right:0,top:0,bottom:0};function Js(t,n,l){for(var s,u,p,y,x,C,P=0;P<t.length;P+=3)if(x=t[P],C=t[P+1],n<x?(u=0,p=1,y="left"):n<C?(u=n-x,p=u+1):(P==t.length-3||n==C&&t[P+3]>n)&&(p=C-x,u=p-1,n>=C&&(y="right")),u!=null){if(s=t[P+2],x==C&&l==(s.insertLeft?"left":"right")&&(y=l),l=="left"&&u==0)for(;P&&t[P-2]==t[P-3]&&t[P-1].insertLeft;)s=t[(P-=3)+2],y="left";if(l=="right"&&u==C-x)for(;P<t.length-3&&t[P+3]==t[P+4]&&!t[P+5].insertLeft;)s=t[(P+=3)+2],y="right";break}return{node:s,start:u,end:p,collapse:y,coverStart:x,coverEnd:C}}function Ba(t,n){var l=Xs;if(n=="left")for(var s=0;s<t.length&&(l=t[s]).left==l.right;s++);else for(var u=t.length-1;u>=0&&(l=t[u]).left==l.right;u--);return l}function xc(t,n,l,s){var u=Js(n.map,l,s),p=u.node,y=u.start,x=u.end,C=u.collapse,P;if(p.nodeType==3){for(var K=0;K<4;K++){for(;y&&jn(n.line.text.charAt(u.coverStart+y));)--y;for(;u.coverStart+x<u.coverEnd&&jn(n.line.text.charAt(u.coverStart+x));)++x;if(D&&j<9&&y==0&&x==u.coverEnd-u.coverStart?P=p.parentNode.getBoundingClientRect():P=Ba(ie(p,y,x).getClientRects(),s),P.left||P.right||y==0)break;x=y,y=y-1,C="right"}D&&j<11&&(P=Sc(t.display.measure,P))}else{y>0&&(C=s="right");var ne;t.options.lineWrapping&&(ne=p.getClientRects()).length>1?P=ne[s=="right"?ne.length-1:0]:P=p.getBoundingClientRect()}if(D&&j<9&&!y&&(!P||!P.left&&!P.right)){var ve=p.parentNode.getClientRects()[0];ve?P={left:ve.left,right:ve.left+ja(t.display),top:ve.top,bottom:ve.bottom}:P=Xs}for(var de=P.top-n.rect.top,Ee=P.bottom-n.rect.top,Ae=(de+Ee)/2,Ie=n.view.measure.heights,Le=0;Le<Ie.length-1&&!(Ae<Ie[Le]);Le++);var De=Le?Ie[Le-1]:0,Ne=Ie[Le],We={left:(C=="right"?P.right:P.left)-n.rect.left,right:(C=="left"?P.left:P.right)-n.rect.left,top:De,bottom:Ne};return!P.left&&!P.right&&(We.bogus=!0),t.options.singleCursorHeightPerLine||(We.rtop=de,We.rbottom=Ee),We}function Sc(t,n){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Jr(t))return n;var l=screen.logicalXDPI/screen.deviceXDPI,s=screen.logicalYDPI/screen.deviceYDPI;return{left:n.left*l,right:n.right*l,top:n.top*s,bottom:n.bottom*s}}function Qs(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var n=0;n<t.rest.length;n++)t.measure.caches[n]={}}function Zs(t){t.display.externalMeasure=null,pe(t.display.lineMeasure);for(var n=0;n<t.display.view.length;n++)Qs(t.display.view[n])}function mo(t){Zs(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function qs(t){return re&&N?-(t.body.getBoundingClientRect().left-parseInt(getComputedStyle(t.body).marginLeft)):t.defaultView.pageXOffset||(t.documentElement||t.body).scrollLeft}function Au(t){return re&&N?-(t.body.getBoundingClientRect().top-parseInt(getComputedStyle(t.body).marginTop)):t.defaultView.pageYOffset||(t.documentElement||t.body).scrollTop}function el(t){var n=_n(t),l=n.widgets,s=0;if(l)for(var u=0;u<l.length;++u)l[u].above&&(s+=Ci(l[u]));return s}function yo(t,n,l,s,u){if(!u){var p=el(n);l.top+=p,l.bottom+=p}if(s=="line")return l;s||(s="local");var y=wi(n);if(s=="local"?y+=vo(t.display):y-=t.display.viewOffset,s=="page"||s=="window"){var x=t.display.lineSpace.getBoundingClientRect();y+=x.top+(s=="window"?0:Au(ut(t)));var C=x.left+(s=="window"?0:qs(ut(t)));l.left+=C,l.right+=C}return l.top+=y,l.bottom+=y,l}function Ou(t,n,l){if(l=="div")return n;var s=n.left,u=n.top;if(l=="page")s-=qs(ut(t)),u-=Au(ut(t));else if(l=="local"||!l){var p=t.display.sizer.getBoundingClientRect();s+=p.left,u+=p.top}var y=t.display.lineSpace.getBoundingClientRect();return{left:s-y.left,top:u-y.top}}function Zo(t,n,l,s,u){return s||(s=Ge(t.doc,n.line)),yo(t,s,Da(t,s,n.ch,u),l)}function kn(t,n,l,s,u,p){s=s||Ge(t.doc,n.line),u||(u=na(t,s));function y(Ee,Ae){var Ie=Tn(t,u,Ee,Ae?"right":"left",p);return Ae?Ie.left=Ie.right:Ie.right=Ie.left,yo(t,s,Ie,l)}var x=tt(s,t.doc.direction),C=n.ch,P=n.sticky;if(C>=s.text.length?(C=s.text.length,P="before"):C<=0&&(C=0,P="after"),!x)return y(P=="before"?C-1:C,P=="before");function K(Ee,Ae,Ie){var Le=x[Ae],De=Le.level==1;return y(Ie?Ee-1:Ee,De!=Ie)}var ne=St(x,C,P),ve=Gt,de=K(C,ne,P=="before");return ve!=null&&(de.other=K(C,ve,P!="before")),de}function li(t,n){var l=0;n=$e(t.doc,n),t.options.lineWrapping||(l=ja(t.display)*n.ch);var s=Ge(t.doc,n.line),u=wi(s)+vo(t.display);return{left:l,right:l,top:u,bottom:u+s.height}}function tl(t,n,l,s,u){var p=T(t,n,l);return p.xRel=u,s&&(p.outside=s),p}function bo(t,n,l){var s=t.doc;if(l+=t.display.viewOffset,l<0)return tl(s.first,0,null,-1,-1);var u=bi(s,l),p=s.first+s.size-1;if(u>p)return tl(s.first+s.size-1,Ge(s,p).text.length,null,1,1);n<0&&(n=0);for(var y=Ge(s,u);;){var x=nl(t,y,u,n,l),C=cu(y,x.ch+(x.xRel>0||x.outside>0?1:0));if(!C)return x;var P=C.find(1);if(P.line==u)return P;y=Ge(s,u=P.line)}}function Eu(t,n,l,s){s-=el(n);var u=n.text.length,p=Mr(function(y){return Tn(t,l,y-1).bottom<=s},u,0);return u=Mr(function(y){return Tn(t,l,y).top>s},p,u),{begin:p,end:u}}function Tu(t,n,l,s){l||(l=na(t,n));var u=yo(t,n,Tn(t,l,s),"line").top;return Eu(t,n,l,u)}function rl(t,n,l,s){return t.bottom<=l?!1:t.top>l?!0:(s?t.left:t.right)>n}function nl(t,n,l,s,u){u-=wi(n);var p=na(t,n),y=el(n),x=0,C=n.text.length,P=!0,K=tt(n,t.doc.direction);if(K){var ne=(t.options.lineWrapping?Cc:wc)(t,n,l,p,K,s,u);P=ne.level!=1,x=P?ne.from:ne.to-1,C=P?ne.to:ne.from-1}var ve=null,de=null,Ee=Mr(function(Qe){var Ke=Tn(t,p,Qe);return Ke.top+=y,Ke.bottom+=y,rl(Ke,s,u,!1)?(Ke.top<=u&&Ke.left<=s&&(ve=Qe,de=Ke),!0):!1},x,C),Ae,Ie,Le=!1;if(de){var De=s-de.left<de.right-s,Ne=De==P;Ee=ve+(Ne?0:1),Ie=Ne?"after":"before",Ae=De?de.left:de.right}else{!P&&(Ee==C||Ee==x)&&Ee++,Ie=Ee==0?"after":Ee==n.text.length?"before":Tn(t,p,Ee-(P?1:0)).bottom+y<=u==P?"after":"before";var We=kn(t,T(l,Ee,Ie),"line",n,p);Ae=We.left,Le=u<We.top?-1:u>=We.bottom?1:0}return Ee=an(n.text,Ee,1),tl(l,Ee,Ie,Le,s-Ae)}function wc(t,n,l,s,u,p,y){var x=Mr(function(ne){var ve=u[ne],de=ve.level!=1;return rl(kn(t,T(l,de?ve.to:ve.from,de?"before":"after"),"line",n,s),p,y,!0)},0,u.length-1),C=u[x];if(x>0){var P=C.level!=1,K=kn(t,T(l,P?C.from:C.to,P?"after":"before"),"line",n,s);rl(K,p,y,!0)&&K.top>y&&(C=u[x-1])}return C}function Cc(t,n,l,s,u,p,y){var x=Eu(t,n,s,y),C=x.begin,P=x.end;/\s/.test(n.text.charAt(P-1))&&P--;for(var K=null,ne=null,ve=0;ve<u.length;ve++){var de=u[ve];if(!(de.from>=P||de.to<=C)){var Ee=de.level!=1,Ae=Tn(t,s,Ee?Math.min(P,de.to)-1:Math.max(C,de.from)).right,Ie=Ae<p?p-Ae+1e9:Ae-p;(!K||ne>Ie)&&(K=de,ne=Ie)}}return K||(K=u[u.length-1]),K.from<C&&(K={from:C,to:K.to,level:K.level}),K.to>P&&(K={from:K.from,to:P,level:K.level}),K}var ia;function Va(t){if(t.cachedTextHeight!=null)return t.cachedTextHeight;if(ia==null){ia=Q("pre",null,"CodeMirror-line-like");for(var n=0;n<49;++n)ia.appendChild(document.createTextNode("x")),ia.appendChild(Q("br"));ia.appendChild(document.createTextNode("x"))}xe(t.measure,ia);var l=ia.offsetHeight/50;return l>3&&(t.cachedTextHeight=l),pe(t.measure),l||1}function ja(t){if(t.cachedCharWidth!=null)return t.cachedCharWidth;var n=Q("span","xxxxxxxxxx"),l=Q("pre",[n],"CodeMirror-line-like");xe(t.measure,l);var s=n.getBoundingClientRect(),u=(s.right-s.left)/10;return u>2&&(t.cachedCharWidth=u),u||10}function il(t){for(var n=t.display,l={},s={},u=n.gutters.clientLeft,p=n.gutters.firstChild,y=0;p;p=p.nextSibling,++y){var x=t.display.gutterSpecs[y].className;l[x]=p.offsetLeft+p.clientLeft+u,s[x]=p.clientWidth}return{fixedPos:al(n),gutterTotalWidth:n.gutters.offsetWidth,gutterLeft:l,gutterWidth:s,wrapperWidth:n.wrapper.clientWidth}}function al(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function ku(t){var n=Va(t.display),l=t.options.lineWrapping,s=l&&Math.max(5,t.display.scroller.clientWidth/ja(t.display)-3);return function(u){if(Si(t.doc,u))return 0;var p=0;if(u.widgets)for(var y=0;y<u.widgets.length;y++)u.widgets[y].height&&(p+=u.widgets[y].height);return l?p+(Math.ceil(u.text.length/s)||1)*n:p+n}}function ol(t){var n=t.doc,l=ku(t);n.iter(function(s){var u=l(s);u!=s.height&&On(s,u)})}function aa(t,n,l,s){var u=t.display;if(!l&&Rr(n).getAttribute("cm-not-content")=="true")return null;var p,y,x=u.lineSpace.getBoundingClientRect();try{p=n.clientX-x.left,y=n.clientY-x.top}catch{return null}var C=bo(t,p,y),P;if(s&&C.xRel>0&&(P=Ge(t.doc,C.line).text).length==C.ch){var K=st(P,P.length,t.options.tabSize)-P.length;C=T(C.line,Math.max(0,Math.round((p-Su(t.display).left)/ja(t.display))-K))}return C}function oa(t,n){if(n>=t.display.viewTo||(n-=t.display.viewFrom,n<0))return null;for(var l=t.display.view,s=0;s<l.length;s++)if(n-=l[s].size,n<0)return s}function qr(t,n,l,s){n==null&&(n=t.doc.first),l==null&&(l=t.doc.first+t.doc.size),s||(s=0);var u=t.display;if(s&&l<u.viewTo&&(u.updateLineNumbers==null||u.updateLineNumbers>n)&&(u.updateLineNumbers=n),t.curOp.viewChanged=!0,n>=u.viewTo)si&&Mi(t.doc,n)<u.viewTo&&Ri(t);else if(l<=u.viewFrom)si&&pu(t.doc,l+s)>u.viewFrom?Ri(t):(u.viewFrom+=s,u.viewTo+=s);else if(n<=u.viewFrom&&l>=u.viewTo)Ri(t);else if(n<=u.viewFrom){var p=qo(t,l,l+s,1);p?(u.view=u.view.slice(p.index),u.viewFrom=p.lineN,u.viewTo+=s):Ri(t)}else if(l>=u.viewTo){var y=qo(t,n,n,-1);y?(u.view=u.view.slice(0,y.index),u.viewTo=y.lineN):Ri(t)}else{var x=qo(t,n,n,-1),C=qo(t,l,l+s,1);x&&C?(u.view=u.view.slice(0,x.index).concat(Ko(t,x.lineN,C.lineN)).concat(u.view.slice(C.index)),u.viewTo+=s):Ri(t)}var P=u.externalMeasured;P&&(l<P.lineN?P.lineN+=s:n<P.lineN+P.size&&(u.externalMeasured=null))}function Ni(t,n,l){t.curOp.viewChanged=!0;var s=t.display,u=t.display.externalMeasured;if(u&&n>=u.lineN&&n<u.lineN+u.size&&(s.externalMeasured=null),!(n<s.viewFrom||n>=s.viewTo)){var p=s.view[oa(t,n)];if(p.node!=null){var y=p.changes||(p.changes=[]);Re(y,l)==-1&&y.push(l)}}}function Ri(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function qo(t,n,l,s){var u=oa(t,n),p,y=t.display.view;if(!si||l==t.doc.first+t.doc.size)return{index:u,lineN:l};for(var x=t.display.viewFrom,C=0;C<u;C++)x+=y[C].size;if(x!=n){if(s>0){if(u==y.length-1)return null;p=x+y[u].size-n,u++}else p=x-n;n+=p,l+=p}for(;Mi(t.doc,l)!=l;){if(u==(s<0?0:y.length-1))return null;l+=s*y[u-(s<0?1:0)].size,u+=s}return{index:u,lineN:l}}function Ac(t,n,l){var s=t.display,u=s.view;u.length==0||n>=s.viewTo||l<=s.viewFrom?(s.view=Ko(t,n,l),s.viewFrom=n):(s.viewFrom>n?s.view=Ko(t,n,s.viewFrom).concat(s.view):s.viewFrom<n&&(s.view=s.view.slice(oa(t,n))),s.viewFrom=n,s.viewTo<l?s.view=s.view.concat(Ko(t,s.viewTo,l)):s.viewTo>l&&(s.view=s.view.slice(0,oa(t,l)))),s.viewTo=l}function Pu(t){for(var n=t.display.view,l=0,s=0;s<n.length;s++){var u=n[s];!u.hidden&&(!u.node||u.changes)&&++l}return l}function Wa(t){t.display.input.showSelection(t.display.input.prepareSelection())}function xo(t,n){n===void 0&&(n=!0);var l=t.doc,s={},u=s.cursors=document.createDocumentFragment(),p=s.selection=document.createDocumentFragment(),y=t.options.$customCursor;y&&(n=!0);for(var x=0;x<l.sel.ranges.length;x++)if(!(!n&&x==l.sel.primIndex)){var C=l.sel.ranges[x];if(!(C.from().line>=t.display.viewTo||C.to().line<t.display.viewFrom)){var P=C.empty();if(y){var K=y(t,C);K&&es(t,K,u)}else(P||t.options.showCursorWhenSelecting)&&es(t,C.head,u);P||Oc(t,C,p)}}return s}function es(t,n,l){var s=kn(t,n,"div",null,null,!t.options.singleCursorHeightPerLine),u=l.appendChild(Q("div","\xA0","CodeMirror-cursor"));if(u.style.left=s.left+"px",u.style.top=s.top+"px",u.style.height=Math.max(0,s.bottom-s.top)*t.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(t.getWrapperElement().className)){var p=Zo(t,n,"div",null,null),y=p.right-p.left;u.style.width=(y>0?y:t.defaultCharWidth())+"px"}if(s.other){var x=l.appendChild(Q("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));x.style.display="",x.style.left=s.other.left+"px",x.style.top=s.other.top+"px",x.style.height=(s.other.bottom-s.other.top)*.85+"px"}}function ts(t,n){return t.top-n.top||t.left-n.left}function Oc(t,n,l){var s=t.display,u=t.doc,p=document.createDocumentFragment(),y=Su(t.display),x=y.left,C=Math.max(s.sizerWidth,zn(t)-s.sizer.offsetLeft)-y.right,P=u.direction=="ltr";function K(Ne,We,Qe,Ke){We<0&&(We=0),We=Math.round(We),Ke=Math.round(Ke),p.appendChild(Q("div",null,"CodeMirror-selected","position: absolute; left: "+Ne+`px;
18
+ top: `+We+"px; width: "+(Qe??C-Ne)+`px;
19
+ height: `+(Ke-We)+"px"))}function ne(Ne,We,Qe){var Ke=Ge(u,Ne),bt=Ke.text.length,$t,wr;function rr(vr,tn){return Zo(t,T(Ne,vr),"div",Ke,tn)}function Sn(vr,tn,Ir){var mr=Tu(t,Ke,null,vr),gr=tn=="ltr"==(Ir=="after")?"left":"right",ur=Ir=="after"?mr.begin:mr.end-(/\s/.test(Ke.text.charAt(mr.end-1))?2:1);return rr(ur,gr)[gr]}var fn=tt(Ke,u.direction);return zr(fn,We||0,Qe??bt,function(vr,tn,Ir,mr){var gr=Ir=="ltr",ur=rr(vr,gr?"left":"right"),cn=rr(tn-1,gr?"right":"left"),Po=We==null&&vr==0,Sa=Qe==null&&tn==bt,jr=mr==0,Jn=!fn||mr==fn.length-1;if(cn.top-ur.top<=3){var Cr=(P?Po:Sa)&&jr,Lf=(P?Sa:Po)&&Jn,zi=Cr?x:(gr?ur:cn).left,no=Lf?C:(gr?cn:ur).right;K(zi,ur.top,no-zi,ur.bottom)}else{var io,Wr,Fn,Rl;gr?(io=P&&Po&&jr?x:ur.left,Wr=P?C:Sn(vr,Ir,"before"),Fn=P?x:Sn(tn,Ir,"after"),Rl=P&&Sa&&Jn?C:cn.right):(io=P?Sn(vr,Ir,"before"):x,Wr=!P&&Po&&jr?C:ur.right,Fn=!P&&Sa&&Jn?x:cn.left,Rl=P?Sn(tn,Ir,"after"):C),K(io,ur.top,Wr-io,ur.bottom),ur.bottom<cn.top&&K(x,ur.bottom,null,cn.top),K(Fn,cn.top,Rl-Fn,cn.bottom)}(!$t||ts(ur,$t)<0)&&($t=ur),ts(cn,$t)<0&&($t=cn),(!wr||ts(ur,wr)<0)&&(wr=ur),ts(cn,wr)<0&&(wr=cn)}),{start:$t,end:wr}}var ve=n.from(),de=n.to();if(ve.line==de.line)ne(ve.line,ve.ch,de.ch);else{var Ee=Ge(u,ve.line),Ae=Ge(u,de.line),Ie=_n(Ee)==_n(Ae),Le=ne(ve.line,ve.ch,Ie?Ee.text.length+1:null).end,De=ne(de.line,Ie?0:null,de.ch).start;Ie&&(Le.top<De.top-2?(K(Le.right,Le.top,null,Le.bottom),K(x,De.top,De.left,De.bottom)):K(Le.right,Le.top,De.left-Le.right,Le.bottom)),Le.bottom<De.top&&K(x,Le.bottom,null,De.top)}l.appendChild(p)}function Di(t){if(t.state.focused){var n=t.display;clearInterval(n.blinker);var l=!0;n.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?n.blinker=setInterval(function(){t.hasFocus()||Ha(t),n.cursorDiv.style.visibility=(l=!l)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(n.cursorDiv.style.visibility="hidden")}}function rs(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||ll(t))}function sl(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&Ha(t))},100)}function ll(t,n){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),t.options.readOnly!="nocursor"&&(t.state.focused||(nt(t,"focus",t,n),t.state.focused=!0,Ue(t.display.wrapper,"CodeMirror-focused"),!t.curOp&&t.display.selForContextMenu!=t.doc.sel&&(t.display.input.reset(),X&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Di(t))}function Ha(t,n){t.state.delayingBlurEvent||(t.state.focused&&(nt(t,"blur",t,n),t.state.focused=!1,q(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function ul(t){for(var n=t.display,l=n.lineDiv.offsetTop,s=Math.max(0,n.scroller.getBoundingClientRect().top),u=n.lineDiv.getBoundingClientRect().top,p=0,y=0;y<n.view.length;y++){var x=n.view[y],C=t.options.lineWrapping,P=void 0,K=0;if(!x.hidden){if(u+=x.line.height,D&&j<8){var ne=x.node.offsetTop+x.node.offsetHeight;P=ne-l,l=ne}else{var ve=x.node.getBoundingClientRect();P=ve.bottom-ve.top,!C&&x.text.firstChild&&(K=x.text.firstChild.getBoundingClientRect().right-ve.left-1)}var de=x.line.height-P;if((de>.005||de<-.005)&&(u<s&&(p-=de),On(x.line,P),Fu(x.line),x.rest))for(var Ee=0;Ee<x.rest.length;Ee++)Fu(x.rest[Ee]);if(K>t.display.sizerWidth){var Ae=Math.ceil(K/ja(t.display));Ae>t.display.maxLineLength&&(t.display.maxLineLength=Ae,t.display.maxLine=x.line,t.display.maxLineChanged=!0)}}}Math.abs(p)>2&&(n.scroller.scrollTop+=p)}function Fu(t){if(t.widgets)for(var n=0;n<t.widgets.length;++n){var l=t.widgets[n],s=l.node.parentNode;s&&(l.height=s.offsetHeight)}}function Ua(t,n,l){var s=l&&l.top!=null?Math.max(0,l.top):t.scroller.scrollTop;s=Math.floor(s-vo(t));var u=l&&l.bottom!=null?l.bottom:s+t.wrapper.clientHeight,p=bi(n,s),y=bi(n,u);if(l&&l.ensure){var x=l.ensure.from.line,C=l.ensure.to.line;x<p?(p=x,y=bi(n,wi(Ge(n,x))+t.wrapper.clientHeight)):Math.min(C,n.lastLine())>=y&&(p=bi(n,wi(Ge(n,C))-t.wrapper.clientHeight),y=C)}return{from:p,to:Math.max(y,p+1)}}function Ec(t,n){if(!ht(t,"scrollCursorIntoView")){var l=t.display,s=l.sizer.getBoundingClientRect(),u=null,p=l.wrapper.ownerDocument;if(n.top+s.top<0?u=!0:n.bottom+s.top>(p.defaultView.innerHeight||p.documentElement.clientHeight)&&(u=!1),u!=null&&!F){var y=Q("div","\u200B",null,`position: absolute;
20
20
  top: `+(n.top-l.viewOffset-vo(t.display))+`px;
21
21
  height: `+(n.bottom-n.top+gn(t)+l.barHeight)+`px;
22
- left: `+n.left+"px; width: "+Math.max(2,n.right-n.left)+"px;");t.display.lineSpace.appendChild(y),y.scrollIntoView(u),t.display.lineSpace.removeChild(y)}}}function Tc(t,n,l,s){s==null&&(s=0);var u;!t.options.lineWrapping&&n==l&&(l=n.sticky=="before"?T(n.line,n.ch+1,"before"):n,n=n.ch?T(n.line,n.sticky=="before"?n.ch-1:n.ch,"after"):n);for(var p=0;p<5;p++){var y=!1,x=kn(t,n),C=!l||l==n?x:kn(t,l);u={left:Math.min(x.left,C.left),top:Math.min(x.top,C.top)-s,right:Math.max(x.left,C.left),bottom:Math.max(x.bottom,C.bottom)+s};var P=fl(t,u),K=t.doc.scrollTop,ne=t.doc.scrollLeft;if(P.scrollTop!=null&&(za(t,P.scrollTop),Math.abs(t.doc.scrollTop-K)>1&&(y=!0)),P.scrollLeft!=null&&(la(t,P.scrollLeft),Math.abs(t.doc.scrollLeft-ne)>1&&(y=!0)),!y)break}return u}function kc(t,n){var l=fl(t,n);l.scrollTop!=null&&za(t,l.scrollTop),l.scrollLeft!=null&&la(t,l.scrollLeft)}function fl(t,n){var l=t.display,s=Va(t.display);n.top<0&&(n.top=0);var u=t.curOp&&t.curOp.scrollTop!=null?t.curOp.scrollTop:l.scroller.scrollTop,p=Jo(t),y={};n.bottom-n.top>p&&(n.bottom=n.top+p);var x=t.doc.height+go(l),C=n.top<s,P=n.bottom>x-s;if(n.top<u)y.scrollTop=C?0:n.top;else if(n.bottom>u+p){var K=Math.min(n.top,(P?x:n.bottom)-p);K!=u&&(y.scrollTop=K)}var ne=t.options.fixedGutter?0:l.gutters.offsetWidth,ve=t.curOp&&t.curOp.scrollLeft!=null?t.curOp.scrollLeft:l.scroller.scrollLeft-ne,de=zn(t)-l.gutters.offsetWidth,Ee=n.right-n.left>de;return Ee&&(n.right=n.left+de),n.left<10?y.scrollLeft=0:n.left<ve?y.scrollLeft=Math.max(0,n.left+ne-(Ee?0:10)):n.right>de+ve-3&&(y.scrollLeft=n.right+(Ee?0:10)-de),y}function cl(t,n){n!=null&&(ns(t),t.curOp.scrollTop=(t.curOp.scrollTop==null?t.doc.scrollTop:t.curOp.scrollTop)+n)}function _a(t){ns(t);var n=t.getCursor();t.curOp.scrollToPos={from:n,to:n,margin:t.options.cursorScrollMargin}}function sa(t,n,l){(n!=null||l!=null)&&ns(t),n!=null&&(t.curOp.scrollLeft=n),l!=null&&(t.curOp.scrollTop=l)}function Iu(t,n){ns(t),t.curOp.scrollToPos=n}function ns(t){var n=t.curOp.scrollToPos;if(n){t.curOp.scrollToPos=null;var l=li(t,n.from),s=li(t,n.to);Lu(t,l,s,n.margin)}}function Lu(t,n,l,s){var u=fl(t,{left:Math.min(n.left,l.left),top:Math.min(n.top,l.top)-s,right:Math.max(n.right,l.right),bottom:Math.max(n.bottom,l.bottom)+s});sa(t,u.scrollLeft,u.scrollTop)}function za(t,n){Math.abs(t.doc.scrollTop-n)<2||(m||hl(t,{top:n}),dl(t,n,!0),m&&hl(t),So(t,100))}function dl(t,n,l){n=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,n)),!(t.display.scroller.scrollTop==n&&!l)&&(t.doc.scrollTop=n,t.display.scrollbars.setScrollTop(n),t.display.scroller.scrollTop!=n&&(t.display.scroller.scrollTop=n))}function la(t,n,l,s){n=Math.max(0,Math.min(n,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),!((l?n==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-n)<2)&&!s)&&(t.doc.scrollLeft=n,ju(t),t.display.scroller.scrollLeft!=n&&(t.display.scroller.scrollLeft=n),t.display.scrollbars.setScrollLeft(n))}function Ga(t){var n=t.display,l=n.gutters.offsetWidth,s=Math.round(t.doc.height+go(t.display));return{clientHeight:n.scroller.clientHeight,viewHeight:n.wrapper.clientHeight,scrollWidth:n.scroller.scrollWidth,clientWidth:n.scroller.clientWidth,viewWidth:n.wrapper.clientWidth,barLeft:t.options.fixedGutter?l:0,docHeight:s,scrollHeight:s+gn(t)+n.barHeight,nativeBarWidth:n.nativeBarWidth,gutterWidth:l}}var Bi=function(t,n,l){this.cm=l;var s=this.vert=Q("div",[Q("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),u=this.horiz=Q("div",[Q("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");s.tabIndex=u.tabIndex=-1,t(s),t(u),se(s,"scroll",function(){s.clientHeight&&n(s.scrollTop,"vertical")}),se(u,"scroll",function(){u.clientWidth&&n(u.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,R&&V<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Bi.prototype.update=function(t){var n=t.scrollWidth>t.clientWidth+1,l=t.scrollHeight>t.clientHeight+1,s=t.nativeBarWidth;if(l){this.vert.style.display="block",this.vert.style.bottom=n?s+"px":"0";var u=t.viewHeight-(n?s:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+u)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(n){this.horiz.style.display="block",this.horiz.style.right=l?s+"px":"0",this.horiz.style.left=t.barLeft+"px";var p=t.viewWidth-t.barLeft-(l?s:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+p)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(s==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:l?s:0,bottom:n?s:0}},Bi.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Bi.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Bi.prototype.zeroWidthHack=function(){var t=M&&!J?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new He,this.disableVert=new He},Bi.prototype.enableZeroWidthBar=function(t,n,l){t.style.visibility="";function s(){var u=t.getBoundingClientRect(),p=l=="vert"?document.elementFromPoint(u.right-1,(u.top+u.bottom)/2):document.elementFromPoint((u.right+u.left)/2,u.bottom-1);p!=t?t.style.visibility="hidden":n.set(1e3,s)}n.set(1e3,s)},Bi.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var is=function(){};is.prototype.update=function(){return{bottom:0,right:0}},is.prototype.setScrollLeft=function(){},is.prototype.setScrollTop=function(){},is.prototype.clear=function(){};function $a(t,n){n||(n=Ga(t));var l=t.display.barWidth,s=t.display.barHeight;Mu(t,n);for(var u=0;u<4&&l!=t.display.barWidth||s!=t.display.barHeight;u++)l!=t.display.barWidth&&t.options.lineWrapping&&ul(t),Mu(t,Ga(t)),l=t.display.barWidth,s=t.display.barHeight}function Mu(t,n){var l=t.display,s=l.scrollbars.update(n);l.sizer.style.paddingRight=(l.barWidth=s.right)+"px",l.sizer.style.paddingBottom=(l.barHeight=s.bottom)+"px",l.heightForcer.style.borderBottom=s.bottom+"px solid transparent",s.right&&s.bottom?(l.scrollbarFiller.style.display="block",l.scrollbarFiller.style.height=s.bottom+"px",l.scrollbarFiller.style.width=s.right+"px"):l.scrollbarFiller.style.display="",s.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(l.gutterFiller.style.display="block",l.gutterFiller.style.height=s.bottom+"px",l.gutterFiller.style.width=n.gutterWidth+"px"):l.gutterFiller.style.display=""}var Nu={native:Bi,null:is};function Ru(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&q(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Nu[t.options.scrollbarStyle](function(n){t.display.wrapper.insertBefore(n,t.display.scrollbarFiller),se(n,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),n.setAttribute("cm-not-content","true")},function(n,l){l=="horizontal"?la(t,n):za(t,n)},t),t.display.scrollbars.addClass&&Ue(t.display.wrapper,t.display.scrollbars.addClass)}var Pc=0;function ua(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Pc,markArrays:null},cc(t.curOp)}function fa(t){var n=t.curOp;n&&dc(n,function(l){for(var s=0;s<l.ops.length;s++)l.ops[s].cm.curOp=null;as(l)})}function as(t){for(var n=t.ops,l=0;l<n.length;l++)Fc(n[l]);for(var s=0;s<n.length;s++)Ic(n[s]);for(var u=0;u<n.length;u++)Lc(n[u]);for(var p=0;p<n.length;p++)Mc(n[p]);for(var y=0;y<n.length;y++)Nc(n[y])}function Fc(t){var n=t.cm,l=n.display;Du(n),t.updateMaxLine&&zs(n),t.mustUpdate=t.viewChanged||t.forceUpdate||t.scrollTop!=null||t.scrollToPos&&(t.scrollToPos.from.line<l.viewFrom||t.scrollToPos.to.line>=l.viewTo)||l.maxLineChanged&&n.options.lineWrapping,t.update=t.mustUpdate&&new os(n,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Ic(t){t.updatedDisplay=t.mustUpdate&&Bu(t.cm,t.update)}function Lc(t){var n=t.cm,l=n.display;t.updatedDisplay&&ul(n),t.barMeasure=Ga(n),l.maxLineChanged&&!n.options.lineWrapping&&(t.adjustWidthTo=Da(n,l.maxLine,l.maxLine.text.length).left+3,n.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(l.scroller.clientWidth,l.sizer.offsetLeft+t.adjustWidthTo+gn(n)+n.display.barWidth),t.maxScrollLeft=Math.max(0,l.sizer.offsetLeft+t.adjustWidthTo-zn(n))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=l.input.prepareSelection())}function Mc(t){var n=t.cm;t.adjustWidthTo!=null&&(n.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<n.doc.scrollLeft&&la(n,Math.min(n.display.scroller.scrollLeft,t.maxScrollLeft),!0),n.display.maxLineChanged=!1);var l=t.focus&&t.focus==ze(ut(n));t.preparedSelection&&n.display.input.showSelection(t.preparedSelection,l),(t.updatedDisplay||t.startHeight!=n.doc.height)&&$a(n,t.barMeasure),t.updatedDisplay&&Vu(n,t.barMeasure),t.selectionChanged&&Di(n),n.state.focused&&t.updateInput&&n.display.input.reset(t.typing),l&&rs(t.cm)}function Nc(t){var n=t.cm,l=n.display,s=n.doc;if(t.updatedDisplay&&pl(n,t.update),l.wheelStartX!=null&&(t.scrollTop!=null||t.scrollLeft!=null||t.scrollToPos)&&(l.wheelStartX=l.wheelStartY=null),t.scrollTop!=null&&dl(n,t.scrollTop,t.forceScroll),t.scrollLeft!=null&&la(n,t.scrollLeft,!0,!0),t.scrollToPos){var u=Tc(n,$e(s,t.scrollToPos.from),$e(s,t.scrollToPos.to),t.scrollToPos.margin);Ec(n,u)}var p=t.maybeHiddenMarkers,y=t.maybeUnhiddenMarkers;if(p)for(var x=0;x<p.length;++x)p[x].lines.length||nt(p[x],"hide");if(y)for(var C=0;C<y.length;++C)y[C].lines.length&&nt(y[C],"unhide");l.wrapper.offsetHeight&&(s.scrollTop=n.display.scroller.scrollTop),t.changeObjs&&nt(n,"changes",n,t.changeObjs),t.update&&t.update.finish()}function ln(t,n){if(t.curOp)return n();ua(t);try{return n()}finally{fa(t)}}function br(t,n){return function(){if(t.curOp)return n.apply(t,arguments);ua(t);try{return n.apply(t,arguments)}finally{fa(t)}}}function Vr(t){return function(){if(this.curOp)return t.apply(this,arguments);ua(this);try{return t.apply(this,arguments)}finally{fa(this)}}}function xr(t){return function(){var n=this.cm;if(!n||n.curOp)return t.apply(this,arguments);ua(n);try{return t.apply(this,arguments)}finally{fa(n)}}}function So(t,n){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(n,gt(Rc,t))}function Rc(t){var n=t.doc;if(!(n.highlightFrontier>=t.display.viewTo)){var l=+new Date+t.options.workTime,s=Fa(t,n.highlightFrontier),u=[];n.iter(s.line,Math.min(n.first+n.size,t.display.viewTo+500),function(p){if(s.line>=t.display.viewFrom){var y=p.styles,x=p.text.length>t.options.maxHighlightLength?An(n.mode,s.state):null,C=ru(t,p,s,!0);x&&(s.state=x),p.styles=C.styles;var P=p.styleClasses,K=C.classes;K?p.styleClasses=K:P&&(p.styleClasses=null);for(var ne=!y||y.length!=p.styles.length||P!=K&&(!P||!K||P.bgClass!=K.bgClass||P.textClass!=K.textClass),ve=0;!ne&&ve<y.length;++ve)ne=y[ve]!=p.styles[ve];ne&&u.push(s.line),p.stateAfter=s.save(),s.nextLine()}else p.text.length<=t.options.maxHighlightLength&&Wo(t,p.text,s),p.stateAfter=s.line%5==0?s.save():null,s.nextLine();if(+new Date>l)return So(t,t.options.workDelay),!0}),n.highlightFrontier=s.line,n.modeFrontier=Math.max(n.modeFrontier,s.line),u.length&&ln(t,function(){for(var p=0;p<u.length;p++)Ni(t,u[p],"text")})}}var os=function(t,n,l){var s=t.display;this.viewport=n,this.visible=Ua(s,t.doc,n),this.editorIsHidden=!s.wrapper.offsetWidth,this.wrapperHeight=s.wrapper.clientHeight,this.wrapperWidth=s.wrapper.clientWidth,this.oldDisplayWidth=zn(t),this.force=l,this.dims=il(t),this.events=[]};os.prototype.signal=function(t,n){Qt(t,n)&&this.events.push(arguments)},os.prototype.finish=function(){for(var t=0;t<this.events.length;t++)nt.apply(null,this.events[t])};function Du(t){var n=t.display;!n.scrollbarsClipped&&n.scroller.offsetWidth&&(n.nativeBarWidth=n.scroller.offsetWidth-n.scroller.clientWidth,n.heightForcer.style.height=gn(t)+"px",n.sizer.style.marginBottom=-n.nativeBarWidth+"px",n.sizer.style.borderRightWidth=gn(t)+"px",n.scrollbarsClipped=!0)}function Dc(t){if(t.hasFocus())return null;var n=ze(ut(t));if(!n||!je(t.display.lineDiv,n))return null;var l={activeElt:n};if(window.getSelection){var s=er(t).getSelection();s.anchorNode&&s.extend&&je(t.display.lineDiv,s.anchorNode)&&(l.anchorNode=s.anchorNode,l.anchorOffset=s.anchorOffset,l.focusNode=s.focusNode,l.focusOffset=s.focusOffset)}return l}function Bc(t){if(!(!t||!t.activeElt||t.activeElt==ze(t.activeElt.ownerDocument))&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&je(document.body,t.anchorNode)&&je(document.body,t.focusNode))){var n=t.activeElt.ownerDocument,l=n.defaultView.getSelection(),s=n.createRange();s.setEnd(t.anchorNode,t.anchorOffset),s.collapse(!1),l.removeAllRanges(),l.addRange(s),l.extend(t.focusNode,t.focusOffset)}}function Bu(t,n){var l=t.display,s=t.doc;if(n.editorIsHidden)return Ri(t),!1;if(!n.force&&n.visible.from>=l.viewFrom&&n.visible.to<=l.viewTo&&(l.updateLineNumbers==null||l.updateLineNumbers>=l.viewTo)&&l.renderedView==l.view&&Pu(t)==0)return!1;Wu(t)&&(Ri(t),n.dims=il(t));var u=s.first+s.size,p=Math.max(n.visible.from-t.options.viewportMargin,s.first),y=Math.min(u,n.visible.to+t.options.viewportMargin);l.viewFrom<p&&p-l.viewFrom<20&&(p=Math.max(s.first,l.viewFrom)),l.viewTo>y&&l.viewTo-y<20&&(y=Math.min(u,l.viewTo)),si&&(p=Mi(t.doc,p),y=pu(t.doc,y));var x=p!=l.viewFrom||y!=l.viewTo||l.lastWrapHeight!=n.wrapperHeight||l.lastWrapWidth!=n.wrapperWidth;Ac(t,p,y),l.viewOffset=wi(Ge(t.doc,l.viewFrom)),t.display.mover.style.top=l.viewOffset+"px";var C=Pu(t);if(!x&&C==0&&!n.force&&l.renderedView==l.view&&(l.updateLineNumbers==null||l.updateLineNumbers>=l.viewTo))return!1;var P=Dc(t);return C>4&&(l.lineDiv.style.display="none"),Vc(t,l.updateLineNumbers,n.dims),C>4&&(l.lineDiv.style.display=""),l.renderedView=l.view,Bc(P),pe(l.cursorDiv),pe(l.selectionDiv),l.gutters.style.height=l.sizer.style.minHeight=0,x&&(l.lastWrapHeight=n.wrapperHeight,l.lastWrapWidth=n.wrapperWidth,So(t,400)),l.updateLineNumbers=null,!0}function pl(t,n){for(var l=n.viewport,s=!0;;s=!1){if(!s||!t.options.lineWrapping||n.oldDisplayWidth==zn(t)){if(l&&l.top!=null&&(l={top:Math.min(t.doc.height+go(t.display)-Jo(t),l.top)}),n.visible=Ua(t.display,t.doc,l),n.visible.from>=t.display.viewFrom&&n.visible.to<=t.display.viewTo)break}else s&&(n.visible=Ua(t.display,t.doc,l));if(!Bu(t,n))break;ul(t);var u=Ga(t);Wa(t),$a(t,u),Vu(t,u),n.force=!1}n.signal(t,"update",t),(t.display.viewFrom!=t.display.reportedViewFrom||t.display.viewTo!=t.display.reportedViewTo)&&(n.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function hl(t,n){var l=new os(t,n);if(Bu(t,l)){ul(t),pl(t,l);var s=Ga(t);Wa(t),$a(t,s),Vu(t,s),l.finish()}}function Vc(t,n,l){var s=t.display,u=t.options.lineNumbers,p=s.lineDiv,y=p.firstChild;function x(Ee){var Ae=Ee.nextSibling;return X&&M&&t.display.currentWheelTarget==Ee?Ee.style.display="none":Ee.parentNode.removeChild(Ee),Ae}for(var C=s.view,P=s.viewFrom,K=0;K<C.length;K++){var ne=C[K];if(!ne.hidden)if(!ne.node||ne.node.parentNode!=p){var ve=mc(t,ne,P,l);p.insertBefore(ve,y)}else{for(;y!=ne.node;)y=x(y);var de=u&&n!=null&&n<=P&&ne.lineNumber;ne.changes&&(Re(ne.changes,"gutter")>-1&&(de=!1),Ks(t,ne,P,l)),de&&(pe(ne.lineNumber),ne.lineNumber.appendChild(document.createTextNode(Pa(t.options,P)))),y=ne.node.nextSibling}P+=ne.size}for(;y;)y=x(y)}function vl(t){var n=t.gutters.offsetWidth;t.sizer.style.marginLeft=n+"px",yr(t,"gutterChanged",t)}function Vu(t,n){t.display.sizer.style.minHeight=n.docHeight+"px",t.display.heightForcer.style.top=n.docHeight+"px",t.display.gutters.style.height=n.docHeight+t.display.barHeight+gn(t)+"px"}function ju(t){var n=t.display,l=n.view;if(!(!n.alignWidgets&&(!n.gutters.firstChild||!t.options.fixedGutter))){for(var s=al(n)-n.scroller.scrollLeft+t.doc.scrollLeft,u=n.gutters.offsetWidth,p=s+"px",y=0;y<l.length;y++)if(!l[y].hidden){t.options.fixedGutter&&(l[y].gutter&&(l[y].gutter.style.left=p),l[y].gutterBackground&&(l[y].gutterBackground.style.left=p));var x=l[y].alignable;if(x)for(var C=0;C<x.length;C++)x[C].style.left=p}t.options.fixedGutter&&(n.gutters.style.left=s+u+"px")}}function Wu(t){if(!t.options.lineNumbers)return!1;var n=t.doc,l=Pa(t.options,n.first+n.size-1),s=t.display;if(l.length!=s.lineNumChars){var u=s.measure.appendChild(Q("div",[Q("div",l)],"CodeMirror-linenumber CodeMirror-gutter-elt")),p=u.firstChild.offsetWidth,y=u.offsetWidth-p;return s.lineGutter.style.width="",s.lineNumInnerWidth=Math.max(p,s.lineGutter.offsetWidth-y)+1,s.lineNumWidth=s.lineNumInnerWidth+y,s.lineNumChars=s.lineNumInnerWidth?l.length:-1,s.lineGutter.style.width=s.lineNumWidth+"px",vl(t.display),!0}return!1}function ss(t,n){for(var l=[],s=!1,u=0;u<t.length;u++){var p=t[u],y=null;if(typeof p!="string"&&(y=p.style,p=p.className),p=="CodeMirror-linenumbers")if(n)s=!0;else continue;l.push({className:p,style:y})}return n&&!s&&l.push({className:"CodeMirror-linenumbers",style:null}),l}function Hu(t){var n=t.gutters,l=t.gutterSpecs;pe(n),t.lineGutter=null;for(var s=0;s<l.length;++s){var u=l[s],p=u.className,y=u.style,x=n.appendChild(Q("div",null,"CodeMirror-gutter "+p));y&&(x.style.cssText=y),p=="CodeMirror-linenumbers"&&(t.lineGutter=x,x.style.width=(t.lineNumWidth||1)+"px")}n.style.display=l.length?"":"none",vl(t)}function Ka(t){Hu(t.display),qr(t),ju(t)}function jc(t,n,l,s){var u=this;this.input=l,u.scrollbarFiller=Q("div",null,"CodeMirror-scrollbar-filler"),u.scrollbarFiller.setAttribute("cm-not-content","true"),u.gutterFiller=Q("div",null,"CodeMirror-gutter-filler"),u.gutterFiller.setAttribute("cm-not-content","true"),u.lineDiv=ye("div",null,"CodeMirror-code"),u.selectionDiv=Q("div",null,null,"position: relative; z-index: 1"),u.cursorDiv=Q("div",null,"CodeMirror-cursors"),u.measure=Q("div",null,"CodeMirror-measure"),u.lineMeasure=Q("div",null,"CodeMirror-measure"),u.lineSpace=ye("div",[u.measure,u.lineMeasure,u.selectionDiv,u.cursorDiv,u.lineDiv],null,"position: relative; outline: none");var p=ye("div",[u.lineSpace],"CodeMirror-lines");u.mover=Q("div",[p],null,"position: relative"),u.sizer=Q("div",[u.mover],"CodeMirror-sizer"),u.sizerWidth=null,u.heightForcer=Q("div",null,null,"position: absolute; height: "+Be+"px; width: 1px;"),u.gutters=Q("div",null,"CodeMirror-gutters"),u.lineGutter=null,u.scroller=Q("div",[u.sizer,u.heightForcer,u.gutters],"CodeMirror-scroll"),u.scroller.setAttribute("tabIndex","-1"),u.wrapper=Q("div",[u.scrollbarFiller,u.gutterFiller,u.scroller],"CodeMirror"),re&&he>=105&&(u.wrapper.style.clipPath="inset(0px)"),u.wrapper.setAttribute("translate","no"),R&&V<8&&(u.gutters.style.zIndex=-1,u.scroller.style.paddingRight=0),!X&&!(m&&w)&&(u.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(u.wrapper):t(u.wrapper)),u.viewFrom=u.viewTo=n.first,u.reportedViewFrom=u.reportedViewTo=n.first,u.view=[],u.renderedView=null,u.externalMeasured=null,u.viewOffset=0,u.lastWrapHeight=u.lastWrapWidth=0,u.updateLineNumbers=null,u.nativeBarWidth=u.barHeight=u.barWidth=0,u.scrollbarsClipped=!1,u.lineNumWidth=u.lineNumInnerWidth=u.lineNumChars=null,u.alignWidgets=!1,u.cachedCharWidth=u.cachedTextHeight=u.cachedPaddingH=null,u.maxLine=null,u.maxLineLength=0,u.maxLineChanged=!1,u.wheelDX=u.wheelDY=u.wheelStartX=u.wheelStartY=null,u.shift=!1,u.selForContextMenu=null,u.activeTouch=null,u.gutterSpecs=ss(s.gutters,s.lineNumbers),Hu(u),l.init(u)}var ls=0,Oi=null;R?Oi=-.53:m?Oi=15:re?Oi=-.7:fe&&(Oi=-1/3);function Uu(t){var n=t.wheelDeltaX,l=t.wheelDeltaY;return n==null&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(n=t.detail),l==null&&t.detail&&t.axis==t.VERTICAL_AXIS?l=t.detail:l==null&&(l=t.wheelDelta),{x:n,y:l}}function Wc(t){var n=Uu(t);return n.x*=Oi,n.y*=Oi,n}function _u(t,n){re&&he==102&&(t.display.chromeScrollHack==null?t.display.sizer.style.pointerEvents="none":clearTimeout(t.display.chromeScrollHack),t.display.chromeScrollHack=setTimeout(function(){t.display.chromeScrollHack=null,t.display.sizer.style.pointerEvents=""},100));var l=Uu(n),s=l.x,u=l.y,p=Oi;n.deltaMode===0&&(s=n.deltaX,u=n.deltaY,p=1);var y=t.display,x=y.scroller,C=x.scrollWidth>x.clientWidth,P=x.scrollHeight>x.clientHeight;if(s&&C||u&&P){if(u&&M&&X){e:for(var K=n.target,ne=y.view;K!=x;K=K.parentNode)for(var ve=0;ve<ne.length;ve++)if(ne[ve].node==K){t.display.currentWheelTarget=K;break e}}if(s&&!m&&!oe&&p!=null){u&&P&&za(t,Math.max(0,x.scrollTop+u*p)),la(t,Math.max(0,x.scrollLeft+s*p)),(!u||u&&P)&&Ft(n),y.wheelStartX=null;return}if(u&&p!=null){var de=u*p,Ee=t.doc.scrollTop,Ae=Ee+y.wrapper.clientHeight;de<0?Ee=Math.max(0,Ee+de-50):Ae=Math.min(t.doc.height,Ae+de+50),hl(t,{top:Ee,bottom:Ae})}ls<20&&n.deltaMode!==0&&(y.wheelStartX==null?(y.wheelStartX=x.scrollLeft,y.wheelStartY=x.scrollTop,y.wheelDX=s,y.wheelDY=u,setTimeout(function(){if(y.wheelStartX!=null){var Ie=x.scrollLeft-y.wheelStartX,Le=x.scrollTop-y.wheelStartY,De=Le&&y.wheelDY&&Le/y.wheelDY||Ie&&y.wheelDX&&Ie/y.wheelDX;y.wheelStartX=y.wheelStartY=null,De&&(Oi=(Oi*ls+De)/(ls+1),++ls)}},200)):(y.wheelDX+=s,y.wheelDY+=u))}}var en=function(t,n){this.ranges=t,this.primIndex=n};en.prototype.primary=function(){return this.ranges[this.primIndex]},en.prototype.equals=function(t){if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var n=0;n<this.ranges.length;n++){var l=this.ranges[n],s=t.ranges[n];if(!Pe(l.anchor,s.anchor)||!Pe(l.head,s.head))return!1}return!0},en.prototype.deepCopy=function(){for(var t=[],n=0;n<this.ranges.length;n++)t[n]=new Dt(Fe(this.ranges[n].anchor),Fe(this.ranges[n].head));return new en(t,this.primIndex)},en.prototype.somethingSelected=function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},en.prototype.contains=function(t,n){n||(n=t);for(var l=0;l<this.ranges.length;l++){var s=this.ranges[l];if($(n,s.from())>=0&&$(t,s.to())<=0)return l}return-1};var Dt=function(t,n){this.anchor=t,this.head=n};Dt.prototype.from=function(){return wt(this.anchor,this.head)},Dt.prototype.to=function(){return it(this.anchor,this.head)},Dt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Gn(t,n,l){var s=t&&t.options.selectionsMayTouch,u=n[l];n.sort(function(ve,de){return $(ve.from(),de.from())}),l=Re(n,u);for(var p=1;p<n.length;p++){var y=n[p],x=n[p-1],C=$(x.to(),y.from());if(s&&!y.empty()?C>0:C>=0){var P=wt(x.from(),y.from()),K=it(x.to(),y.to()),ne=x.empty()?y.from()==y.head:x.from()==x.head;p<=l&&--l,n.splice(--p,2,new Dt(ne?K:P,ne?P:K))}}return new en(n,l)}function Vi(t,n){return new en([new Dt(t,n||t)],0)}function ji(t){return t.text?T(t.from.line+t.text.length-1,et(t.text).length+(t.text.length==1?t.from.ch:0)):t.to}function zu(t,n){if($(t,n.from)<0)return t;if($(t,n.to)<=0)return ji(n);var l=t.line+n.text.length-(n.to.line-n.from.line)-1,s=t.ch;return t.line==n.to.line&&(s+=ji(n).ch-n.to.ch),T(l,s)}function A(t,n){for(var l=[],s=0;s<t.sel.ranges.length;s++){var u=t.sel.ranges[s];l.push(new Dt(zu(u.anchor,n),zu(u.head,n)))}return Gn(t.cm,l,t.sel.primIndex)}function Jt(t,n,l){return t.line==n.line?T(l.line,t.ch-n.ch+l.ch):T(l.line+(t.line-n.line),t.ch)}function ui(t,n,l){for(var s=[],u=T(t.first,0),p=u,y=0;y<n.length;y++){var x=n[y],C=Jt(x.from,u,p),P=Jt(ji(x),u,p);if(u=x.to,p=P,l=="around"){var K=t.sel.ranges[y],ne=$(K.head,K.anchor)<0;s[y]=new Dt(ne?P:C,ne?C:P)}else s[y]=new Dt(C,C)}return new en(s,t.sel.primIndex)}function gl(t){t.doc.mode=Qr(t.options,t.doc.modeOption),wo(t)}function wo(t){t.doc.iter(function(n){n.stateAfter&&(n.stateAfter=null),n.styles&&(n.styles=null)}),t.doc.modeFrontier=t.doc.highlightFrontier=t.doc.first,So(t,100),t.state.modeGen++,t.curOp&&qr(t)}function Gu(t,n){return n.from.ch==0&&n.to.ch==0&&et(n.text)==""&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function ml(t,n,l,s){function u(De){return l?l[De]:null}function p(De,Ne,We){hu(De,Ne,We,s),yr(De,"change",De,n)}function y(De,Ne){for(var We=[],Qe=De;Qe<Ne;++Qe)We.push(new ta(P[Qe],u(Qe),s));return We}var x=n.from,C=n.to,P=n.text,K=Ge(t,x.line),ne=Ge(t,C.line),ve=et(P),de=u(P.length-1),Ee=C.line-x.line;if(n.full)t.insert(0,y(0,P.length)),t.remove(P.length,t.size-P.length);else if(Gu(t,n)){var Ae=y(0,P.length-1);p(ne,ne.text,de),Ee&&t.remove(x.line,Ee),Ae.length&&t.insert(x.line,Ae)}else if(K==ne)if(P.length==1)p(K,K.text.slice(0,x.ch)+ve+K.text.slice(C.ch),de);else{var Ie=y(1,P.length-1);Ie.push(new ta(ve+K.text.slice(C.ch),de,s)),p(K,K.text.slice(0,x.ch)+P[0],u(0)),t.insert(x.line+1,Ie)}else if(P.length==1)p(K,K.text.slice(0,x.ch)+P[0]+ne.text.slice(C.ch),u(0)),t.remove(x.line+1,Ee);else{p(K,K.text.slice(0,x.ch)+P[0],u(0)),p(ne,ve+ne.text.slice(C.ch),de);var Le=y(1,P.length-1);Ee>1&&t.remove(x.line+1,Ee-1),t.insert(x.line+1,Le)}yr(t,"change",t,n)}function Wi(t,n,l){function s(u,p,y){if(u.linked)for(var x=0;x<u.linked.length;++x){var C=u.linked[x];if(C.doc!=p){var P=y&&C.sharedHist;l&&!P||(n(C.doc,P),s(C.doc,u,P))}}}s(t,null,!0)}function $u(t,n){if(n.cm)throw new Error("This document is already in use.");t.doc=n,n.cm=t,ol(t),gl(t),yl(t),t.options.direction=n.direction,t.options.lineWrapping||zs(t),t.options.mode=n.modeOption,qr(t)}function yl(t){(t.doc.direction=="rtl"?Ue:q)(t.display.lineDiv,"CodeMirror-rtl")}function Hc(t){ln(t,function(){yl(t),qr(t)})}function us(t){this.done=[],this.undone=[],this.undoDepth=t?t.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=t?t.maxGeneration:1}function fs(t,n){var l={from:Fe(n.from),to:ji(n),text:yi(t,n.from,n.to)};return $n(t,l,n.from.line,n.to.line+1),Wi(t,function(s){return $n(s,l,n.from.line,n.to.line+1)},!0),l}function Ku(t){for(;t.length;){var n=et(t);if(n.ranges)t.pop();else break}}function Uc(t,n){if(n)return Ku(t.done),et(t.done);if(t.done.length&&!et(t.done).ranges)return et(t.done);if(t.done.length>1&&!t.done[t.done.length-2].ranges)return t.done.pop(),et(t.done)}function Yu(t,n,l,s){var u=t.history;u.undone.length=0;var p=+new Date,y,x;if((u.lastOp==s||u.lastOrigin==n.origin&&n.origin&&(n.origin.charAt(0)=="+"&&u.lastModTime>p-(t.cm?t.cm.options.historyEventDelay:500)||n.origin.charAt(0)=="*"))&&(y=Uc(u,u.lastOp==s)))x=et(y.changes),$(n.from,n.to)==0&&$(n.from,x.to)==0?x.to=ji(n):y.changes.push(fs(t,n));else{var C=et(u.done);for((!C||!C.ranges)&&ca(t.sel,u.done),y={changes:[fs(t,n)],generation:u.generation},u.done.push(y);u.done.length>u.undoDepth;)u.done.shift(),u.done[0].ranges||u.done.shift()}u.done.push(l),u.generation=++u.maxGeneration,u.lastModTime=u.lastSelTime=p,u.lastOp=u.lastSelOp=s,u.lastOrigin=u.lastSelOrigin=n.origin,x||nt(t,"historyAdded")}function _c(t,n,l,s){var u=n.charAt(0);return u=="*"||u=="+"&&l.ranges.length==s.ranges.length&&l.somethingSelected()==s.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function zc(t,n,l,s){var u=t.history,p=s&&s.origin;l==u.lastSelOp||p&&u.lastSelOrigin==p&&(u.lastModTime==u.lastSelTime&&u.lastOrigin==p||_c(t,p,et(u.done),n))?u.done[u.done.length-1]=n:ca(n,u.done),u.lastSelTime=+new Date,u.lastSelOrigin=p,u.lastSelOp=l,s&&s.clearRedo!==!1&&Ku(u.undone)}function ca(t,n){var l=et(n);l&&l.ranges&&l.equals(t)||n.push(t)}function $n(t,n,l,s){var u=n["spans_"+t.id],p=0;t.iter(Math.max(t.first,l),Math.min(t.first+t.size,s),function(y){y.markedSpans&&((u||(u=n["spans_"+t.id]={}))[p]=y.markedSpans),++p})}function Xu(t){if(!t)return null;for(var n,l=0;l<t.length;++l)t[l].marker.explicitlyCleared?n||(n=t.slice(0,l)):n&&n.push(t[l]);return n?n.length?n:null:t}function Ju(t,n){var l=n["spans_"+t.id];if(!l)return null;for(var s=[],u=0;u<n.text.length;++u)s.push(Xu(l[u]));return s}function Qu(t,n){var l=Ju(t,n),s=_o(t,n);if(!l)return s;if(!s)return l;for(var u=0;u<l.length;++u){var p=l[u],y=s[u];if(p&&y)e:for(var x=0;x<y.length;++x){for(var C=y[x],P=0;P<p.length;++P)if(p[P].marker==C.marker)continue e;p.push(C)}else y&&(l[u]=y)}return l}function da(t,n,l){for(var s=[],u=0;u<t.length;++u){var p=t[u];if(p.ranges){s.push(l?en.prototype.deepCopy.call(p):p);continue}var y=p.changes,x=[];s.push({changes:x});for(var C=0;C<y.length;++C){var P=y[C],K=void 0;if(x.push({from:P.from,to:P.to,text:P.text}),n)for(var ne in P)(K=ne.match(/^spans_(\d+)$/))&&Re(n,Number(K[1]))>-1&&(et(x)[ne]=P[ne],delete P[ne])}}return s}function cs(t,n,l,s){if(s){var u=t.anchor;if(l){var p=$(n,u)<0;p!=$(l,u)<0?(u=n,n=l):p!=$(n,l)<0&&(n=l)}return new Dt(u,n)}else return new Dt(l||n,n)}function pa(t,n,l,s,u){u==null&&(u=t.cm&&(t.cm.display.shift||t.extend)),Sr(t,new en([cs(t.sel.primary(),n,l,u)],0),s)}function Zu(t,n,l){for(var s=[],u=t.cm&&(t.cm.display.shift||t.extend),p=0;p<t.sel.ranges.length;p++)s[p]=cs(t.sel.ranges[p],n[p],null,u);var y=Gn(t.cm,s,t.sel.primIndex);Sr(t,y,l)}function ds(t,n,l,s){var u=t.sel.ranges.slice(0);u[n]=l,Sr(t,Gn(t.cm,u,t.sel.primIndex),s)}function bl(t,n,l,s){Sr(t,Vi(n,l),s)}function qu(t,n,l){var s={ranges:n.ranges,update:function(u){this.ranges=[];for(var p=0;p<u.length;p++)this.ranges[p]=new Dt($e(t,u[p].anchor),$e(t,u[p].head))},origin:l&&l.origin};return nt(t,"beforeSelectionChange",t,s),t.cm&&nt(t.cm,"beforeSelectionChange",t.cm,s),s.ranges!=n.ranges?Gn(t.cm,s.ranges,s.ranges.length-1):n}function ef(t,n,l){var s=t.history.done,u=et(s);u&&u.ranges?(s[s.length-1]=n,xt(t,n,l)):Sr(t,n,l)}function Sr(t,n,l){xt(t,n,l),zc(t,t.sel,t.cm?t.cm.curOp.id:NaN,l)}function xt(t,n,l){(Qt(t,"beforeSelectionChange")||t.cm&&Qt(t.cm,"beforeSelectionChange"))&&(n=qu(t,n,l));var s=l&&l.bias||($(n.primary().head,t.sel.primary().head)<0?-1:1);At(t,mn(t,n,s,!0)),!(l&&l.scroll===!1)&&t.cm&&t.cm.getOption("readOnly")!="nocursor"&&_a(t.cm)}function At(t,n){n.equals(t.sel)||(t.sel=n,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,ct(t.cm)),yr(t,"cursorActivity",t))}function dt(t){At(t,mn(t,t.sel,null,!1))}function mn(t,n,l,s){for(var u,p=0;p<n.ranges.length;p++){var y=n.ranges[p],x=n.ranges.length==t.sel.ranges.length&&t.sel.ranges[p],C=ps(t,y.anchor,x&&x.anchor,l,s),P=y.head==y.anchor?C:ps(t,y.head,x&&x.head,l,s);(u||C!=y.anchor||P!=y.head)&&(u||(u=n.ranges.slice(0,p)),u[p]=new Dt(C,P))}return u?Gn(t.cm,u,n.primIndex):n}function Ya(t,n,l,s,u){var p=Ge(t,n.line);if(p.markedSpans)for(var y=0;y<p.markedSpans.length;++y){var x=p.markedSpans[y],C=x.marker,P="selectLeft"in C?!C.selectLeft:C.inclusiveLeft,K="selectRight"in C?!C.selectRight:C.inclusiveRight;if((x.from==null||(P?x.from<=n.ch:x.from<n.ch))&&(x.to==null||(K?x.to>=n.ch:x.to>n.ch))){if(u&&(nt(C,"beforeCursorEnter"),C.explicitlyCleared))if(p.markedSpans){--y;continue}else break;if(!C.atomic)continue;if(l){var ne=C.find(s<0?1:-1),ve=void 0;if((s<0?K:P)&&(ne=tf(t,ne,-s,ne&&ne.line==n.line?p:null)),ne&&ne.line==n.line&&(ve=$(ne,l))&&(s<0?ve<0:ve>0))return Ya(t,ne,n,s,u)}var de=C.find(s<0?-1:1);return(s<0?P:K)&&(de=tf(t,de,s,de.line==n.line?p:null)),de?Ya(t,de,n,s,u):null}}return n}function ps(t,n,l,s,u){var p=s||1,y=Ya(t,n,l,p,u)||!u&&Ya(t,n,l,p,!0)||Ya(t,n,l,-p,u)||!u&&Ya(t,n,l,-p,!0);return y||(t.cantEdit=!0,T(t.first,0))}function tf(t,n,l,s){return l<0&&n.ch==0?n.line>t.first?$e(t,T(n.line-1)):null:l>0&&n.ch==(s||Ge(t,n.line)).text.length?n.line<t.first+t.size-1?T(n.line+1,0):null:new T(n.line,n.ch+l)}function Hi(t){t.setSelection(T(t.firstLine(),0),T(t.lastLine()),_t)}function rf(t,n,l){var s={canceled:!1,from:n.from,to:n.to,text:n.text,origin:n.origin,cancel:function(){return s.canceled=!0}};return l&&(s.update=function(u,p,y,x){u&&(s.from=$e(t,u)),p&&(s.to=$e(t,p)),y&&(s.text=y),x!==void 0&&(s.origin=x)}),nt(t,"beforeChange",t,s),t.cm&&nt(t.cm,"beforeChange",t.cm,s),s.canceled?(t.cm&&(t.cm.curOp.updateInput=2),null):{from:s.from,to:s.to,text:s.text,origin:s.origin}}function ha(t,n,l){if(t.cm){if(!t.cm.curOp)return br(t.cm,ha)(t,n,l);if(t.cm.state.suppressEdits)return}if(!((Qt(t,"beforeChange")||t.cm&&Qt(t.cm,"beforeChange"))&&(n=rf(t,n,!0),!n))){var s=ou&&!l&&Hs(t,n.from,n.to);if(s)for(var u=s.length-1;u>=0;--u)xl(t,{from:s[u].from,to:s[u].to,text:u?[""]:n.text,origin:n.origin});else xl(t,n)}}function xl(t,n){if(!(n.text.length==1&&n.text[0]==""&&$(n.from,n.to)==0)){var l=A(t,n);Yu(t,n,l,t.cm?t.cm.curOp.id:NaN),Co(t,n,l,_o(t,n));var s=[];Wi(t,function(u,p){!p&&Re(s,u.history)==-1&&(Sl(u.history,n),s.push(u.history)),Co(u,n,null,_o(u,n))})}}function hs(t,n,l){var s=t.cm&&t.cm.state.suppressEdits;if(!(s&&!l)){for(var u=t.history,p,y=t.sel,x=n=="undo"?u.done:u.undone,C=n=="undo"?u.undone:u.done,P=0;P<x.length&&(p=x[P],!(l?p.ranges&&!p.equals(t.sel):!p.ranges));P++);if(P!=x.length){for(u.lastOrigin=u.lastSelOrigin=null;;)if(p=x.pop(),p.ranges){if(ca(p,C),l&&!p.equals(t.sel)){Sr(t,p,{clearRedo:!1});return}y=p}else if(s){x.push(p);return}else break;var K=[];ca(y,C),C.push({changes:K,generation:u.generation}),u.generation=p.generation||++u.maxGeneration;for(var ne=Qt(t,"beforeChange")||t.cm&&Qt(t.cm,"beforeChange"),ve=function(Ae){var Ie=p.changes[Ae];if(Ie.origin=n,ne&&!rf(t,Ie,!1))return x.length=0,{};K.push(fs(t,Ie));var Le=Ae?A(t,Ie):et(x);Co(t,Ie,Le,Qu(t,Ie)),!Ae&&t.cm&&t.cm.scrollIntoView({from:Ie.from,to:ji(Ie)});var De=[];Wi(t,function(Ne,We){!We&&Re(De,Ne.history)==-1&&(Sl(Ne.history,Ie),De.push(Ne.history)),Co(Ne,Ie,null,Qu(Ne,Ie))})},de=p.changes.length-1;de>=0;--de){var Ee=ve(de);if(Ee)return Ee.v}}}}function vs(t,n){if(n!=0&&(t.first+=n,t.sel=new en(Et(t.sel.ranges,function(u){return new Dt(T(u.anchor.line+n,u.anchor.ch),T(u.head.line+n,u.head.ch))}),t.sel.primIndex),t.cm)){qr(t.cm,t.first,t.first-n,n);for(var l=t.cm.display,s=l.viewFrom;s<l.viewTo;s++)Ni(t.cm,s,"gutter")}}function Co(t,n,l,s){if(t.cm&&!t.cm.curOp)return br(t.cm,Co)(t,n,l,s);if(n.to.line<t.first){vs(t,n.text.length-1-(n.to.line-n.from.line));return}if(!(n.from.line>t.lastLine())){if(n.from.line<t.first){var u=n.text.length-1-(t.first-n.from.line);vs(t,u),n={from:T(t.first,0),to:T(n.to.line+u,n.to.ch),text:[et(n.text)],origin:n.origin}}var p=t.lastLine();n.to.line>p&&(n={from:n.from,to:T(p,Ge(t,p).text.length),text:[n.text[0]],origin:n.origin}),n.removed=yi(t,n.from,n.to),l||(l=A(t,n)),t.cm?nf(t.cm,n,s):ml(t,n,s),xt(t,l,_t),t.cantEdit&&ps(t,T(t.firstLine(),0))&&(t.cantEdit=!1)}}function nf(t,n,l){var s=t.doc,u=t.display,p=n.from,y=n.to,x=!1,C=p.line;t.options.lineWrapping||(C=It(_n(Ge(s,p.line))),s.iter(C,y.line+1,function(de){if(de==u.maxLine)return x=!0,!0})),s.sel.contains(n.from,n.to)>-1&&ct(t),ml(s,n,l,ku(t)),t.options.lineWrapping||(s.iter(C,p.line+n.text.length,function(de){var Ee=$o(de);Ee>u.maxLineLength&&(u.maxLine=de,u.maxLineLength=Ee,u.maxLineChanged=!0,x=!1)}),x&&(t.curOp.updateMaxLine=!0)),au(s,p.line),So(t,400);var P=n.text.length-(y.line-p.line)-1;n.full?qr(t):p.line==y.line&&n.text.length==1&&!Gu(t.doc,n)?Ni(t,p.line,"text"):qr(t,p.line,y.line+1,P);var K=Qt(t,"changes"),ne=Qt(t,"change");if(ne||K){var ve={from:p,to:y,text:n.text,removed:n.removed,origin:n.origin};ne&&yr(t,"change",t,ve),K&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(ve)}t.display.selForContextMenu=null}function Xa(t,n,l,s,u){var p;s||(s=l),$(s,l)<0&&(p=[s,l],l=p[0],s=p[1]),typeof n=="string"&&(n=t.splitLines(n)),ha(t,{from:l,to:s,text:n,origin:u})}function af(t,n,l,s){l<t.line?t.line+=s:n<t.line&&(t.line=n,t.ch=0)}function of(t,n,l,s){for(var u=0;u<t.length;++u){var p=t[u],y=!0;if(p.ranges){p.copied||(p=t[u]=p.deepCopy(),p.copied=!0);for(var x=0;x<p.ranges.length;x++)af(p.ranges[x].anchor,n,l,s),af(p.ranges[x].head,n,l,s);continue}for(var C=0;C<p.changes.length;++C){var P=p.changes[C];if(l<P.from.line)P.from=T(P.from.line+s,P.from.ch),P.to=T(P.to.line+s,P.to.ch);else if(n<=P.to.line){y=!1;break}}y||(t.splice(0,u+1),u=0)}}function Sl(t,n){var l=n.from.line,s=n.to.line,u=n.text.length-(s-l)-1;of(t.done,l,s,u),of(t.undone,l,s,u)}function Ao(t,n,l,s){var u=n,p=n;return typeof n=="number"?p=Ge(t,Lt(t,n)):u=It(n),u==null?null:(s(p,u)&&t.cm&&Ni(t.cm,u,l),p)}function va(t){this.lines=t,this.parent=null;for(var n=0,l=0;l<t.length;++l)t[l].parent=this,n+=t[l].height;this.height=n}va.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,n){for(var l=t,s=t+n;l<s;++l){var u=this.lines[l];this.height-=u.height,vu(u),yr(u,"delete")}this.lines.splice(t,n)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,n,l){this.height+=l,this.lines=this.lines.slice(0,t).concat(n).concat(this.lines.slice(t));for(var s=0;s<n.length;++s)n[s].parent=this},iterN:function(t,n,l){for(var s=t+n;t<s;++t)if(l(this.lines[t]))return!0}};function Ja(t){this.children=t;for(var n=0,l=0,s=0;s<t.length;++s){var u=t[s];n+=u.chunkSize(),l+=u.height,u.parent=this}this.size=n,this.height=l,this.parent=null}Ja.prototype={chunkSize:function(){return this.size},removeInner:function(t,n){this.size-=n;for(var l=0;l<this.children.length;++l){var s=this.children[l],u=s.chunkSize();if(t<u){var p=Math.min(n,u-t),y=s.height;if(s.removeInner(t,p),this.height-=y-s.height,u==p&&(this.children.splice(l--,1),s.parent=null),(n-=p)==0)break;t=0}else t-=u}if(this.size-n<25&&(this.children.length>1||!(this.children[0]instanceof va))){var x=[];this.collapse(x),this.children=[new va(x)],this.children[0].parent=this}},collapse:function(t){for(var n=0;n<this.children.length;++n)this.children[n].collapse(t)},insertInner:function(t,n,l){this.size+=n.length,this.height+=l;for(var s=0;s<this.children.length;++s){var u=this.children[s],p=u.chunkSize();if(t<=p){if(u.insertInner(t,n,l),u.lines&&u.lines.length>50){for(var y=u.lines.length%25+25,x=y;x<u.lines.length;){var C=new va(u.lines.slice(x,x+=25));u.height-=C.height,this.children.splice(++s,0,C),C.parent=this}u.lines=u.lines.slice(0,y),this.maybeSpill()}break}t-=p}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var n=t.children.splice(t.children.length-5,5),l=new Ja(n);if(t.parent){t.size-=l.size,t.height-=l.height;var u=Re(t.parent.children,t);t.parent.children.splice(u+1,0,l)}else{var s=new Ja(t.children);s.parent=t,t.children=[s,l],t=s}l.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()}},iterN:function(t,n,l){for(var s=0;s<this.children.length;++s){var u=this.children[s],p=u.chunkSize();if(t<p){var y=Math.min(n,p-t);if(u.iterN(t,y,l))return!0;if((n-=y)==0)break;t=0}else t-=p}}};var Oo=function(t,n,l){if(l)for(var s in l)l.hasOwnProperty(s)&&(this[s]=l[s]);this.doc=t,this.node=n};Oo.prototype.clear=function(){var t=this.doc.cm,n=this.line.widgets,l=this.line,s=It(l);if(!(s==null||!n)){for(var u=0;u<n.length;++u)n[u]==this&&n.splice(u--,1);n.length||(l.widgets=null);var p=Ci(this);On(l,Math.max(0,l.height-p)),t&&(ln(t,function(){sf(t,l,-p),Ni(t,s,"widget")}),yr(t,"lineWidgetCleared",t,this,s))}},Oo.prototype.changed=function(){var t=this,n=this.height,l=this.doc.cm,s=this.line;this.height=null;var u=Ci(this)-n;u&&(Si(this.doc,s)||On(s,s.height+u),l&&ln(l,function(){l.curOp.forceUpdate=!0,sf(l,s,u),yr(l,"lineWidgetChanged",l,t,It(s))}))},Gr(Oo);function sf(t,n,l){wi(n)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&cl(t,l)}function Gc(t,n,l,s){var u=new Oo(t,l,s),p=t.cm;return p&&u.noHScroll&&(p.display.alignWidgets=!0),Ao(t,n,"widget",function(y){var x=y.widgets||(y.widgets=[]);if(u.insertAt==null?x.push(u):x.splice(Math.min(x.length,Math.max(0,u.insertAt)),0,u),u.line=y,p&&!Si(t,y)){var C=wi(y)<t.scrollTop;On(y,y.height+Ci(u)),C&&cl(p,u.height),p.curOp.forceUpdate=!0}return!0}),p&&yr(p,"lineWidgetAdded",p,u,typeof n=="number"?n:It(n)),u}var lf=0,fi=function(t,n){this.lines=[],this.type=n,this.doc=t,this.id=++lf};fi.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,n=t&&!t.curOp;if(n&&ua(t),Qt(this,"clear")){var l=this.find();l&&yr(this,"clear",l.from,l.to)}for(var s=null,u=null,p=0;p<this.lines.length;++p){var y=this.lines[p],x=La(y.markedSpans,this);t&&!this.collapsed?Ni(t,It(y),"text"):t&&(x.to!=null&&(u=It(y)),x.from!=null&&(s=It(y))),y.markedSpans=Ze(y.markedSpans,x),x.from==null&&this.collapsed&&!Si(this.doc,y)&&t&&On(y,Va(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var C=0;C<this.lines.length;++C){var P=_n(this.lines[C]),K=$o(P);K>t.display.maxLineLength&&(t.display.maxLine=P,t.display.maxLineLength=K,t.display.maxLineChanged=!0)}s!=null&&t&&this.collapsed&&qr(t,s,u+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&dt(t.doc)),t&&yr(t,"markerCleared",t,this,s,u),n&&fa(t),this.parent&&this.parent.clear()}},fi.prototype.find=function(t,n){t==null&&this.type=="bookmark"&&(t=1);for(var l,s,u=0;u<this.lines.length;++u){var p=this.lines[u],y=La(p.markedSpans,this);if(y.from!=null&&(l=T(n?p:It(p),y.from),t==-1))return l;if(y.to!=null&&(s=T(n?p:It(p),y.to),t==1))return s}return l&&{from:l,to:s}},fi.prototype.changed=function(){var t=this,n=this.find(-1,!0),l=this,s=this.doc.cm;!n||!s||ln(s,function(){var u=n.line,p=It(n.line),y=Qo(s,p);if(y&&(Qs(y),s.curOp.selectionChanged=s.curOp.forceUpdate=!0),s.curOp.updateMaxLine=!0,!Si(l.doc,u)&&l.height!=null){var x=l.height;l.height=null;var C=Ci(l)-x;C&&On(u,u.height+C)}yr(s,"markerChanged",s,t)})},fi.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var n=this.doc.cm.curOp;(!n.maybeHiddenMarkers||Re(n.maybeHiddenMarkers,this)==-1)&&(n.maybeUnhiddenMarkers||(n.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},fi.prototype.detachLine=function(t){if(this.lines.splice(Re(this.lines,t),1),!this.lines.length&&this.doc.cm){var n=this.doc.cm.curOp;(n.maybeHiddenMarkers||(n.maybeHiddenMarkers=[])).push(this)}},Gr(fi);function ga(t,n,l,s,u){if(s&&s.shared)return $c(t,n,l,s,u);if(t.cm&&!t.cm.curOp)return br(t.cm,ga)(t,n,l,s,u);var p=new fi(t,u),y=$(n,l);if(s&&Rt(s,p,!1),y>0||y==0&&p.clearWhenEmpty!==!1)return p;if(p.replacedWith&&(p.collapsed=!0,p.widgetNode=ye("span",[p.replacedWith],"CodeMirror-widget"),s.handleMouseEvents||p.widgetNode.setAttribute("cm-ignore-events","true"),s.insertLeft&&(p.widgetNode.insertLeft=!0)),p.collapsed){if(du(t,n.line,n,l,p)||n.line!=l.line&&du(t,l.line,n,l,p))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ia()}p.addToHistory&&Yu(t,{from:n,to:l,origin:"markText"},t.sel,NaN);var x=n.line,C=t.cm,P;if(t.iter(x,l.line+1,function(ne){C&&p.collapsed&&!C.options.lineWrapping&&_n(ne)==C.display.maxLine&&(P=!0),p.collapsed&&x!=n.line&&On(ne,0),Uo(ne,new Ho(p,x==n.line?n.ch:null,x==l.line?l.ch:null),t.cm&&t.cm.curOp),++x}),p.collapsed&&t.iter(n.line,l.line+1,function(ne){Si(t,ne)&&On(ne,0)}),p.clearOnEnter&&se(p,"beforeCursorEnter",function(){return p.clear()}),p.readOnly&&(su(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),p.collapsed&&(p.id=++lf,p.atomic=!0),C){if(P&&(C.curOp.updateMaxLine=!0),p.collapsed)qr(C,n.line,l.line+1);else if(p.className||p.startStyle||p.endStyle||p.css||p.attributes||p.title)for(var K=n.line;K<=l.line;K++)Ni(C,K,"text");p.atomic&&dt(C.doc),yr(C,"markerAdded",C,p)}return p}var ma=function(t,n){this.markers=t,this.primary=n;for(var l=0;l<t.length;++l)t[l].parent=this};ma.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)this.markers[t].clear();yr(this,"clear")}},ma.prototype.find=function(t,n){return this.primary.find(t,n)},Gr(ma);function $c(t,n,l,s,u){s=Rt(s),s.shared=!1;var p=[ga(t,n,l,s,u)],y=p[0],x=s.widgetNode;return Wi(t,function(C){x&&(s.widgetNode=x.cloneNode(!0)),p.push(ga(C,$e(C,n),$e(C,l),s,u));for(var P=0;P<C.linked.length;++P)if(C.linked[P].isParent)return;y=et(p)}),new ma(p,y)}function ir(t){return t.findMarks(T(t.first,0),t.clipPos(T(t.lastLine())),function(n){return n.parent})}function uf(t,n){for(var l=0;l<n.length;l++){var s=n[l],u=s.find(),p=t.clipPos(u.from),y=t.clipPos(u.to);if($(p,y)){var x=ga(t,p,y,s.primary,s.primary.type);s.markers.push(x),x.parent=s}}}function ot(t){for(var n=function(s){var u=t[s],p=[u.primary.doc];Wi(u.primary.doc,function(C){return p.push(C)});for(var y=0;y<u.markers.length;y++){var x=u.markers[y];Re(p,x.doc)==-1&&(x.parent=null,u.markers.splice(y--,1))}},l=0;l<t.length;l++)n(l)}var Kc=0,Pr=function(t,n,l,s,u){if(!(this instanceof Pr))return new Pr(t,n,l,s,u);l==null&&(l=0),Ja.call(this,[new va([new ta("",null)])]),this.first=l,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=l;var p=T(l,0);this.sel=Vi(p),this.history=new us(null),this.id=++Kc,this.modeOption=n,this.lineSep=s,this.direction=u=="rtl"?"rtl":"ltr",this.extend=!1,typeof t=="string"&&(t=this.splitLines(t)),ml(this,{from:p,to:p,text:t}),Sr(this,Vi(p),_t)};Pr.prototype=zt(Ja.prototype,{constructor:Pr,iter:function(t,n,l){l?this.iterN(t-this.first,n-t,l):this.iterN(this.first,this.first+this.size,t)},insert:function(t,n){for(var l=0,s=0;s<n.length;++s)l+=n[s].height;this.insertInner(t-this.first,n,l)},remove:function(t,n){this.removeInner(t-this.first,n)},getValue:function(t){var n=Qi(this,this.first,this.first+this.size);return t===!1?n:n.join(t||this.lineSeparator())},setValue:xr(function(t){var n=T(this.first,0),l=this.first+this.size-1;ha(this,{from:n,to:T(l,Ge(this,l).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&sa(this.cm,0,0),Sr(this,Vi(n),_t)}),replaceRange:function(t,n,l,s){n=$e(this,n),l=l?$e(this,l):n,Xa(this,t,n,l,s)},getRange:function(t,n,l){var s=yi(this,$e(this,t),$e(this,n));return l===!1?s:l===""?s.join(""):s.join(l||this.lineSeparator())},getLine:function(t){var n=this.getLineHandle(t);return n&&n.text},getLineHandle:function(t){if(Zi(this,t))return Ge(this,t)},getLineNumber:function(t){return It(t)},getLineHandleVisualStart:function(t){return typeof t=="number"&&(t=Ge(this,t)),_n(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return $e(this,t)},getCursor:function(t){var n=this.sel.primary(),l;return t==null||t=="head"?l=n.head:t=="anchor"?l=n.anchor:t=="end"||t=="to"||t===!1?l=n.to():l=n.from(),l},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:xr(function(t,n,l){bl(this,$e(this,typeof t=="number"?T(t,n||0):t),null,l)}),setSelection:xr(function(t,n,l){bl(this,$e(this,t),$e(this,n||t),l)}),extendSelection:xr(function(t,n,l){pa(this,$e(this,t),n&&$e(this,n),l)}),extendSelections:xr(function(t,n){Zu(this,co(this,t),n)}),extendSelectionsBy:xr(function(t,n){var l=Et(this.sel.ranges,t);Zu(this,co(this,l),n)}),setSelections:xr(function(t,n,l){if(t.length){for(var s=[],u=0;u<t.length;u++)s[u]=new Dt($e(this,t[u].anchor),$e(this,t[u].head||t[u].anchor));n==null&&(n=Math.min(t.length-1,this.sel.primIndex)),Sr(this,Gn(this.cm,s,n),l)}}),addSelection:xr(function(t,n,l){var s=this.sel.ranges.slice(0);s.push(new Dt($e(this,t),$e(this,n||t))),Sr(this,Gn(this.cm,s,s.length-1),l)}),getSelection:function(t){for(var n=this.sel.ranges,l,s=0;s<n.length;s++){var u=yi(this,n[s].from(),n[s].to());l=l?l.concat(u):u}return t===!1?l:l.join(t||this.lineSeparator())},getSelections:function(t){for(var n=[],l=this.sel.ranges,s=0;s<l.length;s++){var u=yi(this,l[s].from(),l[s].to());t!==!1&&(u=u.join(t||this.lineSeparator())),n[s]=u}return n},replaceSelection:function(t,n,l){for(var s=[],u=0;u<this.sel.ranges.length;u++)s[u]=t;this.replaceSelections(s,n,l||"+input")},replaceSelections:xr(function(t,n,l){for(var s=[],u=this.sel,p=0;p<u.ranges.length;p++){var y=u.ranges[p];s[p]={from:y.from(),to:y.to(),text:this.splitLines(t[p]),origin:l}}for(var x=n&&n!="end"&&ui(this,s,n),C=s.length-1;C>=0;C--)ha(this,s[C]);x?ef(this,x):this.cm&&_a(this.cm)}),undo:xr(function(){hs(this,"undo")}),redo:xr(function(){hs(this,"redo")}),undoSelection:xr(function(){hs(this,"undo",!0)}),redoSelection:xr(function(){hs(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,n=0,l=0,s=0;s<t.done.length;s++)t.done[s].ranges||++n;for(var u=0;u<t.undone.length;u++)t.undone[u].ranges||++l;return{undo:n,redo:l}},clearHistory:function(){var t=this;this.history=new us(this.history),Wi(this,function(n){return n.history=t.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:da(this.history.done),undone:da(this.history.undone)}},setHistory:function(t){var n=this.history=new us(this.history);n.done=da(t.done.slice(0),null,!0),n.undone=da(t.undone.slice(0),null,!0)},setGutterMarker:xr(function(t,n,l){return Ao(this,t,"gutter",function(s){var u=s.gutterMarkers||(s.gutterMarkers={});return u[n]=l,!l&&Cn(u)&&(s.gutterMarkers=null),!0})}),clearGutter:xr(function(t){var n=this;this.iter(function(l){l.gutterMarkers&&l.gutterMarkers[t]&&Ao(n,l,"gutter",function(){return l.gutterMarkers[t]=null,Cn(l.gutterMarkers)&&(l.gutterMarkers=null),!0})})}),lineInfo:function(t){var n;if(typeof t=="number"){if(!Zi(this,t)||(n=t,t=Ge(this,t),!t))return null}else if(n=It(t),n==null)return null;return{line:n,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},addLineClass:xr(function(t,n,l){return Ao(this,t,n=="gutter"?"gutter":"class",function(s){var u=n=="text"?"textClass":n=="background"?"bgClass":n=="gutter"?"gutterClass":"wrapClass";if(!s[u])s[u]=l;else{if(z(l).test(s[u]))return!1;s[u]+=" "+l}return!0})}),removeLineClass:xr(function(t,n,l){return Ao(this,t,n=="gutter"?"gutter":"class",function(s){var u=n=="text"?"textClass":n=="background"?"bgClass":n=="gutter"?"gutterClass":"wrapClass",p=s[u];if(p)if(l==null)s[u]=null;else{var y=p.match(z(l));if(!y)return!1;var x=y.index+y[0].length;s[u]=p.slice(0,y.index)+(!y.index||x==p.length?"":" ")+p.slice(x)||null}else return!1;return!0})}),addLineWidget:xr(function(t,n,l){return Gc(this,t,n,l)}),removeLineWidget:function(t){t.clear()},markText:function(t,n,l){return ga(this,$e(this,t),$e(this,n),l,l&&l.type||"range")},setBookmark:function(t,n){var l={replacedWith:n&&(n.nodeType==null?n.widget:n),insertLeft:n&&n.insertLeft,clearWhenEmpty:!1,shared:n&&n.shared,handleMouseEvents:n&&n.handleMouseEvents};return t=$e(this,t),ga(this,t,t,l,"bookmark")},findMarksAt:function(t){t=$e(this,t);var n=[],l=Ge(this,t.line).markedSpans;if(l)for(var s=0;s<l.length;++s){var u=l[s];(u.from==null||u.from<=t.ch)&&(u.to==null||u.to>=t.ch)&&n.push(u.marker.parent||u.marker)}return n},findMarks:function(t,n,l){t=$e(this,t),n=$e(this,n);var s=[],u=t.line;return this.iter(t.line,n.line+1,function(p){var y=p.markedSpans;if(y)for(var x=0;x<y.length;x++){var C=y[x];!(C.to!=null&&u==t.line&&t.ch>=C.to||C.from==null&&u!=t.line||C.from!=null&&u==n.line&&C.from>=n.ch)&&(!l||l(C.marker))&&s.push(C.marker.parent||C.marker)}++u}),s},getAllMarks:function(){var t=[];return this.iter(function(n){var l=n.markedSpans;if(l)for(var s=0;s<l.length;++s)l[s].from!=null&&t.push(l[s].marker)}),t},posFromIndex:function(t){var n,l=this.first,s=this.lineSeparator().length;return this.iter(function(u){var p=u.text.length+s;if(p>t)return n=t,!0;t-=p,++l}),$e(this,T(l,n))},indexFromPos:function(t){t=$e(this,t);var n=t.ch;if(t.line<this.first||t.ch<0)return 0;var l=this.lineSeparator().length;return this.iter(this.first,t.line,function(s){n+=s.text.length+l}),n},copy:function(t){var n=new Pr(Qi(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return n.scrollTop=this.scrollTop,n.scrollLeft=this.scrollLeft,n.sel=this.sel,n.extend=!1,t&&(n.history.undoDepth=this.history.undoDepth,n.setHistory(this.getHistory())),n},linkedDoc:function(t){t||(t={});var n=this.first,l=this.first+this.size;t.from!=null&&t.from>n&&(n=t.from),t.to!=null&&t.to<l&&(l=t.to);var s=new Pr(Qi(this,n,l),t.mode||this.modeOption,n,this.lineSep,this.direction);return t.sharedHist&&(s.history=this.history),(this.linked||(this.linked=[])).push({doc:s,sharedHist:t.sharedHist}),s.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],uf(s,ir(this)),s},unlinkDoc:function(t){if(t instanceof Zt&&(t=t.doc),this.linked)for(var n=0;n<this.linked.length;++n){var l=this.linked[n];if(l.doc==t){this.linked.splice(n,1),t.unlinkDoc(this),ot(ir(this));break}}if(t.history==this.history){var s=[t.id];Wi(t,function(u){return s.push(u.id)},!0),t.history=new us(null),t.history.done=da(this.history.done,s),t.history.undone=da(this.history.undone,s)}},iterLinkedDocs:function(t){Wi(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):Wn(t)},lineSeparator:function(){return this.lineSep||`
23
- `},setDirection:xr(function(t){t!="rtl"&&(t="ltr"),t!=this.direction&&(this.direction=t,this.iter(function(n){return n.order=null}),this.cm&&Hc(this.cm))})}),Pr.prototype.eachLine=Pr.prototype.iter;var gs=0;function Yc(t){var n=this;if(ff(n),!(ht(n,t)||Ai(n.display,t))){Ft(t),R&&(gs=+new Date);var l=aa(n,t,!0),s=t.dataTransfer.files;if(!(!l||n.isReadOnly()))if(s&&s.length&&window.FileReader&&window.File)for(var u=s.length,p=Array(u),y=0,x=function(){++y==u&&br(n,function(){l=$e(n.doc,l);var de={from:l,to:l,text:n.doc.splitLines(p.filter(function(Ee){return Ee!=null}).join(n.doc.lineSeparator())),origin:"paste"};ha(n.doc,de),ef(n.doc,Vi($e(n.doc,l),$e(n.doc,ji(de))))})()},C=function(de,Ee){if(n.options.allowDropFileTypes&&Re(n.options.allowDropFileTypes,de.type)==-1){x();return}var Ae=new FileReader;Ae.onerror=function(){return x()},Ae.onload=function(){var Ie=Ae.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ie)){x();return}p[Ee]=Ie,x()},Ae.readAsText(de)},P=0;P<s.length;P++)C(s[P],P);else{if(n.state.draggingText&&n.doc.sel.contains(l)>-1){n.state.draggingText(t),setTimeout(function(){return n.display.input.focus()},20);return}try{var K=t.dataTransfer.getData("Text");if(K){var ne;if(n.state.draggingText&&!n.state.draggingText.copy&&(ne=n.listSelections()),xt(n.doc,Vi(l,l)),ne)for(var ve=0;ve<ne.length;++ve)Xa(n.doc,"",ne[ve].anchor,ne[ve].head,"drag");n.replaceSelection(K,"around","paste"),n.display.input.focus()}}catch(de){}}}}function Xc(t,n){if(R&&(!t.state.draggingText||+new Date-gs<100)){Nr(n);return}if(!(ht(t,n)||Ai(t.display,n))&&(n.dataTransfer.setData("Text",t.getSelection()),n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setDragImage&&!fe)){var l=Q("img",null,null,"position: fixed; left: 0; top: 0;");l.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",oe&&(l.width=l.height=1,t.display.wrapper.appendChild(l),l._top=l.offsetTop),n.dataTransfer.setDragImage(l,0,0),oe&&l.parentNode.removeChild(l)}}function sr(t,n){var l=aa(t,n);if(l){var s=document.createDocumentFragment();es(t,l,s),t.display.dragCursor||(t.display.dragCursor=Q("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),xe(t.display.dragCursor,s)}}function ff(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function cf(t){if(document.getElementsByClassName){for(var n=document.getElementsByClassName("CodeMirror"),l=[],s=0;s<n.length;s++){var u=n[s].CodeMirror;u&&l.push(u)}l.length&&l[0].operation(function(){for(var p=0;p<l.length;p++)t(l[p])})}}var df=!1;function ar(){df||(Fr(),df=!0)}function Fr(){var t;se(window,"resize",function(){t==null&&(t=setTimeout(function(){t=null,cf(Jc)},100))}),se(window,"blur",function(){return cf(Ha)})}function Jc(t){var n=t.display;n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.scrollbarsClipped=!1,t.setSize()}for(var Ui={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"},Eo=0;Eo<10;Eo++)Ui[Eo+48]=Ui[Eo+96]=String(Eo);for(var ms=65;ms<=90;ms++)Ui[ms]=String.fromCharCode(ms);for(var ya=1;ya<=12;ya++)Ui[ya+111]=Ui[ya+63235]="F"+ya;var Kn={};Kn.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"},Kn.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"},Kn.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Kn.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"]},Kn.default=M?Kn.macDefault:Kn.pcDefault;function Qc(t){var n=t.split(/-(?!$)/);t=n[n.length-1];for(var l,s,u,p,y=0;y<n.length-1;y++){var x=n[y];if(/^(cmd|meta|m)$/i.test(x))p=!0;else if(/^a(lt)?$/i.test(x))l=!0;else if(/^(c|ctrl|control)$/i.test(x))s=!0;else if(/^s(hift)?$/i.test(x))u=!0;else throw new Error("Unrecognized modifier name: "+x)}return l&&(t="Alt-"+t),s&&(t="Ctrl-"+t),p&&(t="Cmd-"+t),u&&(t="Shift-"+t),t}function Zc(t){var n={};for(var l in t)if(t.hasOwnProperty(l)){var s=t[l];if(/^(name|fallthrough|(de|at)tach)$/.test(l))continue;if(s=="..."){delete t[l];continue}for(var u=Et(l.split(" "),Qc),p=0;p<u.length;p++){var y=void 0,x=void 0;p==u.length-1?(x=u.join(" "),y=s):(x=u.slice(0,p+1).join(" "),y="...");var C=n[x];if(!C)n[x]=y;else if(C!=y)throw new Error("Inconsistent bindings for "+x)}delete t[l]}for(var P in n)t[P]=n[P];return t}function Qa(t,n,l,s){n=ba(n);var u=n.call?n.call(t,s):n[t];if(u===!1)return"nothing";if(u==="...")return"multi";if(u!=null&&l(u))return"handled";if(n.fallthrough){if(Object.prototype.toString.call(n.fallthrough)!="[object Array]")return Qa(t,n.fallthrough,l,s);for(var p=0;p<n.fallthrough.length;p++){var y=Qa(t,n.fallthrough[p],l,s);if(y)return y}}}function pf(t){var n=typeof t=="string"?t:Ui[t.keyCode];return n=="Ctrl"||n=="Alt"||n=="Shift"||n=="Mod"}function Yn(t,n,l){var s=t;return n.altKey&&s!="Alt"&&(t="Alt-"+t),(H?n.metaKey:n.ctrlKey)&&s!="Ctrl"&&(t="Ctrl-"+t),(H?n.ctrlKey:n.metaKey)&&s!="Mod"&&(t="Cmd-"+t),!l&&n.shiftKey&&s!="Shift"&&(t="Shift-"+t),t}function _i(t,n){if(oe&&t.keyCode==34&&t.char)return!1;var l=Ui[t.keyCode];return l==null||t.altGraphKey?!1:(t.keyCode==3&&t.code&&(l=t.code),Yn(l,t,n))}function ba(t){return typeof t=="string"?Kn[t]:t}function Ei(t,n){for(var l=t.doc.sel.ranges,s=[],u=0;u<l.length;u++){for(var p=n(l[u]);s.length&&$(p.from,et(s).to)<=0;){var y=s.pop();if($(y.from,p.from)<0){p.from=y.from;break}}s.push(p)}ln(t,function(){for(var x=s.length-1;x>=0;x--)Xa(t.doc,"",s[x].from,s[x].to,"+delete");_a(t)})}function ys(t,n,l){var s=an(t.text,n+l,l);return s<0||s>t.text.length?null:s}function wl(t,n,l){var s=ys(t,n.ch,l);return s==null?null:new T(n.line,s,l<0?"after":"before")}function Cl(t,n,l,s,u){if(t){n.doc.direction=="rtl"&&(u=-u);var p=tt(l,n.doc.direction);if(p){var y=u<0?et(p):p[0],x=u<0==(y.level==1),C=x?"after":"before",P;if(y.level>0||n.doc.direction=="rtl"){var K=na(n,l);P=u<0?l.text.length-1:0;var ne=Tn(n,K,P).top;P=Mr(function(ve){return Tn(n,K,ve).top==ne},u<0==(y.level==1)?y.from:y.to-1,P),C=="before"&&(P=ys(l,P,1))}else P=u<0?y.to:y.from;return new T(s,P,C)}}return new T(s,u<0?l.text.length:0,u<0?"before":"after")}function hf(t,n,l,s){var u=tt(n,t.doc.direction);if(!u)return wl(n,l,s);l.ch>=n.text.length?(l.ch=n.text.length,l.sticky="before"):l.ch<=0&&(l.ch=0,l.sticky="after");var p=St(u,l.ch,l.sticky),y=u[p];if(t.doc.direction=="ltr"&&y.level%2==0&&(s>0?y.to>l.ch:y.from<l.ch))return wl(n,l,s);var x=function(Le,De){return ys(n,Le instanceof T?Le.ch:Le,De)},C,P=function(Le){return t.options.lineWrapping?(C=C||na(t,n),Tu(t,n,C,Le)):{begin:0,end:n.text.length}},K=P(l.sticky=="before"?x(l,-1):l.ch);if(t.doc.direction=="rtl"||y.level==1){var ne=y.level==1==s<0,ve=x(l,ne?1:-1);if(ve!=null&&(ne?ve<=y.to&&ve<=K.end:ve>=y.from&&ve>=K.begin)){var de=ne?"before":"after";return new T(l.line,ve,de)}}var Ee=function(Le,De,Ne){for(var We=function($t,wr){return wr?new T(l.line,x($t,1),"before"):new T(l.line,$t,"after")};Le>=0&&Le<u.length;Le+=De){var Qe=u[Le],Ke=De>0==(Qe.level!=1),bt=Ke?Ne.begin:x(Ne.end,-1);if(Qe.from<=bt&&bt<Qe.to||(bt=Ke?Qe.from:x(Qe.to,-1),Ne.begin<=bt&&bt<Ne.end))return We(bt,Ke)}},Ae=Ee(p+s,s,K);if(Ae)return Ae;var Ie=s>0?K.end:x(K.begin,-1);return Ie!=null&&!(s>0&&Ie==n.text.length)&&(Ae=Ee(s>0?0:u.length-1,s,P(Ie)),Ae)?Ae:null}var Za={selectAll:Hi,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),_t)},killLine:function(t){return Ei(t,function(n){if(n.empty()){var l=Ge(t.doc,n.head.line).text.length;return n.head.ch==l&&n.head.line<t.lastLine()?{from:n.head,to:T(n.head.line+1,0)}:{from:n.head,to:T(n.head.line,l)}}else return{from:n.from(),to:n.to()}})},deleteLine:function(t){return Ei(t,function(n){return{from:T(n.from().line,0),to:$e(t.doc,T(n.to().line+1,0))}})},delLineLeft:function(t){return Ei(t,function(n){return{from:T(n.from().line,0),to:n.from()}})},delWrappedLineLeft:function(t){return Ei(t,function(n){var l=t.charCoords(n.head,"div").top+5,s=t.coordsChar({left:0,top:l},"div");return{from:s,to:n.from()}})},delWrappedLineRight:function(t){return Ei(t,function(n){var l=t.charCoords(n.head,"div").top+5,s=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:l},"div");return{from:n.from(),to:s}})},undo:function(t){return t.undo()},redo:function(t){return t.redo()},undoSelection:function(t){return t.undoSelection()},redoSelection:function(t){return t.redoSelection()},goDocStart:function(t){return t.extendSelection(T(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(T(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(n){return vf(t,n.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(n){return bs(t,n.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(n){return qc(t,n.head.line)},{origin:"+move",bias:-1})},goLineRight:function(t){return t.extendSelectionsBy(function(n){var l=t.cursorCoords(n.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:l},"div")},Pt)},goLineLeft:function(t){return t.extendSelectionsBy(function(n){var l=t.cursorCoords(n.head,"div").top+5;return t.coordsChar({left:0,top:l},"div")},Pt)},goLineLeftSmart:function(t){return t.extendSelectionsBy(function(n){var l=t.cursorCoords(n.head,"div").top+5,s=t.coordsChar({left:0,top:l},"div");return s.ch<t.getLine(s.line).search(/\S/)?bs(t,n.head):s},Pt)},goLineUp:function(t){return t.moveV(-1,"line")},goLineDown:function(t){return t.moveV(1,"line")},goPageUp:function(t){return t.moveV(-1,"page")},goPageDown:function(t){return t.moveV(1,"page")},goCharLeft:function(t){return t.moveH(-1,"char")},goCharRight:function(t){return t.moveH(1,"char")},goColumnLeft:function(t){return t.moveH(-1,"column")},goColumnRight:function(t){return t.moveH(1,"column")},goWordLeft:function(t){return t.moveH(-1,"word")},goGroupRight:function(t){return t.moveH(1,"group")},goGroupLeft:function(t){return t.moveH(-1,"group")},goWordRight:function(t){return t.moveH(1,"word")},delCharBefore:function(t){return t.deleteH(-1,"codepoint")},delCharAfter:function(t){return t.deleteH(1,"char")},delWordBefore:function(t){return t.deleteH(-1,"word")},delWordAfter:function(t){return t.deleteH(1,"word")},delGroupBefore:function(t){return t.deleteH(-1,"group")},delGroupAfter:function(t){return t.deleteH(1,"group")},indentAuto:function(t){return t.indentSelection("smart")},indentMore:function(t){return t.indentSelection("add")},indentLess:function(t){return t.indentSelection("subtract")},insertTab:function(t){return t.replaceSelection(" ")},insertSoftTab:function(t){for(var n=[],l=t.listSelections(),s=t.options.tabSize,u=0;u<l.length;u++){var p=l[u].from(),y=st(t.getLine(p.line),p.ch,s);n.push(kr(s-y%s))}t.replaceSelections(n)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return ln(t,function(){for(var n=t.listSelections(),l=[],s=0;s<n.length;s++)if(n[s].empty()){var u=n[s].head,p=Ge(t.doc,u.line).text;if(p){if(u.ch==p.length&&(u=new T(u.line,u.ch-1)),u.ch>0)u=new T(u.line,u.ch+1),t.replaceRange(p.charAt(u.ch-1)+p.charAt(u.ch-2),T(u.line,u.ch-2),u,"+transpose");else if(u.line>t.doc.first){var y=Ge(t.doc,u.line-1).text;y&&(u=new T(u.line,1),t.replaceRange(p.charAt(0)+t.doc.lineSeparator()+y.charAt(y.length-1),T(u.line-1,y.length-1),u,"+transpose"))}}l.push(new Dt(u,u))}t.setSelections(l)})},newlineAndIndent:function(t){return ln(t,function(){for(var n=t.listSelections(),l=n.length-1;l>=0;l--)t.replaceRange(t.doc.lineSeparator(),n[l].anchor,n[l].head,"+input");n=t.listSelections();for(var s=0;s<n.length;s++)t.indentLine(n[s].from().line,null,!0);_a(t)})},openLine:function(t){return t.replaceSelection(`
24
- `,"start")},toggleOverwrite:function(t){return t.toggleOverwrite()}};function vf(t,n){var l=Ge(t.doc,n),s=_n(l);return s!=l&&(n=It(s)),Cl(!0,t,s,n,1)}function qc(t,n){var l=Ge(t.doc,n),s=ic(l);return s!=l&&(n=It(s)),Cl(!0,t,l,n,-1)}function bs(t,n){var l=vf(t,n.line),s=Ge(t.doc,l.line),u=tt(s,t.doc.direction);if(!u||u[0].level==0){var p=Math.max(l.ch,s.text.search(/\S/)),y=n.line==l.line&&n.ch<=p&&n.ch;return T(l.line,y?0:p,l.sticky)}return l}function Je(t,n,l){if(typeof n=="string"&&(n=Za[n],!n))return!1;t.display.input.ensurePolled();var s=t.display.shift,u=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),l&&(t.display.shift=!1),u=n(t)!=lt}finally{t.display.shift=s,t.state.suppressEdits=!1}return u}function xs(t,n,l){for(var s=0;s<t.state.keyMaps.length;s++){var u=Qa(n,t.state.keyMaps[s],l,t);if(u)return u}return t.options.extraKeys&&Qa(n,t.options.extraKeys,l,t)||Qa(n,t.options.keyMap,l,t)}var yn=new He;function Ti(t,n,l,s){var u=t.state.keySeq;if(u){if(pf(n))return"handled";if(/\'$/.test(n)?t.state.keySeq=null:yn.set(50,function(){t.state.keySeq==u&&(t.state.keySeq=null,t.display.input.reset())}),qa(t,u+" "+n,l,s))return!0}return qa(t,n,l,s)}function qa(t,n,l,s){var u=xs(t,n,s);return u=="multi"&&(t.state.keySeq=n),u=="handled"&&yr(t,"keyHandled",t,n,l),(u=="handled"||u=="multi")&&(Ft(l),Di(t)),!!u}function Al(t,n){var l=_i(n,!0);return l?n.shiftKey&&!t.state.keySeq?Ti(t,"Shift-"+l,n,function(s){return Je(t,s,!0)})||Ti(t,l,n,function(s){if(typeof s=="string"?/^go[A-Z]/.test(s):s.motion)return Je(t,s)}):Ti(t,l,n,function(s){return Je(t,s)}):!1}function gf(t,n,l){return Ti(t,"'"+l+"'",n,function(s){return Je(t,s,!0)})}var Ss=null;function ws(t){var n=this;if(!(t.target&&t.target!=n.display.input.getField())&&(n.curOp.focus=ze(ut(n)),!ht(n,t))){R&&V<11&&t.keyCode==27&&(t.returnValue=!1);var l=t.keyCode;n.display.shift=l==16||t.shiftKey;var s=Al(n,t);oe&&(Ss=s?l:null,!s&&l==88&&!Ta&&(M?t.metaKey:t.ctrlKey)&&n.replaceSelection("",null,"cut")),m&&!M&&!s&&l==46&&t.shiftKey&&!t.ctrlKey&&document.execCommand&&document.execCommand("cut"),l==18&&!/\bCodeMirror-crosshair\b/.test(n.display.lineDiv.className)&&mf(n)}}function mf(t){var n=t.display.lineDiv;Ue(n,"CodeMirror-crosshair");function l(s){(s.keyCode==18||!s.altKey)&&(q(n,"CodeMirror-crosshair"),Ve(document,"keyup",l),Ve(document,"mouseover",l))}se(document,"keyup",l),se(document,"mouseover",l)}function Ol(t){t.keyCode==16&&(this.doc.sel.shift=!1),ht(this,t)}function El(t){var n=this;if(!(t.target&&t.target!=n.display.input.getField())&&!(Ai(n.display,t)||ht(n,t)||t.ctrlKey&&!t.altKey||M&&t.metaKey)){var l=t.keyCode,s=t.charCode;if(oe&&l==Ss){Ss=null,Ft(t);return}if(!(oe&&(!t.which||t.which<10)&&Al(n,t))){var u=String.fromCharCode(s==null?l:s);u!="\b"&&(gf(n,t,u)||n.display.input.onKeyPress(t))}}}var yf=400,bn=function(t,n,l){this.time=t,this.pos=n,this.button=l};bn.prototype.compare=function(t,n,l){return this.time+yf>t&&$(n,this.pos)==0&&l==this.button};var xn,eo;function bf(t,n){var l=+new Date;return eo&&eo.compare(l,t,n)?(xn=eo=null,"triple"):xn&&xn.compare(l,t,n)?(eo=new bn(l,t,n),xn=null,"double"):(xn=new bn(l,t,n),eo=null,"single")}function Tl(t){var n=this,l=n.display;if(!(ht(n,t)||l.activeTouch&&l.input.supportsTouch())){if(l.input.ensurePolled(),l.shift=t.shiftKey,Ai(l,t)){X||(l.scroller.draggable=!1,setTimeout(function(){return l.scroller.draggable=!0},100));return}if(!Fl(n,t)){var s=aa(n,t),u=gi(t),p=s?bf(s,u):"single";er(n).focus(),u==1&&n.state.selectingText&&n.state.selectingText(t),!(s&&xf(n,u,s,p,t))&&(u==1?s?wf(n,s,p,t):Rr(t)==l.scroller&&Ft(t):u==2?(s&&pa(n.doc,s),setTimeout(function(){return l.input.focus()},20)):u==3&&(le?n.display.input.onContextMenu(t):sl(n)))}}}function xf(t,n,l,s,u){var p="Click";return s=="double"?p="Double"+p:s=="triple"&&(p="Triple"+p),p=(n==1?"Left":n==2?"Middle":"Right")+p,Ti(t,Yn(p,u),u,function(y){if(typeof y=="string"&&(y=Za[y]),!y)return!1;var x=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),x=y(t,l)!=lt}finally{t.state.suppressEdits=!1}return x})}function Sf(t,n,l){var s=t.getOption("configureMouse"),u=s?s(t,n,l):{};if(u.unit==null){var p=B?l.shiftKey&&l.metaKey:l.altKey;u.unit=p?"rectangle":n=="single"?"char":n=="double"?"word":"line"}return(u.extend==null||t.doc.extend)&&(u.extend=t.doc.extend||l.shiftKey),u.addNew==null&&(u.addNew=M?l.metaKey:l.ctrlKey),u.moveOnDrag==null&&(u.moveOnDrag=!(M?l.altKey:l.ctrlKey)),u}function wf(t,n,l,s){R?setTimeout(gt(rs,t),0):t.curOp.focus=ze(ut(t));var u=Sf(t,l,s),p=t.doc.sel,y;t.options.dragDrop&&$r&&!t.isReadOnly()&&l=="single"&&(y=p.contains(n))>-1&&($((y=p.ranges[y]).from(),n)<0||n.xRel>0)&&($(y.to(),n)>0||n.xRel<0)?xa(t,s,n,u):kl(t,s,n,u)}function xa(t,n,l,s){var u=t.display,p=!1,y=br(t,function(P){X&&(u.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:sl(t)),Ve(u.wrapper.ownerDocument,"mouseup",y),Ve(u.wrapper.ownerDocument,"mousemove",x),Ve(u.scroller,"dragstart",C),Ve(u.scroller,"drop",y),p||(Ft(P),s.addNew||pa(t.doc,l,null,null,s.extend),X&&!fe||R&&V==9?setTimeout(function(){u.wrapper.ownerDocument.body.focus({preventScroll:!0}),u.input.focus()},20):u.input.focus())}),x=function(P){p=p||Math.abs(n.clientX-P.clientX)+Math.abs(n.clientY-P.clientY)>=10},C=function(){return p=!0};X&&(u.scroller.draggable=!0),t.state.draggingText=y,y.copy=!s.moveOnDrag,se(u.wrapper.ownerDocument,"mouseup",y),se(u.wrapper.ownerDocument,"mousemove",x),se(u.scroller,"dragstart",C),se(u.scroller,"drop",y),t.state.delayingBlurEvent=!0,setTimeout(function(){return u.input.focus()},20),u.scroller.dragDrop&&u.scroller.dragDrop()}function Cf(t,n,l){if(l=="char")return new Dt(n,n);if(l=="word")return t.findWordAt(n);if(l=="line")return new Dt(T(n.line,0),$e(t.doc,T(n.line+1,0)));var s=l(t,n);return new Dt(s.from,s.to)}function kl(t,n,l,s){R&&sl(t);var u=t.display,p=t.doc;Ft(n);var y,x,C=p.sel,P=C.ranges;if(s.addNew&&!s.extend?(x=p.sel.contains(l),x>-1?y=P[x]:y=new Dt(l,l)):(y=p.sel.primary(),x=p.sel.primIndex),s.unit=="rectangle")s.addNew||(y=new Dt(l,l)),l=aa(t,n,!0,!0),x=-1;else{var K=Cf(t,l,s.unit);s.extend?y=cs(y,K.anchor,K.head,s.extend):y=K}s.addNew?x==-1?(x=P.length,Sr(p,Gn(t,P.concat([y]),x),{scroll:!1,origin:"*mouse"})):P.length>1&&P[x].empty()&&s.unit=="char"&&!s.extend?(Sr(p,Gn(t,P.slice(0,x).concat(P.slice(x+1)),0),{scroll:!1,origin:"*mouse"}),C=p.sel):ds(p,x,y,rt):(x=0,Sr(p,new en([y],0),rt),C=p.sel);var ne=l;function ve(Ne){if($(ne,Ne)!=0)if(ne=Ne,s.unit=="rectangle"){for(var We=[],Qe=t.options.tabSize,Ke=st(Ge(p,l.line).text,l.ch,Qe),bt=st(Ge(p,Ne.line).text,Ne.ch,Qe),$t=Math.min(Ke,bt),wr=Math.max(Ke,bt),rr=Math.min(l.line,Ne.line),Sn=Math.min(t.lastLine(),Math.max(l.line,Ne.line));rr<=Sn;rr++){var fn=Ge(p,rr).text,vr=tr(fn,$t,Qe);$t==wr?We.push(new Dt(T(rr,vr),T(rr,vr))):fn.length>vr&&We.push(new Dt(T(rr,vr),T(rr,tr(fn,wr,Qe))))}We.length||We.push(new Dt(l,l)),Sr(p,Gn(t,C.ranges.slice(0,x).concat(We),x),{origin:"*mouse",scroll:!1}),t.scrollIntoView(Ne)}else{var tn=y,Ir=Cf(t,Ne,s.unit),mr=tn.anchor,gr;$(Ir.anchor,mr)>0?(gr=Ir.head,mr=wt(tn.from(),Ir.anchor)):(gr=Ir.anchor,mr=it(tn.to(),Ir.head));var ur=C.ranges.slice(0);ur[x]=Af(t,new Dt($e(p,mr),gr)),Sr(p,Gn(t,ur,x),rt)}}var de=u.wrapper.getBoundingClientRect(),Ee=0;function Ae(Ne){var We=++Ee,Qe=aa(t,Ne,!0,s.unit=="rectangle");if(Qe)if($(Qe,ne)!=0){t.curOp.focus=ze(ut(t)),ve(Qe);var Ke=Ua(u,p);(Qe.line>=Ke.to||Qe.line<Ke.from)&&setTimeout(br(t,function(){Ee==We&&Ae(Ne)}),150)}else{var bt=Ne.clientY<de.top?-20:Ne.clientY>de.bottom?20:0;bt&&setTimeout(br(t,function(){Ee==We&&(u.scroller.scrollTop+=bt,Ae(Ne))}),50)}}function Ie(Ne){t.state.selectingText=!1,Ee=1/0,Ne&&(Ft(Ne),u.input.focus()),Ve(u.wrapper.ownerDocument,"mousemove",Le),Ve(u.wrapper.ownerDocument,"mouseup",De),p.history.lastSelOrigin=null}var Le=br(t,function(Ne){Ne.buttons===0||!gi(Ne)?Ie(Ne):Ae(Ne)}),De=br(t,Ie);t.state.selectingText=De,se(u.wrapper.ownerDocument,"mousemove",Le),se(u.wrapper.ownerDocument,"mouseup",De)}function Af(t,n){var l=n.anchor,s=n.head,u=Ge(t.doc,l.line);if($(l,s)==0&&l.sticky==s.sticky)return n;var p=tt(u);if(!p)return n;var y=St(p,l.ch,l.sticky),x=p[y];if(x.from!=l.ch&&x.to!=l.ch)return n;var C=y+(x.from==l.ch==(x.level!=1)?0:1);if(C==0||C==p.length)return n;var P;if(s.line!=l.line)P=(s.line-l.line)*(t.doc.direction=="ltr"?1:-1)>0;else{var K=St(p,s.ch,s.sticky),ne=K-y||(s.ch-l.ch)*(x.level==1?-1:1);K==C-1||K==C?P=ne<0:P=ne>0}var ve=p[C+(P?-1:0)],de=P==(ve.level==1),Ee=de?ve.from:ve.to,Ae=de?"after":"before";return l.ch==Ee&&l.sticky==Ae?n:new Dt(new T(l.line,Ee,Ae),s)}function Pl(t,n,l,s){var u,p;if(n.touches)u=n.touches[0].clientX,p=n.touches[0].clientY;else try{u=n.clientX,p=n.clientY}catch(ve){return!1}if(u>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;s&&Ft(n);var y=t.display,x=y.lineDiv.getBoundingClientRect();if(p>x.bottom||!Qt(t,l))return vi(n);p-=x.top-y.viewOffset;for(var C=0;C<t.display.gutterSpecs.length;++C){var P=y.gutters.childNodes[C];if(P&&P.getBoundingClientRect().right>=u){var K=bi(t.doc,p),ne=t.display.gutterSpecs[C];return nt(t,l,t,K,ne.className,n),vi(n)}}}function Fl(t,n){return Pl(t,n,"gutterClick",!0)}function Of(t,n){Ai(t.display,n)||Cs(t,n)||ht(t,n,"contextmenu")||le||t.display.input.onContextMenu(n)}function Cs(t,n){return Qt(t,"gutterContextMenu")?Pl(t,n,"gutterContextMenu",!1):!1}function Ef(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),mo(t)}var To={toString:function(){return"CodeMirror.Init"}},Pn={},As={};function ed(t){var n=t.optionHandlers;function l(s,u,p,y){t.defaults[s]=u,p&&(n[s]=y?function(x,C,P){P!=To&&p(x,C,P)}:p)}t.defineOption=l,t.Init=To,l("value","",function(s,u){return s.setValue(u)},!0),l("mode",null,function(s,u){s.doc.modeOption=u,gl(s)},!0),l("indentUnit",2,gl,!0),l("indentWithTabs",!1),l("smartIndent",!0),l("tabSize",4,function(s){wo(s),mo(s),qr(s)},!0),l("lineSeparator",null,function(s,u){if(s.doc.lineSep=u,!!u){var p=[],y=s.doc.first;s.doc.iter(function(C){for(var P=0;;){var K=C.text.indexOf(u,P);if(K==-1)break;P=K+u.length,p.push(T(y,K))}y++});for(var x=p.length-1;x>=0;x--)Xa(s.doc,u,p[x],T(p[x].line,p[x].ch+u.length))}}),l("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(s,u,p){s.state.specialChars=new RegExp(u.source+(u.test(" ")?"":"| "),"g"),p!=To&&s.refresh()}),l("specialCharPlaceholder",sc,function(s){return s.refresh()},!0),l("electricChars",!0),l("inputStyle",w?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),l("spellcheck",!1,function(s,u){return s.getInputField().spellcheck=u},!0),l("autocorrect",!1,function(s,u){return s.getInputField().autocorrect=u},!0),l("autocapitalize",!1,function(s,u){return s.getInputField().autocapitalize=u},!0),l("rtlMoveVisually",!Z),l("wholeLineUpdateBefore",!0),l("theme","default",function(s){Ef(s),Ka(s)},!0),l("keyMap","default",function(s,u,p){var y=ba(u),x=p!=To&&ba(p);x&&x.detach&&x.detach(s,y),y.attach&&y.attach(s,x||null)}),l("extraKeys",null),l("configureMouse",null),l("lineWrapping",!1,Tf,!0),l("gutters",[],function(s,u){s.display.gutterSpecs=ss(u,s.options.lineNumbers),Ka(s)},!0),l("fixedGutter",!0,function(s,u){s.display.gutters.style.left=u?al(s.display)+"px":"0",s.refresh()},!0),l("coverGutterNextToScrollbar",!1,function(s){return $a(s)},!0),l("scrollbarStyle","native",function(s){Ru(s),$a(s),s.display.scrollbars.setScrollTop(s.doc.scrollTop),s.display.scrollbars.setScrollLeft(s.doc.scrollLeft)},!0),l("lineNumbers",!1,function(s,u){s.display.gutterSpecs=ss(s.options.gutters,u),Ka(s)},!0),l("firstLineNumber",1,Ka,!0),l("lineNumberFormatter",function(s){return s},Ka,!0),l("showCursorWhenSelecting",!1,Wa,!0),l("resetSelectionOnContextMenu",!0),l("lineWiseCopyCut",!0),l("pasteLinesPerSelection",!0),l("selectionsMayTouch",!1),l("readOnly",!1,function(s,u){u=="nocursor"&&(Ha(s),s.display.input.blur()),s.display.input.readOnlyChanged(u)}),l("screenReaderLabel",null,function(s,u){u=u===""?null:u,s.display.input.screenReaderLabelChanged(u)}),l("disableInput",!1,function(s,u){u||s.display.input.reset()},!0),l("dragDrop",!0,un),l("allowDropFileTypes",null),l("cursorBlinkRate",530),l("cursorScrollMargin",0),l("cursorHeight",1,Wa,!0),l("singleCursorHeightPerLine",!0,Wa,!0),l("workTime",100),l("workDelay",100),l("flattenSpans",!0,wo,!0),l("addModeClass",!1,wo,!0),l("pollInterval",100),l("undoDepth",200,function(s,u){return s.doc.history.undoDepth=u}),l("historyEventDelay",1250),l("viewportMargin",10,function(s){return s.refresh()},!0),l("maxHighlightLength",1e4,wo,!0),l("moveInputWithCursor",!0,function(s,u){u||s.display.input.resetPosition()}),l("tabindex",null,function(s,u){return s.display.input.getField().tabIndex=u||""}),l("autofocus",null),l("direction","ltr",function(s,u){return s.doc.setDirection(u)},!0),l("phrases",null)}function un(t,n,l){var s=l&&l!=To;if(!n!=!s){var u=t.display.dragFunctions,p=n?se:Ve;p(t.display.scroller,"dragstart",u.start),p(t.display.scroller,"dragenter",u.enter),p(t.display.scroller,"dragover",u.over),p(t.display.scroller,"dragleave",u.leave),p(t.display.scroller,"drop",u.drop)}}function Tf(t){t.options.lineWrapping?(Ue(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(q(t.display.wrapper,"CodeMirror-wrap"),zs(t)),ol(t),qr(t),mo(t),setTimeout(function(){return $a(t)},100)}function Zt(t,n){var l=this;if(!(this instanceof Zt))return new Zt(t,n);this.options=n=n?Rt(n):{},Rt(Pn,n,!1);var s=n.value;typeof s=="string"?s=new Pr(s,n.mode,null,n.lineSeparator,n.direction):n.mode&&(s.modeOption=n.mode),this.doc=s;var u=new Zt.inputStyles[n.inputStyle](this),p=this.display=new jc(t,s,u,n);p.wrapper.CodeMirror=this,Ef(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ru(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 He,keySeq:null,specialChars:null},n.autofocus&&!w&&p.input.focus(),R&&V<11&&setTimeout(function(){return l.display.input.reset(!0)},20),td(this),ar(),ua(this),this.curOp.forceUpdate=!0,$u(this,s),n.autofocus&&!w||this.hasFocus()?setTimeout(function(){l.hasFocus()&&!l.state.focused&&ll(l)},20):Ha(this);for(var y in As)As.hasOwnProperty(y)&&As[y](this,n[y],To);Wu(this),n.finishInit&&n.finishInit(this);for(var x=0;x<Il.length;++x)Il[x](this);fa(this),X&&n.lineWrapping&&getComputedStyle(p.lineDiv).textRendering=="optimizelegibility"&&(p.lineDiv.style.textRendering="auto")}Zt.defaults=Pn,Zt.optionHandlers=As;function td(t){var n=t.display;se(n.scroller,"mousedown",br(t,Tl)),R&&V<11?se(n.scroller,"dblclick",br(t,function(C){if(!ht(t,C)){var P=aa(t,C);if(!(!P||Fl(t,C)||Ai(t.display,C))){Ft(C);var K=t.findWordAt(P);pa(t.doc,K.anchor,K.head)}}})):se(n.scroller,"dblclick",function(C){return ht(t,C)||Ft(C)}),se(n.scroller,"contextmenu",function(C){return Of(t,C)}),se(n.input.getField(),"contextmenu",function(C){n.scroller.contains(C.target)||Of(t,C)});var l,s={end:0};function u(){n.activeTouch&&(l=setTimeout(function(){return n.activeTouch=null},1e3),s=n.activeTouch,s.end=+new Date)}function p(C){if(C.touches.length!=1)return!1;var P=C.touches[0];return P.radiusX<=1&&P.radiusY<=1}function y(C,P){if(P.left==null)return!0;var K=P.left-C.left,ne=P.top-C.top;return K*K+ne*ne>20*20}se(n.scroller,"touchstart",function(C){if(!ht(t,C)&&!p(C)&&!Fl(t,C)){n.input.ensurePolled(),clearTimeout(l);var P=+new Date;n.activeTouch={start:P,moved:!1,prev:P-s.end<=300?s:null},C.touches.length==1&&(n.activeTouch.left=C.touches[0].pageX,n.activeTouch.top=C.touches[0].pageY)}}),se(n.scroller,"touchmove",function(){n.activeTouch&&(n.activeTouch.moved=!0)}),se(n.scroller,"touchend",function(C){var P=n.activeTouch;if(P&&!Ai(n,C)&&P.left!=null&&!P.moved&&new Date-P.start<300){var K=t.coordsChar(n.activeTouch,"page"),ne;!P.prev||y(P,P.prev)?ne=new Dt(K,K):!P.prev.prev||y(P,P.prev.prev)?ne=t.findWordAt(K):ne=new Dt(T(K.line,0),$e(t.doc,T(K.line+1,0))),t.setSelection(ne.anchor,ne.head),t.focus(),Ft(C)}u()}),se(n.scroller,"touchcancel",u),se(n.scroller,"scroll",function(){n.scroller.clientHeight&&(za(t,n.scroller.scrollTop),la(t,n.scroller.scrollLeft,!0),nt(t,"scroll",t))}),se(n.scroller,"mousewheel",function(C){return _u(t,C)}),se(n.scroller,"DOMMouseScroll",function(C){return _u(t,C)}),se(n.wrapper,"scroll",function(){return n.wrapper.scrollTop=n.wrapper.scrollLeft=0}),n.dragFunctions={enter:function(C){ht(t,C)||Nr(C)},over:function(C){ht(t,C)||(sr(t,C),Nr(C))},start:function(C){return Xc(t,C)},drop:br(t,Yc),leave:function(C){ht(t,C)||ff(t)}};var x=n.input.getField();se(x,"keyup",function(C){return Ol.call(t,C)}),se(x,"keydown",br(t,ws)),se(x,"keypress",br(t,El)),se(x,"focus",function(C){return ll(t,C)}),se(x,"blur",function(C){return Ha(t,C)})}var Il=[];Zt.defineInitHook=function(t){return Il.push(t)};function ko(t,n,l,s){var u=t.doc,p;l==null&&(l="add"),l=="smart"&&(u.mode.indent?p=Fa(t,n).state:l="prev");var y=t.options.tabSize,x=Ge(u,n),C=st(x.text,null,y);x.stateAfter&&(x.stateAfter=null);var P=x.text.match(/^\s*/)[0],K;if(!s&&!/\S/.test(x.text))K=0,l="not";else if(l=="smart"&&(K=u.mode.indent(p,x.text.slice(P.length),x.text),K==lt||K>150)){if(!s)return;l="prev"}l=="prev"?n>u.first?K=st(Ge(u,n-1).text,null,y):K=0:l=="add"?K=C+t.options.indentUnit:l=="subtract"?K=C-t.options.indentUnit:typeof l=="number"&&(K=C+l),K=Math.max(0,K);var ne="",ve=0;if(t.options.indentWithTabs)for(var de=Math.floor(K/y);de;--de)ve+=y,ne+=" ";if(ve<K&&(ne+=kr(K-ve)),ne!=P)return Xa(u,ne,T(n,0),T(n,P.length),"+input"),x.stateAfter=null,!0;for(var Ee=0;Ee<u.sel.ranges.length;Ee++){var Ae=u.sel.ranges[Ee];if(Ae.head.line==n&&Ae.head.ch<P.length){var Ie=T(n,P.length);ds(u,Ee,new Dt(Ie,Ie));break}}}var Xn=null;function Os(t){Xn=t}function Ll(t,n,l,s,u){var p=t.doc;t.display.shift=!1,s||(s=p.sel);var y=+new Date-200,x=u=="paste"||t.state.pasteIncoming>y,C=Wn(n),P=null;if(x&&s.ranges.length>1)if(Xn&&Xn.text.join(`
22
+ left: `+n.left+"px; width: "+Math.max(2,n.right-n.left)+"px;");t.display.lineSpace.appendChild(y),y.scrollIntoView(u),t.display.lineSpace.removeChild(y)}}}function Tc(t,n,l,s){s==null&&(s=0);var u;!t.options.lineWrapping&&n==l&&(l=n.sticky=="before"?T(n.line,n.ch+1,"before"):n,n=n.ch?T(n.line,n.sticky=="before"?n.ch-1:n.ch,"after"):n);for(var p=0;p<5;p++){var y=!1,x=kn(t,n),C=!l||l==n?x:kn(t,l);u={left:Math.min(x.left,C.left),top:Math.min(x.top,C.top)-s,right:Math.max(x.left,C.left),bottom:Math.max(x.bottom,C.bottom)+s};var P=fl(t,u),K=t.doc.scrollTop,ne=t.doc.scrollLeft;if(P.scrollTop!=null&&(za(t,P.scrollTop),Math.abs(t.doc.scrollTop-K)>1&&(y=!0)),P.scrollLeft!=null&&(la(t,P.scrollLeft),Math.abs(t.doc.scrollLeft-ne)>1&&(y=!0)),!y)break}return u}function kc(t,n){var l=fl(t,n);l.scrollTop!=null&&za(t,l.scrollTop),l.scrollLeft!=null&&la(t,l.scrollLeft)}function fl(t,n){var l=t.display,s=Va(t.display);n.top<0&&(n.top=0);var u=t.curOp&&t.curOp.scrollTop!=null?t.curOp.scrollTop:l.scroller.scrollTop,p=Jo(t),y={};n.bottom-n.top>p&&(n.bottom=n.top+p);var x=t.doc.height+go(l),C=n.top<s,P=n.bottom>x-s;if(n.top<u)y.scrollTop=C?0:n.top;else if(n.bottom>u+p){var K=Math.min(n.top,(P?x:n.bottom)-p);K!=u&&(y.scrollTop=K)}var ne=t.options.fixedGutter?0:l.gutters.offsetWidth,ve=t.curOp&&t.curOp.scrollLeft!=null?t.curOp.scrollLeft:l.scroller.scrollLeft-ne,de=zn(t)-l.gutters.offsetWidth,Ee=n.right-n.left>de;return Ee&&(n.right=n.left+de),n.left<10?y.scrollLeft=0:n.left<ve?y.scrollLeft=Math.max(0,n.left+ne-(Ee?0:10)):n.right>de+ve-3&&(y.scrollLeft=n.right+(Ee?0:10)-de),y}function cl(t,n){n!=null&&(ns(t),t.curOp.scrollTop=(t.curOp.scrollTop==null?t.doc.scrollTop:t.curOp.scrollTop)+n)}function _a(t){ns(t);var n=t.getCursor();t.curOp.scrollToPos={from:n,to:n,margin:t.options.cursorScrollMargin}}function sa(t,n,l){(n!=null||l!=null)&&ns(t),n!=null&&(t.curOp.scrollLeft=n),l!=null&&(t.curOp.scrollTop=l)}function Iu(t,n){ns(t),t.curOp.scrollToPos=n}function ns(t){var n=t.curOp.scrollToPos;if(n){t.curOp.scrollToPos=null;var l=li(t,n.from),s=li(t,n.to);Lu(t,l,s,n.margin)}}function Lu(t,n,l,s){var u=fl(t,{left:Math.min(n.left,l.left),top:Math.min(n.top,l.top)-s,right:Math.max(n.right,l.right),bottom:Math.max(n.bottom,l.bottom)+s});sa(t,u.scrollLeft,u.scrollTop)}function za(t,n){Math.abs(t.doc.scrollTop-n)<2||(m||hl(t,{top:n}),dl(t,n,!0),m&&hl(t),So(t,100))}function dl(t,n,l){n=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,n)),!(t.display.scroller.scrollTop==n&&!l)&&(t.doc.scrollTop=n,t.display.scrollbars.setScrollTop(n),t.display.scroller.scrollTop!=n&&(t.display.scroller.scrollTop=n))}function la(t,n,l,s){n=Math.max(0,Math.min(n,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),!((l?n==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-n)<2)&&!s)&&(t.doc.scrollLeft=n,ju(t),t.display.scroller.scrollLeft!=n&&(t.display.scroller.scrollLeft=n),t.display.scrollbars.setScrollLeft(n))}function Ga(t){var n=t.display,l=n.gutters.offsetWidth,s=Math.round(t.doc.height+go(t.display));return{clientHeight:n.scroller.clientHeight,viewHeight:n.wrapper.clientHeight,scrollWidth:n.scroller.scrollWidth,clientWidth:n.scroller.clientWidth,viewWidth:n.wrapper.clientWidth,barLeft:t.options.fixedGutter?l:0,docHeight:s,scrollHeight:s+gn(t)+n.barHeight,nativeBarWidth:n.nativeBarWidth,gutterWidth:l}}var Bi=function(t,n,l){this.cm=l;var s=this.vert=Q("div",[Q("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),u=this.horiz=Q("div",[Q("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");s.tabIndex=u.tabIndex=-1,t(s),t(u),se(s,"scroll",function(){s.clientHeight&&n(s.scrollTop,"vertical")}),se(u,"scroll",function(){u.clientWidth&&n(u.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,D&&j<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Bi.prototype.update=function(t){var n=t.scrollWidth>t.clientWidth+1,l=t.scrollHeight>t.clientHeight+1,s=t.nativeBarWidth;if(l){this.vert.style.display="block",this.vert.style.bottom=n?s+"px":"0";var u=t.viewHeight-(n?s:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+u)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(n){this.horiz.style.display="block",this.horiz.style.right=l?s+"px":"0",this.horiz.style.left=t.barLeft+"px";var p=t.viewWidth-t.barLeft-(l?s:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+p)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(s==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:l?s:0,bottom:n?s:0}},Bi.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Bi.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Bi.prototype.zeroWidthHack=function(){var t=M&&!J?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new He,this.disableVert=new He},Bi.prototype.enableZeroWidthBar=function(t,n,l){t.style.visibility="";function s(){var u=t.getBoundingClientRect(),p=l=="vert"?document.elementFromPoint(u.right-1,(u.top+u.bottom)/2):document.elementFromPoint((u.right+u.left)/2,u.bottom-1);p!=t?t.style.visibility="hidden":n.set(1e3,s)}n.set(1e3,s)},Bi.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var is=function(){};is.prototype.update=function(){return{bottom:0,right:0}},is.prototype.setScrollLeft=function(){},is.prototype.setScrollTop=function(){},is.prototype.clear=function(){};function $a(t,n){n||(n=Ga(t));var l=t.display.barWidth,s=t.display.barHeight;Mu(t,n);for(var u=0;u<4&&l!=t.display.barWidth||s!=t.display.barHeight;u++)l!=t.display.barWidth&&t.options.lineWrapping&&ul(t),Mu(t,Ga(t)),l=t.display.barWidth,s=t.display.barHeight}function Mu(t,n){var l=t.display,s=l.scrollbars.update(n);l.sizer.style.paddingRight=(l.barWidth=s.right)+"px",l.sizer.style.paddingBottom=(l.barHeight=s.bottom)+"px",l.heightForcer.style.borderBottom=s.bottom+"px solid transparent",s.right&&s.bottom?(l.scrollbarFiller.style.display="block",l.scrollbarFiller.style.height=s.bottom+"px",l.scrollbarFiller.style.width=s.right+"px"):l.scrollbarFiller.style.display="",s.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(l.gutterFiller.style.display="block",l.gutterFiller.style.height=s.bottom+"px",l.gutterFiller.style.width=n.gutterWidth+"px"):l.gutterFiller.style.display=""}var Nu={native:Bi,null:is};function Ru(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&q(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Nu[t.options.scrollbarStyle](function(n){t.display.wrapper.insertBefore(n,t.display.scrollbarFiller),se(n,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),n.setAttribute("cm-not-content","true")},function(n,l){l=="horizontal"?la(t,n):za(t,n)},t),t.display.scrollbars.addClass&&Ue(t.display.wrapper,t.display.scrollbars.addClass)}var Pc=0;function ua(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Pc,markArrays:null},cc(t.curOp)}function fa(t){var n=t.curOp;n&&dc(n,function(l){for(var s=0;s<l.ops.length;s++)l.ops[s].cm.curOp=null;as(l)})}function as(t){for(var n=t.ops,l=0;l<n.length;l++)Fc(n[l]);for(var s=0;s<n.length;s++)Ic(n[s]);for(var u=0;u<n.length;u++)Lc(n[u]);for(var p=0;p<n.length;p++)Mc(n[p]);for(var y=0;y<n.length;y++)Nc(n[y])}function Fc(t){var n=t.cm,l=n.display;Du(n),t.updateMaxLine&&zs(n),t.mustUpdate=t.viewChanged||t.forceUpdate||t.scrollTop!=null||t.scrollToPos&&(t.scrollToPos.from.line<l.viewFrom||t.scrollToPos.to.line>=l.viewTo)||l.maxLineChanged&&n.options.lineWrapping,t.update=t.mustUpdate&&new os(n,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Ic(t){t.updatedDisplay=t.mustUpdate&&Bu(t.cm,t.update)}function Lc(t){var n=t.cm,l=n.display;t.updatedDisplay&&ul(n),t.barMeasure=Ga(n),l.maxLineChanged&&!n.options.lineWrapping&&(t.adjustWidthTo=Da(n,l.maxLine,l.maxLine.text.length).left+3,n.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(l.scroller.clientWidth,l.sizer.offsetLeft+t.adjustWidthTo+gn(n)+n.display.barWidth),t.maxScrollLeft=Math.max(0,l.sizer.offsetLeft+t.adjustWidthTo-zn(n))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=l.input.prepareSelection())}function Mc(t){var n=t.cm;t.adjustWidthTo!=null&&(n.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<n.doc.scrollLeft&&la(n,Math.min(n.display.scroller.scrollLeft,t.maxScrollLeft),!0),n.display.maxLineChanged=!1);var l=t.focus&&t.focus==ze(ut(n));t.preparedSelection&&n.display.input.showSelection(t.preparedSelection,l),(t.updatedDisplay||t.startHeight!=n.doc.height)&&$a(n,t.barMeasure),t.updatedDisplay&&Vu(n,t.barMeasure),t.selectionChanged&&Di(n),n.state.focused&&t.updateInput&&n.display.input.reset(t.typing),l&&rs(t.cm)}function Nc(t){var n=t.cm,l=n.display,s=n.doc;if(t.updatedDisplay&&pl(n,t.update),l.wheelStartX!=null&&(t.scrollTop!=null||t.scrollLeft!=null||t.scrollToPos)&&(l.wheelStartX=l.wheelStartY=null),t.scrollTop!=null&&dl(n,t.scrollTop,t.forceScroll),t.scrollLeft!=null&&la(n,t.scrollLeft,!0,!0),t.scrollToPos){var u=Tc(n,$e(s,t.scrollToPos.from),$e(s,t.scrollToPos.to),t.scrollToPos.margin);Ec(n,u)}var p=t.maybeHiddenMarkers,y=t.maybeUnhiddenMarkers;if(p)for(var x=0;x<p.length;++x)p[x].lines.length||nt(p[x],"hide");if(y)for(var C=0;C<y.length;++C)y[C].lines.length&&nt(y[C],"unhide");l.wrapper.offsetHeight&&(s.scrollTop=n.display.scroller.scrollTop),t.changeObjs&&nt(n,"changes",n,t.changeObjs),t.update&&t.update.finish()}function ln(t,n){if(t.curOp)return n();ua(t);try{return n()}finally{fa(t)}}function br(t,n){return function(){if(t.curOp)return n.apply(t,arguments);ua(t);try{return n.apply(t,arguments)}finally{fa(t)}}}function Vr(t){return function(){if(this.curOp)return t.apply(this,arguments);ua(this);try{return t.apply(this,arguments)}finally{fa(this)}}}function xr(t){return function(){var n=this.cm;if(!n||n.curOp)return t.apply(this,arguments);ua(n);try{return t.apply(this,arguments)}finally{fa(n)}}}function So(t,n){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(n,gt(Rc,t))}function Rc(t){var n=t.doc;if(!(n.highlightFrontier>=t.display.viewTo)){var l=+new Date+t.options.workTime,s=Fa(t,n.highlightFrontier),u=[];n.iter(s.line,Math.min(n.first+n.size,t.display.viewTo+500),function(p){if(s.line>=t.display.viewFrom){var y=p.styles,x=p.text.length>t.options.maxHighlightLength?An(n.mode,s.state):null,C=ru(t,p,s,!0);x&&(s.state=x),p.styles=C.styles;var P=p.styleClasses,K=C.classes;K?p.styleClasses=K:P&&(p.styleClasses=null);for(var ne=!y||y.length!=p.styles.length||P!=K&&(!P||!K||P.bgClass!=K.bgClass||P.textClass!=K.textClass),ve=0;!ne&&ve<y.length;++ve)ne=y[ve]!=p.styles[ve];ne&&u.push(s.line),p.stateAfter=s.save(),s.nextLine()}else p.text.length<=t.options.maxHighlightLength&&Wo(t,p.text,s),p.stateAfter=s.line%5==0?s.save():null,s.nextLine();if(+new Date>l)return So(t,t.options.workDelay),!0}),n.highlightFrontier=s.line,n.modeFrontier=Math.max(n.modeFrontier,s.line),u.length&&ln(t,function(){for(var p=0;p<u.length;p++)Ni(t,u[p],"text")})}}var os=function(t,n,l){var s=t.display;this.viewport=n,this.visible=Ua(s,t.doc,n),this.editorIsHidden=!s.wrapper.offsetWidth,this.wrapperHeight=s.wrapper.clientHeight,this.wrapperWidth=s.wrapper.clientWidth,this.oldDisplayWidth=zn(t),this.force=l,this.dims=il(t),this.events=[]};os.prototype.signal=function(t,n){Qt(t,n)&&this.events.push(arguments)},os.prototype.finish=function(){for(var t=0;t<this.events.length;t++)nt.apply(null,this.events[t])};function Du(t){var n=t.display;!n.scrollbarsClipped&&n.scroller.offsetWidth&&(n.nativeBarWidth=n.scroller.offsetWidth-n.scroller.clientWidth,n.heightForcer.style.height=gn(t)+"px",n.sizer.style.marginBottom=-n.nativeBarWidth+"px",n.sizer.style.borderRightWidth=gn(t)+"px",n.scrollbarsClipped=!0)}function Dc(t){if(t.hasFocus())return null;var n=ze(ut(t));if(!n||!je(t.display.lineDiv,n))return null;var l={activeElt:n};if(window.getSelection){var s=er(t).getSelection();s.anchorNode&&s.extend&&je(t.display.lineDiv,s.anchorNode)&&(l.anchorNode=s.anchorNode,l.anchorOffset=s.anchorOffset,l.focusNode=s.focusNode,l.focusOffset=s.focusOffset)}return l}function Bc(t){if(!(!t||!t.activeElt||t.activeElt==ze(t.activeElt.ownerDocument))&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&je(document.body,t.anchorNode)&&je(document.body,t.focusNode))){var n=t.activeElt.ownerDocument,l=n.defaultView.getSelection(),s=n.createRange();s.setEnd(t.anchorNode,t.anchorOffset),s.collapse(!1),l.removeAllRanges(),l.addRange(s),l.extend(t.focusNode,t.focusOffset)}}function Bu(t,n){var l=t.display,s=t.doc;if(n.editorIsHidden)return Ri(t),!1;if(!n.force&&n.visible.from>=l.viewFrom&&n.visible.to<=l.viewTo&&(l.updateLineNumbers==null||l.updateLineNumbers>=l.viewTo)&&l.renderedView==l.view&&Pu(t)==0)return!1;Wu(t)&&(Ri(t),n.dims=il(t));var u=s.first+s.size,p=Math.max(n.visible.from-t.options.viewportMargin,s.first),y=Math.min(u,n.visible.to+t.options.viewportMargin);l.viewFrom<p&&p-l.viewFrom<20&&(p=Math.max(s.first,l.viewFrom)),l.viewTo>y&&l.viewTo-y<20&&(y=Math.min(u,l.viewTo)),si&&(p=Mi(t.doc,p),y=pu(t.doc,y));var x=p!=l.viewFrom||y!=l.viewTo||l.lastWrapHeight!=n.wrapperHeight||l.lastWrapWidth!=n.wrapperWidth;Ac(t,p,y),l.viewOffset=wi(Ge(t.doc,l.viewFrom)),t.display.mover.style.top=l.viewOffset+"px";var C=Pu(t);if(!x&&C==0&&!n.force&&l.renderedView==l.view&&(l.updateLineNumbers==null||l.updateLineNumbers>=l.viewTo))return!1;var P=Dc(t);return C>4&&(l.lineDiv.style.display="none"),Vc(t,l.updateLineNumbers,n.dims),C>4&&(l.lineDiv.style.display=""),l.renderedView=l.view,Bc(P),pe(l.cursorDiv),pe(l.selectionDiv),l.gutters.style.height=l.sizer.style.minHeight=0,x&&(l.lastWrapHeight=n.wrapperHeight,l.lastWrapWidth=n.wrapperWidth,So(t,400)),l.updateLineNumbers=null,!0}function pl(t,n){for(var l=n.viewport,s=!0;;s=!1){if(!s||!t.options.lineWrapping||n.oldDisplayWidth==zn(t)){if(l&&l.top!=null&&(l={top:Math.min(t.doc.height+go(t.display)-Jo(t),l.top)}),n.visible=Ua(t.display,t.doc,l),n.visible.from>=t.display.viewFrom&&n.visible.to<=t.display.viewTo)break}else s&&(n.visible=Ua(t.display,t.doc,l));if(!Bu(t,n))break;ul(t);var u=Ga(t);Wa(t),$a(t,u),Vu(t,u),n.force=!1}n.signal(t,"update",t),(t.display.viewFrom!=t.display.reportedViewFrom||t.display.viewTo!=t.display.reportedViewTo)&&(n.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function hl(t,n){var l=new os(t,n);if(Bu(t,l)){ul(t),pl(t,l);var s=Ga(t);Wa(t),$a(t,s),Vu(t,s),l.finish()}}function Vc(t,n,l){var s=t.display,u=t.options.lineNumbers,p=s.lineDiv,y=p.firstChild;function x(Ee){var Ae=Ee.nextSibling;return X&&M&&t.display.currentWheelTarget==Ee?Ee.style.display="none":Ee.parentNode.removeChild(Ee),Ae}for(var C=s.view,P=s.viewFrom,K=0;K<C.length;K++){var ne=C[K];if(!ne.hidden)if(!ne.node||ne.node.parentNode!=p){var ve=mc(t,ne,P,l);p.insertBefore(ve,y)}else{for(;y!=ne.node;)y=x(y);var de=u&&n!=null&&n<=P&&ne.lineNumber;ne.changes&&(Re(ne.changes,"gutter")>-1&&(de=!1),Ks(t,ne,P,l)),de&&(pe(ne.lineNumber),ne.lineNumber.appendChild(document.createTextNode(Pa(t.options,P)))),y=ne.node.nextSibling}P+=ne.size}for(;y;)y=x(y)}function vl(t){var n=t.gutters.offsetWidth;t.sizer.style.marginLeft=n+"px",yr(t,"gutterChanged",t)}function Vu(t,n){t.display.sizer.style.minHeight=n.docHeight+"px",t.display.heightForcer.style.top=n.docHeight+"px",t.display.gutters.style.height=n.docHeight+t.display.barHeight+gn(t)+"px"}function ju(t){var n=t.display,l=n.view;if(!(!n.alignWidgets&&(!n.gutters.firstChild||!t.options.fixedGutter))){for(var s=al(n)-n.scroller.scrollLeft+t.doc.scrollLeft,u=n.gutters.offsetWidth,p=s+"px",y=0;y<l.length;y++)if(!l[y].hidden){t.options.fixedGutter&&(l[y].gutter&&(l[y].gutter.style.left=p),l[y].gutterBackground&&(l[y].gutterBackground.style.left=p));var x=l[y].alignable;if(x)for(var C=0;C<x.length;C++)x[C].style.left=p}t.options.fixedGutter&&(n.gutters.style.left=s+u+"px")}}function Wu(t){if(!t.options.lineNumbers)return!1;var n=t.doc,l=Pa(t.options,n.first+n.size-1),s=t.display;if(l.length!=s.lineNumChars){var u=s.measure.appendChild(Q("div",[Q("div",l)],"CodeMirror-linenumber CodeMirror-gutter-elt")),p=u.firstChild.offsetWidth,y=u.offsetWidth-p;return s.lineGutter.style.width="",s.lineNumInnerWidth=Math.max(p,s.lineGutter.offsetWidth-y)+1,s.lineNumWidth=s.lineNumInnerWidth+y,s.lineNumChars=s.lineNumInnerWidth?l.length:-1,s.lineGutter.style.width=s.lineNumWidth+"px",vl(t.display),!0}return!1}function ss(t,n){for(var l=[],s=!1,u=0;u<t.length;u++){var p=t[u],y=null;if(typeof p!="string"&&(y=p.style,p=p.className),p=="CodeMirror-linenumbers")if(n)s=!0;else continue;l.push({className:p,style:y})}return n&&!s&&l.push({className:"CodeMirror-linenumbers",style:null}),l}function Hu(t){var n=t.gutters,l=t.gutterSpecs;pe(n),t.lineGutter=null;for(var s=0;s<l.length;++s){var u=l[s],p=u.className,y=u.style,x=n.appendChild(Q("div",null,"CodeMirror-gutter "+p));y&&(x.style.cssText=y),p=="CodeMirror-linenumbers"&&(t.lineGutter=x,x.style.width=(t.lineNumWidth||1)+"px")}n.style.display=l.length?"":"none",vl(t)}function Ka(t){Hu(t.display),qr(t),ju(t)}function jc(t,n,l,s){var u=this;this.input=l,u.scrollbarFiller=Q("div",null,"CodeMirror-scrollbar-filler"),u.scrollbarFiller.setAttribute("cm-not-content","true"),u.gutterFiller=Q("div",null,"CodeMirror-gutter-filler"),u.gutterFiller.setAttribute("cm-not-content","true"),u.lineDiv=ye("div",null,"CodeMirror-code"),u.selectionDiv=Q("div",null,null,"position: relative; z-index: 1"),u.cursorDiv=Q("div",null,"CodeMirror-cursors"),u.measure=Q("div",null,"CodeMirror-measure"),u.lineMeasure=Q("div",null,"CodeMirror-measure"),u.lineSpace=ye("div",[u.measure,u.lineMeasure,u.selectionDiv,u.cursorDiv,u.lineDiv],null,"position: relative; outline: none");var p=ye("div",[u.lineSpace],"CodeMirror-lines");u.mover=Q("div",[p],null,"position: relative"),u.sizer=Q("div",[u.mover],"CodeMirror-sizer"),u.sizerWidth=null,u.heightForcer=Q("div",null,null,"position: absolute; height: "+Be+"px; width: 1px;"),u.gutters=Q("div",null,"CodeMirror-gutters"),u.lineGutter=null,u.scroller=Q("div",[u.sizer,u.heightForcer,u.gutters],"CodeMirror-scroll"),u.scroller.setAttribute("tabIndex","-1"),u.wrapper=Q("div",[u.scrollbarFiller,u.gutterFiller,u.scroller],"CodeMirror"),re&&he>=105&&(u.wrapper.style.clipPath="inset(0px)"),u.wrapper.setAttribute("translate","no"),D&&j<8&&(u.gutters.style.zIndex=-1,u.scroller.style.paddingRight=0),!X&&!(m&&w)&&(u.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(u.wrapper):t(u.wrapper)),u.viewFrom=u.viewTo=n.first,u.reportedViewFrom=u.reportedViewTo=n.first,u.view=[],u.renderedView=null,u.externalMeasured=null,u.viewOffset=0,u.lastWrapHeight=u.lastWrapWidth=0,u.updateLineNumbers=null,u.nativeBarWidth=u.barHeight=u.barWidth=0,u.scrollbarsClipped=!1,u.lineNumWidth=u.lineNumInnerWidth=u.lineNumChars=null,u.alignWidgets=!1,u.cachedCharWidth=u.cachedTextHeight=u.cachedPaddingH=null,u.maxLine=null,u.maxLineLength=0,u.maxLineChanged=!1,u.wheelDX=u.wheelDY=u.wheelStartX=u.wheelStartY=null,u.shift=!1,u.selForContextMenu=null,u.activeTouch=null,u.gutterSpecs=ss(s.gutters,s.lineNumbers),Hu(u),l.init(u)}var ls=0,Oi=null;D?Oi=-.53:m?Oi=15:re?Oi=-.7:fe&&(Oi=-1/3);function Uu(t){var n=t.wheelDeltaX,l=t.wheelDeltaY;return n==null&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(n=t.detail),l==null&&t.detail&&t.axis==t.VERTICAL_AXIS?l=t.detail:l==null&&(l=t.wheelDelta),{x:n,y:l}}function Wc(t){var n=Uu(t);return n.x*=Oi,n.y*=Oi,n}function _u(t,n){re&&he==102&&(t.display.chromeScrollHack==null?t.display.sizer.style.pointerEvents="none":clearTimeout(t.display.chromeScrollHack),t.display.chromeScrollHack=setTimeout(function(){t.display.chromeScrollHack=null,t.display.sizer.style.pointerEvents=""},100));var l=Uu(n),s=l.x,u=l.y,p=Oi;n.deltaMode===0&&(s=n.deltaX,u=n.deltaY,p=1);var y=t.display,x=y.scroller,C=x.scrollWidth>x.clientWidth,P=x.scrollHeight>x.clientHeight;if(s&&C||u&&P){if(u&&M&&X){e:for(var K=n.target,ne=y.view;K!=x;K=K.parentNode)for(var ve=0;ve<ne.length;ve++)if(ne[ve].node==K){t.display.currentWheelTarget=K;break e}}if(s&&!m&&!oe&&p!=null){u&&P&&za(t,Math.max(0,x.scrollTop+u*p)),la(t,Math.max(0,x.scrollLeft+s*p)),(!u||u&&P)&&Ft(n),y.wheelStartX=null;return}if(u&&p!=null){var de=u*p,Ee=t.doc.scrollTop,Ae=Ee+y.wrapper.clientHeight;de<0?Ee=Math.max(0,Ee+de-50):Ae=Math.min(t.doc.height,Ae+de+50),hl(t,{top:Ee,bottom:Ae})}ls<20&&n.deltaMode!==0&&(y.wheelStartX==null?(y.wheelStartX=x.scrollLeft,y.wheelStartY=x.scrollTop,y.wheelDX=s,y.wheelDY=u,setTimeout(function(){if(y.wheelStartX!=null){var Ie=x.scrollLeft-y.wheelStartX,Le=x.scrollTop-y.wheelStartY,De=Le&&y.wheelDY&&Le/y.wheelDY||Ie&&y.wheelDX&&Ie/y.wheelDX;y.wheelStartX=y.wheelStartY=null,De&&(Oi=(Oi*ls+De)/(ls+1),++ls)}},200)):(y.wheelDX+=s,y.wheelDY+=u))}}var en=function(t,n){this.ranges=t,this.primIndex=n};en.prototype.primary=function(){return this.ranges[this.primIndex]},en.prototype.equals=function(t){if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var n=0;n<this.ranges.length;n++){var l=this.ranges[n],s=t.ranges[n];if(!Pe(l.anchor,s.anchor)||!Pe(l.head,s.head))return!1}return!0},en.prototype.deepCopy=function(){for(var t=[],n=0;n<this.ranges.length;n++)t[n]=new Dt(Fe(this.ranges[n].anchor),Fe(this.ranges[n].head));return new en(t,this.primIndex)},en.prototype.somethingSelected=function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},en.prototype.contains=function(t,n){n||(n=t);for(var l=0;l<this.ranges.length;l++){var s=this.ranges[l];if($(n,s.from())>=0&&$(t,s.to())<=0)return l}return-1};var Dt=function(t,n){this.anchor=t,this.head=n};Dt.prototype.from=function(){return wt(this.anchor,this.head)},Dt.prototype.to=function(){return it(this.anchor,this.head)},Dt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Gn(t,n,l){var s=t&&t.options.selectionsMayTouch,u=n[l];n.sort(function(ve,de){return $(ve.from(),de.from())}),l=Re(n,u);for(var p=1;p<n.length;p++){var y=n[p],x=n[p-1],C=$(x.to(),y.from());if(s&&!y.empty()?C>0:C>=0){var P=wt(x.from(),y.from()),K=it(x.to(),y.to()),ne=x.empty()?y.from()==y.head:x.from()==x.head;p<=l&&--l,n.splice(--p,2,new Dt(ne?K:P,ne?P:K))}}return new en(n,l)}function Vi(t,n){return new en([new Dt(t,n||t)],0)}function ji(t){return t.text?T(t.from.line+t.text.length-1,et(t.text).length+(t.text.length==1?t.from.ch:0)):t.to}function zu(t,n){if($(t,n.from)<0)return t;if($(t,n.to)<=0)return ji(n);var l=t.line+n.text.length-(n.to.line-n.from.line)-1,s=t.ch;return t.line==n.to.line&&(s+=ji(n).ch-n.to.ch),T(l,s)}function A(t,n){for(var l=[],s=0;s<t.sel.ranges.length;s++){var u=t.sel.ranges[s];l.push(new Dt(zu(u.anchor,n),zu(u.head,n)))}return Gn(t.cm,l,t.sel.primIndex)}function Jt(t,n,l){return t.line==n.line?T(l.line,t.ch-n.ch+l.ch):T(l.line+(t.line-n.line),t.ch)}function ui(t,n,l){for(var s=[],u=T(t.first,0),p=u,y=0;y<n.length;y++){var x=n[y],C=Jt(x.from,u,p),P=Jt(ji(x),u,p);if(u=x.to,p=P,l=="around"){var K=t.sel.ranges[y],ne=$(K.head,K.anchor)<0;s[y]=new Dt(ne?P:C,ne?C:P)}else s[y]=new Dt(C,C)}return new en(s,t.sel.primIndex)}function gl(t){t.doc.mode=Qr(t.options,t.doc.modeOption),wo(t)}function wo(t){t.doc.iter(function(n){n.stateAfter&&(n.stateAfter=null),n.styles&&(n.styles=null)}),t.doc.modeFrontier=t.doc.highlightFrontier=t.doc.first,So(t,100),t.state.modeGen++,t.curOp&&qr(t)}function Gu(t,n){return n.from.ch==0&&n.to.ch==0&&et(n.text)==""&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function ml(t,n,l,s){function u(De){return l?l[De]:null}function p(De,Ne,We){hu(De,Ne,We,s),yr(De,"change",De,n)}function y(De,Ne){for(var We=[],Qe=De;Qe<Ne;++Qe)We.push(new ta(P[Qe],u(Qe),s));return We}var x=n.from,C=n.to,P=n.text,K=Ge(t,x.line),ne=Ge(t,C.line),ve=et(P),de=u(P.length-1),Ee=C.line-x.line;if(n.full)t.insert(0,y(0,P.length)),t.remove(P.length,t.size-P.length);else if(Gu(t,n)){var Ae=y(0,P.length-1);p(ne,ne.text,de),Ee&&t.remove(x.line,Ee),Ae.length&&t.insert(x.line,Ae)}else if(K==ne)if(P.length==1)p(K,K.text.slice(0,x.ch)+ve+K.text.slice(C.ch),de);else{var Ie=y(1,P.length-1);Ie.push(new ta(ve+K.text.slice(C.ch),de,s)),p(K,K.text.slice(0,x.ch)+P[0],u(0)),t.insert(x.line+1,Ie)}else if(P.length==1)p(K,K.text.slice(0,x.ch)+P[0]+ne.text.slice(C.ch),u(0)),t.remove(x.line+1,Ee);else{p(K,K.text.slice(0,x.ch)+P[0],u(0)),p(ne,ve+ne.text.slice(C.ch),de);var Le=y(1,P.length-1);Ee>1&&t.remove(x.line+1,Ee-1),t.insert(x.line+1,Le)}yr(t,"change",t,n)}function Wi(t,n,l){function s(u,p,y){if(u.linked)for(var x=0;x<u.linked.length;++x){var C=u.linked[x];if(C.doc!=p){var P=y&&C.sharedHist;l&&!P||(n(C.doc,P),s(C.doc,u,P))}}}s(t,null,!0)}function $u(t,n){if(n.cm)throw new Error("This document is already in use.");t.doc=n,n.cm=t,ol(t),gl(t),yl(t),t.options.direction=n.direction,t.options.lineWrapping||zs(t),t.options.mode=n.modeOption,qr(t)}function yl(t){(t.doc.direction=="rtl"?Ue:q)(t.display.lineDiv,"CodeMirror-rtl")}function Hc(t){ln(t,function(){yl(t),qr(t)})}function us(t){this.done=[],this.undone=[],this.undoDepth=t?t.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=t?t.maxGeneration:1}function fs(t,n){var l={from:Fe(n.from),to:ji(n),text:yi(t,n.from,n.to)};return $n(t,l,n.from.line,n.to.line+1),Wi(t,function(s){return $n(s,l,n.from.line,n.to.line+1)},!0),l}function Ku(t){for(;t.length;){var n=et(t);if(n.ranges)t.pop();else break}}function Uc(t,n){if(n)return Ku(t.done),et(t.done);if(t.done.length&&!et(t.done).ranges)return et(t.done);if(t.done.length>1&&!t.done[t.done.length-2].ranges)return t.done.pop(),et(t.done)}function Yu(t,n,l,s){var u=t.history;u.undone.length=0;var p=+new Date,y,x;if((u.lastOp==s||u.lastOrigin==n.origin&&n.origin&&(n.origin.charAt(0)=="+"&&u.lastModTime>p-(t.cm?t.cm.options.historyEventDelay:500)||n.origin.charAt(0)=="*"))&&(y=Uc(u,u.lastOp==s)))x=et(y.changes),$(n.from,n.to)==0&&$(n.from,x.to)==0?x.to=ji(n):y.changes.push(fs(t,n));else{var C=et(u.done);for((!C||!C.ranges)&&ca(t.sel,u.done),y={changes:[fs(t,n)],generation:u.generation},u.done.push(y);u.done.length>u.undoDepth;)u.done.shift(),u.done[0].ranges||u.done.shift()}u.done.push(l),u.generation=++u.maxGeneration,u.lastModTime=u.lastSelTime=p,u.lastOp=u.lastSelOp=s,u.lastOrigin=u.lastSelOrigin=n.origin,x||nt(t,"historyAdded")}function _c(t,n,l,s){var u=n.charAt(0);return u=="*"||u=="+"&&l.ranges.length==s.ranges.length&&l.somethingSelected()==s.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function zc(t,n,l,s){var u=t.history,p=s&&s.origin;l==u.lastSelOp||p&&u.lastSelOrigin==p&&(u.lastModTime==u.lastSelTime&&u.lastOrigin==p||_c(t,p,et(u.done),n))?u.done[u.done.length-1]=n:ca(n,u.done),u.lastSelTime=+new Date,u.lastSelOrigin=p,u.lastSelOp=l,s&&s.clearRedo!==!1&&Ku(u.undone)}function ca(t,n){var l=et(n);l&&l.ranges&&l.equals(t)||n.push(t)}function $n(t,n,l,s){var u=n["spans_"+t.id],p=0;t.iter(Math.max(t.first,l),Math.min(t.first+t.size,s),function(y){y.markedSpans&&((u||(u=n["spans_"+t.id]={}))[p]=y.markedSpans),++p})}function Xu(t){if(!t)return null;for(var n,l=0;l<t.length;++l)t[l].marker.explicitlyCleared?n||(n=t.slice(0,l)):n&&n.push(t[l]);return n?n.length?n:null:t}function Ju(t,n){var l=n["spans_"+t.id];if(!l)return null;for(var s=[],u=0;u<n.text.length;++u)s.push(Xu(l[u]));return s}function Qu(t,n){var l=Ju(t,n),s=_o(t,n);if(!l)return s;if(!s)return l;for(var u=0;u<l.length;++u){var p=l[u],y=s[u];if(p&&y)e:for(var x=0;x<y.length;++x){for(var C=y[x],P=0;P<p.length;++P)if(p[P].marker==C.marker)continue e;p.push(C)}else y&&(l[u]=y)}return l}function da(t,n,l){for(var s=[],u=0;u<t.length;++u){var p=t[u];if(p.ranges){s.push(l?en.prototype.deepCopy.call(p):p);continue}var y=p.changes,x=[];s.push({changes:x});for(var C=0;C<y.length;++C){var P=y[C],K=void 0;if(x.push({from:P.from,to:P.to,text:P.text}),n)for(var ne in P)(K=ne.match(/^spans_(\d+)$/))&&Re(n,Number(K[1]))>-1&&(et(x)[ne]=P[ne],delete P[ne])}}return s}function cs(t,n,l,s){if(s){var u=t.anchor;if(l){var p=$(n,u)<0;p!=$(l,u)<0?(u=n,n=l):p!=$(n,l)<0&&(n=l)}return new Dt(u,n)}else return new Dt(l||n,n)}function pa(t,n,l,s,u){u==null&&(u=t.cm&&(t.cm.display.shift||t.extend)),Sr(t,new en([cs(t.sel.primary(),n,l,u)],0),s)}function Zu(t,n,l){for(var s=[],u=t.cm&&(t.cm.display.shift||t.extend),p=0;p<t.sel.ranges.length;p++)s[p]=cs(t.sel.ranges[p],n[p],null,u);var y=Gn(t.cm,s,t.sel.primIndex);Sr(t,y,l)}function ds(t,n,l,s){var u=t.sel.ranges.slice(0);u[n]=l,Sr(t,Gn(t.cm,u,t.sel.primIndex),s)}function bl(t,n,l,s){Sr(t,Vi(n,l),s)}function qu(t,n,l){var s={ranges:n.ranges,update:function(u){this.ranges=[];for(var p=0;p<u.length;p++)this.ranges[p]=new Dt($e(t,u[p].anchor),$e(t,u[p].head))},origin:l&&l.origin};return nt(t,"beforeSelectionChange",t,s),t.cm&&nt(t.cm,"beforeSelectionChange",t.cm,s),s.ranges!=n.ranges?Gn(t.cm,s.ranges,s.ranges.length-1):n}function ef(t,n,l){var s=t.history.done,u=et(s);u&&u.ranges?(s[s.length-1]=n,xt(t,n,l)):Sr(t,n,l)}function Sr(t,n,l){xt(t,n,l),zc(t,t.sel,t.cm?t.cm.curOp.id:NaN,l)}function xt(t,n,l){(Qt(t,"beforeSelectionChange")||t.cm&&Qt(t.cm,"beforeSelectionChange"))&&(n=qu(t,n,l));var s=l&&l.bias||($(n.primary().head,t.sel.primary().head)<0?-1:1);At(t,mn(t,n,s,!0)),!(l&&l.scroll===!1)&&t.cm&&t.cm.getOption("readOnly")!="nocursor"&&_a(t.cm)}function At(t,n){n.equals(t.sel)||(t.sel=n,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,ct(t.cm)),yr(t,"cursorActivity",t))}function dt(t){At(t,mn(t,t.sel,null,!1))}function mn(t,n,l,s){for(var u,p=0;p<n.ranges.length;p++){var y=n.ranges[p],x=n.ranges.length==t.sel.ranges.length&&t.sel.ranges[p],C=ps(t,y.anchor,x&&x.anchor,l,s),P=y.head==y.anchor?C:ps(t,y.head,x&&x.head,l,s);(u||C!=y.anchor||P!=y.head)&&(u||(u=n.ranges.slice(0,p)),u[p]=new Dt(C,P))}return u?Gn(t.cm,u,n.primIndex):n}function Ya(t,n,l,s,u){var p=Ge(t,n.line);if(p.markedSpans)for(var y=0;y<p.markedSpans.length;++y){var x=p.markedSpans[y],C=x.marker,P="selectLeft"in C?!C.selectLeft:C.inclusiveLeft,K="selectRight"in C?!C.selectRight:C.inclusiveRight;if((x.from==null||(P?x.from<=n.ch:x.from<n.ch))&&(x.to==null||(K?x.to>=n.ch:x.to>n.ch))){if(u&&(nt(C,"beforeCursorEnter"),C.explicitlyCleared))if(p.markedSpans){--y;continue}else break;if(!C.atomic)continue;if(l){var ne=C.find(s<0?1:-1),ve=void 0;if((s<0?K:P)&&(ne=tf(t,ne,-s,ne&&ne.line==n.line?p:null)),ne&&ne.line==n.line&&(ve=$(ne,l))&&(s<0?ve<0:ve>0))return Ya(t,ne,n,s,u)}var de=C.find(s<0?-1:1);return(s<0?P:K)&&(de=tf(t,de,s,de.line==n.line?p:null)),de?Ya(t,de,n,s,u):null}}return n}function ps(t,n,l,s,u){var p=s||1,y=Ya(t,n,l,p,u)||!u&&Ya(t,n,l,p,!0)||Ya(t,n,l,-p,u)||!u&&Ya(t,n,l,-p,!0);return y||(t.cantEdit=!0,T(t.first,0))}function tf(t,n,l,s){return l<0&&n.ch==0?n.line>t.first?$e(t,T(n.line-1)):null:l>0&&n.ch==(s||Ge(t,n.line)).text.length?n.line<t.first+t.size-1?T(n.line+1,0):null:new T(n.line,n.ch+l)}function Hi(t){t.setSelection(T(t.firstLine(),0),T(t.lastLine()),_t)}function rf(t,n,l){var s={canceled:!1,from:n.from,to:n.to,text:n.text,origin:n.origin,cancel:function(){return s.canceled=!0}};return l&&(s.update=function(u,p,y,x){u&&(s.from=$e(t,u)),p&&(s.to=$e(t,p)),y&&(s.text=y),x!==void 0&&(s.origin=x)}),nt(t,"beforeChange",t,s),t.cm&&nt(t.cm,"beforeChange",t.cm,s),s.canceled?(t.cm&&(t.cm.curOp.updateInput=2),null):{from:s.from,to:s.to,text:s.text,origin:s.origin}}function ha(t,n,l){if(t.cm){if(!t.cm.curOp)return br(t.cm,ha)(t,n,l);if(t.cm.state.suppressEdits)return}if(!((Qt(t,"beforeChange")||t.cm&&Qt(t.cm,"beforeChange"))&&(n=rf(t,n,!0),!n))){var s=ou&&!l&&Hs(t,n.from,n.to);if(s)for(var u=s.length-1;u>=0;--u)xl(t,{from:s[u].from,to:s[u].to,text:u?[""]:n.text,origin:n.origin});else xl(t,n)}}function xl(t,n){if(!(n.text.length==1&&n.text[0]==""&&$(n.from,n.to)==0)){var l=A(t,n);Yu(t,n,l,t.cm?t.cm.curOp.id:NaN),Co(t,n,l,_o(t,n));var s=[];Wi(t,function(u,p){!p&&Re(s,u.history)==-1&&(Sl(u.history,n),s.push(u.history)),Co(u,n,null,_o(u,n))})}}function hs(t,n,l){var s=t.cm&&t.cm.state.suppressEdits;if(!(s&&!l)){for(var u=t.history,p,y=t.sel,x=n=="undo"?u.done:u.undone,C=n=="undo"?u.undone:u.done,P=0;P<x.length&&(p=x[P],!(l?p.ranges&&!p.equals(t.sel):!p.ranges));P++);if(P!=x.length){for(u.lastOrigin=u.lastSelOrigin=null;;)if(p=x.pop(),p.ranges){if(ca(p,C),l&&!p.equals(t.sel)){Sr(t,p,{clearRedo:!1});return}y=p}else if(s){x.push(p);return}else break;var K=[];ca(y,C),C.push({changes:K,generation:u.generation}),u.generation=p.generation||++u.maxGeneration;for(var ne=Qt(t,"beforeChange")||t.cm&&Qt(t.cm,"beforeChange"),ve=function(Ae){var Ie=p.changes[Ae];if(Ie.origin=n,ne&&!rf(t,Ie,!1))return x.length=0,{};K.push(fs(t,Ie));var Le=Ae?A(t,Ie):et(x);Co(t,Ie,Le,Qu(t,Ie)),!Ae&&t.cm&&t.cm.scrollIntoView({from:Ie.from,to:ji(Ie)});var De=[];Wi(t,function(Ne,We){!We&&Re(De,Ne.history)==-1&&(Sl(Ne.history,Ie),De.push(Ne.history)),Co(Ne,Ie,null,Qu(Ne,Ie))})},de=p.changes.length-1;de>=0;--de){var Ee=ve(de);if(Ee)return Ee.v}}}}function vs(t,n){if(n!=0&&(t.first+=n,t.sel=new en(Et(t.sel.ranges,function(u){return new Dt(T(u.anchor.line+n,u.anchor.ch),T(u.head.line+n,u.head.ch))}),t.sel.primIndex),t.cm)){qr(t.cm,t.first,t.first-n,n);for(var l=t.cm.display,s=l.viewFrom;s<l.viewTo;s++)Ni(t.cm,s,"gutter")}}function Co(t,n,l,s){if(t.cm&&!t.cm.curOp)return br(t.cm,Co)(t,n,l,s);if(n.to.line<t.first){vs(t,n.text.length-1-(n.to.line-n.from.line));return}if(!(n.from.line>t.lastLine())){if(n.from.line<t.first){var u=n.text.length-1-(t.first-n.from.line);vs(t,u),n={from:T(t.first,0),to:T(n.to.line+u,n.to.ch),text:[et(n.text)],origin:n.origin}}var p=t.lastLine();n.to.line>p&&(n={from:n.from,to:T(p,Ge(t,p).text.length),text:[n.text[0]],origin:n.origin}),n.removed=yi(t,n.from,n.to),l||(l=A(t,n)),t.cm?nf(t.cm,n,s):ml(t,n,s),xt(t,l,_t),t.cantEdit&&ps(t,T(t.firstLine(),0))&&(t.cantEdit=!1)}}function nf(t,n,l){var s=t.doc,u=t.display,p=n.from,y=n.to,x=!1,C=p.line;t.options.lineWrapping||(C=It(_n(Ge(s,p.line))),s.iter(C,y.line+1,function(de){if(de==u.maxLine)return x=!0,!0})),s.sel.contains(n.from,n.to)>-1&&ct(t),ml(s,n,l,ku(t)),t.options.lineWrapping||(s.iter(C,p.line+n.text.length,function(de){var Ee=$o(de);Ee>u.maxLineLength&&(u.maxLine=de,u.maxLineLength=Ee,u.maxLineChanged=!0,x=!1)}),x&&(t.curOp.updateMaxLine=!0)),au(s,p.line),So(t,400);var P=n.text.length-(y.line-p.line)-1;n.full?qr(t):p.line==y.line&&n.text.length==1&&!Gu(t.doc,n)?Ni(t,p.line,"text"):qr(t,p.line,y.line+1,P);var K=Qt(t,"changes"),ne=Qt(t,"change");if(ne||K){var ve={from:p,to:y,text:n.text,removed:n.removed,origin:n.origin};ne&&yr(t,"change",t,ve),K&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(ve)}t.display.selForContextMenu=null}function Xa(t,n,l,s,u){var p;s||(s=l),$(s,l)<0&&(p=[s,l],l=p[0],s=p[1]),typeof n=="string"&&(n=t.splitLines(n)),ha(t,{from:l,to:s,text:n,origin:u})}function af(t,n,l,s){l<t.line?t.line+=s:n<t.line&&(t.line=n,t.ch=0)}function of(t,n,l,s){for(var u=0;u<t.length;++u){var p=t[u],y=!0;if(p.ranges){p.copied||(p=t[u]=p.deepCopy(),p.copied=!0);for(var x=0;x<p.ranges.length;x++)af(p.ranges[x].anchor,n,l,s),af(p.ranges[x].head,n,l,s);continue}for(var C=0;C<p.changes.length;++C){var P=p.changes[C];if(l<P.from.line)P.from=T(P.from.line+s,P.from.ch),P.to=T(P.to.line+s,P.to.ch);else if(n<=P.to.line){y=!1;break}}y||(t.splice(0,u+1),u=0)}}function Sl(t,n){var l=n.from.line,s=n.to.line,u=n.text.length-(s-l)-1;of(t.done,l,s,u),of(t.undone,l,s,u)}function Ao(t,n,l,s){var u=n,p=n;return typeof n=="number"?p=Ge(t,Lt(t,n)):u=It(n),u==null?null:(s(p,u)&&t.cm&&Ni(t.cm,u,l),p)}function va(t){this.lines=t,this.parent=null;for(var n=0,l=0;l<t.length;++l)t[l].parent=this,n+=t[l].height;this.height=n}va.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,n){for(var l=t,s=t+n;l<s;++l){var u=this.lines[l];this.height-=u.height,vu(u),yr(u,"delete")}this.lines.splice(t,n)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,n,l){this.height+=l,this.lines=this.lines.slice(0,t).concat(n).concat(this.lines.slice(t));for(var s=0;s<n.length;++s)n[s].parent=this},iterN:function(t,n,l){for(var s=t+n;t<s;++t)if(l(this.lines[t]))return!0}};function Ja(t){this.children=t;for(var n=0,l=0,s=0;s<t.length;++s){var u=t[s];n+=u.chunkSize(),l+=u.height,u.parent=this}this.size=n,this.height=l,this.parent=null}Ja.prototype={chunkSize:function(){return this.size},removeInner:function(t,n){this.size-=n;for(var l=0;l<this.children.length;++l){var s=this.children[l],u=s.chunkSize();if(t<u){var p=Math.min(n,u-t),y=s.height;if(s.removeInner(t,p),this.height-=y-s.height,u==p&&(this.children.splice(l--,1),s.parent=null),(n-=p)==0)break;t=0}else t-=u}if(this.size-n<25&&(this.children.length>1||!(this.children[0]instanceof va))){var x=[];this.collapse(x),this.children=[new va(x)],this.children[0].parent=this}},collapse:function(t){for(var n=0;n<this.children.length;++n)this.children[n].collapse(t)},insertInner:function(t,n,l){this.size+=n.length,this.height+=l;for(var s=0;s<this.children.length;++s){var u=this.children[s],p=u.chunkSize();if(t<=p){if(u.insertInner(t,n,l),u.lines&&u.lines.length>50){for(var y=u.lines.length%25+25,x=y;x<u.lines.length;){var C=new va(u.lines.slice(x,x+=25));u.height-=C.height,this.children.splice(++s,0,C),C.parent=this}u.lines=u.lines.slice(0,y),this.maybeSpill()}break}t-=p}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var n=t.children.splice(t.children.length-5,5),l=new Ja(n);if(t.parent){t.size-=l.size,t.height-=l.height;var u=Re(t.parent.children,t);t.parent.children.splice(u+1,0,l)}else{var s=new Ja(t.children);s.parent=t,t.children=[s,l],t=s}l.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()}},iterN:function(t,n,l){for(var s=0;s<this.children.length;++s){var u=this.children[s],p=u.chunkSize();if(t<p){var y=Math.min(n,p-t);if(u.iterN(t,y,l))return!0;if((n-=y)==0)break;t=0}else t-=p}}};var Oo=function(t,n,l){if(l)for(var s in l)l.hasOwnProperty(s)&&(this[s]=l[s]);this.doc=t,this.node=n};Oo.prototype.clear=function(){var t=this.doc.cm,n=this.line.widgets,l=this.line,s=It(l);if(!(s==null||!n)){for(var u=0;u<n.length;++u)n[u]==this&&n.splice(u--,1);n.length||(l.widgets=null);var p=Ci(this);On(l,Math.max(0,l.height-p)),t&&(ln(t,function(){sf(t,l,-p),Ni(t,s,"widget")}),yr(t,"lineWidgetCleared",t,this,s))}},Oo.prototype.changed=function(){var t=this,n=this.height,l=this.doc.cm,s=this.line;this.height=null;var u=Ci(this)-n;u&&(Si(this.doc,s)||On(s,s.height+u),l&&ln(l,function(){l.curOp.forceUpdate=!0,sf(l,s,u),yr(l,"lineWidgetChanged",l,t,It(s))}))},Gr(Oo);function sf(t,n,l){wi(n)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&cl(t,l)}function Gc(t,n,l,s){var u=new Oo(t,l,s),p=t.cm;return p&&u.noHScroll&&(p.display.alignWidgets=!0),Ao(t,n,"widget",function(y){var x=y.widgets||(y.widgets=[]);if(u.insertAt==null?x.push(u):x.splice(Math.min(x.length,Math.max(0,u.insertAt)),0,u),u.line=y,p&&!Si(t,y)){var C=wi(y)<t.scrollTop;On(y,y.height+Ci(u)),C&&cl(p,u.height),p.curOp.forceUpdate=!0}return!0}),p&&yr(p,"lineWidgetAdded",p,u,typeof n=="number"?n:It(n)),u}var lf=0,fi=function(t,n){this.lines=[],this.type=n,this.doc=t,this.id=++lf};fi.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,n=t&&!t.curOp;if(n&&ua(t),Qt(this,"clear")){var l=this.find();l&&yr(this,"clear",l.from,l.to)}for(var s=null,u=null,p=0;p<this.lines.length;++p){var y=this.lines[p],x=La(y.markedSpans,this);t&&!this.collapsed?Ni(t,It(y),"text"):t&&(x.to!=null&&(u=It(y)),x.from!=null&&(s=It(y))),y.markedSpans=Ze(y.markedSpans,x),x.from==null&&this.collapsed&&!Si(this.doc,y)&&t&&On(y,Va(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var C=0;C<this.lines.length;++C){var P=_n(this.lines[C]),K=$o(P);K>t.display.maxLineLength&&(t.display.maxLine=P,t.display.maxLineLength=K,t.display.maxLineChanged=!0)}s!=null&&t&&this.collapsed&&qr(t,s,u+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&dt(t.doc)),t&&yr(t,"markerCleared",t,this,s,u),n&&fa(t),this.parent&&this.parent.clear()}},fi.prototype.find=function(t,n){t==null&&this.type=="bookmark"&&(t=1);for(var l,s,u=0;u<this.lines.length;++u){var p=this.lines[u],y=La(p.markedSpans,this);if(y.from!=null&&(l=T(n?p:It(p),y.from),t==-1))return l;if(y.to!=null&&(s=T(n?p:It(p),y.to),t==1))return s}return l&&{from:l,to:s}},fi.prototype.changed=function(){var t=this,n=this.find(-1,!0),l=this,s=this.doc.cm;!n||!s||ln(s,function(){var u=n.line,p=It(n.line),y=Qo(s,p);if(y&&(Qs(y),s.curOp.selectionChanged=s.curOp.forceUpdate=!0),s.curOp.updateMaxLine=!0,!Si(l.doc,u)&&l.height!=null){var x=l.height;l.height=null;var C=Ci(l)-x;C&&On(u,u.height+C)}yr(s,"markerChanged",s,t)})},fi.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var n=this.doc.cm.curOp;(!n.maybeHiddenMarkers||Re(n.maybeHiddenMarkers,this)==-1)&&(n.maybeUnhiddenMarkers||(n.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},fi.prototype.detachLine=function(t){if(this.lines.splice(Re(this.lines,t),1),!this.lines.length&&this.doc.cm){var n=this.doc.cm.curOp;(n.maybeHiddenMarkers||(n.maybeHiddenMarkers=[])).push(this)}},Gr(fi);function ga(t,n,l,s,u){if(s&&s.shared)return $c(t,n,l,s,u);if(t.cm&&!t.cm.curOp)return br(t.cm,ga)(t,n,l,s,u);var p=new fi(t,u),y=$(n,l);if(s&&Rt(s,p,!1),y>0||y==0&&p.clearWhenEmpty!==!1)return p;if(p.replacedWith&&(p.collapsed=!0,p.widgetNode=ye("span",[p.replacedWith],"CodeMirror-widget"),s.handleMouseEvents||p.widgetNode.setAttribute("cm-ignore-events","true"),s.insertLeft&&(p.widgetNode.insertLeft=!0)),p.collapsed){if(du(t,n.line,n,l,p)||n.line!=l.line&&du(t,l.line,n,l,p))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ia()}p.addToHistory&&Yu(t,{from:n,to:l,origin:"markText"},t.sel,NaN);var x=n.line,C=t.cm,P;if(t.iter(x,l.line+1,function(ne){C&&p.collapsed&&!C.options.lineWrapping&&_n(ne)==C.display.maxLine&&(P=!0),p.collapsed&&x!=n.line&&On(ne,0),Uo(ne,new Ho(p,x==n.line?n.ch:null,x==l.line?l.ch:null),t.cm&&t.cm.curOp),++x}),p.collapsed&&t.iter(n.line,l.line+1,function(ne){Si(t,ne)&&On(ne,0)}),p.clearOnEnter&&se(p,"beforeCursorEnter",function(){return p.clear()}),p.readOnly&&(su(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),p.collapsed&&(p.id=++lf,p.atomic=!0),C){if(P&&(C.curOp.updateMaxLine=!0),p.collapsed)qr(C,n.line,l.line+1);else if(p.className||p.startStyle||p.endStyle||p.css||p.attributes||p.title)for(var K=n.line;K<=l.line;K++)Ni(C,K,"text");p.atomic&&dt(C.doc),yr(C,"markerAdded",C,p)}return p}var ma=function(t,n){this.markers=t,this.primary=n;for(var l=0;l<t.length;++l)t[l].parent=this};ma.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)this.markers[t].clear();yr(this,"clear")}},ma.prototype.find=function(t,n){return this.primary.find(t,n)},Gr(ma);function $c(t,n,l,s,u){s=Rt(s),s.shared=!1;var p=[ga(t,n,l,s,u)],y=p[0],x=s.widgetNode;return Wi(t,function(C){x&&(s.widgetNode=x.cloneNode(!0)),p.push(ga(C,$e(C,n),$e(C,l),s,u));for(var P=0;P<C.linked.length;++P)if(C.linked[P].isParent)return;y=et(p)}),new ma(p,y)}function ir(t){return t.findMarks(T(t.first,0),t.clipPos(T(t.lastLine())),function(n){return n.parent})}function uf(t,n){for(var l=0;l<n.length;l++){var s=n[l],u=s.find(),p=t.clipPos(u.from),y=t.clipPos(u.to);if($(p,y)){var x=ga(t,p,y,s.primary,s.primary.type);s.markers.push(x),x.parent=s}}}function ot(t){for(var n=function(s){var u=t[s],p=[u.primary.doc];Wi(u.primary.doc,function(C){return p.push(C)});for(var y=0;y<u.markers.length;y++){var x=u.markers[y];Re(p,x.doc)==-1&&(x.parent=null,u.markers.splice(y--,1))}},l=0;l<t.length;l++)n(l)}var Kc=0,Pr=function(t,n,l,s,u){if(!(this instanceof Pr))return new Pr(t,n,l,s,u);l==null&&(l=0),Ja.call(this,[new va([new ta("",null)])]),this.first=l,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=l;var p=T(l,0);this.sel=Vi(p),this.history=new us(null),this.id=++Kc,this.modeOption=n,this.lineSep=s,this.direction=u=="rtl"?"rtl":"ltr",this.extend=!1,typeof t=="string"&&(t=this.splitLines(t)),ml(this,{from:p,to:p,text:t}),Sr(this,Vi(p),_t)};Pr.prototype=zt(Ja.prototype,{constructor:Pr,iter:function(t,n,l){l?this.iterN(t-this.first,n-t,l):this.iterN(this.first,this.first+this.size,t)},insert:function(t,n){for(var l=0,s=0;s<n.length;++s)l+=n[s].height;this.insertInner(t-this.first,n,l)},remove:function(t,n){this.removeInner(t-this.first,n)},getValue:function(t){var n=Qi(this,this.first,this.first+this.size);return t===!1?n:n.join(t||this.lineSeparator())},setValue:xr(function(t){var n=T(this.first,0),l=this.first+this.size-1;ha(this,{from:n,to:T(l,Ge(this,l).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&sa(this.cm,0,0),Sr(this,Vi(n),_t)}),replaceRange:function(t,n,l,s){n=$e(this,n),l=l?$e(this,l):n,Xa(this,t,n,l,s)},getRange:function(t,n,l){var s=yi(this,$e(this,t),$e(this,n));return l===!1?s:l===""?s.join(""):s.join(l||this.lineSeparator())},getLine:function(t){var n=this.getLineHandle(t);return n&&n.text},getLineHandle:function(t){if(Zi(this,t))return Ge(this,t)},getLineNumber:function(t){return It(t)},getLineHandleVisualStart:function(t){return typeof t=="number"&&(t=Ge(this,t)),_n(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return $e(this,t)},getCursor:function(t){var n=this.sel.primary(),l;return t==null||t=="head"?l=n.head:t=="anchor"?l=n.anchor:t=="end"||t=="to"||t===!1?l=n.to():l=n.from(),l},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:xr(function(t,n,l){bl(this,$e(this,typeof t=="number"?T(t,n||0):t),null,l)}),setSelection:xr(function(t,n,l){bl(this,$e(this,t),$e(this,n||t),l)}),extendSelection:xr(function(t,n,l){pa(this,$e(this,t),n&&$e(this,n),l)}),extendSelections:xr(function(t,n){Zu(this,co(this,t),n)}),extendSelectionsBy:xr(function(t,n){var l=Et(this.sel.ranges,t);Zu(this,co(this,l),n)}),setSelections:xr(function(t,n,l){if(t.length){for(var s=[],u=0;u<t.length;u++)s[u]=new Dt($e(this,t[u].anchor),$e(this,t[u].head||t[u].anchor));n==null&&(n=Math.min(t.length-1,this.sel.primIndex)),Sr(this,Gn(this.cm,s,n),l)}}),addSelection:xr(function(t,n,l){var s=this.sel.ranges.slice(0);s.push(new Dt($e(this,t),$e(this,n||t))),Sr(this,Gn(this.cm,s,s.length-1),l)}),getSelection:function(t){for(var n=this.sel.ranges,l,s=0;s<n.length;s++){var u=yi(this,n[s].from(),n[s].to());l=l?l.concat(u):u}return t===!1?l:l.join(t||this.lineSeparator())},getSelections:function(t){for(var n=[],l=this.sel.ranges,s=0;s<l.length;s++){var u=yi(this,l[s].from(),l[s].to());t!==!1&&(u=u.join(t||this.lineSeparator())),n[s]=u}return n},replaceSelection:function(t,n,l){for(var s=[],u=0;u<this.sel.ranges.length;u++)s[u]=t;this.replaceSelections(s,n,l||"+input")},replaceSelections:xr(function(t,n,l){for(var s=[],u=this.sel,p=0;p<u.ranges.length;p++){var y=u.ranges[p];s[p]={from:y.from(),to:y.to(),text:this.splitLines(t[p]),origin:l}}for(var x=n&&n!="end"&&ui(this,s,n),C=s.length-1;C>=0;C--)ha(this,s[C]);x?ef(this,x):this.cm&&_a(this.cm)}),undo:xr(function(){hs(this,"undo")}),redo:xr(function(){hs(this,"redo")}),undoSelection:xr(function(){hs(this,"undo",!0)}),redoSelection:xr(function(){hs(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,n=0,l=0,s=0;s<t.done.length;s++)t.done[s].ranges||++n;for(var u=0;u<t.undone.length;u++)t.undone[u].ranges||++l;return{undo:n,redo:l}},clearHistory:function(){var t=this;this.history=new us(this.history),Wi(this,function(n){return n.history=t.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:da(this.history.done),undone:da(this.history.undone)}},setHistory:function(t){var n=this.history=new us(this.history);n.done=da(t.done.slice(0),null,!0),n.undone=da(t.undone.slice(0),null,!0)},setGutterMarker:xr(function(t,n,l){return Ao(this,t,"gutter",function(s){var u=s.gutterMarkers||(s.gutterMarkers={});return u[n]=l,!l&&Cn(u)&&(s.gutterMarkers=null),!0})}),clearGutter:xr(function(t){var n=this;this.iter(function(l){l.gutterMarkers&&l.gutterMarkers[t]&&Ao(n,l,"gutter",function(){return l.gutterMarkers[t]=null,Cn(l.gutterMarkers)&&(l.gutterMarkers=null),!0})})}),lineInfo:function(t){var n;if(typeof t=="number"){if(!Zi(this,t)||(n=t,t=Ge(this,t),!t))return null}else if(n=It(t),n==null)return null;return{line:n,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},addLineClass:xr(function(t,n,l){return Ao(this,t,n=="gutter"?"gutter":"class",function(s){var u=n=="text"?"textClass":n=="background"?"bgClass":n=="gutter"?"gutterClass":"wrapClass";if(!s[u])s[u]=l;else{if(z(l).test(s[u]))return!1;s[u]+=" "+l}return!0})}),removeLineClass:xr(function(t,n,l){return Ao(this,t,n=="gutter"?"gutter":"class",function(s){var u=n=="text"?"textClass":n=="background"?"bgClass":n=="gutter"?"gutterClass":"wrapClass",p=s[u];if(p)if(l==null)s[u]=null;else{var y=p.match(z(l));if(!y)return!1;var x=y.index+y[0].length;s[u]=p.slice(0,y.index)+(!y.index||x==p.length?"":" ")+p.slice(x)||null}else return!1;return!0})}),addLineWidget:xr(function(t,n,l){return Gc(this,t,n,l)}),removeLineWidget:function(t){t.clear()},markText:function(t,n,l){return ga(this,$e(this,t),$e(this,n),l,l&&l.type||"range")},setBookmark:function(t,n){var l={replacedWith:n&&(n.nodeType==null?n.widget:n),insertLeft:n&&n.insertLeft,clearWhenEmpty:!1,shared:n&&n.shared,handleMouseEvents:n&&n.handleMouseEvents};return t=$e(this,t),ga(this,t,t,l,"bookmark")},findMarksAt:function(t){t=$e(this,t);var n=[],l=Ge(this,t.line).markedSpans;if(l)for(var s=0;s<l.length;++s){var u=l[s];(u.from==null||u.from<=t.ch)&&(u.to==null||u.to>=t.ch)&&n.push(u.marker.parent||u.marker)}return n},findMarks:function(t,n,l){t=$e(this,t),n=$e(this,n);var s=[],u=t.line;return this.iter(t.line,n.line+1,function(p){var y=p.markedSpans;if(y)for(var x=0;x<y.length;x++){var C=y[x];!(C.to!=null&&u==t.line&&t.ch>=C.to||C.from==null&&u!=t.line||C.from!=null&&u==n.line&&C.from>=n.ch)&&(!l||l(C.marker))&&s.push(C.marker.parent||C.marker)}++u}),s},getAllMarks:function(){var t=[];return this.iter(function(n){var l=n.markedSpans;if(l)for(var s=0;s<l.length;++s)l[s].from!=null&&t.push(l[s].marker)}),t},posFromIndex:function(t){var n,l=this.first,s=this.lineSeparator().length;return this.iter(function(u){var p=u.text.length+s;if(p>t)return n=t,!0;t-=p,++l}),$e(this,T(l,n))},indexFromPos:function(t){t=$e(this,t);var n=t.ch;if(t.line<this.first||t.ch<0)return 0;var l=this.lineSeparator().length;return this.iter(this.first,t.line,function(s){n+=s.text.length+l}),n},copy:function(t){var n=new Pr(Qi(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return n.scrollTop=this.scrollTop,n.scrollLeft=this.scrollLeft,n.sel=this.sel,n.extend=!1,t&&(n.history.undoDepth=this.history.undoDepth,n.setHistory(this.getHistory())),n},linkedDoc:function(t){t||(t={});var n=this.first,l=this.first+this.size;t.from!=null&&t.from>n&&(n=t.from),t.to!=null&&t.to<l&&(l=t.to);var s=new Pr(Qi(this,n,l),t.mode||this.modeOption,n,this.lineSep,this.direction);return t.sharedHist&&(s.history=this.history),(this.linked||(this.linked=[])).push({doc:s,sharedHist:t.sharedHist}),s.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],uf(s,ir(this)),s},unlinkDoc:function(t){if(t instanceof Zt&&(t=t.doc),this.linked)for(var n=0;n<this.linked.length;++n){var l=this.linked[n];if(l.doc==t){this.linked.splice(n,1),t.unlinkDoc(this),ot(ir(this));break}}if(t.history==this.history){var s=[t.id];Wi(t,function(u){return s.push(u.id)},!0),t.history=new us(null),t.history.done=da(this.history.done,s),t.history.undone=da(this.history.undone,s)}},iterLinkedDocs:function(t){Wi(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):Wn(t)},lineSeparator:function(){return this.lineSep||`
23
+ `},setDirection:xr(function(t){t!="rtl"&&(t="ltr"),t!=this.direction&&(this.direction=t,this.iter(function(n){return n.order=null}),this.cm&&Hc(this.cm))})}),Pr.prototype.eachLine=Pr.prototype.iter;var gs=0;function Yc(t){var n=this;if(ff(n),!(ht(n,t)||Ai(n.display,t))){Ft(t),D&&(gs=+new Date);var l=aa(n,t,!0),s=t.dataTransfer.files;if(!(!l||n.isReadOnly()))if(s&&s.length&&window.FileReader&&window.File)for(var u=s.length,p=Array(u),y=0,x=function(){++y==u&&br(n,function(){l=$e(n.doc,l);var de={from:l,to:l,text:n.doc.splitLines(p.filter(function(Ee){return Ee!=null}).join(n.doc.lineSeparator())),origin:"paste"};ha(n.doc,de),ef(n.doc,Vi($e(n.doc,l),$e(n.doc,ji(de))))})()},C=function(de,Ee){if(n.options.allowDropFileTypes&&Re(n.options.allowDropFileTypes,de.type)==-1){x();return}var Ae=new FileReader;Ae.onerror=function(){return x()},Ae.onload=function(){var Ie=Ae.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ie)){x();return}p[Ee]=Ie,x()},Ae.readAsText(de)},P=0;P<s.length;P++)C(s[P],P);else{if(n.state.draggingText&&n.doc.sel.contains(l)>-1){n.state.draggingText(t),setTimeout(function(){return n.display.input.focus()},20);return}try{var K=t.dataTransfer.getData("Text");if(K){var ne;if(n.state.draggingText&&!n.state.draggingText.copy&&(ne=n.listSelections()),xt(n.doc,Vi(l,l)),ne)for(var ve=0;ve<ne.length;++ve)Xa(n.doc,"",ne[ve].anchor,ne[ve].head,"drag");n.replaceSelection(K,"around","paste"),n.display.input.focus()}}catch{}}}}function Xc(t,n){if(D&&(!t.state.draggingText||+new Date-gs<100)){Nr(n);return}if(!(ht(t,n)||Ai(t.display,n))&&(n.dataTransfer.setData("Text",t.getSelection()),n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setDragImage&&!fe)){var l=Q("img",null,null,"position: fixed; left: 0; top: 0;");l.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",oe&&(l.width=l.height=1,t.display.wrapper.appendChild(l),l._top=l.offsetTop),n.dataTransfer.setDragImage(l,0,0),oe&&l.parentNode.removeChild(l)}}function sr(t,n){var l=aa(t,n);if(l){var s=document.createDocumentFragment();es(t,l,s),t.display.dragCursor||(t.display.dragCursor=Q("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),xe(t.display.dragCursor,s)}}function ff(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function cf(t){if(document.getElementsByClassName){for(var n=document.getElementsByClassName("CodeMirror"),l=[],s=0;s<n.length;s++){var u=n[s].CodeMirror;u&&l.push(u)}l.length&&l[0].operation(function(){for(var p=0;p<l.length;p++)t(l[p])})}}var df=!1;function ar(){df||(Fr(),df=!0)}function Fr(){var t;se(window,"resize",function(){t==null&&(t=setTimeout(function(){t=null,cf(Jc)},100))}),se(window,"blur",function(){return cf(Ha)})}function Jc(t){var n=t.display;n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.scrollbarsClipped=!1,t.setSize()}for(var Ui={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"},Eo=0;Eo<10;Eo++)Ui[Eo+48]=Ui[Eo+96]=String(Eo);for(var ms=65;ms<=90;ms++)Ui[ms]=String.fromCharCode(ms);for(var ya=1;ya<=12;ya++)Ui[ya+111]=Ui[ya+63235]="F"+ya;var Kn={};Kn.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"},Kn.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"},Kn.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Kn.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"]},Kn.default=M?Kn.macDefault:Kn.pcDefault;function Qc(t){var n=t.split(/-(?!$)/);t=n[n.length-1];for(var l,s,u,p,y=0;y<n.length-1;y++){var x=n[y];if(/^(cmd|meta|m)$/i.test(x))p=!0;else if(/^a(lt)?$/i.test(x))l=!0;else if(/^(c|ctrl|control)$/i.test(x))s=!0;else if(/^s(hift)?$/i.test(x))u=!0;else throw new Error("Unrecognized modifier name: "+x)}return l&&(t="Alt-"+t),s&&(t="Ctrl-"+t),p&&(t="Cmd-"+t),u&&(t="Shift-"+t),t}function Zc(t){var n={};for(var l in t)if(t.hasOwnProperty(l)){var s=t[l];if(/^(name|fallthrough|(de|at)tach)$/.test(l))continue;if(s=="..."){delete t[l];continue}for(var u=Et(l.split(" "),Qc),p=0;p<u.length;p++){var y=void 0,x=void 0;p==u.length-1?(x=u.join(" "),y=s):(x=u.slice(0,p+1).join(" "),y="...");var C=n[x];if(!C)n[x]=y;else if(C!=y)throw new Error("Inconsistent bindings for "+x)}delete t[l]}for(var P in n)t[P]=n[P];return t}function Qa(t,n,l,s){n=ba(n);var u=n.call?n.call(t,s):n[t];if(u===!1)return"nothing";if(u==="...")return"multi";if(u!=null&&l(u))return"handled";if(n.fallthrough){if(Object.prototype.toString.call(n.fallthrough)!="[object Array]")return Qa(t,n.fallthrough,l,s);for(var p=0;p<n.fallthrough.length;p++){var y=Qa(t,n.fallthrough[p],l,s);if(y)return y}}}function pf(t){var n=typeof t=="string"?t:Ui[t.keyCode];return n=="Ctrl"||n=="Alt"||n=="Shift"||n=="Mod"}function Yn(t,n,l){var s=t;return n.altKey&&s!="Alt"&&(t="Alt-"+t),(H?n.metaKey:n.ctrlKey)&&s!="Ctrl"&&(t="Ctrl-"+t),(H?n.ctrlKey:n.metaKey)&&s!="Mod"&&(t="Cmd-"+t),!l&&n.shiftKey&&s!="Shift"&&(t="Shift-"+t),t}function _i(t,n){if(oe&&t.keyCode==34&&t.char)return!1;var l=Ui[t.keyCode];return l==null||t.altGraphKey?!1:(t.keyCode==3&&t.code&&(l=t.code),Yn(l,t,n))}function ba(t){return typeof t=="string"?Kn[t]:t}function Ei(t,n){for(var l=t.doc.sel.ranges,s=[],u=0;u<l.length;u++){for(var p=n(l[u]);s.length&&$(p.from,et(s).to)<=0;){var y=s.pop();if($(y.from,p.from)<0){p.from=y.from;break}}s.push(p)}ln(t,function(){for(var x=s.length-1;x>=0;x--)Xa(t.doc,"",s[x].from,s[x].to,"+delete");_a(t)})}function ys(t,n,l){var s=an(t.text,n+l,l);return s<0||s>t.text.length?null:s}function wl(t,n,l){var s=ys(t,n.ch,l);return s==null?null:new T(n.line,s,l<0?"after":"before")}function Cl(t,n,l,s,u){if(t){n.doc.direction=="rtl"&&(u=-u);var p=tt(l,n.doc.direction);if(p){var y=u<0?et(p):p[0],x=u<0==(y.level==1),C=x?"after":"before",P;if(y.level>0||n.doc.direction=="rtl"){var K=na(n,l);P=u<0?l.text.length-1:0;var ne=Tn(n,K,P).top;P=Mr(function(ve){return Tn(n,K,ve).top==ne},u<0==(y.level==1)?y.from:y.to-1,P),C=="before"&&(P=ys(l,P,1))}else P=u<0?y.to:y.from;return new T(s,P,C)}}return new T(s,u<0?l.text.length:0,u<0?"before":"after")}function hf(t,n,l,s){var u=tt(n,t.doc.direction);if(!u)return wl(n,l,s);l.ch>=n.text.length?(l.ch=n.text.length,l.sticky="before"):l.ch<=0&&(l.ch=0,l.sticky="after");var p=St(u,l.ch,l.sticky),y=u[p];if(t.doc.direction=="ltr"&&y.level%2==0&&(s>0?y.to>l.ch:y.from<l.ch))return wl(n,l,s);var x=function(Le,De){return ys(n,Le instanceof T?Le.ch:Le,De)},C,P=function(Le){return t.options.lineWrapping?(C=C||na(t,n),Tu(t,n,C,Le)):{begin:0,end:n.text.length}},K=P(l.sticky=="before"?x(l,-1):l.ch);if(t.doc.direction=="rtl"||y.level==1){var ne=y.level==1==s<0,ve=x(l,ne?1:-1);if(ve!=null&&(ne?ve<=y.to&&ve<=K.end:ve>=y.from&&ve>=K.begin)){var de=ne?"before":"after";return new T(l.line,ve,de)}}var Ee=function(Le,De,Ne){for(var We=function($t,wr){return wr?new T(l.line,x($t,1),"before"):new T(l.line,$t,"after")};Le>=0&&Le<u.length;Le+=De){var Qe=u[Le],Ke=De>0==(Qe.level!=1),bt=Ke?Ne.begin:x(Ne.end,-1);if(Qe.from<=bt&&bt<Qe.to||(bt=Ke?Qe.from:x(Qe.to,-1),Ne.begin<=bt&&bt<Ne.end))return We(bt,Ke)}},Ae=Ee(p+s,s,K);if(Ae)return Ae;var Ie=s>0?K.end:x(K.begin,-1);return Ie!=null&&!(s>0&&Ie==n.text.length)&&(Ae=Ee(s>0?0:u.length-1,s,P(Ie)),Ae)?Ae:null}var Za={selectAll:Hi,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),_t)},killLine:function(t){return Ei(t,function(n){if(n.empty()){var l=Ge(t.doc,n.head.line).text.length;return n.head.ch==l&&n.head.line<t.lastLine()?{from:n.head,to:T(n.head.line+1,0)}:{from:n.head,to:T(n.head.line,l)}}else return{from:n.from(),to:n.to()}})},deleteLine:function(t){return Ei(t,function(n){return{from:T(n.from().line,0),to:$e(t.doc,T(n.to().line+1,0))}})},delLineLeft:function(t){return Ei(t,function(n){return{from:T(n.from().line,0),to:n.from()}})},delWrappedLineLeft:function(t){return Ei(t,function(n){var l=t.charCoords(n.head,"div").top+5,s=t.coordsChar({left:0,top:l},"div");return{from:s,to:n.from()}})},delWrappedLineRight:function(t){return Ei(t,function(n){var l=t.charCoords(n.head,"div").top+5,s=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:l},"div");return{from:n.from(),to:s}})},undo:function(t){return t.undo()},redo:function(t){return t.redo()},undoSelection:function(t){return t.undoSelection()},redoSelection:function(t){return t.redoSelection()},goDocStart:function(t){return t.extendSelection(T(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(T(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(n){return vf(t,n.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(n){return bs(t,n.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(n){return qc(t,n.head.line)},{origin:"+move",bias:-1})},goLineRight:function(t){return t.extendSelectionsBy(function(n){var l=t.cursorCoords(n.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:l},"div")},Pt)},goLineLeft:function(t){return t.extendSelectionsBy(function(n){var l=t.cursorCoords(n.head,"div").top+5;return t.coordsChar({left:0,top:l},"div")},Pt)},goLineLeftSmart:function(t){return t.extendSelectionsBy(function(n){var l=t.cursorCoords(n.head,"div").top+5,s=t.coordsChar({left:0,top:l},"div");return s.ch<t.getLine(s.line).search(/\S/)?bs(t,n.head):s},Pt)},goLineUp:function(t){return t.moveV(-1,"line")},goLineDown:function(t){return t.moveV(1,"line")},goPageUp:function(t){return t.moveV(-1,"page")},goPageDown:function(t){return t.moveV(1,"page")},goCharLeft:function(t){return t.moveH(-1,"char")},goCharRight:function(t){return t.moveH(1,"char")},goColumnLeft:function(t){return t.moveH(-1,"column")},goColumnRight:function(t){return t.moveH(1,"column")},goWordLeft:function(t){return t.moveH(-1,"word")},goGroupRight:function(t){return t.moveH(1,"group")},goGroupLeft:function(t){return t.moveH(-1,"group")},goWordRight:function(t){return t.moveH(1,"word")},delCharBefore:function(t){return t.deleteH(-1,"codepoint")},delCharAfter:function(t){return t.deleteH(1,"char")},delWordBefore:function(t){return t.deleteH(-1,"word")},delWordAfter:function(t){return t.deleteH(1,"word")},delGroupBefore:function(t){return t.deleteH(-1,"group")},delGroupAfter:function(t){return t.deleteH(1,"group")},indentAuto:function(t){return t.indentSelection("smart")},indentMore:function(t){return t.indentSelection("add")},indentLess:function(t){return t.indentSelection("subtract")},insertTab:function(t){return t.replaceSelection(" ")},insertSoftTab:function(t){for(var n=[],l=t.listSelections(),s=t.options.tabSize,u=0;u<l.length;u++){var p=l[u].from(),y=st(t.getLine(p.line),p.ch,s);n.push(kr(s-y%s))}t.replaceSelections(n)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return ln(t,function(){for(var n=t.listSelections(),l=[],s=0;s<n.length;s++)if(n[s].empty()){var u=n[s].head,p=Ge(t.doc,u.line).text;if(p){if(u.ch==p.length&&(u=new T(u.line,u.ch-1)),u.ch>0)u=new T(u.line,u.ch+1),t.replaceRange(p.charAt(u.ch-1)+p.charAt(u.ch-2),T(u.line,u.ch-2),u,"+transpose");else if(u.line>t.doc.first){var y=Ge(t.doc,u.line-1).text;y&&(u=new T(u.line,1),t.replaceRange(p.charAt(0)+t.doc.lineSeparator()+y.charAt(y.length-1),T(u.line-1,y.length-1),u,"+transpose"))}}l.push(new Dt(u,u))}t.setSelections(l)})},newlineAndIndent:function(t){return ln(t,function(){for(var n=t.listSelections(),l=n.length-1;l>=0;l--)t.replaceRange(t.doc.lineSeparator(),n[l].anchor,n[l].head,"+input");n=t.listSelections();for(var s=0;s<n.length;s++)t.indentLine(n[s].from().line,null,!0);_a(t)})},openLine:function(t){return t.replaceSelection(`
24
+ `,"start")},toggleOverwrite:function(t){return t.toggleOverwrite()}};function vf(t,n){var l=Ge(t.doc,n),s=_n(l);return s!=l&&(n=It(s)),Cl(!0,t,s,n,1)}function qc(t,n){var l=Ge(t.doc,n),s=ic(l);return s!=l&&(n=It(s)),Cl(!0,t,l,n,-1)}function bs(t,n){var l=vf(t,n.line),s=Ge(t.doc,l.line),u=tt(s,t.doc.direction);if(!u||u[0].level==0){var p=Math.max(l.ch,s.text.search(/\S/)),y=n.line==l.line&&n.ch<=p&&n.ch;return T(l.line,y?0:p,l.sticky)}return l}function Je(t,n,l){if(typeof n=="string"&&(n=Za[n],!n))return!1;t.display.input.ensurePolled();var s=t.display.shift,u=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),l&&(t.display.shift=!1),u=n(t)!=lt}finally{t.display.shift=s,t.state.suppressEdits=!1}return u}function xs(t,n,l){for(var s=0;s<t.state.keyMaps.length;s++){var u=Qa(n,t.state.keyMaps[s],l,t);if(u)return u}return t.options.extraKeys&&Qa(n,t.options.extraKeys,l,t)||Qa(n,t.options.keyMap,l,t)}var yn=new He;function Ti(t,n,l,s){var u=t.state.keySeq;if(u){if(pf(n))return"handled";if(/\'$/.test(n)?t.state.keySeq=null:yn.set(50,function(){t.state.keySeq==u&&(t.state.keySeq=null,t.display.input.reset())}),qa(t,u+" "+n,l,s))return!0}return qa(t,n,l,s)}function qa(t,n,l,s){var u=xs(t,n,s);return u=="multi"&&(t.state.keySeq=n),u=="handled"&&yr(t,"keyHandled",t,n,l),(u=="handled"||u=="multi")&&(Ft(l),Di(t)),!!u}function Al(t,n){var l=_i(n,!0);return l?n.shiftKey&&!t.state.keySeq?Ti(t,"Shift-"+l,n,function(s){return Je(t,s,!0)})||Ti(t,l,n,function(s){if(typeof s=="string"?/^go[A-Z]/.test(s):s.motion)return Je(t,s)}):Ti(t,l,n,function(s){return Je(t,s)}):!1}function gf(t,n,l){return Ti(t,"'"+l+"'",n,function(s){return Je(t,s,!0)})}var Ss=null;function ws(t){var n=this;if(!(t.target&&t.target!=n.display.input.getField())&&(n.curOp.focus=ze(ut(n)),!ht(n,t))){D&&j<11&&t.keyCode==27&&(t.returnValue=!1);var l=t.keyCode;n.display.shift=l==16||t.shiftKey;var s=Al(n,t);oe&&(Ss=s?l:null,!s&&l==88&&!Ta&&(M?t.metaKey:t.ctrlKey)&&n.replaceSelection("",null,"cut")),m&&!M&&!s&&l==46&&t.shiftKey&&!t.ctrlKey&&document.execCommand&&document.execCommand("cut"),l==18&&!/\bCodeMirror-crosshair\b/.test(n.display.lineDiv.className)&&mf(n)}}function mf(t){var n=t.display.lineDiv;Ue(n,"CodeMirror-crosshair");function l(s){(s.keyCode==18||!s.altKey)&&(q(n,"CodeMirror-crosshair"),Ve(document,"keyup",l),Ve(document,"mouseover",l))}se(document,"keyup",l),se(document,"mouseover",l)}function Ol(t){t.keyCode==16&&(this.doc.sel.shift=!1),ht(this,t)}function El(t){var n=this;if(!(t.target&&t.target!=n.display.input.getField())&&!(Ai(n.display,t)||ht(n,t)||t.ctrlKey&&!t.altKey||M&&t.metaKey)){var l=t.keyCode,s=t.charCode;if(oe&&l==Ss){Ss=null,Ft(t);return}if(!(oe&&(!t.which||t.which<10)&&Al(n,t))){var u=String.fromCharCode(s??l);u!="\b"&&(gf(n,t,u)||n.display.input.onKeyPress(t))}}}var yf=400,bn=function(t,n,l){this.time=t,this.pos=n,this.button=l};bn.prototype.compare=function(t,n,l){return this.time+yf>t&&$(n,this.pos)==0&&l==this.button};var xn,eo;function bf(t,n){var l=+new Date;return eo&&eo.compare(l,t,n)?(xn=eo=null,"triple"):xn&&xn.compare(l,t,n)?(eo=new bn(l,t,n),xn=null,"double"):(xn=new bn(l,t,n),eo=null,"single")}function Tl(t){var n=this,l=n.display;if(!(ht(n,t)||l.activeTouch&&l.input.supportsTouch())){if(l.input.ensurePolled(),l.shift=t.shiftKey,Ai(l,t)){X||(l.scroller.draggable=!1,setTimeout(function(){return l.scroller.draggable=!0},100));return}if(!Fl(n,t)){var s=aa(n,t),u=gi(t),p=s?bf(s,u):"single";er(n).focus(),u==1&&n.state.selectingText&&n.state.selectingText(t),!(s&&xf(n,u,s,p,t))&&(u==1?s?wf(n,s,p,t):Rr(t)==l.scroller&&Ft(t):u==2?(s&&pa(n.doc,s),setTimeout(function(){return l.input.focus()},20)):u==3&&(le?n.display.input.onContextMenu(t):sl(n)))}}}function xf(t,n,l,s,u){var p="Click";return s=="double"?p="Double"+p:s=="triple"&&(p="Triple"+p),p=(n==1?"Left":n==2?"Middle":"Right")+p,Ti(t,Yn(p,u),u,function(y){if(typeof y=="string"&&(y=Za[y]),!y)return!1;var x=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),x=y(t,l)!=lt}finally{t.state.suppressEdits=!1}return x})}function Sf(t,n,l){var s=t.getOption("configureMouse"),u=s?s(t,n,l):{};if(u.unit==null){var p=B?l.shiftKey&&l.metaKey:l.altKey;u.unit=p?"rectangle":n=="single"?"char":n=="double"?"word":"line"}return(u.extend==null||t.doc.extend)&&(u.extend=t.doc.extend||l.shiftKey),u.addNew==null&&(u.addNew=M?l.metaKey:l.ctrlKey),u.moveOnDrag==null&&(u.moveOnDrag=!(M?l.altKey:l.ctrlKey)),u}function wf(t,n,l,s){D?setTimeout(gt(rs,t),0):t.curOp.focus=ze(ut(t));var u=Sf(t,l,s),p=t.doc.sel,y;t.options.dragDrop&&$r&&!t.isReadOnly()&&l=="single"&&(y=p.contains(n))>-1&&($((y=p.ranges[y]).from(),n)<0||n.xRel>0)&&($(y.to(),n)>0||n.xRel<0)?xa(t,s,n,u):kl(t,s,n,u)}function xa(t,n,l,s){var u=t.display,p=!1,y=br(t,function(P){X&&(u.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:sl(t)),Ve(u.wrapper.ownerDocument,"mouseup",y),Ve(u.wrapper.ownerDocument,"mousemove",x),Ve(u.scroller,"dragstart",C),Ve(u.scroller,"drop",y),p||(Ft(P),s.addNew||pa(t.doc,l,null,null,s.extend),X&&!fe||D&&j==9?setTimeout(function(){u.wrapper.ownerDocument.body.focus({preventScroll:!0}),u.input.focus()},20):u.input.focus())}),x=function(P){p=p||Math.abs(n.clientX-P.clientX)+Math.abs(n.clientY-P.clientY)>=10},C=function(){return p=!0};X&&(u.scroller.draggable=!0),t.state.draggingText=y,y.copy=!s.moveOnDrag,se(u.wrapper.ownerDocument,"mouseup",y),se(u.wrapper.ownerDocument,"mousemove",x),se(u.scroller,"dragstart",C),se(u.scroller,"drop",y),t.state.delayingBlurEvent=!0,setTimeout(function(){return u.input.focus()},20),u.scroller.dragDrop&&u.scroller.dragDrop()}function Cf(t,n,l){if(l=="char")return new Dt(n,n);if(l=="word")return t.findWordAt(n);if(l=="line")return new Dt(T(n.line,0),$e(t.doc,T(n.line+1,0)));var s=l(t,n);return new Dt(s.from,s.to)}function kl(t,n,l,s){D&&sl(t);var u=t.display,p=t.doc;Ft(n);var y,x,C=p.sel,P=C.ranges;if(s.addNew&&!s.extend?(x=p.sel.contains(l),x>-1?y=P[x]:y=new Dt(l,l)):(y=p.sel.primary(),x=p.sel.primIndex),s.unit=="rectangle")s.addNew||(y=new Dt(l,l)),l=aa(t,n,!0,!0),x=-1;else{var K=Cf(t,l,s.unit);s.extend?y=cs(y,K.anchor,K.head,s.extend):y=K}s.addNew?x==-1?(x=P.length,Sr(p,Gn(t,P.concat([y]),x),{scroll:!1,origin:"*mouse"})):P.length>1&&P[x].empty()&&s.unit=="char"&&!s.extend?(Sr(p,Gn(t,P.slice(0,x).concat(P.slice(x+1)),0),{scroll:!1,origin:"*mouse"}),C=p.sel):ds(p,x,y,rt):(x=0,Sr(p,new en([y],0),rt),C=p.sel);var ne=l;function ve(Ne){if($(ne,Ne)!=0)if(ne=Ne,s.unit=="rectangle"){for(var We=[],Qe=t.options.tabSize,Ke=st(Ge(p,l.line).text,l.ch,Qe),bt=st(Ge(p,Ne.line).text,Ne.ch,Qe),$t=Math.min(Ke,bt),wr=Math.max(Ke,bt),rr=Math.min(l.line,Ne.line),Sn=Math.min(t.lastLine(),Math.max(l.line,Ne.line));rr<=Sn;rr++){var fn=Ge(p,rr).text,vr=tr(fn,$t,Qe);$t==wr?We.push(new Dt(T(rr,vr),T(rr,vr))):fn.length>vr&&We.push(new Dt(T(rr,vr),T(rr,tr(fn,wr,Qe))))}We.length||We.push(new Dt(l,l)),Sr(p,Gn(t,C.ranges.slice(0,x).concat(We),x),{origin:"*mouse",scroll:!1}),t.scrollIntoView(Ne)}else{var tn=y,Ir=Cf(t,Ne,s.unit),mr=tn.anchor,gr;$(Ir.anchor,mr)>0?(gr=Ir.head,mr=wt(tn.from(),Ir.anchor)):(gr=Ir.anchor,mr=it(tn.to(),Ir.head));var ur=C.ranges.slice(0);ur[x]=Af(t,new Dt($e(p,mr),gr)),Sr(p,Gn(t,ur,x),rt)}}var de=u.wrapper.getBoundingClientRect(),Ee=0;function Ae(Ne){var We=++Ee,Qe=aa(t,Ne,!0,s.unit=="rectangle");if(Qe)if($(Qe,ne)!=0){t.curOp.focus=ze(ut(t)),ve(Qe);var Ke=Ua(u,p);(Qe.line>=Ke.to||Qe.line<Ke.from)&&setTimeout(br(t,function(){Ee==We&&Ae(Ne)}),150)}else{var bt=Ne.clientY<de.top?-20:Ne.clientY>de.bottom?20:0;bt&&setTimeout(br(t,function(){Ee==We&&(u.scroller.scrollTop+=bt,Ae(Ne))}),50)}}function Ie(Ne){t.state.selectingText=!1,Ee=1/0,Ne&&(Ft(Ne),u.input.focus()),Ve(u.wrapper.ownerDocument,"mousemove",Le),Ve(u.wrapper.ownerDocument,"mouseup",De),p.history.lastSelOrigin=null}var Le=br(t,function(Ne){Ne.buttons===0||!gi(Ne)?Ie(Ne):Ae(Ne)}),De=br(t,Ie);t.state.selectingText=De,se(u.wrapper.ownerDocument,"mousemove",Le),se(u.wrapper.ownerDocument,"mouseup",De)}function Af(t,n){var l=n.anchor,s=n.head,u=Ge(t.doc,l.line);if($(l,s)==0&&l.sticky==s.sticky)return n;var p=tt(u);if(!p)return n;var y=St(p,l.ch,l.sticky),x=p[y];if(x.from!=l.ch&&x.to!=l.ch)return n;var C=y+(x.from==l.ch==(x.level!=1)?0:1);if(C==0||C==p.length)return n;var P;if(s.line!=l.line)P=(s.line-l.line)*(t.doc.direction=="ltr"?1:-1)>0;else{var K=St(p,s.ch,s.sticky),ne=K-y||(s.ch-l.ch)*(x.level==1?-1:1);K==C-1||K==C?P=ne<0:P=ne>0}var ve=p[C+(P?-1:0)],de=P==(ve.level==1),Ee=de?ve.from:ve.to,Ae=de?"after":"before";return l.ch==Ee&&l.sticky==Ae?n:new Dt(new T(l.line,Ee,Ae),s)}function Pl(t,n,l,s){var u,p;if(n.touches)u=n.touches[0].clientX,p=n.touches[0].clientY;else try{u=n.clientX,p=n.clientY}catch{return!1}if(u>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;s&&Ft(n);var y=t.display,x=y.lineDiv.getBoundingClientRect();if(p>x.bottom||!Qt(t,l))return vi(n);p-=x.top-y.viewOffset;for(var C=0;C<t.display.gutterSpecs.length;++C){var P=y.gutters.childNodes[C];if(P&&P.getBoundingClientRect().right>=u){var K=bi(t.doc,p),ne=t.display.gutterSpecs[C];return nt(t,l,t,K,ne.className,n),vi(n)}}}function Fl(t,n){return Pl(t,n,"gutterClick",!0)}function Of(t,n){Ai(t.display,n)||Cs(t,n)||ht(t,n,"contextmenu")||le||t.display.input.onContextMenu(n)}function Cs(t,n){return Qt(t,"gutterContextMenu")?Pl(t,n,"gutterContextMenu",!1):!1}function Ef(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),mo(t)}var To={toString:function(){return"CodeMirror.Init"}},Pn={},As={};function ed(t){var n=t.optionHandlers;function l(s,u,p,y){t.defaults[s]=u,p&&(n[s]=y?function(x,C,P){P!=To&&p(x,C,P)}:p)}t.defineOption=l,t.Init=To,l("value","",function(s,u){return s.setValue(u)},!0),l("mode",null,function(s,u){s.doc.modeOption=u,gl(s)},!0),l("indentUnit",2,gl,!0),l("indentWithTabs",!1),l("smartIndent",!0),l("tabSize",4,function(s){wo(s),mo(s),qr(s)},!0),l("lineSeparator",null,function(s,u){if(s.doc.lineSep=u,!!u){var p=[],y=s.doc.first;s.doc.iter(function(C){for(var P=0;;){var K=C.text.indexOf(u,P);if(K==-1)break;P=K+u.length,p.push(T(y,K))}y++});for(var x=p.length-1;x>=0;x--)Xa(s.doc,u,p[x],T(p[x].line,p[x].ch+u.length))}}),l("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(s,u,p){s.state.specialChars=new RegExp(u.source+(u.test(" ")?"":"| "),"g"),p!=To&&s.refresh()}),l("specialCharPlaceholder",sc,function(s){return s.refresh()},!0),l("electricChars",!0),l("inputStyle",w?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),l("spellcheck",!1,function(s,u){return s.getInputField().spellcheck=u},!0),l("autocorrect",!1,function(s,u){return s.getInputField().autocorrect=u},!0),l("autocapitalize",!1,function(s,u){return s.getInputField().autocapitalize=u},!0),l("rtlMoveVisually",!Z),l("wholeLineUpdateBefore",!0),l("theme","default",function(s){Ef(s),Ka(s)},!0),l("keyMap","default",function(s,u,p){var y=ba(u),x=p!=To&&ba(p);x&&x.detach&&x.detach(s,y),y.attach&&y.attach(s,x||null)}),l("extraKeys",null),l("configureMouse",null),l("lineWrapping",!1,Tf,!0),l("gutters",[],function(s,u){s.display.gutterSpecs=ss(u,s.options.lineNumbers),Ka(s)},!0),l("fixedGutter",!0,function(s,u){s.display.gutters.style.left=u?al(s.display)+"px":"0",s.refresh()},!0),l("coverGutterNextToScrollbar",!1,function(s){return $a(s)},!0),l("scrollbarStyle","native",function(s){Ru(s),$a(s),s.display.scrollbars.setScrollTop(s.doc.scrollTop),s.display.scrollbars.setScrollLeft(s.doc.scrollLeft)},!0),l("lineNumbers",!1,function(s,u){s.display.gutterSpecs=ss(s.options.gutters,u),Ka(s)},!0),l("firstLineNumber",1,Ka,!0),l("lineNumberFormatter",function(s){return s},Ka,!0),l("showCursorWhenSelecting",!1,Wa,!0),l("resetSelectionOnContextMenu",!0),l("lineWiseCopyCut",!0),l("pasteLinesPerSelection",!0),l("selectionsMayTouch",!1),l("readOnly",!1,function(s,u){u=="nocursor"&&(Ha(s),s.display.input.blur()),s.display.input.readOnlyChanged(u)}),l("screenReaderLabel",null,function(s,u){u=u===""?null:u,s.display.input.screenReaderLabelChanged(u)}),l("disableInput",!1,function(s,u){u||s.display.input.reset()},!0),l("dragDrop",!0,un),l("allowDropFileTypes",null),l("cursorBlinkRate",530),l("cursorScrollMargin",0),l("cursorHeight",1,Wa,!0),l("singleCursorHeightPerLine",!0,Wa,!0),l("workTime",100),l("workDelay",100),l("flattenSpans",!0,wo,!0),l("addModeClass",!1,wo,!0),l("pollInterval",100),l("undoDepth",200,function(s,u){return s.doc.history.undoDepth=u}),l("historyEventDelay",1250),l("viewportMargin",10,function(s){return s.refresh()},!0),l("maxHighlightLength",1e4,wo,!0),l("moveInputWithCursor",!0,function(s,u){u||s.display.input.resetPosition()}),l("tabindex",null,function(s,u){return s.display.input.getField().tabIndex=u||""}),l("autofocus",null),l("direction","ltr",function(s,u){return s.doc.setDirection(u)},!0),l("phrases",null)}function un(t,n,l){var s=l&&l!=To;if(!n!=!s){var u=t.display.dragFunctions,p=n?se:Ve;p(t.display.scroller,"dragstart",u.start),p(t.display.scroller,"dragenter",u.enter),p(t.display.scroller,"dragover",u.over),p(t.display.scroller,"dragleave",u.leave),p(t.display.scroller,"drop",u.drop)}}function Tf(t){t.options.lineWrapping?(Ue(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(q(t.display.wrapper,"CodeMirror-wrap"),zs(t)),ol(t),qr(t),mo(t),setTimeout(function(){return $a(t)},100)}function Zt(t,n){var l=this;if(!(this instanceof Zt))return new Zt(t,n);this.options=n=n?Rt(n):{},Rt(Pn,n,!1);var s=n.value;typeof s=="string"?s=new Pr(s,n.mode,null,n.lineSeparator,n.direction):n.mode&&(s.modeOption=n.mode),this.doc=s;var u=new Zt.inputStyles[n.inputStyle](this),p=this.display=new jc(t,s,u,n);p.wrapper.CodeMirror=this,Ef(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ru(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 He,keySeq:null,specialChars:null},n.autofocus&&!w&&p.input.focus(),D&&j<11&&setTimeout(function(){return l.display.input.reset(!0)},20),td(this),ar(),ua(this),this.curOp.forceUpdate=!0,$u(this,s),n.autofocus&&!w||this.hasFocus()?setTimeout(function(){l.hasFocus()&&!l.state.focused&&ll(l)},20):Ha(this);for(var y in As)As.hasOwnProperty(y)&&As[y](this,n[y],To);Wu(this),n.finishInit&&n.finishInit(this);for(var x=0;x<Il.length;++x)Il[x](this);fa(this),X&&n.lineWrapping&&getComputedStyle(p.lineDiv).textRendering=="optimizelegibility"&&(p.lineDiv.style.textRendering="auto")}Zt.defaults=Pn,Zt.optionHandlers=As;function td(t){var n=t.display;se(n.scroller,"mousedown",br(t,Tl)),D&&j<11?se(n.scroller,"dblclick",br(t,function(C){if(!ht(t,C)){var P=aa(t,C);if(!(!P||Fl(t,C)||Ai(t.display,C))){Ft(C);var K=t.findWordAt(P);pa(t.doc,K.anchor,K.head)}}})):se(n.scroller,"dblclick",function(C){return ht(t,C)||Ft(C)}),se(n.scroller,"contextmenu",function(C){return Of(t,C)}),se(n.input.getField(),"contextmenu",function(C){n.scroller.contains(C.target)||Of(t,C)});var l,s={end:0};function u(){n.activeTouch&&(l=setTimeout(function(){return n.activeTouch=null},1e3),s=n.activeTouch,s.end=+new Date)}function p(C){if(C.touches.length!=1)return!1;var P=C.touches[0];return P.radiusX<=1&&P.radiusY<=1}function y(C,P){if(P.left==null)return!0;var K=P.left-C.left,ne=P.top-C.top;return K*K+ne*ne>20*20}se(n.scroller,"touchstart",function(C){if(!ht(t,C)&&!p(C)&&!Fl(t,C)){n.input.ensurePolled(),clearTimeout(l);var P=+new Date;n.activeTouch={start:P,moved:!1,prev:P-s.end<=300?s:null},C.touches.length==1&&(n.activeTouch.left=C.touches[0].pageX,n.activeTouch.top=C.touches[0].pageY)}}),se(n.scroller,"touchmove",function(){n.activeTouch&&(n.activeTouch.moved=!0)}),se(n.scroller,"touchend",function(C){var P=n.activeTouch;if(P&&!Ai(n,C)&&P.left!=null&&!P.moved&&new Date-P.start<300){var K=t.coordsChar(n.activeTouch,"page"),ne;!P.prev||y(P,P.prev)?ne=new Dt(K,K):!P.prev.prev||y(P,P.prev.prev)?ne=t.findWordAt(K):ne=new Dt(T(K.line,0),$e(t.doc,T(K.line+1,0))),t.setSelection(ne.anchor,ne.head),t.focus(),Ft(C)}u()}),se(n.scroller,"touchcancel",u),se(n.scroller,"scroll",function(){n.scroller.clientHeight&&(za(t,n.scroller.scrollTop),la(t,n.scroller.scrollLeft,!0),nt(t,"scroll",t))}),se(n.scroller,"mousewheel",function(C){return _u(t,C)}),se(n.scroller,"DOMMouseScroll",function(C){return _u(t,C)}),se(n.wrapper,"scroll",function(){return n.wrapper.scrollTop=n.wrapper.scrollLeft=0}),n.dragFunctions={enter:function(C){ht(t,C)||Nr(C)},over:function(C){ht(t,C)||(sr(t,C),Nr(C))},start:function(C){return Xc(t,C)},drop:br(t,Yc),leave:function(C){ht(t,C)||ff(t)}};var x=n.input.getField();se(x,"keyup",function(C){return Ol.call(t,C)}),se(x,"keydown",br(t,ws)),se(x,"keypress",br(t,El)),se(x,"focus",function(C){return ll(t,C)}),se(x,"blur",function(C){return Ha(t,C)})}var Il=[];Zt.defineInitHook=function(t){return Il.push(t)};function ko(t,n,l,s){var u=t.doc,p;l==null&&(l="add"),l=="smart"&&(u.mode.indent?p=Fa(t,n).state:l="prev");var y=t.options.tabSize,x=Ge(u,n),C=st(x.text,null,y);x.stateAfter&&(x.stateAfter=null);var P=x.text.match(/^\s*/)[0],K;if(!s&&!/\S/.test(x.text))K=0,l="not";else if(l=="smart"&&(K=u.mode.indent(p,x.text.slice(P.length),x.text),K==lt||K>150)){if(!s)return;l="prev"}l=="prev"?n>u.first?K=st(Ge(u,n-1).text,null,y):K=0:l=="add"?K=C+t.options.indentUnit:l=="subtract"?K=C-t.options.indentUnit:typeof l=="number"&&(K=C+l),K=Math.max(0,K);var ne="",ve=0;if(t.options.indentWithTabs)for(var de=Math.floor(K/y);de;--de)ve+=y,ne+=" ";if(ve<K&&(ne+=kr(K-ve)),ne!=P)return Xa(u,ne,T(n,0),T(n,P.length),"+input"),x.stateAfter=null,!0;for(var Ee=0;Ee<u.sel.ranges.length;Ee++){var Ae=u.sel.ranges[Ee];if(Ae.head.line==n&&Ae.head.ch<P.length){var Ie=T(n,P.length);ds(u,Ee,new Dt(Ie,Ie));break}}}var Xn=null;function Os(t){Xn=t}function Ll(t,n,l,s,u){var p=t.doc;t.display.shift=!1,s||(s=p.sel);var y=+new Date-200,x=u=="paste"||t.state.pasteIncoming>y,C=Wn(n),P=null;if(x&&s.ranges.length>1)if(Xn&&Xn.text.join(`
25
25
  `)==n){if(s.ranges.length%Xn.text.length==0){P=[];for(var K=0;K<Xn.text.length;K++)P.push(p.splitLines(Xn.text[K]))}}else C.length==s.ranges.length&&t.options.pasteLinesPerSelection&&(P=Et(C,function(Le){return[Le]}));for(var ne=t.curOp.updateInput,ve=s.ranges.length-1;ve>=0;ve--){var de=s.ranges[ve],Ee=de.from(),Ae=de.to();de.empty()&&(l&&l>0?Ee=T(Ee.line,Ee.ch-l):t.state.overwrite&&!x?Ae=T(Ae.line,Math.min(Ge(p,Ae.line).text.length,Ae.ch+et(C).length)):x&&Xn&&Xn.lineWise&&Xn.text.join(`
26
26
  `)==C.join(`
27
- `)&&(Ee=Ae=T(Ee.line,0)));var Ie={from:Ee,to:Ae,text:P?P[ve%P.length]:C,origin:u||(x?"paste":t.state.cutIncoming>y?"cut":"+input")};ha(t.doc,Ie),yr(t,"inputRead",t,Ie)}n&&!x&&ci(t,n),_a(t),t.curOp.updateInput<2&&(t.curOp.updateInput=ne),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function to(t,n){var l=t.clipboardData&&t.clipboardData.getData("Text");if(l)return t.preventDefault(),!n.isReadOnly()&&!n.options.disableInput&&n.hasFocus()&&ln(n,function(){return Ll(n,l,0,null,"paste")}),!0}function ci(t,n){if(!(!t.options.electricChars||!t.options.smartIndent))for(var l=t.doc.sel,s=l.ranges.length-1;s>=0;s--){var u=l.ranges[s];if(!(u.head.ch>100||s&&l.ranges[s-1].head.line==u.head.line)){var p=t.getModeAt(u.head),y=!1;if(p.electricChars){for(var x=0;x<p.electricChars.length;x++)if(n.indexOf(p.electricChars.charAt(x))>-1){y=ko(t,u.head.line,"smart");break}}else p.electricInput&&p.electricInput.test(Ge(t.doc,u.head.line).text.slice(0,u.head.ch))&&(y=ko(t,u.head.line,"smart"));y&&yr(t,"electricInput",t,u.head.line)}}}function kf(t){for(var n=[],l=[],s=0;s<t.doc.sel.ranges.length;s++){var u=t.doc.sel.ranges[s].head.line,p={anchor:T(u,0),head:T(u+1,0)};l.push(p),n.push(t.getRange(p.anchor,p.head))}return{text:n,ranges:l}}function Ml(t,n,l,s){t.setAttribute("autocorrect",l?"on":"off"),t.setAttribute("autocapitalize",s?"on":"off"),t.setAttribute("spellcheck",!!n)}function Pf(){var t=Q("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),n=Q("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return X?t.style.width="1000px":t.setAttribute("wrap","off"),ee&&(t.style.border="1px solid black"),n}function rd(t){var n=t.optionHandlers,l=t.helpers={};t.prototype={constructor:t,focus:function(){er(this).focus(),this.display.input.focus()},setOption:function(s,u){var p=this.options,y=p[s];p[s]==u&&s!="mode"||(p[s]=u,n.hasOwnProperty(s)&&br(this,n[s])(this,u,y),nt(this,"optionChange",this,s))},getOption:function(s){return this.options[s]},getDoc:function(){return this.doc},addKeyMap:function(s,u){this.state.keyMaps[u?"push":"unshift"](ba(s))},removeKeyMap:function(s){for(var u=this.state.keyMaps,p=0;p<u.length;++p)if(u[p]==s||u[p].name==s)return u.splice(p,1),!0},addOverlay:Vr(function(s,u){var p=s.token?s:t.getMode(this.options,s);if(p.startState)throw new Error("Overlays may not be stateful.");jt(this.state.overlays,{mode:p,modeSpec:s,opaque:u&&u.opaque,priority:u&&u.priority||0},function(y){return y.priority}),this.state.modeGen++,qr(this)}),removeOverlay:Vr(function(s){for(var u=this.state.overlays,p=0;p<u.length;++p){var y=u[p].modeSpec;if(y==s||typeof s=="string"&&y.name==s){u.splice(p,1),this.state.modeGen++,qr(this);return}}}),indentLine:Vr(function(s,u,p){typeof u!="string"&&typeof u!="number"&&(u==null?u=this.options.smartIndent?"smart":"prev":u=u?"add":"subtract"),Zi(this.doc,s)&&ko(this,s,u,p)}),indentSelection:Vr(function(s){for(var u=this.doc.sel.ranges,p=-1,y=0;y<u.length;y++){var x=u[y];if(x.empty())x.head.line>p&&(ko(this,x.head.line,s,!0),p=x.head.line,y==this.doc.sel.primIndex&&_a(this));else{var C=x.from(),P=x.to(),K=Math.max(p,C.line);p=Math.min(this.lastLine(),P.line-(P.ch?0:1))+1;for(var ne=K;ne<p;++ne)ko(this,ne,s);var ve=this.doc.sel.ranges;C.ch==0&&u.length==ve.length&&ve[y].from().ch>0&&ds(this.doc,y,new Dt(C,ve[y].to()),_t)}}}),getTokenAt:function(s,u){return qi(this,s,u)},getLineTokens:function(s,u){return qi(this,T(s),u,!0)},getTokenTypeAt:function(s){s=$e(this.doc,s);var u=Ws(this,Ge(this.doc,s.line)),p=0,y=(u.length-1)/2,x=s.ch,C;if(x==0)C=u[2];else for(;;){var P=p+y>>1;if((P?u[P*2-1]:0)>=x)y=P;else if(u[P*2+1]<x)p=P+1;else{C=u[P*2+2];break}}var K=C?C.indexOf("overlay "):-1;return K<0?C:K==0?null:C.slice(0,K-1)},getModeAt:function(s){var u=this.doc.mode;return u.innerMode?t.innerMode(u,this.getTokenAt(s).state).mode:u},getHelper:function(s,u){return this.getHelpers(s,u)[0]},getHelpers:function(s,u){var p=[];if(!l.hasOwnProperty(u))return p;var y=l[u],x=this.getModeAt(s);if(typeof x[u]=="string")y[x[u]]&&p.push(y[x[u]]);else if(x[u])for(var C=0;C<x[u].length;C++){var P=y[x[u][C]];P&&p.push(P)}else x.helperType&&y[x.helperType]?p.push(y[x.helperType]):y[x.name]&&p.push(y[x.name]);for(var K=0;K<y._global.length;K++){var ne=y._global[K];ne.pred(x,this)&&Re(p,ne.val)==-1&&p.push(ne.val)}return p},getStateAfter:function(s,u){var p=this.doc;return s=Lt(p,s==null?p.first+p.size-1:s),Fa(this,s+1,u).state},cursorCoords:function(s,u){var p,y=this.doc.sel.primary();return s==null?p=y.head:typeof s=="object"?p=$e(this.doc,s):p=s?y.from():y.to(),kn(this,p,u||"page")},charCoords:function(s,u){return Zo(this,$e(this.doc,s),u||"page")},coordsChar:function(s,u){return s=Ou(this,s,u||"page"),bo(this,s.left,s.top)},lineAtHeight:function(s,u){return s=Ou(this,{top:s,left:0},u||"page").top,bi(this.doc,s+this.display.viewOffset)},heightAtLine:function(s,u,p){var y=!1,x;if(typeof s=="number"){var C=this.doc.first+this.doc.size-1;s<this.doc.first?s=this.doc.first:s>C&&(s=C,y=!0),x=Ge(this.doc,s)}else x=s;return yo(this,x,{top:0,left:0},u||"page",p||y).top+(y?this.doc.height-wi(x):0)},defaultTextHeight:function(){return Va(this.display)},defaultCharWidth:function(){return ja(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(s,u,p,y,x){var C=this.display;s=kn(this,$e(this.doc,s));var P=s.bottom,K=s.left;if(u.style.position="absolute",u.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(u),C.sizer.appendChild(u),y=="over")P=s.top;else if(y=="above"||y=="near"){var ne=Math.max(C.wrapper.clientHeight,this.doc.height),ve=Math.max(C.sizer.clientWidth,C.lineSpace.clientWidth);(y=="above"||s.bottom+u.offsetHeight>ne)&&s.top>u.offsetHeight?P=s.top-u.offsetHeight:s.bottom+u.offsetHeight<=ne&&(P=s.bottom),K+u.offsetWidth>ve&&(K=ve-u.offsetWidth)}u.style.top=P+"px",u.style.left=u.style.right="",x=="right"?(K=C.sizer.clientWidth-u.offsetWidth,u.style.right="0px"):(x=="left"?K=0:x=="middle"&&(K=(C.sizer.clientWidth-u.offsetWidth)/2),u.style.left=K+"px"),p&&kc(this,{left:K,top:P,right:K+u.offsetWidth,bottom:P+u.offsetHeight})},triggerOnKeyDown:Vr(ws),triggerOnKeyPress:Vr(El),triggerOnKeyUp:Ol,triggerOnMouseDown:Vr(Tl),execCommand:function(s){if(Za.hasOwnProperty(s))return Za[s].call(null,this)},triggerElectric:Vr(function(s){ci(this,s)}),findPosH:function(s,u,p,y){var x=1;u<0&&(x=-1,u=-u);for(var C=$e(this.doc,s),P=0;P<u&&(C=Nl(this.doc,C,x,p,y),!C.hitSide);++P);return C},moveH:Vr(function(s,u){var p=this;this.extendSelectionsBy(function(y){return p.display.shift||p.doc.extend||y.empty()?Nl(p.doc,y.head,s,u,p.options.rtlMoveVisually):s<0?y.from():y.to()},Pt)}),deleteH:Vr(function(s,u){var p=this.doc.sel,y=this.doc;p.somethingSelected()?y.replaceSelection("",null,"+delete"):Ei(this,function(x){var C=Nl(y,x.head,s,u,!1);return s<0?{from:C,to:x.head}:{from:x.head,to:C}})}),findPosV:function(s,u,p,y){var x=1,C=y;u<0&&(x=-1,u=-u);for(var P=$e(this.doc,s),K=0;K<u;++K){var ne=kn(this,P,"div");if(C==null?C=ne.left:ne.left=C,P=Ff(this,ne,x,p),P.hitSide)break}return P},moveV:Vr(function(s,u){var p=this,y=this.doc,x=[],C=!this.display.shift&&!y.extend&&y.sel.somethingSelected();if(y.extendSelectionsBy(function(K){if(C)return s<0?K.from():K.to();var ne=kn(p,K.head,"div");K.goalColumn!=null&&(ne.left=K.goalColumn),x.push(ne.left);var ve=Ff(p,ne,s,u);return u=="page"&&K==y.sel.primary()&&cl(p,Zo(p,ve,"div").top-ne.top),ve},Pt),x.length)for(var P=0;P<y.sel.ranges.length;P++)y.sel.ranges[P].goalColumn=x[P]}),findWordAt:function(s){var u=this.doc,p=Ge(u,s.line).text,y=s.ch,x=s.ch;if(p){var C=this.getHelper(s,"wordChars");(s.sticky=="before"||x==p.length)&&y?--y:++x;for(var P=p.charAt(y),K=nn(P,C)?function(ne){return nn(ne,C)}:/\s/.test(P)?function(ne){return/\s/.test(ne)}:function(ne){return!/\s/.test(ne)&&!nn(ne)};y>0&&K(p.charAt(y-1));)--y;for(;x<p.length&&K(p.charAt(x));)++x}return new Dt(T(s.line,y),T(s.line,x))},toggleOverwrite:function(s){s!=null&&s==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ue(this.display.cursorDiv,"CodeMirror-overwrite"):q(this.display.cursorDiv,"CodeMirror-overwrite"),nt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ze(ut(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Vr(function(s,u){sa(this,s,u)}),getScrollInfo:function(){var s=this.display.scroller;return{left:s.scrollLeft,top:s.scrollTop,height:s.scrollHeight-gn(this)-this.display.barHeight,width:s.scrollWidth-gn(this)-this.display.barWidth,clientHeight:Jo(this),clientWidth:zn(this)}},scrollIntoView:Vr(function(s,u){s==null?(s={from:this.doc.sel.primary().head,to:null},u==null&&(u=this.options.cursorScrollMargin)):typeof s=="number"?s={from:T(s,0),to:null}:s.from==null&&(s={from:s,to:null}),s.to||(s.to=s.from),s.margin=u||0,s.from.line!=null?Iu(this,s):Lu(this,s.from,s.to,s.margin)}),setSize:Vr(function(s,u){var p=this,y=function(C){return typeof C=="number"||/^\d+$/.test(String(C))?C+"px":C};s!=null&&(this.display.wrapper.style.width=y(s)),u!=null&&(this.display.wrapper.style.height=y(u)),this.options.lineWrapping&&Zs(this);var x=this.display.viewFrom;this.doc.iter(x,this.display.viewTo,function(C){if(C.widgets){for(var P=0;P<C.widgets.length;P++)if(C.widgets[P].noHScroll){Ni(p,x,"widget");break}}++x}),this.curOp.forceUpdate=!0,nt(this,"refresh",this)}),operation:function(s){return ln(this,s)},startOperation:function(){return ua(this)},endOperation:function(){return fa(this)},refresh:Vr(function(){var s=this.display.cachedTextHeight;qr(this),this.curOp.forceUpdate=!0,mo(this),sa(this,this.doc.scrollLeft,this.doc.scrollTop),vl(this.display),(s==null||Math.abs(s-Va(this.display))>.5||this.options.lineWrapping)&&ol(this),nt(this,"refresh",this)}),swapDoc:Vr(function(s){var u=this.doc;return u.cm=null,this.state.selectingText&&this.state.selectingText(),$u(this,s),mo(this),this.display.input.reset(),sa(this,s.scrollLeft,s.scrollTop),this.curOp.forceScroll=!0,yr(this,"swapDoc",this,u),u}),phrase:function(s){var u=this.options.phrases;return u&&Object.prototype.hasOwnProperty.call(u,s)?u[s]:s},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}},Gr(t),t.registerHelper=function(s,u,p){l.hasOwnProperty(s)||(l[s]=t[s]={_global:[]}),l[s][u]=p},t.registerGlobalHelper=function(s,u,p,y){t.registerHelper(s,u,y),l[s]._global.push({pred:p,val:y})}}function Nl(t,n,l,s,u){var p=n,y=l,x=Ge(t,n.line),C=u&&t.direction=="rtl"?-l:l;function P(){var De=n.line+C;return De<t.first||De>=t.first+t.size?!1:(n=new T(De,n.ch,n.sticky),x=Ge(t,De))}function K(De){var Ne;if(s=="codepoint"){var We=x.text.charCodeAt(n.ch+(l>0?0:-1));if(isNaN(We))Ne=null;else{var Qe=l>0?We>=55296&&We<56320:We>=56320&&We<57343;Ne=new T(n.line,Math.max(0,Math.min(x.text.length,n.ch+l*(Qe?2:1))),-l)}}else u?Ne=hf(t.cm,x,n,l):Ne=wl(x,n,l);if(Ne==null)if(!De&&P())n=Cl(u,t.cm,x,n.line,C);else return!1;else n=Ne;return!0}if(s=="char"||s=="codepoint")K();else if(s=="column")K(!0);else if(s=="word"||s=="group")for(var ne=null,ve=s=="group",de=t.cm&&t.cm.getHelper(n,"wordChars"),Ee=!0;!(l<0&&!K(!Ee));Ee=!1){var Ae=x.text.charAt(n.ch)||`
27
+ `)&&(Ee=Ae=T(Ee.line,0)));var Ie={from:Ee,to:Ae,text:P?P[ve%P.length]:C,origin:u||(x?"paste":t.state.cutIncoming>y?"cut":"+input")};ha(t.doc,Ie),yr(t,"inputRead",t,Ie)}n&&!x&&ci(t,n),_a(t),t.curOp.updateInput<2&&(t.curOp.updateInput=ne),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function to(t,n){var l=t.clipboardData&&t.clipboardData.getData("Text");if(l)return t.preventDefault(),!n.isReadOnly()&&!n.options.disableInput&&n.hasFocus()&&ln(n,function(){return Ll(n,l,0,null,"paste")}),!0}function ci(t,n){if(!(!t.options.electricChars||!t.options.smartIndent))for(var l=t.doc.sel,s=l.ranges.length-1;s>=0;s--){var u=l.ranges[s];if(!(u.head.ch>100||s&&l.ranges[s-1].head.line==u.head.line)){var p=t.getModeAt(u.head),y=!1;if(p.electricChars){for(var x=0;x<p.electricChars.length;x++)if(n.indexOf(p.electricChars.charAt(x))>-1){y=ko(t,u.head.line,"smart");break}}else p.electricInput&&p.electricInput.test(Ge(t.doc,u.head.line).text.slice(0,u.head.ch))&&(y=ko(t,u.head.line,"smart"));y&&yr(t,"electricInput",t,u.head.line)}}}function kf(t){for(var n=[],l=[],s=0;s<t.doc.sel.ranges.length;s++){var u=t.doc.sel.ranges[s].head.line,p={anchor:T(u,0),head:T(u+1,0)};l.push(p),n.push(t.getRange(p.anchor,p.head))}return{text:n,ranges:l}}function Ml(t,n,l,s){t.setAttribute("autocorrect",l?"on":"off"),t.setAttribute("autocapitalize",s?"on":"off"),t.setAttribute("spellcheck",!!n)}function Pf(){var t=Q("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),n=Q("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return X?t.style.width="1000px":t.setAttribute("wrap","off"),ee&&(t.style.border="1px solid black"),n}function rd(t){var n=t.optionHandlers,l=t.helpers={};t.prototype={constructor:t,focus:function(){er(this).focus(),this.display.input.focus()},setOption:function(s,u){var p=this.options,y=p[s];p[s]==u&&s!="mode"||(p[s]=u,n.hasOwnProperty(s)&&br(this,n[s])(this,u,y),nt(this,"optionChange",this,s))},getOption:function(s){return this.options[s]},getDoc:function(){return this.doc},addKeyMap:function(s,u){this.state.keyMaps[u?"push":"unshift"](ba(s))},removeKeyMap:function(s){for(var u=this.state.keyMaps,p=0;p<u.length;++p)if(u[p]==s||u[p].name==s)return u.splice(p,1),!0},addOverlay:Vr(function(s,u){var p=s.token?s:t.getMode(this.options,s);if(p.startState)throw new Error("Overlays may not be stateful.");jt(this.state.overlays,{mode:p,modeSpec:s,opaque:u&&u.opaque,priority:u&&u.priority||0},function(y){return y.priority}),this.state.modeGen++,qr(this)}),removeOverlay:Vr(function(s){for(var u=this.state.overlays,p=0;p<u.length;++p){var y=u[p].modeSpec;if(y==s||typeof s=="string"&&y.name==s){u.splice(p,1),this.state.modeGen++,qr(this);return}}}),indentLine:Vr(function(s,u,p){typeof u!="string"&&typeof u!="number"&&(u==null?u=this.options.smartIndent?"smart":"prev":u=u?"add":"subtract"),Zi(this.doc,s)&&ko(this,s,u,p)}),indentSelection:Vr(function(s){for(var u=this.doc.sel.ranges,p=-1,y=0;y<u.length;y++){var x=u[y];if(x.empty())x.head.line>p&&(ko(this,x.head.line,s,!0),p=x.head.line,y==this.doc.sel.primIndex&&_a(this));else{var C=x.from(),P=x.to(),K=Math.max(p,C.line);p=Math.min(this.lastLine(),P.line-(P.ch?0:1))+1;for(var ne=K;ne<p;++ne)ko(this,ne,s);var ve=this.doc.sel.ranges;C.ch==0&&u.length==ve.length&&ve[y].from().ch>0&&ds(this.doc,y,new Dt(C,ve[y].to()),_t)}}}),getTokenAt:function(s,u){return qi(this,s,u)},getLineTokens:function(s,u){return qi(this,T(s),u,!0)},getTokenTypeAt:function(s){s=$e(this.doc,s);var u=Ws(this,Ge(this.doc,s.line)),p=0,y=(u.length-1)/2,x=s.ch,C;if(x==0)C=u[2];else for(;;){var P=p+y>>1;if((P?u[P*2-1]:0)>=x)y=P;else if(u[P*2+1]<x)p=P+1;else{C=u[P*2+2];break}}var K=C?C.indexOf("overlay "):-1;return K<0?C:K==0?null:C.slice(0,K-1)},getModeAt:function(s){var u=this.doc.mode;return u.innerMode?t.innerMode(u,this.getTokenAt(s).state).mode:u},getHelper:function(s,u){return this.getHelpers(s,u)[0]},getHelpers:function(s,u){var p=[];if(!l.hasOwnProperty(u))return p;var y=l[u],x=this.getModeAt(s);if(typeof x[u]=="string")y[x[u]]&&p.push(y[x[u]]);else if(x[u])for(var C=0;C<x[u].length;C++){var P=y[x[u][C]];P&&p.push(P)}else x.helperType&&y[x.helperType]?p.push(y[x.helperType]):y[x.name]&&p.push(y[x.name]);for(var K=0;K<y._global.length;K++){var ne=y._global[K];ne.pred(x,this)&&Re(p,ne.val)==-1&&p.push(ne.val)}return p},getStateAfter:function(s,u){var p=this.doc;return s=Lt(p,s??p.first+p.size-1),Fa(this,s+1,u).state},cursorCoords:function(s,u){var p,y=this.doc.sel.primary();return s==null?p=y.head:typeof s=="object"?p=$e(this.doc,s):p=s?y.from():y.to(),kn(this,p,u||"page")},charCoords:function(s,u){return Zo(this,$e(this.doc,s),u||"page")},coordsChar:function(s,u){return s=Ou(this,s,u||"page"),bo(this,s.left,s.top)},lineAtHeight:function(s,u){return s=Ou(this,{top:s,left:0},u||"page").top,bi(this.doc,s+this.display.viewOffset)},heightAtLine:function(s,u,p){var y=!1,x;if(typeof s=="number"){var C=this.doc.first+this.doc.size-1;s<this.doc.first?s=this.doc.first:s>C&&(s=C,y=!0),x=Ge(this.doc,s)}else x=s;return yo(this,x,{top:0,left:0},u||"page",p||y).top+(y?this.doc.height-wi(x):0)},defaultTextHeight:function(){return Va(this.display)},defaultCharWidth:function(){return ja(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(s,u,p,y,x){var C=this.display;s=kn(this,$e(this.doc,s));var P=s.bottom,K=s.left;if(u.style.position="absolute",u.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(u),C.sizer.appendChild(u),y=="over")P=s.top;else if(y=="above"||y=="near"){var ne=Math.max(C.wrapper.clientHeight,this.doc.height),ve=Math.max(C.sizer.clientWidth,C.lineSpace.clientWidth);(y=="above"||s.bottom+u.offsetHeight>ne)&&s.top>u.offsetHeight?P=s.top-u.offsetHeight:s.bottom+u.offsetHeight<=ne&&(P=s.bottom),K+u.offsetWidth>ve&&(K=ve-u.offsetWidth)}u.style.top=P+"px",u.style.left=u.style.right="",x=="right"?(K=C.sizer.clientWidth-u.offsetWidth,u.style.right="0px"):(x=="left"?K=0:x=="middle"&&(K=(C.sizer.clientWidth-u.offsetWidth)/2),u.style.left=K+"px"),p&&kc(this,{left:K,top:P,right:K+u.offsetWidth,bottom:P+u.offsetHeight})},triggerOnKeyDown:Vr(ws),triggerOnKeyPress:Vr(El),triggerOnKeyUp:Ol,triggerOnMouseDown:Vr(Tl),execCommand:function(s){if(Za.hasOwnProperty(s))return Za[s].call(null,this)},triggerElectric:Vr(function(s){ci(this,s)}),findPosH:function(s,u,p,y){var x=1;u<0&&(x=-1,u=-u);for(var C=$e(this.doc,s),P=0;P<u&&(C=Nl(this.doc,C,x,p,y),!C.hitSide);++P);return C},moveH:Vr(function(s,u){var p=this;this.extendSelectionsBy(function(y){return p.display.shift||p.doc.extend||y.empty()?Nl(p.doc,y.head,s,u,p.options.rtlMoveVisually):s<0?y.from():y.to()},Pt)}),deleteH:Vr(function(s,u){var p=this.doc.sel,y=this.doc;p.somethingSelected()?y.replaceSelection("",null,"+delete"):Ei(this,function(x){var C=Nl(y,x.head,s,u,!1);return s<0?{from:C,to:x.head}:{from:x.head,to:C}})}),findPosV:function(s,u,p,y){var x=1,C=y;u<0&&(x=-1,u=-u);for(var P=$e(this.doc,s),K=0;K<u;++K){var ne=kn(this,P,"div");if(C==null?C=ne.left:ne.left=C,P=Ff(this,ne,x,p),P.hitSide)break}return P},moveV:Vr(function(s,u){var p=this,y=this.doc,x=[],C=!this.display.shift&&!y.extend&&y.sel.somethingSelected();if(y.extendSelectionsBy(function(K){if(C)return s<0?K.from():K.to();var ne=kn(p,K.head,"div");K.goalColumn!=null&&(ne.left=K.goalColumn),x.push(ne.left);var ve=Ff(p,ne,s,u);return u=="page"&&K==y.sel.primary()&&cl(p,Zo(p,ve,"div").top-ne.top),ve},Pt),x.length)for(var P=0;P<y.sel.ranges.length;P++)y.sel.ranges[P].goalColumn=x[P]}),findWordAt:function(s){var u=this.doc,p=Ge(u,s.line).text,y=s.ch,x=s.ch;if(p){var C=this.getHelper(s,"wordChars");(s.sticky=="before"||x==p.length)&&y?--y:++x;for(var P=p.charAt(y),K=nn(P,C)?function(ne){return nn(ne,C)}:/\s/.test(P)?function(ne){return/\s/.test(ne)}:function(ne){return!/\s/.test(ne)&&!nn(ne)};y>0&&K(p.charAt(y-1));)--y;for(;x<p.length&&K(p.charAt(x));)++x}return new Dt(T(s.line,y),T(s.line,x))},toggleOverwrite:function(s){s!=null&&s==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ue(this.display.cursorDiv,"CodeMirror-overwrite"):q(this.display.cursorDiv,"CodeMirror-overwrite"),nt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ze(ut(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Vr(function(s,u){sa(this,s,u)}),getScrollInfo:function(){var s=this.display.scroller;return{left:s.scrollLeft,top:s.scrollTop,height:s.scrollHeight-gn(this)-this.display.barHeight,width:s.scrollWidth-gn(this)-this.display.barWidth,clientHeight:Jo(this),clientWidth:zn(this)}},scrollIntoView:Vr(function(s,u){s==null?(s={from:this.doc.sel.primary().head,to:null},u==null&&(u=this.options.cursorScrollMargin)):typeof s=="number"?s={from:T(s,0),to:null}:s.from==null&&(s={from:s,to:null}),s.to||(s.to=s.from),s.margin=u||0,s.from.line!=null?Iu(this,s):Lu(this,s.from,s.to,s.margin)}),setSize:Vr(function(s,u){var p=this,y=function(C){return typeof C=="number"||/^\d+$/.test(String(C))?C+"px":C};s!=null&&(this.display.wrapper.style.width=y(s)),u!=null&&(this.display.wrapper.style.height=y(u)),this.options.lineWrapping&&Zs(this);var x=this.display.viewFrom;this.doc.iter(x,this.display.viewTo,function(C){if(C.widgets){for(var P=0;P<C.widgets.length;P++)if(C.widgets[P].noHScroll){Ni(p,x,"widget");break}}++x}),this.curOp.forceUpdate=!0,nt(this,"refresh",this)}),operation:function(s){return ln(this,s)},startOperation:function(){return ua(this)},endOperation:function(){return fa(this)},refresh:Vr(function(){var s=this.display.cachedTextHeight;qr(this),this.curOp.forceUpdate=!0,mo(this),sa(this,this.doc.scrollLeft,this.doc.scrollTop),vl(this.display),(s==null||Math.abs(s-Va(this.display))>.5||this.options.lineWrapping)&&ol(this),nt(this,"refresh",this)}),swapDoc:Vr(function(s){var u=this.doc;return u.cm=null,this.state.selectingText&&this.state.selectingText(),$u(this,s),mo(this),this.display.input.reset(),sa(this,s.scrollLeft,s.scrollTop),this.curOp.forceScroll=!0,yr(this,"swapDoc",this,u),u}),phrase:function(s){var u=this.options.phrases;return u&&Object.prototype.hasOwnProperty.call(u,s)?u[s]:s},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}},Gr(t),t.registerHelper=function(s,u,p){l.hasOwnProperty(s)||(l[s]=t[s]={_global:[]}),l[s][u]=p},t.registerGlobalHelper=function(s,u,p,y){t.registerHelper(s,u,y),l[s]._global.push({pred:p,val:y})}}function Nl(t,n,l,s,u){var p=n,y=l,x=Ge(t,n.line),C=u&&t.direction=="rtl"?-l:l;function P(){var De=n.line+C;return De<t.first||De>=t.first+t.size?!1:(n=new T(De,n.ch,n.sticky),x=Ge(t,De))}function K(De){var Ne;if(s=="codepoint"){var We=x.text.charCodeAt(n.ch+(l>0?0:-1));if(isNaN(We))Ne=null;else{var Qe=l>0?We>=55296&&We<56320:We>=56320&&We<57343;Ne=new T(n.line,Math.max(0,Math.min(x.text.length,n.ch+l*(Qe?2:1))),-l)}}else u?Ne=hf(t.cm,x,n,l):Ne=wl(x,n,l);if(Ne==null)if(!De&&P())n=Cl(u,t.cm,x,n.line,C);else return!1;else n=Ne;return!0}if(s=="char"||s=="codepoint")K();else if(s=="column")K(!0);else if(s=="word"||s=="group")for(var ne=null,ve=s=="group",de=t.cm&&t.cm.getHelper(n,"wordChars"),Ee=!0;!(l<0&&!K(!Ee));Ee=!1){var Ae=x.text.charAt(n.ch)||`
28
28
  `,Ie=nn(Ae,de)?"w":ve&&Ae==`
29
- `?"n":!ve||/\s/.test(Ae)?null:"p";if(ve&&!Ee&&!Ie&&(Ie="s"),ne&&ne!=Ie){l<0&&(l=1,K(),n.sticky="after");break}if(Ie&&(ne=Ie),l>0&&!K(!Ee))break}var Le=ps(t,n,p,y,!0);return Pe(p,Le)&&(Le.hitSide=!0),Le}function Ff(t,n,l,s){var u=t.doc,p=n.left,y;if(s=="page"){var x=Math.min(t.display.wrapper.clientHeight,er(t).innerHeight||u(t).documentElement.clientHeight),C=Math.max(x-.5*Va(t.display),3);y=(l>0?n.bottom:n.top)+l*C}else s=="line"&&(y=l>0?n.bottom+3:n.top-3);for(var P;P=bo(t,p,y),!!P.outside;){if(l<0?y<=0:y>=u.height){P.hitSide=!0;break}y+=l*5}return P}var Ut=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new He,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ut.prototype.init=function(t){var n=this,l=this,s=l.cm,u=l.div=t.lineDiv;u.contentEditable=!0,Ml(u,s.options.spellcheck,s.options.autocorrect,s.options.autocapitalize);function p(x){for(var C=x.target;C;C=C.parentNode){if(C==u)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(C.className))break}return!1}se(u,"paste",function(x){!p(x)||ht(s,x)||to(x,s)||V<=11&&setTimeout(br(s,function(){return n.updateFromDOM()}),20)}),se(u,"compositionstart",function(x){n.composing={data:x.data,done:!1}}),se(u,"compositionupdate",function(x){n.composing||(n.composing={data:x.data,done:!1})}),se(u,"compositionend",function(x){n.composing&&(x.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),se(u,"touchstart",function(){return l.forceCompositionEnd()}),se(u,"input",function(){n.composing||n.readFromDOMSoon()});function y(x){if(!(!p(x)||ht(s,x))){if(s.somethingSelected())Os({lineWise:!1,text:s.getSelections()}),x.type=="cut"&&s.replaceSelection("",null,"cut");else if(s.options.lineWiseCopyCut){var C=kf(s);Os({lineWise:!0,text:C.text}),x.type=="cut"&&s.operation(function(){s.setSelections(C.ranges,0,_t),s.replaceSelection("",null,"cut")})}else return;if(x.clipboardData){x.clipboardData.clearData();var P=Xn.text.join(`
29
+ `?"n":!ve||/\s/.test(Ae)?null:"p";if(ve&&!Ee&&!Ie&&(Ie="s"),ne&&ne!=Ie){l<0&&(l=1,K(),n.sticky="after");break}if(Ie&&(ne=Ie),l>0&&!K(!Ee))break}var Le=ps(t,n,p,y,!0);return Pe(p,Le)&&(Le.hitSide=!0),Le}function Ff(t,n,l,s){var u=t.doc,p=n.left,y;if(s=="page"){var x=Math.min(t.display.wrapper.clientHeight,er(t).innerHeight||u(t).documentElement.clientHeight),C=Math.max(x-.5*Va(t.display),3);y=(l>0?n.bottom:n.top)+l*C}else s=="line"&&(y=l>0?n.bottom+3:n.top-3);for(var P;P=bo(t,p,y),!!P.outside;){if(l<0?y<=0:y>=u.height){P.hitSide=!0;break}y+=l*5}return P}var Ut=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new He,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ut.prototype.init=function(t){var n=this,l=this,s=l.cm,u=l.div=t.lineDiv;u.contentEditable=!0,Ml(u,s.options.spellcheck,s.options.autocorrect,s.options.autocapitalize);function p(x){for(var C=x.target;C;C=C.parentNode){if(C==u)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(C.className))break}return!1}se(u,"paste",function(x){!p(x)||ht(s,x)||to(x,s)||j<=11&&setTimeout(br(s,function(){return n.updateFromDOM()}),20)}),se(u,"compositionstart",function(x){n.composing={data:x.data,done:!1}}),se(u,"compositionupdate",function(x){n.composing||(n.composing={data:x.data,done:!1})}),se(u,"compositionend",function(x){n.composing&&(x.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),se(u,"touchstart",function(){return l.forceCompositionEnd()}),se(u,"input",function(){n.composing||n.readFromDOMSoon()});function y(x){if(!(!p(x)||ht(s,x))){if(s.somethingSelected())Os({lineWise:!1,text:s.getSelections()}),x.type=="cut"&&s.replaceSelection("",null,"cut");else if(s.options.lineWiseCopyCut){var C=kf(s);Os({lineWise:!0,text:C.text}),x.type=="cut"&&s.operation(function(){s.setSelections(C.ranges,0,_t),s.replaceSelection("",null,"cut")})}else return;if(x.clipboardData){x.clipboardData.clearData();var P=Xn.text.join(`
30
30
  `);if(x.clipboardData.setData("Text",P),x.clipboardData.getData("Text")==P){x.preventDefault();return}}var K=Pf(),ne=K.firstChild;Ml(ne),s.display.lineSpace.insertBefore(K,s.display.lineSpace.firstChild),ne.value=Xn.text.join(`
31
- `);var ve=ze(u.ownerDocument);pt(ne),setTimeout(function(){s.display.lineSpace.removeChild(K),ve.focus(),ve==u&&l.showPrimarySelection()},50)}}se(u,"copy",y),se(u,"cut",y)},Ut.prototype.screenReaderLabelChanged=function(t){t?this.div.setAttribute("aria-label",t):this.div.removeAttribute("aria-label")},Ut.prototype.prepareSelection=function(){var t=xo(this.cm,!1);return t.focus=ze(this.div.ownerDocument)==this.div,t},Ut.prototype.showSelection=function(t,n){!t||!this.cm.display.view.length||((t.focus||n)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ut.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ut.prototype.showPrimarySelection=function(){var t=this.getSelection(),n=this.cm,l=n.doc.sel.primary(),s=l.from(),u=l.to();if(n.display.viewTo==n.display.viewFrom||s.line>=n.display.viewTo||u.line<n.display.viewFrom){t.removeAllRanges();return}var p=Es(n,t.anchorNode,t.anchorOffset),y=Es(n,t.focusNode,t.focusOffset);if(!(p&&!p.bad&&y&&!y.bad&&$(wt(p,y),s)==0&&$(it(p,y),u)==0)){var x=n.display.view,C=s.line>=n.display.viewFrom&&If(n,s)||{node:x[0].measure.map[2],offset:0},P=u.line<n.display.viewTo&&If(n,u);if(!P){var K=x[x.length-1].measure,ne=K.maps?K.maps[K.maps.length-1]:K.map;P={node:ne[ne.length-1],offset:ne[ne.length-2]-ne[ne.length-3]}}if(!C||!P){t.removeAllRanges();return}var ve=t.rangeCount&&t.getRangeAt(0),de;try{de=ie(C.node,C.offset,P.offset,P.node)}catch(Ee){}de&&(!m&&n.state.focused?(t.collapse(C.node,C.offset),de.collapsed||(t.removeAllRanges(),t.addRange(de))):(t.removeAllRanges(),t.addRange(de)),ve&&t.anchorNode==null?t.addRange(ve):m&&this.startGracePeriod()),this.rememberSelection()}},Ut.prototype.startGracePeriod=function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation(function(){return t.cm.curOp.selectionChanged=!0})},20)},Ut.prototype.showMultipleSelections=function(t){xe(this.cm.display.cursorDiv,t.cursors),xe(this.cm.display.selectionDiv,t.selection)},Ut.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},Ut.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var n=t.getRangeAt(0).commonAncestorContainer;return je(this.div,n)},Ut.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||ze(this.div.ownerDocument)!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ut.prototype.blur=function(){this.div.blur()},Ut.prototype.getField=function(){return this.div},Ut.prototype.supportsTouch=function(){return!0},Ut.prototype.receivedFocus=function(){var t=this,n=this;this.selectionInEditor()?setTimeout(function(){return t.pollSelection()},20):ln(this.cm,function(){return n.cm.curOp.selectionChanged=!0});function l(){n.cm.state.focused&&(n.pollSelection(),n.polling.set(n.cm.options.pollInterval,l))}this.polling.set(this.cm.options.pollInterval,l)},Ut.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},Ut.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var t=this.getSelection(),n=this.cm;if(D&&re&&this.cm.display.gutterSpecs.length&&nd(t.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var l=Es(n,t.anchorNode,t.anchorOffset),s=Es(n,t.focusNode,t.focusOffset);l&&s&&ln(n,function(){Sr(n.doc,Vi(l,s),_t),(l.bad||s.bad)&&(n.curOp.selectionChanged=!0)})}}},Ut.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t=this.cm,n=t.display,l=t.doc.sel.primary(),s=l.from(),u=l.to();if(s.ch==0&&s.line>t.firstLine()&&(s=T(s.line-1,Ge(t.doc,s.line-1).length)),u.ch==Ge(t.doc,u.line).text.length&&u.line<t.lastLine()&&(u=T(u.line+1,0)),s.line<n.viewFrom||u.line>n.viewTo-1)return!1;var p,y,x;s.line==n.viewFrom||(p=oa(t,s.line))==0?(y=It(n.view[0].line),x=n.view[0].node):(y=It(n.view[p].line),x=n.view[p-1].node.nextSibling);var C=oa(t,u.line),P,K;if(C==n.view.length-1?(P=n.viewTo-1,K=n.lineDiv.lastChild):(P=It(n.view[C+1].line)-1,K=n.view[C+1].node.previousSibling),!x)return!1;for(var ne=t.doc.splitLines(id(t,x,K,y,P)),ve=yi(t.doc,T(y,0),T(P,Ge(t.doc,P).text.length));ne.length>1&&ve.length>1;)if(et(ne)==et(ve))ne.pop(),ve.pop(),P--;else if(ne[0]==ve[0])ne.shift(),ve.shift(),y++;else break;for(var de=0,Ee=0,Ae=ne[0],Ie=ve[0],Le=Math.min(Ae.length,Ie.length);de<Le&&Ae.charCodeAt(de)==Ie.charCodeAt(de);)++de;for(var De=et(ne),Ne=et(ve),We=Math.min(De.length-(ne.length==1?de:0),Ne.length-(ve.length==1?de:0));Ee<We&&De.charCodeAt(De.length-Ee-1)==Ne.charCodeAt(Ne.length-Ee-1);)++Ee;if(ne.length==1&&ve.length==1&&y==s.line)for(;de&&de>s.ch&&De.charCodeAt(De.length-Ee-1)==Ne.charCodeAt(Ne.length-Ee-1);)de--,Ee++;ne[ne.length-1]=De.slice(0,De.length-Ee).replace(/^\u200b+/,""),ne[0]=ne[0].slice(de).replace(/\u200b+$/,"");var Qe=T(y,de),Ke=T(P,ve.length?et(ve).length-Ee:0);if(ne.length>1||ne[0]||$(Qe,Ke))return Xa(t.doc,ne,Qe,Ke,"+input"),!0},Ut.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ut.prototype.reset=function(){this.forceCompositionEnd()},Ut.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ut.prototype.readFromDOMSoon=function(){var t=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing)if(t.composing.done)t.composing=null;else return;t.updateFromDOM()},80))},Ut.prototype.updateFromDOM=function(){var t=this;(this.cm.isReadOnly()||!this.pollContent())&&ln(this.cm,function(){return qr(t.cm)})},Ut.prototype.setUneditable=function(t){t.contentEditable="false"},Ut.prototype.onKeyPress=function(t){t.charCode==0||this.composing||(t.preventDefault(),this.cm.isReadOnly()||br(this.cm,Ll)(this.cm,String.fromCharCode(t.charCode==null?t.keyCode:t.charCode),0))},Ut.prototype.readOnlyChanged=function(t){this.div.contentEditable=String(t!="nocursor")},Ut.prototype.onContextMenu=function(){},Ut.prototype.resetPosition=function(){},Ut.prototype.needsContentAttribute=!0;function If(t,n){var l=Qo(t,n.line);if(!l||l.hidden)return null;var s=Ge(t.doc,n.line),u=Cu(l,s,n.line),p=tt(s,t.doc.direction),y="left";if(p){var x=St(p,n.ch);y=x%2?"right":"left"}var C=Js(u.map,n.ch,y);return C.offset=C.collapse=="right"?C.end:C.start,C}function nd(t){for(var n=t;n;n=n.parentNode)if(/CodeMirror-gutter-wrapper/.test(n.className))return!0;return!1}function ro(t,n){return n&&(t.bad=!0),t}function id(t,n,l,s,u){var p="",y=!1,x=t.doc.lineSeparator(),C=!1;function P(de){return function(Ee){return Ee.id==de}}function K(){y&&(p+=x,C&&(p+=x),y=C=!1)}function ne(de){de&&(K(),p+=de)}function ve(de){if(de.nodeType==1){var Ee=de.getAttribute("cm-text");if(Ee){ne(Ee);return}var Ae=de.getAttribute("cm-marker"),Ie;if(Ae){var Le=t.findMarks(T(s,0),T(u+1,0),P(+Ae));Le.length&&(Ie=Le[0].find(0))&&ne(yi(t.doc,Ie.from,Ie.to).join(x));return}if(de.getAttribute("contenteditable")=="false")return;var De=/^(pre|div|p|li|table|br)$/i.test(de.nodeName);if(!/^br$/i.test(de.nodeName)&&de.textContent.length==0)return;De&&K();for(var Ne=0;Ne<de.childNodes.length;Ne++)ve(de.childNodes[Ne]);/^(pre|p)$/i.test(de.nodeName)&&(C=!0),De&&(y=!0)}else de.nodeType==3&&ne(de.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;ve(n),n!=l;)n=n.nextSibling,C=!1;return p}function Es(t,n,l){var s;if(n==t.display.lineDiv){if(s=t.display.lineDiv.childNodes[l],!s)return ro(t.clipPos(T(t.display.viewTo-1)),!0);n=null,l=0}else for(s=n;;s=s.parentNode){if(!s||s==t.display.lineDiv)return null;if(s.parentNode&&s.parentNode==t.display.lineDiv)break}for(var u=0;u<t.display.view.length;u++){var p=t.display.view[u];if(p.node==s)return ad(p,n,l)}}function ad(t,n,l){var s=t.text.firstChild,u=!1;if(!n||!je(s,n))return ro(T(It(t.line),0),!0);if(n==s&&(u=!0,n=s.childNodes[l],l=0,!n)){var p=t.rest?et(t.rest):t.line;return ro(T(It(p),p.text.length),u)}var y=n.nodeType==3?n:null,x=n;for(!y&&n.childNodes.length==1&&n.firstChild.nodeType==3&&(y=n.firstChild,l&&(l=y.nodeValue.length));x.parentNode!=s;)x=x.parentNode;var C=t.measure,P=C.maps;function K(Ie,Le,De){for(var Ne=-1;Ne<(P?P.length:0);Ne++)for(var We=Ne<0?C.map:P[Ne],Qe=0;Qe<We.length;Qe+=3){var Ke=We[Qe+2];if(Ke==Ie||Ke==Le){var bt=It(Ne<0?t.line:t.rest[Ne]),$t=We[Qe]+De;return(De<0||Ke!=Ie)&&($t=We[Qe+(De?1:0)]),T(bt,$t)}}}var ne=K(y,x,l);if(ne)return ro(ne,u);for(var ve=x.nextSibling,de=y?y.nodeValue.length-l:0;ve;ve=ve.nextSibling){if(ne=K(ve,ve.firstChild,0),ne)return ro(T(ne.line,ne.ch-de),u);de+=ve.textContent.length}for(var Ee=x.previousSibling,Ae=l;Ee;Ee=Ee.previousSibling){if(ne=K(Ee,Ee.firstChild,-1),ne)return ro(T(ne.line,ne.ch+Ae),u);Ae+=Ee.textContent.length}}var lr=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new He,this.hasSelection=!1,this.composing=null,this.resetting=!1};lr.prototype.init=function(t){var n=this,l=this,s=this.cm;this.createField(t);var u=this.textarea;t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),ee&&(u.style.width="0px"),se(u,"input",function(){R&&V>=9&&n.hasSelection&&(n.hasSelection=null),l.poll()}),se(u,"paste",function(y){ht(s,y)||to(y,s)||(s.state.pasteIncoming=+new Date,l.fastPoll())});function p(y){if(!ht(s,y)){if(s.somethingSelected())Os({lineWise:!1,text:s.getSelections()});else if(s.options.lineWiseCopyCut){var x=kf(s);Os({lineWise:!0,text:x.text}),y.type=="cut"?s.setSelections(x.ranges,null,_t):(l.prevInput="",u.value=x.text.join(`
32
- `),pt(u))}else return;y.type=="cut"&&(s.state.cutIncoming=+new Date)}}se(u,"cut",p),se(u,"copy",p),se(t.scroller,"paste",function(y){if(!(Ai(t,y)||ht(s,y))){if(!u.dispatchEvent){s.state.pasteIncoming=+new Date,l.focus();return}var x=new Event("paste");x.clipboardData=y.clipboardData,u.dispatchEvent(x)}}),se(t.lineSpace,"selectstart",function(y){Ai(t,y)||Ft(y)}),se(u,"compositionstart",function(){var y=s.getCursor("from");l.composing&&l.composing.range.clear(),l.composing={start:y,range:s.markText(y,s.getCursor("to"),{className:"CodeMirror-composing"})}}),se(u,"compositionend",function(){l.composing&&(l.poll(),l.composing.range.clear(),l.composing=null)})},lr.prototype.createField=function(t){this.wrapper=Pf(),this.textarea=this.wrapper.firstChild;var n=this.cm.options;Ml(this.textarea,n.spellcheck,n.autocorrect,n.autocapitalize)},lr.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},lr.prototype.prepareSelection=function(){var t=this.cm,n=t.display,l=t.doc,s=xo(t);if(t.options.moveInputWithCursor){var u=kn(t,l.sel.primary().head,"div"),p=n.wrapper.getBoundingClientRect(),y=n.lineDiv.getBoundingClientRect();s.teTop=Math.max(0,Math.min(n.wrapper.clientHeight-10,u.top+y.top-p.top)),s.teLeft=Math.max(0,Math.min(n.wrapper.clientWidth-10,u.left+y.left-p.left))}return s},lr.prototype.showSelection=function(t){var n=this.cm,l=n.display;xe(l.cursorDiv,t.cursors),xe(l.selectionDiv,t.selection),t.teTop!=null&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},lr.prototype.reset=function(t){if(!(this.contextMenuPending||this.composing&&t)){var n=this.cm;if(this.resetting=!0,n.somethingSelected()){this.prevInput="";var l=n.getSelection();this.textarea.value=l,n.state.focused&&pt(this.textarea),R&&V>=9&&(this.hasSelection=l)}else t||(this.prevInput=this.textarea.value="",R&&V>=9&&(this.hasSelection=null));this.resetting=!1}},lr.prototype.getField=function(){return this.textarea},lr.prototype.supportsTouch=function(){return!1},lr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!w||ze(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch(t){}},lr.prototype.blur=function(){this.textarea.blur()},lr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},lr.prototype.receivedFocus=function(){this.slowPoll()},lr.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},lr.prototype.fastPoll=function(){var t=!1,n=this;n.pollingFast=!0;function l(){var s=n.poll();!s&&!t?(t=!0,n.polling.set(60,l)):(n.pollingFast=!1,n.slowPoll())}n.polling.set(20,l)},lr.prototype.poll=function(){var t=this,n=this.cm,l=this.textarea,s=this.prevInput;if(this.contextMenuPending||this.resetting||!n.state.focused||Ii(l)&&!s&&!this.composing||n.isReadOnly()||n.options.disableInput||n.state.keySeq)return!1;var u=l.value;if(u==s&&!n.somethingSelected())return!1;if(R&&V>=9&&this.hasSelection===u||M&&/[\uf700-\uf7ff]/.test(u))return n.display.input.reset(),!1;if(n.doc.sel==n.display.selForContextMenu){var p=u.charCodeAt(0);if(p==8203&&!s&&(s="\u200B"),p==8666)return this.reset(),this.cm.execCommand("undo")}for(var y=0,x=Math.min(s.length,u.length);y<x&&s.charCodeAt(y)==u.charCodeAt(y);)++y;return ln(n,function(){Ll(n,u.slice(y),s.length-y,null,t.composing?"*compose":null),u.length>1e3||u.indexOf(`
33
- `)>-1?l.value=t.prevInput="":t.prevInput=u,t.composing&&(t.composing.range.clear(),t.composing.range=n.markText(t.composing.start,n.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},lr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},lr.prototype.onKeyPress=function(){R&&V>=9&&(this.hasSelection=null),this.fastPoll()},lr.prototype.onContextMenu=function(t){var n=this,l=n.cm,s=l.display,u=n.textarea;n.contextMenuPending&&n.contextMenuPending();var p=aa(l,t),y=s.scroller.scrollTop;if(!p||oe)return;var x=l.options.resetSelectionOnContextMenu;x&&l.doc.sel.contains(p)==-1&&br(l,Sr)(l.doc,Vi(p),_t);var C=u.style.cssText,P=n.wrapper.style.cssText,K=n.wrapper.offsetParent.getBoundingClientRect();n.wrapper.style.cssText="position: static",u.style.cssText=`position: absolute; width: 30px; height: 30px;
31
+ `);var ve=ze(u.ownerDocument);pt(ne),setTimeout(function(){s.display.lineSpace.removeChild(K),ve.focus(),ve==u&&l.showPrimarySelection()},50)}}se(u,"copy",y),se(u,"cut",y)},Ut.prototype.screenReaderLabelChanged=function(t){t?this.div.setAttribute("aria-label",t):this.div.removeAttribute("aria-label")},Ut.prototype.prepareSelection=function(){var t=xo(this.cm,!1);return t.focus=ze(this.div.ownerDocument)==this.div,t},Ut.prototype.showSelection=function(t,n){!t||!this.cm.display.view.length||((t.focus||n)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ut.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ut.prototype.showPrimarySelection=function(){var t=this.getSelection(),n=this.cm,l=n.doc.sel.primary(),s=l.from(),u=l.to();if(n.display.viewTo==n.display.viewFrom||s.line>=n.display.viewTo||u.line<n.display.viewFrom){t.removeAllRanges();return}var p=Es(n,t.anchorNode,t.anchorOffset),y=Es(n,t.focusNode,t.focusOffset);if(!(p&&!p.bad&&y&&!y.bad&&$(wt(p,y),s)==0&&$(it(p,y),u)==0)){var x=n.display.view,C=s.line>=n.display.viewFrom&&If(n,s)||{node:x[0].measure.map[2],offset:0},P=u.line<n.display.viewTo&&If(n,u);if(!P){var K=x[x.length-1].measure,ne=K.maps?K.maps[K.maps.length-1]:K.map;P={node:ne[ne.length-1],offset:ne[ne.length-2]-ne[ne.length-3]}}if(!C||!P){t.removeAllRanges();return}var ve=t.rangeCount&&t.getRangeAt(0),de;try{de=ie(C.node,C.offset,P.offset,P.node)}catch{}de&&(!m&&n.state.focused?(t.collapse(C.node,C.offset),de.collapsed||(t.removeAllRanges(),t.addRange(de))):(t.removeAllRanges(),t.addRange(de)),ve&&t.anchorNode==null?t.addRange(ve):m&&this.startGracePeriod()),this.rememberSelection()}},Ut.prototype.startGracePeriod=function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation(function(){return t.cm.curOp.selectionChanged=!0})},20)},Ut.prototype.showMultipleSelections=function(t){xe(this.cm.display.cursorDiv,t.cursors),xe(this.cm.display.selectionDiv,t.selection)},Ut.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},Ut.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var n=t.getRangeAt(0).commonAncestorContainer;return je(this.div,n)},Ut.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||ze(this.div.ownerDocument)!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ut.prototype.blur=function(){this.div.blur()},Ut.prototype.getField=function(){return this.div},Ut.prototype.supportsTouch=function(){return!0},Ut.prototype.receivedFocus=function(){var t=this,n=this;this.selectionInEditor()?setTimeout(function(){return t.pollSelection()},20):ln(this.cm,function(){return n.cm.curOp.selectionChanged=!0});function l(){n.cm.state.focused&&(n.pollSelection(),n.polling.set(n.cm.options.pollInterval,l))}this.polling.set(this.cm.options.pollInterval,l)},Ut.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},Ut.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var t=this.getSelection(),n=this.cm;if(N&&re&&this.cm.display.gutterSpecs.length&&nd(t.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var l=Es(n,t.anchorNode,t.anchorOffset),s=Es(n,t.focusNode,t.focusOffset);l&&s&&ln(n,function(){Sr(n.doc,Vi(l,s),_t),(l.bad||s.bad)&&(n.curOp.selectionChanged=!0)})}}},Ut.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t=this.cm,n=t.display,l=t.doc.sel.primary(),s=l.from(),u=l.to();if(s.ch==0&&s.line>t.firstLine()&&(s=T(s.line-1,Ge(t.doc,s.line-1).length)),u.ch==Ge(t.doc,u.line).text.length&&u.line<t.lastLine()&&(u=T(u.line+1,0)),s.line<n.viewFrom||u.line>n.viewTo-1)return!1;var p,y,x;s.line==n.viewFrom||(p=oa(t,s.line))==0?(y=It(n.view[0].line),x=n.view[0].node):(y=It(n.view[p].line),x=n.view[p-1].node.nextSibling);var C=oa(t,u.line),P,K;if(C==n.view.length-1?(P=n.viewTo-1,K=n.lineDiv.lastChild):(P=It(n.view[C+1].line)-1,K=n.view[C+1].node.previousSibling),!x)return!1;for(var ne=t.doc.splitLines(id(t,x,K,y,P)),ve=yi(t.doc,T(y,0),T(P,Ge(t.doc,P).text.length));ne.length>1&&ve.length>1;)if(et(ne)==et(ve))ne.pop(),ve.pop(),P--;else if(ne[0]==ve[0])ne.shift(),ve.shift(),y++;else break;for(var de=0,Ee=0,Ae=ne[0],Ie=ve[0],Le=Math.min(Ae.length,Ie.length);de<Le&&Ae.charCodeAt(de)==Ie.charCodeAt(de);)++de;for(var De=et(ne),Ne=et(ve),We=Math.min(De.length-(ne.length==1?de:0),Ne.length-(ve.length==1?de:0));Ee<We&&De.charCodeAt(De.length-Ee-1)==Ne.charCodeAt(Ne.length-Ee-1);)++Ee;if(ne.length==1&&ve.length==1&&y==s.line)for(;de&&de>s.ch&&De.charCodeAt(De.length-Ee-1)==Ne.charCodeAt(Ne.length-Ee-1);)de--,Ee++;ne[ne.length-1]=De.slice(0,De.length-Ee).replace(/^\u200b+/,""),ne[0]=ne[0].slice(de).replace(/\u200b+$/,"");var Qe=T(y,de),Ke=T(P,ve.length?et(ve).length-Ee:0);if(ne.length>1||ne[0]||$(Qe,Ke))return Xa(t.doc,ne,Qe,Ke,"+input"),!0},Ut.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ut.prototype.reset=function(){this.forceCompositionEnd()},Ut.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ut.prototype.readFromDOMSoon=function(){var t=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing)if(t.composing.done)t.composing=null;else return;t.updateFromDOM()},80))},Ut.prototype.updateFromDOM=function(){var t=this;(this.cm.isReadOnly()||!this.pollContent())&&ln(this.cm,function(){return qr(t.cm)})},Ut.prototype.setUneditable=function(t){t.contentEditable="false"},Ut.prototype.onKeyPress=function(t){t.charCode==0||this.composing||(t.preventDefault(),this.cm.isReadOnly()||br(this.cm,Ll)(this.cm,String.fromCharCode(t.charCode==null?t.keyCode:t.charCode),0))},Ut.prototype.readOnlyChanged=function(t){this.div.contentEditable=String(t!="nocursor")},Ut.prototype.onContextMenu=function(){},Ut.prototype.resetPosition=function(){},Ut.prototype.needsContentAttribute=!0;function If(t,n){var l=Qo(t,n.line);if(!l||l.hidden)return null;var s=Ge(t.doc,n.line),u=Cu(l,s,n.line),p=tt(s,t.doc.direction),y="left";if(p){var x=St(p,n.ch);y=x%2?"right":"left"}var C=Js(u.map,n.ch,y);return C.offset=C.collapse=="right"?C.end:C.start,C}function nd(t){for(var n=t;n;n=n.parentNode)if(/CodeMirror-gutter-wrapper/.test(n.className))return!0;return!1}function ro(t,n){return n&&(t.bad=!0),t}function id(t,n,l,s,u){var p="",y=!1,x=t.doc.lineSeparator(),C=!1;function P(de){return function(Ee){return Ee.id==de}}function K(){y&&(p+=x,C&&(p+=x),y=C=!1)}function ne(de){de&&(K(),p+=de)}function ve(de){if(de.nodeType==1){var Ee=de.getAttribute("cm-text");if(Ee){ne(Ee);return}var Ae=de.getAttribute("cm-marker"),Ie;if(Ae){var Le=t.findMarks(T(s,0),T(u+1,0),P(+Ae));Le.length&&(Ie=Le[0].find(0))&&ne(yi(t.doc,Ie.from,Ie.to).join(x));return}if(de.getAttribute("contenteditable")=="false")return;var De=/^(pre|div|p|li|table|br)$/i.test(de.nodeName);if(!/^br$/i.test(de.nodeName)&&de.textContent.length==0)return;De&&K();for(var Ne=0;Ne<de.childNodes.length;Ne++)ve(de.childNodes[Ne]);/^(pre|p)$/i.test(de.nodeName)&&(C=!0),De&&(y=!0)}else de.nodeType==3&&ne(de.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;ve(n),n!=l;)n=n.nextSibling,C=!1;return p}function Es(t,n,l){var s;if(n==t.display.lineDiv){if(s=t.display.lineDiv.childNodes[l],!s)return ro(t.clipPos(T(t.display.viewTo-1)),!0);n=null,l=0}else for(s=n;;s=s.parentNode){if(!s||s==t.display.lineDiv)return null;if(s.parentNode&&s.parentNode==t.display.lineDiv)break}for(var u=0;u<t.display.view.length;u++){var p=t.display.view[u];if(p.node==s)return ad(p,n,l)}}function ad(t,n,l){var s=t.text.firstChild,u=!1;if(!n||!je(s,n))return ro(T(It(t.line),0),!0);if(n==s&&(u=!0,n=s.childNodes[l],l=0,!n)){var p=t.rest?et(t.rest):t.line;return ro(T(It(p),p.text.length),u)}var y=n.nodeType==3?n:null,x=n;for(!y&&n.childNodes.length==1&&n.firstChild.nodeType==3&&(y=n.firstChild,l&&(l=y.nodeValue.length));x.parentNode!=s;)x=x.parentNode;var C=t.measure,P=C.maps;function K(Ie,Le,De){for(var Ne=-1;Ne<(P?P.length:0);Ne++)for(var We=Ne<0?C.map:P[Ne],Qe=0;Qe<We.length;Qe+=3){var Ke=We[Qe+2];if(Ke==Ie||Ke==Le){var bt=It(Ne<0?t.line:t.rest[Ne]),$t=We[Qe]+De;return(De<0||Ke!=Ie)&&($t=We[Qe+(De?1:0)]),T(bt,$t)}}}var ne=K(y,x,l);if(ne)return ro(ne,u);for(var ve=x.nextSibling,de=y?y.nodeValue.length-l:0;ve;ve=ve.nextSibling){if(ne=K(ve,ve.firstChild,0),ne)return ro(T(ne.line,ne.ch-de),u);de+=ve.textContent.length}for(var Ee=x.previousSibling,Ae=l;Ee;Ee=Ee.previousSibling){if(ne=K(Ee,Ee.firstChild,-1),ne)return ro(T(ne.line,ne.ch+Ae),u);Ae+=Ee.textContent.length}}var lr=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new He,this.hasSelection=!1,this.composing=null,this.resetting=!1};lr.prototype.init=function(t){var n=this,l=this,s=this.cm;this.createField(t);var u=this.textarea;t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),ee&&(u.style.width="0px"),se(u,"input",function(){D&&j>=9&&n.hasSelection&&(n.hasSelection=null),l.poll()}),se(u,"paste",function(y){ht(s,y)||to(y,s)||(s.state.pasteIncoming=+new Date,l.fastPoll())});function p(y){if(!ht(s,y)){if(s.somethingSelected())Os({lineWise:!1,text:s.getSelections()});else if(s.options.lineWiseCopyCut){var x=kf(s);Os({lineWise:!0,text:x.text}),y.type=="cut"?s.setSelections(x.ranges,null,_t):(l.prevInput="",u.value=x.text.join(`
32
+ `),pt(u))}else return;y.type=="cut"&&(s.state.cutIncoming=+new Date)}}se(u,"cut",p),se(u,"copy",p),se(t.scroller,"paste",function(y){if(!(Ai(t,y)||ht(s,y))){if(!u.dispatchEvent){s.state.pasteIncoming=+new Date,l.focus();return}var x=new Event("paste");x.clipboardData=y.clipboardData,u.dispatchEvent(x)}}),se(t.lineSpace,"selectstart",function(y){Ai(t,y)||Ft(y)}),se(u,"compositionstart",function(){var y=s.getCursor("from");l.composing&&l.composing.range.clear(),l.composing={start:y,range:s.markText(y,s.getCursor("to"),{className:"CodeMirror-composing"})}}),se(u,"compositionend",function(){l.composing&&(l.poll(),l.composing.range.clear(),l.composing=null)})},lr.prototype.createField=function(t){this.wrapper=Pf(),this.textarea=this.wrapper.firstChild;var n=this.cm.options;Ml(this.textarea,n.spellcheck,n.autocorrect,n.autocapitalize)},lr.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},lr.prototype.prepareSelection=function(){var t=this.cm,n=t.display,l=t.doc,s=xo(t);if(t.options.moveInputWithCursor){var u=kn(t,l.sel.primary().head,"div"),p=n.wrapper.getBoundingClientRect(),y=n.lineDiv.getBoundingClientRect();s.teTop=Math.max(0,Math.min(n.wrapper.clientHeight-10,u.top+y.top-p.top)),s.teLeft=Math.max(0,Math.min(n.wrapper.clientWidth-10,u.left+y.left-p.left))}return s},lr.prototype.showSelection=function(t){var n=this.cm,l=n.display;xe(l.cursorDiv,t.cursors),xe(l.selectionDiv,t.selection),t.teTop!=null&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},lr.prototype.reset=function(t){if(!(this.contextMenuPending||this.composing&&t)){var n=this.cm;if(this.resetting=!0,n.somethingSelected()){this.prevInput="";var l=n.getSelection();this.textarea.value=l,n.state.focused&&pt(this.textarea),D&&j>=9&&(this.hasSelection=l)}else t||(this.prevInput=this.textarea.value="",D&&j>=9&&(this.hasSelection=null));this.resetting=!1}},lr.prototype.getField=function(){return this.textarea},lr.prototype.supportsTouch=function(){return!1},lr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!w||ze(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch{}},lr.prototype.blur=function(){this.textarea.blur()},lr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},lr.prototype.receivedFocus=function(){this.slowPoll()},lr.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},lr.prototype.fastPoll=function(){var t=!1,n=this;n.pollingFast=!0;function l(){var s=n.poll();!s&&!t?(t=!0,n.polling.set(60,l)):(n.pollingFast=!1,n.slowPoll())}n.polling.set(20,l)},lr.prototype.poll=function(){var t=this,n=this.cm,l=this.textarea,s=this.prevInput;if(this.contextMenuPending||this.resetting||!n.state.focused||Ii(l)&&!s&&!this.composing||n.isReadOnly()||n.options.disableInput||n.state.keySeq)return!1;var u=l.value;if(u==s&&!n.somethingSelected())return!1;if(D&&j>=9&&this.hasSelection===u||M&&/[\uf700-\uf7ff]/.test(u))return n.display.input.reset(),!1;if(n.doc.sel==n.display.selForContextMenu){var p=u.charCodeAt(0);if(p==8203&&!s&&(s="\u200B"),p==8666)return this.reset(),this.cm.execCommand("undo")}for(var y=0,x=Math.min(s.length,u.length);y<x&&s.charCodeAt(y)==u.charCodeAt(y);)++y;return ln(n,function(){Ll(n,u.slice(y),s.length-y,null,t.composing?"*compose":null),u.length>1e3||u.indexOf(`
33
+ `)>-1?l.value=t.prevInput="":t.prevInput=u,t.composing&&(t.composing.range.clear(),t.composing.range=n.markText(t.composing.start,n.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},lr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},lr.prototype.onKeyPress=function(){D&&j>=9&&(this.hasSelection=null),this.fastPoll()},lr.prototype.onContextMenu=function(t){var n=this,l=n.cm,s=l.display,u=n.textarea;n.contextMenuPending&&n.contextMenuPending();var p=aa(l,t),y=s.scroller.scrollTop;if(!p||oe)return;var x=l.options.resetSelectionOnContextMenu;x&&l.doc.sel.contains(p)==-1&&br(l,Sr)(l.doc,Vi(p),_t);var C=u.style.cssText,P=n.wrapper.style.cssText,K=n.wrapper.offsetParent.getBoundingClientRect();n.wrapper.style.cssText="position: static",u.style.cssText=`position: absolute; width: 30px; height: 30px;
34
34
  top: `+(t.clientY-K.top-5)+"px; left: "+(t.clientX-K.left-5)+`px;
35
- z-index: 1000; background: `+(R?"rgba(255, 255, 255, .05)":"transparent")+`;
36
- outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ne;X&&(ne=u.ownerDocument.defaultView.scrollY),s.input.focus(),X&&u.ownerDocument.defaultView.scrollTo(null,ne),s.input.reset(),l.somethingSelected()||(u.value=n.prevInput=" "),n.contextMenuPending=de,s.selForContextMenu=l.doc.sel,clearTimeout(s.detectingSelectAll);function ve(){if(u.selectionStart!=null){var Ae=l.somethingSelected(),Ie="\u200B"+(Ae?u.value:"");u.value="\u21DA",u.value=Ie,n.prevInput=Ae?"":"\u200B",u.selectionStart=1,u.selectionEnd=Ie.length,s.selForContextMenu=l.doc.sel}}function de(){if(n.contextMenuPending==de&&(n.contextMenuPending=!1,n.wrapper.style.cssText=P,u.style.cssText=C,R&&V<9&&s.scrollbars.setScrollTop(s.scroller.scrollTop=y),u.selectionStart!=null)){(!R||R&&V<9)&&ve();var Ae=0,Ie=function(){s.selForContextMenu==l.doc.sel&&u.selectionStart==0&&u.selectionEnd>0&&n.prevInput=="\u200B"?br(l,Hi)(l):Ae++<10?s.detectingSelectAll=setTimeout(Ie,500):(s.selForContextMenu=null,s.input.reset())};s.detectingSelectAll=setTimeout(Ie,200)}}if(R&&V>=9&&ve(),le){Nr(t);var Ee=function(){Ve(window,"mouseup",Ee),setTimeout(de,20)};se(window,"mouseup",Ee)}else setTimeout(de,50)},lr.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled=t=="nocursor",this.textarea.readOnly=!!t},lr.prototype.setUneditable=function(){},lr.prototype.needsContentAttribute=!1;function od(t,n){if(n=n?Rt(n):{},n.value=t.value,!n.tabindex&&t.tabIndex&&(n.tabindex=t.tabIndex),!n.placeholder&&t.placeholder&&(n.placeholder=t.placeholder),n.autofocus==null){var l=ze(t.ownerDocument);n.autofocus=l==t||t.getAttribute("autofocus")!=null&&l==document.body}function s(){t.value=x.getValue()}var u;if(t.form&&(se(t.form,"submit",s),!n.leaveSubmitMethodAlone)){var p=t.form;u=p.submit;try{var y=p.submit=function(){s(),p.submit=u,p.submit(),p.submit=y}}catch(C){}}n.finishInit=function(C){C.save=s,C.getTextArea=function(){return t},C.toTextArea=function(){C.toTextArea=isNaN,s(),t.parentNode.removeChild(C.getWrapperElement()),t.style.display="",t.form&&(Ve(t.form,"submit",s),!n.leaveSubmitMethodAlone&&typeof t.form.submit=="function"&&(t.form.submit=u))}},t.style.display="none";var x=Zt(function(C){return t.parentNode.insertBefore(C,t.nextSibling)},n);return x}function sd(t){t.off=Ve,t.on=se,t.wheelEventPixels=Wc,t.Doc=Pr,t.splitLines=Wn,t.countColumn=st,t.findColumn=tr,t.isWordChar=Vn,t.Pass=lt,t.signal=nt,t.Line=ta,t.changeEnd=ji,t.scrollbarModel=Nu,t.Pos=T,t.cmpPos=$,t.modes=vn,t.mimeModes=on,t.resolveMode=Hn,t.getMode=Qr,t.modeExtensions=pr,t.extendMode=ai,t.copyState=An,t.startState=Vo,t.innerMode=ka,t.commands=Za,t.keyMap=Kn,t.keyName=_i,t.isModifierKey=pf,t.lookupKey=Qa,t.normalizeKeyMap=Zc,t.StringStream=Xt,t.SharedTextMarker=ma,t.TextMarker=fi,t.LineWidget=Oo,t.e_preventDefault=Ft,t.e_stopPropagation=dr,t.e_stop=Nr,t.addClass=Ue,t.contains=je,t.rmClass=q,t.keyNames=Ui}ed(Zt),rd(Zt);var ld="iter insert remove copy getEditor constructor".split(" ");for(var Ts in Pr.prototype)Pr.prototype.hasOwnProperty(Ts)&&Re(ld,Ts)<0&&(Zt.prototype[Ts]=function(t){return function(){return t.apply(this.doc,arguments)}}(Pr.prototype[Ts]));return Gr(Pr),Zt.inputStyles={textarea:lr,contenteditable:Ut},Zt.defineMode=function(t){!Zt.defaults.mode&&t!="null"&&(Zt.defaults.mode=t),sn.apply(this,arguments)},Zt.defineMIME=fo,Zt.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Zt.defineMIME("text/plain","null"),Zt.defineExtension=function(t,n){Zt.prototype[t]=n},Zt.defineDocExtension=function(t,n){Pr.prototype[t]=n},Zt.fromTextArea=od,sd(Zt),Zt.version="5.65.12",Zt})},13156:(S,N,c)=>{(function(m){m(c(46944))})(function(m){"use strict";m.defineMode("javascript",function(O,k){var L=O.indentUnit,R=k.statementIndent,V=k.jsonld,X=k.json||V,te=k.trackScope!==!1,re=k.typescript,he=k.wordCharacters||/[\w$\xa1-\uffff]/,oe=function(){function T($e){return{type:$e,style:"keyword"}}var $=T("keyword a"),Pe=T("keyword b"),Fe=T("keyword c"),it=T("keyword d"),wt=T("operator"),Lt={type:"atom",style:"atom"};return{if:T("if"),while:$,with:$,else:Pe,do:Pe,try:Pe,finally:Pe,return:it,break:it,continue:it,new:T("new"),delete:Fe,void:Fe,throw:Fe,debugger:T("debugger"),var:T("var"),const:T("var"),let:T("var"),function:T("function"),catch:T("catch"),for:T("for"),switch:T("switch"),case:T("case"),default:T("default"),in:wt,typeof:wt,instanceof:wt,true:Lt,false:Lt,null:Lt,undefined:Lt,NaN:Lt,Infinity:Lt,this:T("this"),class:T("class"),super:T("atom"),yield:Fe,export:T("export"),import:T("import"),extends:Fe,await:Fe}}(),fe=/[+\-*&%=<>!?|~^@]/,J=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function F(T){for(var $=!1,Pe,Fe=!1;(Pe=T.next())!=null;){if(!$){if(Pe=="/"&&!Fe)return;Pe=="["?Fe=!0:Fe&&Pe=="]"&&(Fe=!1)}$=!$&&Pe=="\\"}}var ee,D;function w(T,$,Pe){return ee=T,D=Pe,$}function M(T,$){var Pe=T.next();if(Pe=='"'||Pe=="'")return $.tokenize=B(Pe),$.tokenize(T,$);if(Pe=="."&&T.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return w("number","number");if(Pe=="."&&T.match(".."))return w("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(Pe))return w(Pe);if(Pe=="="&&T.eat(">"))return w("=>","operator");if(Pe=="0"&&T.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return w("number","number");if(/\d/.test(Pe))return T.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),w("number","number");if(Pe=="/")return T.eat("*")?($.tokenize=Z,Z(T,$)):T.eat("/")?(T.skipToEnd(),w("comment","comment")):Pa(T,$,1)?(F(T),T.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),w("regexp","string-2")):(T.eat("="),w("operator","operator",T.current()));if(Pe=="`")return $.tokenize=ae,ae(T,$);if(Pe=="#"&&T.peek()=="!")return T.skipToEnd(),w("meta","meta");if(Pe=="#"&&T.eatWhile(he))return w("variable","property");if(Pe=="<"&&T.match("!--")||Pe=="-"&&T.match("->")&&!/\S/.test(T.string.slice(0,T.start)))return T.skipToEnd(),w("comment","comment");if(fe.test(Pe))return(Pe!=">"||!$.lexical||$.lexical.type!=">")&&(T.eat("=")?(Pe=="!"||Pe=="=")&&T.eat("="):/[<>*+\-|&?]/.test(Pe)&&(T.eat(Pe),Pe==">"&&T.eat(Pe))),Pe=="?"&&T.eat(".")?w("."):w("operator","operator",T.current());if(he.test(Pe)){T.eatWhile(he);var Fe=T.current();if($.lastType!="."){if(oe.propertyIsEnumerable(Fe)){var it=oe[Fe];return w(it.type,it.style,Fe)}if(Fe=="async"&&T.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return w("async","keyword",Fe)}return w("variable","variable",Fe)}}function B(T){return function($,Pe){var Fe=!1,it;if(V&&$.peek()=="@"&&$.match(J))return Pe.tokenize=M,w("jsonld-keyword","meta");for(;(it=$.next())!=null&&!(it==T&&!Fe);)Fe=!Fe&&it=="\\";return Fe||(Pe.tokenize=M),w("string","string")}}function Z(T,$){for(var Pe=!1,Fe;Fe=T.next();){if(Fe=="/"&&Pe){$.tokenize=M;break}Pe=Fe=="*"}return w("comment","comment")}function ae(T,$){for(var Pe=!1,Fe;(Fe=T.next())!=null;){if(!Pe&&(Fe=="`"||Fe=="$"&&T.eat("{"))){$.tokenize=M;break}Pe=!Pe&&Fe=="\\"}return w("quasi","string-2",T.current())}var H="([{}])";function le(T,$){$.fatArrowAt&&($.fatArrowAt=null);var Pe=T.string.indexOf("=>",T.start);if(!(Pe<0)){if(re){var Fe=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(T.string.slice(T.start,Pe));Fe&&(Pe=Fe.index)}for(var it=0,wt=!1,Lt=Pe-1;Lt>=0;--Lt){var $e=T.string.charAt(Lt),En=H.indexOf($e);if(En>=0&&En<3){if(!it){++Lt;break}if(--it==0){$e=="("&&(wt=!0);break}}else if(En>=3&&En<6)++it;else if(he.test($e))wt=!0;else if(/["'\/`]/.test($e))for(;;--Lt){if(Lt==0)return;var co=T.string.charAt(Lt-1);if(co==$e&&T.string.charAt(Lt-2)!="\\"){Lt--;break}}else if(wt&&!it){++Lt;break}}wt&&!it&&($.fatArrowAt=Lt)}}var z={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function q(T,$,Pe,Fe,it,wt){this.indented=T,this.column=$,this.type=Pe,this.prev=it,this.info=wt,Fe!=null&&(this.align=Fe)}function pe(T,$){if(!te)return!1;for(var Pe=T.localVars;Pe;Pe=Pe.next)if(Pe.name==$)return!0;for(var Fe=T.context;Fe;Fe=Fe.prev)for(var Pe=Fe.vars;Pe;Pe=Pe.next)if(Pe.name==$)return!0}function xe(T,$,Pe,Fe,it){var wt=T.cc;for(Q.state=T,Q.stream=it,Q.marked=null,Q.cc=wt,Q.style=$,T.lexical.hasOwnProperty("align")||(T.lexical.align=!0);;){var Lt=wt.length?wt.pop():X?rt:lt;if(Lt(Pe,Fe)){for(;wt.length&&wt[wt.length-1].lex;)wt.pop()();return Q.marked?Q.marked:Pe=="variable"&&pe(T,Fe)?"variable-2":$}}}var Q={state:null,column:null,marked:null,cc:null};function ye(){for(var T=arguments.length-1;T>=0;T--)Q.cc.push(arguments[T])}function ie(){return ye.apply(null,arguments),!0}function je(T,$){for(var Pe=$;Pe;Pe=Pe.next)if(Pe.name==T)return!0;return!1}function ze(T){var $=Q.state;if(Q.marked="def",!!te){if($.context){if($.lexical.info=="var"&&$.context&&$.context.block){var Pe=Ue(T,$.context);if(Pe!=null){$.context=Pe;return}}else if(!je(T,$.localVars)){$.localVars=new ut(T,$.localVars);return}}k.globalVars&&!je(T,$.globalVars)&&($.globalVars=new ut(T,$.globalVars))}}function Ue(T,$){if($)if($.block){var Pe=Ue(T,$.prev);return Pe?Pe==$.prev?$:new pt(Pe,$.vars,!0):null}else return je(T,$.vars)?$:new pt($.prev,new ut(T,$.vars),!1);else return null}function vt(T){return T=="public"||T=="private"||T=="protected"||T=="abstract"||T=="readonly"}function pt(T,$,Pe){this.prev=T,this.vars=$,this.block=Pe}function ut(T,$){this.name=T,this.next=$}var er=new ut("this",new ut("arguments",null));function gt(){Q.state.context=new pt(Q.state.context,Q.state.localVars,!1),Q.state.localVars=er}function Rt(){Q.state.context=new pt(Q.state.context,Q.state.localVars,!0),Q.state.localVars=null}gt.lex=Rt.lex=!0;function st(){Q.state.localVars=Q.state.context.vars,Q.state.context=Q.state.context.prev}st.lex=!0;function He(T,$){var Pe=function(){var Fe=Q.state,it=Fe.indented;if(Fe.lexical.type=="stat")it=Fe.lexical.indented;else for(var wt=Fe.lexical;wt&&wt.type==")"&&wt.align;wt=wt.prev)it=wt.indented;Fe.lexical=new q(it,Q.stream.column(),T,null,Fe.lexical,$)};return Pe.lex=!0,Pe}function Re(){var T=Q.state;T.lexical.prev&&(T.lexical.type==")"&&(T.indented=T.lexical.indented),T.lexical=T.lexical.prev)}Re.lex=!0;function Be(T){function $(Pe){return Pe==T?ie():T==";"||Pe=="}"||Pe==")"||Pe=="]"?ye():ie($)}return $}function lt(T,$){return T=="var"?ie(He("vardef",$),gi,Be(";"),Re):T=="keyword a"?ie(He("form"),tr,lt,Re):T=="keyword b"?ie(He("form"),lt,Re):T=="keyword d"?Q.stream.match(/^\s*$/,!1)?ie():ie(He("stat"),kr,Be(";"),Re):T=="debugger"?ie(Be(";")):T=="{"?ie(He("}"),Rt,ft,Re,st):T==";"?ie():T=="if"?(Q.state.lexical.info=="else"&&Q.state.cc[Q.state.cc.length-1]==Re&&Q.state.cc.pop()(),ie(He("form"),tr,lt,Re,Wn)):T=="function"?ie(Jr):T=="for"?ie(He("form"),Rt,Ii,lt,st,Re):T=="class"||re&&$=="interface"?(Q.marked="keyword",ie(He("form",T=="class"?T:$),Hn,Re)):T=="variable"?re&&$=="declare"?(Q.marked="keyword",ie(lt)):re&&($=="module"||$=="enum"||$=="type")&&Q.stream.match(/^\s*\w/,!1)?(Q.marked="keyword",$=="enum"?ie(It):$=="type"?ie(on,Be("operator"),Ve,Be(";")):ie(He("form"),$r,Be("{"),He("}"),ft,Re,Re)):re&&$=="namespace"?(Q.marked="keyword",ie(He("form"),rt,lt,Re)):re&&$=="abstract"?(Q.marked="keyword",ie(lt)):ie(He("stat"),ri):T=="switch"?ie(He("form"),tr,Be("{"),He("}","switch"),Rt,ft,Re,Re,st):T=="case"?ie(rt,Be(":")):T=="default"?ie(Be(":")):T=="catch"?ie(He("form"),gt,_t,lt,Re,st):T=="export"?ie(He("stat"),An,Re):T=="import"?ie(He("stat"),Vo,Re):T=="async"?ie(lt):$=="@"?ie(rt,lt):ye(He("stat"),rt,Be(";"),Re)}function _t(T){if(T=="(")return ie(sn,Be(")"))}function rt(T,$){return or(T,$,!1)}function Pt(T,$){return or(T,$,!0)}function tr(T){return T!="("?ye():ie(He(")"),kr,Be(")"),Re)}function or(T,$,Pe){if(Q.state.fatArrowAt==Q.stream.start){var Fe=Pe?Bn:zt;if(T=="(")return ie(gt,He(")"),Gt(sn,")"),Re,Be("=>"),Fe,st);if(T=="variable")return ye(gt,$r,Be("=>"),Fe,st)}var it=Pe?Et:et;return z.hasOwnProperty(T)?ie(it):T=="function"?ie(Jr,it):T=="class"||re&&$=="interface"?(Q.marked="keyword",ie(He("form"),fo,Re)):T=="keyword c"||T=="async"?ie(Pe?Pt:rt):T=="("?ie(He(")"),kr,Be(")"),Re,it):T=="operator"||T=="spread"?ie(Pe?Pt:rt):T=="["?ie(He("]"),On,Re,it):T=="{"?St(an,"}",null,it):T=="quasi"?ye(jt,it):T=="new"?ie(Vn(Pe)):ie()}function kr(T){return T.match(/[;\}\)\],]/)?ye():ye(rt)}function et(T,$){return T==","?ie(kr):Et(T,$,!1)}function Et(T,$,Pe){var Fe=Pe==!1?et:Et,it=Pe==!1?rt:Pt;if(T=="=>")return ie(gt,Pe?Bn:zt,st);if(T=="operator")return/\+\+|--/.test($)||re&&$=="!"?ie(Fe):re&&$=="<"&&Q.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?ie(He(">"),Gt(Ve,">"),Re,Fe):$=="?"?ie(rt,Be(":"),it):ie(it);if(T=="quasi")return ye(jt,Fe);if(T!=";"){if(T=="(")return St(Pt,")","call",Fe);if(T==".")return ie(jn,Fe);if(T=="[")return ie(He("]"),kr,Be("]"),Re,Fe);if(re&&$=="as")return Q.marked="keyword",ie(Ve,Fe);if(T=="regexp")return Q.state.lastType=Q.marked="operator",Q.stream.backUp(Q.stream.pos-Q.stream.start-1),ie(it)}}function jt(T,$){return T!="quasi"?ye():$.slice($.length-2)!="${"?ie(jt):ie(kr,_r)}function _r(T){if(T=="}")return Q.marked="string-2",Q.state.tokenize=ae,ie(jt)}function zt(T){return le(Q.stream,Q.state),ye(T=="{"?lt:rt)}function Bn(T){return le(Q.stream,Q.state),ye(T=="{"?lt:Pt)}function Vn(T){return function($){return $=="."?ie(T?Cn:nn):$=="variable"&&re?ie(vi,T?Et:et):ye(T?Pt:rt)}}function nn(T,$){if($=="target")return Q.marked="keyword",ie(et)}function Cn(T,$){if($=="target")return Q.marked="keyword",ie(Et)}function ri(T){return T==":"?ie(Re,lt):ye(et,Be(";"),Re)}function jn(T){if(T=="variable")return Q.marked="property",ie()}function an(T,$){if(T=="async")return Q.marked="property",ie(an);if(T=="variable"||Q.style=="keyword"){if(Q.marked="property",$=="get"||$=="set")return ie(Mr);var Pe;return re&&Q.state.fatArrowAt==Q.stream.start&&(Pe=Q.stream.match(/^\s*:\s*/,!1))&&(Q.state.fatArrowAt=Q.stream.pos+Pe[0].length),ie(zr)}else{if(T=="number"||T=="string")return Q.marked=V?"property":Q.style+" property",ie(zr);if(T=="jsonld-keyword")return ie(zr);if(re&&vt($))return Q.marked="keyword",ie(an);if(T=="[")return ie(rt,tt,Be("]"),zr);if(T=="spread")return ie(Pt,zr);if($=="*")return Q.marked="keyword",ie(an);if(T==":")return ye(zr)}}function Mr(T){return T!="variable"?ye(zr):(Q.marked="property",ie(Jr))}function zr(T){if(T==":")return ie(Pt);if(T=="(")return ye(Jr)}function Gt(T,$,Pe){function Fe(it,wt){if(Pe?Pe.indexOf(it)>-1:it==","){var Lt=Q.state.lexical;return Lt.info=="call"&&(Lt.pos=(Lt.pos||0)+1),ie(function($e,En){return $e==$||En==$?ye():ye(T)},Fe)}return it==$||wt==$?ie():Pe&&Pe.indexOf(";")>-1?ye(T):ie(Be($))}return function(it,wt){return it==$||wt==$?ie():ye(T,Fe)}}function St(T,$,Pe){for(var Fe=3;Fe<arguments.length;Fe++)Q.cc.push(arguments[Fe]);return ie(He($,Pe),Gt(T,$),Re)}function ft(T){return T=="}"?ie():ye(lt,ft)}function tt(T,$){if(re){if(T==":")return ie(Ve);if($=="?")return ie(tt)}}function mt(T,$){if(re&&(T==":"||$=="in"))return ie(Ve)}function se(T){if(re&&T==":")return Q.stream.match(/^\s*\w+\s+is\b/,!1)?ie(rt,we,Ve):ie(Ve)}function we(T,$){if($=="is")return Q.marked="keyword",ie()}function Ve(T,$){if($=="keyof"||$=="typeof"||$=="infer"||$=="readonly")return Q.marked="keyword",ie($=="typeof"?Pt:Ve);if(T=="variable"||$=="void")return Q.marked="type",ie(dr);if($=="|"||$=="&")return ie(Ve);if(T=="string"||T=="number"||T=="atom")return ie(dr);if(T=="[")return ie(He("]"),Gt(Ve,"]",","),Re,dr);if(T=="{")return ie(He("}"),ht,Re,dr);if(T=="(")return ie(Gt(Ft,")"),nt,dr);if(T=="<")return ie(Gt(Ve,">"),Ve);if(T=="quasi")return ye(Qt,dr)}function nt(T){if(T=="=>")return ie(Ve)}function ht(T){return T.match(/[\}\)\]]/)?ie():T==","||T==";"?ie(ht):ye(ct,ht)}function ct(T,$){if(T=="variable"||Q.style=="keyword")return Q.marked="property",ie(ct);if($=="?"||T=="number"||T=="string")return ie(ct);if(T==":")return ie(Ve);if(T=="[")return ie(Be("variable"),mt,Be("]"),ct);if(T=="(")return ye(vn,ct);if(!T.match(/[;\}\)\],]/))return ie()}function Qt(T,$){return T!="quasi"?ye():$.slice($.length-2)!="${"?ie(Qt):ie(Ve,Gr)}function Gr(T){if(T=="}")return Q.marked="string-2",Q.state.tokenize=ae,ie(Qt)}function Ft(T,$){return T=="variable"&&Q.stream.match(/^\s*[?:]/,!1)||$=="?"?ie(Ft):T==":"?ie(Ve):T=="spread"?ie(Ft):ye(Ve)}function dr(T,$){if($=="<")return ie(He(">"),Gt(Ve,">"),Re,dr);if($=="|"||T=="."||$=="&")return ie(Ve);if(T=="[")return ie(Ve,Be("]"),dr);if($=="extends"||$=="implements")return Q.marked="keyword",ie(Ve);if($=="?")return ie(Ve,Be(":"),Ve)}function vi(T,$){if($=="<")return ie(He(">"),Gt(Ve,">"),Re,dr)}function Nr(){return ye(Ve,Rr)}function Rr(T,$){if($=="=")return ie(Ve)}function gi(T,$){return $=="enum"?(Q.marked="keyword",ie(It)):ye($r,tt,Dr,mi)}function $r(T,$){if(re&&vt($))return Q.marked="keyword",ie($r);if(T=="variable")return ze($),ie();if(T=="spread")return ie($r);if(T=="[")return St(ii,"]");if(T=="{")return St(ni,"}")}function ni(T,$){return T=="variable"&&!Q.stream.match(/^\s*:/,!1)?(ze($),ie(Dr)):(T=="variable"&&(Q.marked="property"),T=="spread"?ie($r):T=="}"?ye():T=="["?ie(rt,Be("]"),Be(":"),ni):ie(Be(":"),$r,Dr))}function ii(){return ye($r,Dr)}function Dr(T,$){if($=="=")return ie(Pt)}function mi(T){if(T==",")return ie(gi)}function Wn(T,$){if(T=="keyword b"&&$=="else")return ie(He("form","else"),lt,Re)}function Ii(T,$){if($=="await")return ie(Ii);if(T=="(")return ie(He(")"),Ta,Re)}function Ta(T){return T=="var"?ie(gi,hn):T=="variable"?ie(hn):ye(hn)}function hn(T,$){return T==")"?ie():T==";"?ie(hn):$=="in"||$=="of"?(Q.marked="keyword",ie(rt,hn)):ye(rt,hn)}function Jr(T,$){if($=="*")return Q.marked="keyword",ie(Jr);if(T=="variable")return ze($),ie(Jr);if(T=="(")return ie(gt,He(")"),Gt(sn,")"),Re,se,lt,st);if(re&&$=="<")return ie(He(">"),Gt(Nr,">"),Re,Jr)}function vn(T,$){if($=="*")return Q.marked="keyword",ie(vn);if(T=="variable")return ze($),ie(vn);if(T=="(")return ie(gt,He(")"),Gt(sn,")"),Re,se,st);if(re&&$=="<")return ie(He(">"),Gt(Nr,">"),Re,vn)}function on(T,$){if(T=="keyword"||T=="variable")return Q.marked="type",ie(on);if($=="<")return ie(He(">"),Gt(Nr,">"),Re)}function sn(T,$){return $=="@"&&ie(rt,sn),T=="spread"?ie(sn):re&&vt($)?(Q.marked="keyword",ie(sn)):re&&T=="this"?ie(tt,Dr):ye($r,tt,Dr)}function fo(T,$){return T=="variable"?Hn(T,$):Qr(T,$)}function Hn(T,$){if(T=="variable")return ze($),ie(Qr)}function Qr(T,$){if($=="<")return ie(He(">"),Gt(Nr,">"),Re,Qr);if($=="extends"||$=="implements"||re&&T==",")return $=="implements"&&(Q.marked="keyword"),ie(re?Ve:rt,Qr);if(T=="{")return ie(He("}"),pr,Re)}function pr(T,$){if(T=="async"||T=="variable"&&($=="static"||$=="get"||$=="set"||re&&vt($))&&Q.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return Q.marked="keyword",ie(pr);if(T=="variable"||Q.style=="keyword")return Q.marked="property",ie(ai,pr);if(T=="number"||T=="string")return ie(ai,pr);if(T=="[")return ie(rt,tt,Be("]"),ai,pr);if($=="*")return Q.marked="keyword",ie(pr);if(re&&T=="(")return ye(vn,pr);if(T==";"||T==",")return ie(pr);if(T=="}")return ie();if($=="@")return ie(rt,pr)}function ai(T,$){if($=="!"||$=="?")return ie(ai);if(T==":")return ie(Ve,Dr);if($=="=")return ie(Pt);var Pe=Q.state.lexical.prev,Fe=Pe&&Pe.info=="interface";return ye(Fe?vn:Jr)}function An(T,$){return $=="*"?(Q.marked="keyword",ie(Qi,Be(";"))):$=="default"?(Q.marked="keyword",ie(rt,Be(";"))):T=="{"?ie(Gt(ka,"}"),Qi,Be(";")):ye(lt)}function ka(T,$){if($=="as")return Q.marked="keyword",ie(Be("variable"));if(T=="variable")return ye(Pt,ka)}function Vo(T){return T=="string"?ie():T=="("?ye(rt):T=="."?ye(et):ye(Xt,Ge,Qi)}function Xt(T,$){return T=="{"?St(Xt,"}"):(T=="variable"&&ze($),$=="*"&&(Q.marked="keyword"),ie(yi))}function Ge(T){if(T==",")return ie(Xt,Ge)}function yi(T,$){if($=="as")return Q.marked="keyword",ie(Xt)}function Qi(T,$){if($=="from")return Q.marked="keyword",ie(rt)}function On(T){return T=="]"?ie():ye(Gt(Pt,"]"))}function It(){return ye(He("form"),$r,Be("{"),He("}"),Gt(bi,"}"),Re,Re)}function bi(){return ye($r,Dr)}function Zi(T,$){return T.lastType=="operator"||T.lastType==","||fe.test($.charAt(0))||/[,.]/.test($.charAt(0))}function Pa(T,$,Pe){return $.tokenize==M&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test($.lastType)||$.lastType=="quasi"&&/\{\s*$/.test(T.string.slice(0,T.pos-(Pe||0)))}return{startState:function(T){var $={tokenize:M,lastType:"sof",cc:[],lexical:new q((T||0)-L,0,"block",!1),localVars:k.localVars,context:k.localVars&&new pt(null,null,!1),indented:T||0};return k.globalVars&&typeof k.globalVars=="object"&&($.globalVars=k.globalVars),$},token:function(T,$){if(T.sol()&&($.lexical.hasOwnProperty("align")||($.lexical.align=!1),$.indented=T.indentation(),le(T,$)),$.tokenize!=Z&&T.eatSpace())return null;var Pe=$.tokenize(T,$);return ee=="comment"?Pe:($.lastType=ee=="operator"&&(D=="++"||D=="--")?"incdec":ee,xe($,Pe,ee,D,T))},indent:function(T,$){if(T.tokenize==Z||T.tokenize==ae)return m.Pass;if(T.tokenize!=M)return 0;var Pe=$&&$.charAt(0),Fe=T.lexical,it;if(!/^\s*else\b/.test($))for(var wt=T.cc.length-1;wt>=0;--wt){var Lt=T.cc[wt];if(Lt==Re)Fe=Fe.prev;else if(Lt!=Wn&&Lt!=st)break}for(;(Fe.type=="stat"||Fe.type=="form")&&(Pe=="}"||(it=T.cc[T.cc.length-1])&&(it==et||it==Et)&&!/^[,\.=+\-*:?[\(]/.test($));)Fe=Fe.prev;R&&Fe.type==")"&&Fe.prev.type=="stat"&&(Fe=Fe.prev);var $e=Fe.type,En=Pe==$e;return $e=="vardef"?Fe.indented+(T.lastType=="operator"||T.lastType==","?Fe.info.length+1:0):$e=="form"&&Pe=="{"?Fe.indented:$e=="form"?Fe.indented+L:$e=="stat"?Fe.indented+(Zi(T,$)?R||L:0):Fe.info=="switch"&&!En&&k.doubleIndentSwitch!=!1?Fe.indented+(/^(?:case|default)\b/.test($)?L:2*L):Fe.align?Fe.column+(En?0:1):Fe.indented+(En?0:L)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:X?null:"/*",blockCommentEnd:X?null:"*/",blockCommentContinue:X?null:" * ",lineComment:X?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:X?"json":"javascript",jsonldMode:V,jsonMode:X,expressionAllowed:Pa,skipExpression:function(T){xe(T,"atom","atom","true",new m.StringStream("",2,null))}}}),m.registerHelper("wordChars","javascript",/[\w$]/),m.defineMIME("text/javascript","javascript"),m.defineMIME("text/ecmascript","javascript"),m.defineMIME("application/javascript","javascript"),m.defineMIME("application/x-javascript","javascript"),m.defineMIME("application/ecmascript","javascript"),m.defineMIME("application/json",{name:"javascript",json:!0}),m.defineMIME("application/x-json",{name:"javascript",json:!0}),m.defineMIME("application/manifest+json",{name:"javascript",json:!0}),m.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),m.defineMIME("text/typescript",{name:"javascript",typescript:!0}),m.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},26179:(S,N)=>{"use strict";/*!
35
+ z-index: 1000; background: `+(D?"rgba(255, 255, 255, .05)":"transparent")+`;
36
+ outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ne;X&&(ne=u.ownerDocument.defaultView.scrollY),s.input.focus(),X&&u.ownerDocument.defaultView.scrollTo(null,ne),s.input.reset(),l.somethingSelected()||(u.value=n.prevInput=" "),n.contextMenuPending=de,s.selForContextMenu=l.doc.sel,clearTimeout(s.detectingSelectAll);function ve(){if(u.selectionStart!=null){var Ae=l.somethingSelected(),Ie="\u200B"+(Ae?u.value:"");u.value="\u21DA",u.value=Ie,n.prevInput=Ae?"":"\u200B",u.selectionStart=1,u.selectionEnd=Ie.length,s.selForContextMenu=l.doc.sel}}function de(){if(n.contextMenuPending==de&&(n.contextMenuPending=!1,n.wrapper.style.cssText=P,u.style.cssText=C,D&&j<9&&s.scrollbars.setScrollTop(s.scroller.scrollTop=y),u.selectionStart!=null)){(!D||D&&j<9)&&ve();var Ae=0,Ie=function(){s.selForContextMenu==l.doc.sel&&u.selectionStart==0&&u.selectionEnd>0&&n.prevInput=="\u200B"?br(l,Hi)(l):Ae++<10?s.detectingSelectAll=setTimeout(Ie,500):(s.selForContextMenu=null,s.input.reset())};s.detectingSelectAll=setTimeout(Ie,200)}}if(D&&j>=9&&ve(),le){Nr(t);var Ee=function(){Ve(window,"mouseup",Ee),setTimeout(de,20)};se(window,"mouseup",Ee)}else setTimeout(de,50)},lr.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled=t=="nocursor",this.textarea.readOnly=!!t},lr.prototype.setUneditable=function(){},lr.prototype.needsContentAttribute=!1;function od(t,n){if(n=n?Rt(n):{},n.value=t.value,!n.tabindex&&t.tabIndex&&(n.tabindex=t.tabIndex),!n.placeholder&&t.placeholder&&(n.placeholder=t.placeholder),n.autofocus==null){var l=ze(t.ownerDocument);n.autofocus=l==t||t.getAttribute("autofocus")!=null&&l==document.body}function s(){t.value=x.getValue()}var u;if(t.form&&(se(t.form,"submit",s),!n.leaveSubmitMethodAlone)){var p=t.form;u=p.submit;try{var y=p.submit=function(){s(),p.submit=u,p.submit(),p.submit=y}}catch{}}n.finishInit=function(C){C.save=s,C.getTextArea=function(){return t},C.toTextArea=function(){C.toTextArea=isNaN,s(),t.parentNode.removeChild(C.getWrapperElement()),t.style.display="",t.form&&(Ve(t.form,"submit",s),!n.leaveSubmitMethodAlone&&typeof t.form.submit=="function"&&(t.form.submit=u))}},t.style.display="none";var x=Zt(function(C){return t.parentNode.insertBefore(C,t.nextSibling)},n);return x}function sd(t){t.off=Ve,t.on=se,t.wheelEventPixels=Wc,t.Doc=Pr,t.splitLines=Wn,t.countColumn=st,t.findColumn=tr,t.isWordChar=Vn,t.Pass=lt,t.signal=nt,t.Line=ta,t.changeEnd=ji,t.scrollbarModel=Nu,t.Pos=T,t.cmpPos=$,t.modes=vn,t.mimeModes=on,t.resolveMode=Hn,t.getMode=Qr,t.modeExtensions=pr,t.extendMode=ai,t.copyState=An,t.startState=Vo,t.innerMode=ka,t.commands=Za,t.keyMap=Kn,t.keyName=_i,t.isModifierKey=pf,t.lookupKey=Qa,t.normalizeKeyMap=Zc,t.StringStream=Xt,t.SharedTextMarker=ma,t.TextMarker=fi,t.LineWidget=Oo,t.e_preventDefault=Ft,t.e_stopPropagation=dr,t.e_stop=Nr,t.addClass=Ue,t.contains=je,t.rmClass=q,t.keyNames=Ui}ed(Zt),rd(Zt);var ld="iter insert remove copy getEditor constructor".split(" ");for(var Ts in Pr.prototype)Pr.prototype.hasOwnProperty(Ts)&&Re(ld,Ts)<0&&(Zt.prototype[Ts]=function(t){return function(){return t.apply(this.doc,arguments)}}(Pr.prototype[Ts]));return Gr(Pr),Zt.inputStyles={textarea:lr,contenteditable:Ut},Zt.defineMode=function(t){!Zt.defaults.mode&&t!="null"&&(Zt.defaults.mode=t),sn.apply(this,arguments)},Zt.defineMIME=fo,Zt.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Zt.defineMIME("text/plain","null"),Zt.defineExtension=function(t,n){Zt.prototype[t]=n},Zt.defineDocExtension=function(t,n){Pr.prototype[t]=n},Zt.fromTextArea=od,sd(Zt),Zt.version="5.65.12",Zt})},13156:(S,R,c)=>{(function(m){m(c(46944))})(function(m){"use strict";m.defineMode("javascript",function(O,k){var L=O.indentUnit,D=k.statementIndent,j=k.jsonld,X=k.json||j,te=k.trackScope!==!1,re=k.typescript,he=k.wordCharacters||/[\w$\xa1-\uffff]/,oe=function(){function T($e){return{type:$e,style:"keyword"}}var $=T("keyword a"),Pe=T("keyword b"),Fe=T("keyword c"),it=T("keyword d"),wt=T("operator"),Lt={type:"atom",style:"atom"};return{if:T("if"),while:$,with:$,else:Pe,do:Pe,try:Pe,finally:Pe,return:it,break:it,continue:it,new:T("new"),delete:Fe,void:Fe,throw:Fe,debugger:T("debugger"),var:T("var"),const:T("var"),let:T("var"),function:T("function"),catch:T("catch"),for:T("for"),switch:T("switch"),case:T("case"),default:T("default"),in:wt,typeof:wt,instanceof:wt,true:Lt,false:Lt,null:Lt,undefined:Lt,NaN:Lt,Infinity:Lt,this:T("this"),class:T("class"),super:T("atom"),yield:Fe,export:T("export"),import:T("import"),extends:Fe,await:Fe}}(),fe=/[+\-*&%=<>!?|~^@]/,J=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function F(T){for(var $=!1,Pe,Fe=!1;(Pe=T.next())!=null;){if(!$){if(Pe=="/"&&!Fe)return;Pe=="["?Fe=!0:Fe&&Pe=="]"&&(Fe=!1)}$=!$&&Pe=="\\"}}var ee,N;function w(T,$,Pe){return ee=T,N=Pe,$}function M(T,$){var Pe=T.next();if(Pe=='"'||Pe=="'")return $.tokenize=B(Pe),$.tokenize(T,$);if(Pe=="."&&T.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return w("number","number");if(Pe=="."&&T.match(".."))return w("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(Pe))return w(Pe);if(Pe=="="&&T.eat(">"))return w("=>","operator");if(Pe=="0"&&T.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return w("number","number");if(/\d/.test(Pe))return T.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),w("number","number");if(Pe=="/")return T.eat("*")?($.tokenize=Z,Z(T,$)):T.eat("/")?(T.skipToEnd(),w("comment","comment")):Pa(T,$,1)?(F(T),T.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),w("regexp","string-2")):(T.eat("="),w("operator","operator",T.current()));if(Pe=="`")return $.tokenize=ae,ae(T,$);if(Pe=="#"&&T.peek()=="!")return T.skipToEnd(),w("meta","meta");if(Pe=="#"&&T.eatWhile(he))return w("variable","property");if(Pe=="<"&&T.match("!--")||Pe=="-"&&T.match("->")&&!/\S/.test(T.string.slice(0,T.start)))return T.skipToEnd(),w("comment","comment");if(fe.test(Pe))return(Pe!=">"||!$.lexical||$.lexical.type!=">")&&(T.eat("=")?(Pe=="!"||Pe=="=")&&T.eat("="):/[<>*+\-|&?]/.test(Pe)&&(T.eat(Pe),Pe==">"&&T.eat(Pe))),Pe=="?"&&T.eat(".")?w("."):w("operator","operator",T.current());if(he.test(Pe)){T.eatWhile(he);var Fe=T.current();if($.lastType!="."){if(oe.propertyIsEnumerable(Fe)){var it=oe[Fe];return w(it.type,it.style,Fe)}if(Fe=="async"&&T.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return w("async","keyword",Fe)}return w("variable","variable",Fe)}}function B(T){return function($,Pe){var Fe=!1,it;if(j&&$.peek()=="@"&&$.match(J))return Pe.tokenize=M,w("jsonld-keyword","meta");for(;(it=$.next())!=null&&!(it==T&&!Fe);)Fe=!Fe&&it=="\\";return Fe||(Pe.tokenize=M),w("string","string")}}function Z(T,$){for(var Pe=!1,Fe;Fe=T.next();){if(Fe=="/"&&Pe){$.tokenize=M;break}Pe=Fe=="*"}return w("comment","comment")}function ae(T,$){for(var Pe=!1,Fe;(Fe=T.next())!=null;){if(!Pe&&(Fe=="`"||Fe=="$"&&T.eat("{"))){$.tokenize=M;break}Pe=!Pe&&Fe=="\\"}return w("quasi","string-2",T.current())}var H="([{}])";function le(T,$){$.fatArrowAt&&($.fatArrowAt=null);var Pe=T.string.indexOf("=>",T.start);if(!(Pe<0)){if(re){var Fe=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(T.string.slice(T.start,Pe));Fe&&(Pe=Fe.index)}for(var it=0,wt=!1,Lt=Pe-1;Lt>=0;--Lt){var $e=T.string.charAt(Lt),En=H.indexOf($e);if(En>=0&&En<3){if(!it){++Lt;break}if(--it==0){$e=="("&&(wt=!0);break}}else if(En>=3&&En<6)++it;else if(he.test($e))wt=!0;else if(/["'\/`]/.test($e))for(;;--Lt){if(Lt==0)return;var co=T.string.charAt(Lt-1);if(co==$e&&T.string.charAt(Lt-2)!="\\"){Lt--;break}}else if(wt&&!it){++Lt;break}}wt&&!it&&($.fatArrowAt=Lt)}}var z={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function q(T,$,Pe,Fe,it,wt){this.indented=T,this.column=$,this.type=Pe,this.prev=it,this.info=wt,Fe!=null&&(this.align=Fe)}function pe(T,$){if(!te)return!1;for(var Pe=T.localVars;Pe;Pe=Pe.next)if(Pe.name==$)return!0;for(var Fe=T.context;Fe;Fe=Fe.prev)for(var Pe=Fe.vars;Pe;Pe=Pe.next)if(Pe.name==$)return!0}function xe(T,$,Pe,Fe,it){var wt=T.cc;for(Q.state=T,Q.stream=it,Q.marked=null,Q.cc=wt,Q.style=$,T.lexical.hasOwnProperty("align")||(T.lexical.align=!0);;){var Lt=wt.length?wt.pop():X?rt:lt;if(Lt(Pe,Fe)){for(;wt.length&&wt[wt.length-1].lex;)wt.pop()();return Q.marked?Q.marked:Pe=="variable"&&pe(T,Fe)?"variable-2":$}}}var Q={state:null,column:null,marked:null,cc:null};function ye(){for(var T=arguments.length-1;T>=0;T--)Q.cc.push(arguments[T])}function ie(){return ye.apply(null,arguments),!0}function je(T,$){for(var Pe=$;Pe;Pe=Pe.next)if(Pe.name==T)return!0;return!1}function ze(T){var $=Q.state;if(Q.marked="def",!!te){if($.context){if($.lexical.info=="var"&&$.context&&$.context.block){var Pe=Ue(T,$.context);if(Pe!=null){$.context=Pe;return}}else if(!je(T,$.localVars)){$.localVars=new ut(T,$.localVars);return}}k.globalVars&&!je(T,$.globalVars)&&($.globalVars=new ut(T,$.globalVars))}}function Ue(T,$){if($)if($.block){var Pe=Ue(T,$.prev);return Pe?Pe==$.prev?$:new pt(Pe,$.vars,!0):null}else return je(T,$.vars)?$:new pt($.prev,new ut(T,$.vars),!1);else return null}function vt(T){return T=="public"||T=="private"||T=="protected"||T=="abstract"||T=="readonly"}function pt(T,$,Pe){this.prev=T,this.vars=$,this.block=Pe}function ut(T,$){this.name=T,this.next=$}var er=new ut("this",new ut("arguments",null));function gt(){Q.state.context=new pt(Q.state.context,Q.state.localVars,!1),Q.state.localVars=er}function Rt(){Q.state.context=new pt(Q.state.context,Q.state.localVars,!0),Q.state.localVars=null}gt.lex=Rt.lex=!0;function st(){Q.state.localVars=Q.state.context.vars,Q.state.context=Q.state.context.prev}st.lex=!0;function He(T,$){var Pe=function(){var Fe=Q.state,it=Fe.indented;if(Fe.lexical.type=="stat")it=Fe.lexical.indented;else for(var wt=Fe.lexical;wt&&wt.type==")"&&wt.align;wt=wt.prev)it=wt.indented;Fe.lexical=new q(it,Q.stream.column(),T,null,Fe.lexical,$)};return Pe.lex=!0,Pe}function Re(){var T=Q.state;T.lexical.prev&&(T.lexical.type==")"&&(T.indented=T.lexical.indented),T.lexical=T.lexical.prev)}Re.lex=!0;function Be(T){function $(Pe){return Pe==T?ie():T==";"||Pe=="}"||Pe==")"||Pe=="]"?ye():ie($)}return $}function lt(T,$){return T=="var"?ie(He("vardef",$),gi,Be(";"),Re):T=="keyword a"?ie(He("form"),tr,lt,Re):T=="keyword b"?ie(He("form"),lt,Re):T=="keyword d"?Q.stream.match(/^\s*$/,!1)?ie():ie(He("stat"),kr,Be(";"),Re):T=="debugger"?ie(Be(";")):T=="{"?ie(He("}"),Rt,ft,Re,st):T==";"?ie():T=="if"?(Q.state.lexical.info=="else"&&Q.state.cc[Q.state.cc.length-1]==Re&&Q.state.cc.pop()(),ie(He("form"),tr,lt,Re,Wn)):T=="function"?ie(Jr):T=="for"?ie(He("form"),Rt,Ii,lt,st,Re):T=="class"||re&&$=="interface"?(Q.marked="keyword",ie(He("form",T=="class"?T:$),Hn,Re)):T=="variable"?re&&$=="declare"?(Q.marked="keyword",ie(lt)):re&&($=="module"||$=="enum"||$=="type")&&Q.stream.match(/^\s*\w/,!1)?(Q.marked="keyword",$=="enum"?ie(It):$=="type"?ie(on,Be("operator"),Ve,Be(";")):ie(He("form"),$r,Be("{"),He("}"),ft,Re,Re)):re&&$=="namespace"?(Q.marked="keyword",ie(He("form"),rt,lt,Re)):re&&$=="abstract"?(Q.marked="keyword",ie(lt)):ie(He("stat"),ri):T=="switch"?ie(He("form"),tr,Be("{"),He("}","switch"),Rt,ft,Re,Re,st):T=="case"?ie(rt,Be(":")):T=="default"?ie(Be(":")):T=="catch"?ie(He("form"),gt,_t,lt,Re,st):T=="export"?ie(He("stat"),An,Re):T=="import"?ie(He("stat"),Vo,Re):T=="async"?ie(lt):$=="@"?ie(rt,lt):ye(He("stat"),rt,Be(";"),Re)}function _t(T){if(T=="(")return ie(sn,Be(")"))}function rt(T,$){return or(T,$,!1)}function Pt(T,$){return or(T,$,!0)}function tr(T){return T!="("?ye():ie(He(")"),kr,Be(")"),Re)}function or(T,$,Pe){if(Q.state.fatArrowAt==Q.stream.start){var Fe=Pe?Bn:zt;if(T=="(")return ie(gt,He(")"),Gt(sn,")"),Re,Be("=>"),Fe,st);if(T=="variable")return ye(gt,$r,Be("=>"),Fe,st)}var it=Pe?Et:et;return z.hasOwnProperty(T)?ie(it):T=="function"?ie(Jr,it):T=="class"||re&&$=="interface"?(Q.marked="keyword",ie(He("form"),fo,Re)):T=="keyword c"||T=="async"?ie(Pe?Pt:rt):T=="("?ie(He(")"),kr,Be(")"),Re,it):T=="operator"||T=="spread"?ie(Pe?Pt:rt):T=="["?ie(He("]"),On,Re,it):T=="{"?St(an,"}",null,it):T=="quasi"?ye(jt,it):T=="new"?ie(Vn(Pe)):ie()}function kr(T){return T.match(/[;\}\)\],]/)?ye():ye(rt)}function et(T,$){return T==","?ie(kr):Et(T,$,!1)}function Et(T,$,Pe){var Fe=Pe==!1?et:Et,it=Pe==!1?rt:Pt;if(T=="=>")return ie(gt,Pe?Bn:zt,st);if(T=="operator")return/\+\+|--/.test($)||re&&$=="!"?ie(Fe):re&&$=="<"&&Q.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?ie(He(">"),Gt(Ve,">"),Re,Fe):$=="?"?ie(rt,Be(":"),it):ie(it);if(T=="quasi")return ye(jt,Fe);if(T!=";"){if(T=="(")return St(Pt,")","call",Fe);if(T==".")return ie(jn,Fe);if(T=="[")return ie(He("]"),kr,Be("]"),Re,Fe);if(re&&$=="as")return Q.marked="keyword",ie(Ve,Fe);if(T=="regexp")return Q.state.lastType=Q.marked="operator",Q.stream.backUp(Q.stream.pos-Q.stream.start-1),ie(it)}}function jt(T,$){return T!="quasi"?ye():$.slice($.length-2)!="${"?ie(jt):ie(kr,_r)}function _r(T){if(T=="}")return Q.marked="string-2",Q.state.tokenize=ae,ie(jt)}function zt(T){return le(Q.stream,Q.state),ye(T=="{"?lt:rt)}function Bn(T){return le(Q.stream,Q.state),ye(T=="{"?lt:Pt)}function Vn(T){return function($){return $=="."?ie(T?Cn:nn):$=="variable"&&re?ie(vi,T?Et:et):ye(T?Pt:rt)}}function nn(T,$){if($=="target")return Q.marked="keyword",ie(et)}function Cn(T,$){if($=="target")return Q.marked="keyword",ie(Et)}function ri(T){return T==":"?ie(Re,lt):ye(et,Be(";"),Re)}function jn(T){if(T=="variable")return Q.marked="property",ie()}function an(T,$){if(T=="async")return Q.marked="property",ie(an);if(T=="variable"||Q.style=="keyword"){if(Q.marked="property",$=="get"||$=="set")return ie(Mr);var Pe;return re&&Q.state.fatArrowAt==Q.stream.start&&(Pe=Q.stream.match(/^\s*:\s*/,!1))&&(Q.state.fatArrowAt=Q.stream.pos+Pe[0].length),ie(zr)}else{if(T=="number"||T=="string")return Q.marked=j?"property":Q.style+" property",ie(zr);if(T=="jsonld-keyword")return ie(zr);if(re&&vt($))return Q.marked="keyword",ie(an);if(T=="[")return ie(rt,tt,Be("]"),zr);if(T=="spread")return ie(Pt,zr);if($=="*")return Q.marked="keyword",ie(an);if(T==":")return ye(zr)}}function Mr(T){return T!="variable"?ye(zr):(Q.marked="property",ie(Jr))}function zr(T){if(T==":")return ie(Pt);if(T=="(")return ye(Jr)}function Gt(T,$,Pe){function Fe(it,wt){if(Pe?Pe.indexOf(it)>-1:it==","){var Lt=Q.state.lexical;return Lt.info=="call"&&(Lt.pos=(Lt.pos||0)+1),ie(function($e,En){return $e==$||En==$?ye():ye(T)},Fe)}return it==$||wt==$?ie():Pe&&Pe.indexOf(";")>-1?ye(T):ie(Be($))}return function(it,wt){return it==$||wt==$?ie():ye(T,Fe)}}function St(T,$,Pe){for(var Fe=3;Fe<arguments.length;Fe++)Q.cc.push(arguments[Fe]);return ie(He($,Pe),Gt(T,$),Re)}function ft(T){return T=="}"?ie():ye(lt,ft)}function tt(T,$){if(re){if(T==":")return ie(Ve);if($=="?")return ie(tt)}}function mt(T,$){if(re&&(T==":"||$=="in"))return ie(Ve)}function se(T){if(re&&T==":")return Q.stream.match(/^\s*\w+\s+is\b/,!1)?ie(rt,we,Ve):ie(Ve)}function we(T,$){if($=="is")return Q.marked="keyword",ie()}function Ve(T,$){if($=="keyof"||$=="typeof"||$=="infer"||$=="readonly")return Q.marked="keyword",ie($=="typeof"?Pt:Ve);if(T=="variable"||$=="void")return Q.marked="type",ie(dr);if($=="|"||$=="&")return ie(Ve);if(T=="string"||T=="number"||T=="atom")return ie(dr);if(T=="[")return ie(He("]"),Gt(Ve,"]",","),Re,dr);if(T=="{")return ie(He("}"),ht,Re,dr);if(T=="(")return ie(Gt(Ft,")"),nt,dr);if(T=="<")return ie(Gt(Ve,">"),Ve);if(T=="quasi")return ye(Qt,dr)}function nt(T){if(T=="=>")return ie(Ve)}function ht(T){return T.match(/[\}\)\]]/)?ie():T==","||T==";"?ie(ht):ye(ct,ht)}function ct(T,$){if(T=="variable"||Q.style=="keyword")return Q.marked="property",ie(ct);if($=="?"||T=="number"||T=="string")return ie(ct);if(T==":")return ie(Ve);if(T=="[")return ie(Be("variable"),mt,Be("]"),ct);if(T=="(")return ye(vn,ct);if(!T.match(/[;\}\)\],]/))return ie()}function Qt(T,$){return T!="quasi"?ye():$.slice($.length-2)!="${"?ie(Qt):ie(Ve,Gr)}function Gr(T){if(T=="}")return Q.marked="string-2",Q.state.tokenize=ae,ie(Qt)}function Ft(T,$){return T=="variable"&&Q.stream.match(/^\s*[?:]/,!1)||$=="?"?ie(Ft):T==":"?ie(Ve):T=="spread"?ie(Ft):ye(Ve)}function dr(T,$){if($=="<")return ie(He(">"),Gt(Ve,">"),Re,dr);if($=="|"||T=="."||$=="&")return ie(Ve);if(T=="[")return ie(Ve,Be("]"),dr);if($=="extends"||$=="implements")return Q.marked="keyword",ie(Ve);if($=="?")return ie(Ve,Be(":"),Ve)}function vi(T,$){if($=="<")return ie(He(">"),Gt(Ve,">"),Re,dr)}function Nr(){return ye(Ve,Rr)}function Rr(T,$){if($=="=")return ie(Ve)}function gi(T,$){return $=="enum"?(Q.marked="keyword",ie(It)):ye($r,tt,Dr,mi)}function $r(T,$){if(re&&vt($))return Q.marked="keyword",ie($r);if(T=="variable")return ze($),ie();if(T=="spread")return ie($r);if(T=="[")return St(ii,"]");if(T=="{")return St(ni,"}")}function ni(T,$){return T=="variable"&&!Q.stream.match(/^\s*:/,!1)?(ze($),ie(Dr)):(T=="variable"&&(Q.marked="property"),T=="spread"?ie($r):T=="}"?ye():T=="["?ie(rt,Be("]"),Be(":"),ni):ie(Be(":"),$r,Dr))}function ii(){return ye($r,Dr)}function Dr(T,$){if($=="=")return ie(Pt)}function mi(T){if(T==",")return ie(gi)}function Wn(T,$){if(T=="keyword b"&&$=="else")return ie(He("form","else"),lt,Re)}function Ii(T,$){if($=="await")return ie(Ii);if(T=="(")return ie(He(")"),Ta,Re)}function Ta(T){return T=="var"?ie(gi,hn):T=="variable"?ie(hn):ye(hn)}function hn(T,$){return T==")"?ie():T==";"?ie(hn):$=="in"||$=="of"?(Q.marked="keyword",ie(rt,hn)):ye(rt,hn)}function Jr(T,$){if($=="*")return Q.marked="keyword",ie(Jr);if(T=="variable")return ze($),ie(Jr);if(T=="(")return ie(gt,He(")"),Gt(sn,")"),Re,se,lt,st);if(re&&$=="<")return ie(He(">"),Gt(Nr,">"),Re,Jr)}function vn(T,$){if($=="*")return Q.marked="keyword",ie(vn);if(T=="variable")return ze($),ie(vn);if(T=="(")return ie(gt,He(")"),Gt(sn,")"),Re,se,st);if(re&&$=="<")return ie(He(">"),Gt(Nr,">"),Re,vn)}function on(T,$){if(T=="keyword"||T=="variable")return Q.marked="type",ie(on);if($=="<")return ie(He(">"),Gt(Nr,">"),Re)}function sn(T,$){return $=="@"&&ie(rt,sn),T=="spread"?ie(sn):re&&vt($)?(Q.marked="keyword",ie(sn)):re&&T=="this"?ie(tt,Dr):ye($r,tt,Dr)}function fo(T,$){return T=="variable"?Hn(T,$):Qr(T,$)}function Hn(T,$){if(T=="variable")return ze($),ie(Qr)}function Qr(T,$){if($=="<")return ie(He(">"),Gt(Nr,">"),Re,Qr);if($=="extends"||$=="implements"||re&&T==",")return $=="implements"&&(Q.marked="keyword"),ie(re?Ve:rt,Qr);if(T=="{")return ie(He("}"),pr,Re)}function pr(T,$){if(T=="async"||T=="variable"&&($=="static"||$=="get"||$=="set"||re&&vt($))&&Q.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return Q.marked="keyword",ie(pr);if(T=="variable"||Q.style=="keyword")return Q.marked="property",ie(ai,pr);if(T=="number"||T=="string")return ie(ai,pr);if(T=="[")return ie(rt,tt,Be("]"),ai,pr);if($=="*")return Q.marked="keyword",ie(pr);if(re&&T=="(")return ye(vn,pr);if(T==";"||T==",")return ie(pr);if(T=="}")return ie();if($=="@")return ie(rt,pr)}function ai(T,$){if($=="!"||$=="?")return ie(ai);if(T==":")return ie(Ve,Dr);if($=="=")return ie(Pt);var Pe=Q.state.lexical.prev,Fe=Pe&&Pe.info=="interface";return ye(Fe?vn:Jr)}function An(T,$){return $=="*"?(Q.marked="keyword",ie(Qi,Be(";"))):$=="default"?(Q.marked="keyword",ie(rt,Be(";"))):T=="{"?ie(Gt(ka,"}"),Qi,Be(";")):ye(lt)}function ka(T,$){if($=="as")return Q.marked="keyword",ie(Be("variable"));if(T=="variable")return ye(Pt,ka)}function Vo(T){return T=="string"?ie():T=="("?ye(rt):T=="."?ye(et):ye(Xt,Ge,Qi)}function Xt(T,$){return T=="{"?St(Xt,"}"):(T=="variable"&&ze($),$=="*"&&(Q.marked="keyword"),ie(yi))}function Ge(T){if(T==",")return ie(Xt,Ge)}function yi(T,$){if($=="as")return Q.marked="keyword",ie(Xt)}function Qi(T,$){if($=="from")return Q.marked="keyword",ie(rt)}function On(T){return T=="]"?ie():ye(Gt(Pt,"]"))}function It(){return ye(He("form"),$r,Be("{"),He("}"),Gt(bi,"}"),Re,Re)}function bi(){return ye($r,Dr)}function Zi(T,$){return T.lastType=="operator"||T.lastType==","||fe.test($.charAt(0))||/[,.]/.test($.charAt(0))}function Pa(T,$,Pe){return $.tokenize==M&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test($.lastType)||$.lastType=="quasi"&&/\{\s*$/.test(T.string.slice(0,T.pos-(Pe||0)))}return{startState:function(T){var $={tokenize:M,lastType:"sof",cc:[],lexical:new q((T||0)-L,0,"block",!1),localVars:k.localVars,context:k.localVars&&new pt(null,null,!1),indented:T||0};return k.globalVars&&typeof k.globalVars=="object"&&($.globalVars=k.globalVars),$},token:function(T,$){if(T.sol()&&($.lexical.hasOwnProperty("align")||($.lexical.align=!1),$.indented=T.indentation(),le(T,$)),$.tokenize!=Z&&T.eatSpace())return null;var Pe=$.tokenize(T,$);return ee=="comment"?Pe:($.lastType=ee=="operator"&&(N=="++"||N=="--")?"incdec":ee,xe($,Pe,ee,N,T))},indent:function(T,$){if(T.tokenize==Z||T.tokenize==ae)return m.Pass;if(T.tokenize!=M)return 0;var Pe=$&&$.charAt(0),Fe=T.lexical,it;if(!/^\s*else\b/.test($))for(var wt=T.cc.length-1;wt>=0;--wt){var Lt=T.cc[wt];if(Lt==Re)Fe=Fe.prev;else if(Lt!=Wn&&Lt!=st)break}for(;(Fe.type=="stat"||Fe.type=="form")&&(Pe=="}"||(it=T.cc[T.cc.length-1])&&(it==et||it==Et)&&!/^[,\.=+\-*:?[\(]/.test($));)Fe=Fe.prev;D&&Fe.type==")"&&Fe.prev.type=="stat"&&(Fe=Fe.prev);var $e=Fe.type,En=Pe==$e;return $e=="vardef"?Fe.indented+(T.lastType=="operator"||T.lastType==","?Fe.info.length+1:0):$e=="form"&&Pe=="{"?Fe.indented:$e=="form"?Fe.indented+L:$e=="stat"?Fe.indented+(Zi(T,$)?D||L:0):Fe.info=="switch"&&!En&&k.doubleIndentSwitch!=!1?Fe.indented+(/^(?:case|default)\b/.test($)?L:2*L):Fe.align?Fe.column+(En?0:1):Fe.indented+(En?0:L)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:X?null:"/*",blockCommentEnd:X?null:"*/",blockCommentContinue:X?null:" * ",lineComment:X?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:X?"json":"javascript",jsonldMode:j,jsonMode:X,expressionAllowed:Pa,skipExpression:function(T){xe(T,"atom","atom","true",new m.StringStream("",2,null))}}}),m.registerHelper("wordChars","javascript",/[\w$]/),m.defineMIME("text/javascript","javascript"),m.defineMIME("text/ecmascript","javascript"),m.defineMIME("application/javascript","javascript"),m.defineMIME("application/x-javascript","javascript"),m.defineMIME("application/ecmascript","javascript"),m.defineMIME("application/json",{name:"javascript",json:!0}),m.defineMIME("application/x-json",{name:"javascript",json:!0}),m.defineMIME("application/manifest+json",{name:"javascript",json:!0}),m.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),m.defineMIME("text/typescript",{name:"javascript",typescript:!0}),m.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},26179:(S,R)=>{"use strict";/*!
37
37
  * cookie
38
38
  * Copyright(c) 2012-2014 Roman Shtylman
39
39
  * Copyright(c) 2015 Douglas Christopher Wilson
40
40
  * MIT Licensed
41
- */N.parse=O,N.serialize=k;var c=Object.prototype.toString,m=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function O(te,re){if(typeof te!="string")throw new TypeError("argument str must be a string");for(var he={},oe=re||{},fe=oe.decode||L,J=0;J<te.length;){var F=te.indexOf("=",J);if(F===-1)break;var ee=te.indexOf(";",J);if(ee===-1)ee=te.length;else if(ee<F){J=te.lastIndexOf(";",F-1)+1;continue}var D=te.slice(J,F).trim();if(he[D]===void 0){var w=te.slice(F+1,ee).trim();w.charCodeAt(0)===34&&(w=w.slice(1,-1)),he[D]=X(w,fe)}J=ee+1}return he}function k(te,re,he){var oe=he||{},fe=oe.encode||R;if(typeof fe!="function")throw new TypeError("option encode is invalid");if(!m.test(te))throw new TypeError("argument name is invalid");var J=fe(re);if(J&&!m.test(J))throw new TypeError("argument val is invalid");var F=te+"="+J;if(oe.maxAge!=null){var ee=oe.maxAge-0;if(isNaN(ee)||!isFinite(ee))throw new TypeError("option maxAge is invalid");F+="; Max-Age="+Math.floor(ee)}if(oe.domain){if(!m.test(oe.domain))throw new TypeError("option domain is invalid");F+="; Domain="+oe.domain}if(oe.path){if(!m.test(oe.path))throw new TypeError("option path is invalid");F+="; Path="+oe.path}if(oe.expires){var D=oe.expires;if(!V(D)||isNaN(D.valueOf()))throw new TypeError("option expires is invalid");F+="; Expires="+D.toUTCString()}if(oe.httpOnly&&(F+="; HttpOnly"),oe.secure&&(F+="; Secure"),oe.priority){var w=typeof oe.priority=="string"?oe.priority.toLowerCase():oe.priority;switch(w){case"low":F+="; Priority=Low";break;case"medium":F+="; Priority=Medium";break;case"high":F+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(oe.sameSite){var M=typeof oe.sameSite=="string"?oe.sameSite.toLowerCase():oe.sameSite;switch(M){case!0:F+="; SameSite=Strict";break;case"lax":F+="; SameSite=Lax";break;case"strict":F+="; SameSite=Strict";break;case"none":F+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return F}function L(te){return te.indexOf("%")!==-1?decodeURIComponent(te):te}function R(te){return encodeURIComponent(te)}function V(te){return c.call(te)==="[object Date]"||te instanceof Date}function X(te,re){try{return re(te)}catch(he){return te}}},97529:(S,N,c)=>{var m=c(44928);S.exports=m},75342:(S,N,c)=>{var m=c(26087);S.exports=m},64218:(S,N,c)=>{var m=c(11783);S.exports=m},95050:(S,N,c)=>{var m=c(88462);S.exports=m},84779:(S,N,c)=>{var m=c(83531);S.exports=m},17190:(S,N,c)=>{var m=c(19941);S.exports=m},96589:(S,N,c)=>{var m=c(25081);S.exports=m},32276:(S,N,c)=>{var m=c(22145);S.exports=m},15064:(S,N,c)=>{var m=c(93690);S.exports=m},31986:(S,N,c)=>{var m=c(8429);c(42319),S.exports=m},69635:(S,N,c)=>{var m=c(13099);S.exports=m},3529:(S,N,c)=>{var m=c(44931);S.exports=m},85373:(S,N,c)=>{c(17802);var m=c(70291);S.exports=m("Array").filter},94537:(S,N,c)=>{c(64009);var m=c(70291);S.exports=m("Array").forEach},27794:(S,N,c)=>{c(32449);var m=c(70291);S.exports=m("Array").indexOf},55794:(S,N,c)=>{var m=c(15166),O=c(85373),k=Array.prototype;S.exports=function(L){var R=L.filter;return L===k||m(k,L)&&R===k.filter?O:R}},85838:(S,N,c)=>{var m=c(15166),O=c(27794),k=Array.prototype;S.exports=function(L){var R=L.indexOf;return L===k||m(k,L)&&R===k.indexOf?O:R}},95617:(S,N,c)=>{c(28135);var m=c(59921),O=m.Object,k=S.exports=function(R,V){return O.defineProperties(R,V)};O.defineProperties.sham&&(k.sham=!0)},11906:(S,N,c)=>{c(70829);var m=c(59921),O=m.Object,k=S.exports=function(R,V,X){return O.defineProperty(R,V,X)};O.defineProperty.sham&&(k.sham=!0)},59123:(S,N,c)=>{c(51964);var m=c(59921),O=m.Object,k=S.exports=function(R,V){return O.getOwnPropertyDescriptor(R,V)};O.getOwnPropertyDescriptor.sham&&(k.sham=!0)},63332:(S,N,c)=>{c(723);var m=c(59921);S.exports=m.Object.getOwnPropertyDescriptors},83606:(S,N,c)=>{c(68030);var m=c(59921);S.exports=m.Object.getOwnPropertySymbols},90660:(S,N,c)=>{c(38339);var m=c(59921);S.exports=m.Object.keys},49198:(S,N,c)=>{c(69825),c(97829),c(68030),c(95353),c(63906),c(39542),c(47882),c(84911),c(88725),c(47954),c(67703),c(2220),c(48990),c(50240),c(99921),c(3502),c(80220),c(23870),c(5828),c(5708);var m=c(59921);S.exports=m.Symbol},15413:(S,N,c)=>{c(44390),c(97829),c(27626),c(84911);var m=c(39378);S.exports=m.f("iterator")},4793:(S,N,c)=>{c(91667),c(99921);var m=c(39378);S.exports=m.f("toPrimitive")},24018:(S,N,c)=>{S.exports=c(11226)},27411:(S,N,c)=>{S.exports=c(39743)},79155:(S,N,c)=>{S.exports=c(17018)},13375:(S,N,c)=>{S.exports=c(45057)},95442:(S,N,c)=>{S.exports=c(97947)},55334:(S,N,c)=>{S.exports=c(26452)},48261:(S,N,c)=>{S.exports=c(4477)},92864:(S,N,c)=>{S.exports=c(74013)},27923:(S,N,c)=>{S.exports=c(17685)},89225:(S,N,c)=>{S.exports=c(2371)},95281:(S,N,c)=>{S.exports=c(89061)},55468:(S,N,c)=>{S.exports=c(51553)},11226:(S,N,c)=>{var m=c(97529);S.exports=m},39743:(S,N,c)=>{var m=c(75342);S.exports=m},17018:(S,N,c)=>{var m=c(64218);S.exports=m},45057:(S,N,c)=>{var m=c(95050);S.exports=m},97947:(S,N,c)=>{var m=c(84779);S.exports=m},26452:(S,N,c)=>{var m=c(17190);S.exports=m},4477:(S,N,c)=>{var m=c(96589);S.exports=m},74013:(S,N,c)=>{var m=c(32276);S.exports=m},17685:(S,N,c)=>{var m=c(15064);S.exports=m},2371:(S,N,c)=>{var m=c(31986);c(45987),c(58052),c(90181),c(25129),c(90397),c(18097),c(82793),c(52100),c(20122),S.exports=m},89061:(S,N,c)=>{var m=c(69635);S.exports=m},51553:(S,N,c)=>{var m=c(3529);S.exports=m},81970:(S,N,c)=>{var m=c(43152),O=c(18342),k=TypeError;S.exports=function(L){if(m(L))return L;throw k(O(L)+" is not a function")}},72185:(S,N,c)=>{var m=c(43152),O=String,k=TypeError;S.exports=function(L){if(typeof L=="object"||m(L))return L;throw k("Can't set "+O(L)+" as a prototype")}},20844:S=>{S.exports=function(){}},35970:(S,N,c)=>{var m=c(92548),O=String,k=TypeError;S.exports=function(L){if(m(L))return L;throw k(O(L)+" is not an object")}},24782:(S,N,c)=>{"use strict";var m=c(93935).forEach,O=c(10454),k=O("forEach");S.exports=k?[].forEach:function(R){return m(this,R,arguments.length>1?arguments[1]:void 0)}},66322:(S,N,c)=>{var m=c(88966),O=c(13249),k=c(53387),L=function(R){return function(V,X,te){var re=m(V),he=k(re),oe=O(te,he),fe;if(R&&X!=X){for(;he>oe;)if(fe=re[oe++],fe!=fe)return!0}else for(;he>oe;oe++)if((R||oe in re)&&re[oe]===X)return R||oe||0;return!R&&-1}};S.exports={includes:L(!0),indexOf:L(!1)}},93935:(S,N,c)=>{var m=c(7416),O=c(90406),k=c(38622),L=c(53254),R=c(53387),V=c(69573),X=O([].push),te=function(re){var he=re==1,oe=re==2,fe=re==3,J=re==4,F=re==6,ee=re==7,D=re==5||F;return function(w,M,B,Z){for(var ae=L(w),H=k(ae),le=m(M,B),z=R(H),q=0,pe=Z||V,xe=he?pe(w,z):oe||ee?pe(w,0):void 0,Q,ye;z>q;q++)if((D||q in H)&&(Q=H[q],ye=le(Q,q,ae),re))if(he)xe[q]=ye;else if(ye)switch(re){case 3:return!0;case 5:return Q;case 6:return q;case 2:X(xe,Q)}else switch(re){case 4:return!1;case 7:X(xe,Q)}return F?-1:fe||J?J:xe}};S.exports={forEach:te(0),map:te(1),filter:te(2),some:te(3),every:te(4),find:te(5),findIndex:te(6),filterReject:te(7)}},36844:(S,N,c)=>{var m=c(31982),O=c(33538),k=c(32438),L=O("species");S.exports=function(R){return k>=51||!m(function(){var V=[],X=V.constructor={};return X[L]=function(){return{foo:1}},V[R](Boolean).foo!==1})}},10454:(S,N,c)=>{"use strict";var m=c(31982);S.exports=function(O,k){var L=[][O];return!!L&&m(function(){L.call(null,k||function(){return 1},1)})}},67932:(S,N,c)=>{var m=c(13249),O=c(53387),k=c(53437),L=Array,R=Math.max;S.exports=function(V,X,te){for(var re=O(V),he=m(X,re),oe=m(te===void 0?re:te,re),fe=L(R(oe-he,0)),J=0;he<oe;he++,J++)k(fe,J,V[he]);return fe.length=J,fe}},53160:(S,N,c)=>{var m=c(90406);S.exports=m([].slice)},76562:(S,N,c)=>{var m=c(93053),O=c(43455),k=c(92548),L=c(33538),R=L("species"),V=Array;S.exports=function(X){var te;return m(X)&&(te=X.constructor,O(te)&&(te===V||m(te.prototype))?te=void 0:k(te)&&(te=te[R],te===null&&(te=void 0))),te===void 0?V:te}},69573:(S,N,c)=>{var m=c(76562);S.exports=function(O,k){return new(m(O))(k===0?0:k)}},58310:(S,N,c)=>{var m=c(90406),O=m({}.toString),k=m("".slice);S.exports=function(L){return k(O(L),8,-1)}},82059:(S,N,c)=>{var m=c(48448),O=c(43152),k=c(58310),L=c(33538),R=L("toStringTag"),V=Object,X=k(function(){return arguments}())=="Arguments",te=function(re,he){try{return re[he]}catch(oe){}};S.exports=m?k:function(re){var he,oe,fe;return re===void 0?"Undefined":re===null?"Null":typeof(oe=te(he=V(re),R))=="string"?oe:X?k(he):(fe=k(he))=="Object"&&O(he.callee)?"Arguments":fe}},74838:(S,N,c)=>{var m=c(31982);S.exports=!m(function(){function O(){}return O.prototype.constructor=null,Object.getPrototypeOf(new O)!==O.prototype})},10248:S=>{S.exports=function(N,c){return{value:N,done:c}}},20410:(S,N,c)=>{var m=c(56049),O=c(36133),k=c(54686);S.exports=m?function(L,R,V){return O.f(L,R,k(1,V))}:function(L,R,V){return L[R]=V,L}},54686:S=>{S.exports=function(N,c){return{enumerable:!(N&1),configurable:!(N&2),writable:!(N&4),value:c}}},53437:(S,N,c)=>{"use strict";var m=c(5135),O=c(36133),k=c(54686);S.exports=function(L,R,V){var X=m(R);X in L?O.f(L,X,k(0,V)):L[X]=V}},37912:(S,N,c)=>{var m=c(36133);S.exports=function(O,k,L){return m.f(O,k,L)}},27519:(S,N,c)=>{var m=c(20410);S.exports=function(O,k,L,R){return R&&R.enumerable?O[k]=L:m(O,k,L),O}},9267:(S,N,c)=>{var m=c(62447),O=Object.defineProperty;S.exports=function(k,L){try{O(m,k,{value:L,configurable:!0,writable:!0})}catch(R){m[k]=L}return L}},56049:(S,N,c)=>{var m=c(31982);S.exports=!m(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},51647:S=>{var N=typeof document=="object"&&document.all,c=typeof N=="undefined"&&N!==void 0;S.exports={all:N,IS_HTMLDDA:c}},45511:(S,N,c)=>{var m=c(62447),O=c(92548),k=m.document,L=O(k)&&O(k.createElement);S.exports=function(R){return L?k.createElement(R):{}}},11452:S=>{var N=TypeError,c=9007199254740991;S.exports=function(m){if(m>c)throw N("Maximum allowed index exceeded");return m}},81595:S=>{S.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},90740:S=>{S.exports=typeof navigator!="undefined"&&String(navigator.userAgent)||""},32438:(S,N,c)=>{var m=c(62447),O=c(90740),k=m.process,L=m.Deno,R=k&&k.versions||L&&L.version,V=R&&R.v8,X,te;V&&(X=V.split("."),te=X[0]>0&&X[0]<4?1:+(X[0]+X[1])),!te&&O&&(X=O.match(/Edge\/(\d+)/),(!X||X[1]>=74)&&(X=O.match(/Chrome\/(\d+)/),X&&(te=+X[1]))),S.exports=te},70291:(S,N,c)=>{var m=c(59921);S.exports=function(O){return m[O+"Prototype"]}},11792:S=>{S.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},30080:(S,N,c)=>{"use strict";var m=c(62447),O=c(82768),k=c(57953),L=c(43152),R=c(80016).f,V=c(51585),X=c(59921),te=c(7416),re=c(20410),he=c(18768),oe=function(fe){var J=function(F,ee,D){if(this instanceof J){switch(arguments.length){case 0:return new fe;case 1:return new fe(F);case 2:return new fe(F,ee)}return new fe(F,ee,D)}return O(fe,this,arguments)};return J.prototype=fe.prototype,J};S.exports=function(fe,J){var F=fe.target,ee=fe.global,D=fe.stat,w=fe.proto,M=ee?m:D?m[F]:(m[F]||{}).prototype,B=ee?X:X[F]||re(X,F,{})[F],Z=B.prototype,ae,H,le,z,q,pe,xe,Q,ye;for(z in J)ae=V(ee?z:F+(D?".":"#")+z,fe.forced),H=!ae&&M&&he(M,z),pe=B[z],H&&(fe.dontCallGetSet?(ye=R(M,z),xe=ye&&ye.value):xe=M[z]),q=H&&xe?xe:J[z],!(H&&typeof pe==typeof q)&&(fe.bind&&H?Q=te(q,m):fe.wrap&&H?Q=oe(q):w&&L(q)?Q=k(q):Q=q,(fe.sham||q&&q.sham||pe&&pe.sham)&&re(Q,"sham",!0),re(B,z,Q),w&&(le=F+"Prototype",he(X,le)||re(X,le,{}),re(X[le],z,q),fe.real&&Z&&(ae||!Z[z])&&re(Z,z,q)))}},31982:S=>{S.exports=function(N){try{return!!N()}catch(c){return!0}}},82768:(S,N,c)=>{var m=c(97966),O=Function.prototype,k=O.apply,L=O.call;S.exports=typeof Reflect=="object"&&Reflect.apply||(m?L.bind(k):function(){return L.apply(k,arguments)})},7416:(S,N,c)=>{var m=c(57953),O=c(81970),k=c(97966),L=m(m.bind);S.exports=function(R,V){return O(R),V===void 0?R:k?L(R,V):function(){return R.apply(V,arguments)}}},97966:(S,N,c)=>{var m=c(31982);S.exports=!m(function(){var O=function(){}.bind();return typeof O!="function"||O.hasOwnProperty("prototype")})},12461:(S,N,c)=>{var m=c(97966),O=Function.prototype.call;S.exports=m?O.bind(O):function(){return O.apply(O,arguments)}},58100:(S,N,c)=>{var m=c(56049),O=c(18768),k=Function.prototype,L=m&&Object.getOwnPropertyDescriptor,R=O(k,"name"),V=R&&function(){}.name==="something",X=R&&(!m||m&&L(k,"name").configurable);S.exports={EXISTS:R,PROPER:V,CONFIGURABLE:X}},54518:(S,N,c)=>{var m=c(90406),O=c(81970);S.exports=function(k,L,R){try{return m(O(Object.getOwnPropertyDescriptor(k,L)[R]))}catch(V){}}},57953:(S,N,c)=>{var m=c(58310),O=c(90406);S.exports=function(k){if(m(k)==="Function")return O(k)}},90406:(S,N,c)=>{var m=c(97966),O=Function.prototype,k=O.call,L=m&&O.bind.bind(k,k);S.exports=m?L:function(R){return function(){return k.apply(R,arguments)}}},97080:(S,N,c)=>{var m=c(59921),O=c(62447),k=c(43152),L=function(R){return k(R)?R:void 0};S.exports=function(R,V){return arguments.length<2?L(m[R])||L(O[R]):m[R]&&m[R][V]||O[R]&&O[R][V]}},82850:(S,N,c)=>{var m=c(90406),O=c(93053),k=c(43152),L=c(58310),R=c(46025),V=m([].push);S.exports=function(X){if(k(X))return X;if(O(X)){for(var te=X.length,re=[],he=0;he<te;he++){var oe=X[he];typeof oe=="string"?V(re,oe):(typeof oe=="number"||L(oe)=="Number"||L(oe)=="String")&&V(re,R(oe))}var fe=re.length,J=!0;return function(F,ee){if(J)return J=!1,ee;if(O(this))return ee;for(var D=0;D<fe;D++)if(re[D]===F)return ee}}}},27529:(S,N,c)=>{var m=c(81970),O=c(71365);S.exports=function(k,L){var R=k[L];return O(R)?void 0:m(R)}},62447:(S,N,c)=>{var m=function(O){return O&&O.Math==Math&&O};S.exports=m(typeof globalThis=="object"&&globalThis)||m(typeof window=="object"&&window)||m(typeof self=="object"&&self)||m(typeof c.g=="object"&&c.g)||function(){return this}()||Function("return this")()},18768:(S,N,c)=>{var m=c(90406),O=c(53254),k=m({}.hasOwnProperty);S.exports=Object.hasOwn||function(R,V){return k(O(R),V)}},13477:S=>{S.exports={}},19552:(S,N,c)=>{var m=c(97080);S.exports=m("document","documentElement")},11314:(S,N,c)=>{var m=c(56049),O=c(31982),k=c(45511);S.exports=!m&&!O(function(){return Object.defineProperty(k("div"),"a",{get:function(){return 7}}).a!=7})},38622:(S,N,c)=>{var m=c(90406),O=c(31982),k=c(58310),L=Object,R=m("".split);S.exports=O(function(){return!L("z").propertyIsEnumerable(0)})?function(V){return k(V)=="String"?R(V,""):L(V)}:L},41524:(S,N,c)=>{var m=c(90406),O=c(43152),k=c(70716),L=m(Function.toString);O(k.inspectSource)||(k.inspectSource=function(R){return L(R)}),S.exports=k.inspectSource},44083:(S,N,c)=>{var m=c(57761),O=c(62447),k=c(92548),L=c(20410),R=c(18768),V=c(70716),X=c(4580),te=c(13477),re="Object already initialized",he=O.TypeError,oe=O.WeakMap,fe,J,F,ee=function(B){return F(B)?J(B):fe(B,{})},D=function(B){return function(Z){var ae;if(!k(Z)||(ae=J(Z)).type!==B)throw he("Incompatible receiver, "+B+" required");return ae}};if(m||V.state){var w=V.state||(V.state=new oe);w.get=w.get,w.has=w.has,w.set=w.set,fe=function(B,Z){if(w.has(B))throw he(re);return Z.facade=B,w.set(B,Z),Z},J=function(B){return w.get(B)||{}},F=function(B){return w.has(B)}}else{var M=X("state");te[M]=!0,fe=function(B,Z){if(R(B,M))throw he(re);return Z.facade=B,L(B,M,Z),Z},J=function(B){return R(B,M)?B[M]:{}},F=function(B){return R(B,M)}}S.exports={set:fe,get:J,has:F,enforce:ee,getterFor:D}},93053:(S,N,c)=>{var m=c(58310);S.exports=Array.isArray||function(k){return m(k)=="Array"}},43152:(S,N,c)=>{var m=c(51647),O=m.all;S.exports=m.IS_HTMLDDA?function(k){return typeof k=="function"||k===O}:function(k){return typeof k=="function"}},43455:(S,N,c)=>{var m=c(90406),O=c(31982),k=c(43152),L=c(82059),R=c(97080),V=c(41524),X=function(){},te=[],re=R("Reflect","construct"),he=/^\s*(?:class|function)\b/,oe=m(he.exec),fe=!he.exec(X),J=function(D){if(!k(D))return!1;try{return re(X,te,D),!0}catch(w){return!1}},F=function(D){if(!k(D))return!1;switch(L(D)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return fe||!!oe(he,V(D))}catch(w){return!0}};F.sham=!0,S.exports=!re||O(function(){var ee;return J(J.call)||!J(Object)||!J(function(){ee=!0})||ee})?F:J},51585:(S,N,c)=>{var m=c(31982),O=c(43152),k=/#|\.prototype\./,L=function(re,he){var oe=V[R(re)];return oe==te?!0:oe==X?!1:O(he)?m(he):!!he},R=L.normalize=function(re){return String(re).replace(k,".").toLowerCase()},V=L.data={},X=L.NATIVE="N",te=L.POLYFILL="P";S.exports=L},71365:S=>{S.exports=function(N){return N==null}},92548:(S,N,c)=>{var m=c(43152),O=c(51647),k=O.all;S.exports=O.IS_HTMLDDA?function(L){return typeof L=="object"?L!==null:m(L)||L===k}:function(L){return typeof L=="object"?L!==null:m(L)}},39839:S=>{S.exports=!0},28609:(S,N,c)=>{var m=c(97080),O=c(43152),k=c(15166),L=c(27237),R=Object;S.exports=L?function(V){return typeof V=="symbol"}:function(V){var X=m("Symbol");return O(X)&&k(X.prototype,R(V))}},41709:(S,N,c)=>{"use strict";var m=c(98488).IteratorPrototype,O=c(73270),k=c(54686),L=c(98889),R=c(94609),V=function(){return this};S.exports=function(X,te,re,he){var oe=te+" Iterator";return X.prototype=O(m,{next:k(+!he,re)}),L(X,oe,!1,!0),R[oe]=V,X}},78107:(S,N,c)=>{"use strict";var m=c(30080),O=c(12461),k=c(39839),L=c(58100),R=c(43152),V=c(41709),X=c(90851),te=c(70738),re=c(98889),he=c(20410),oe=c(27519),fe=c(33538),J=c(94609),F=c(98488),ee=L.PROPER,D=L.CONFIGURABLE,w=F.IteratorPrototype,M=F.BUGGY_SAFARI_ITERATORS,B=fe("iterator"),Z="keys",ae="values",H="entries",le=function(){return this};S.exports=function(z,q,pe,xe,Q,ye,ie){V(pe,q,xe);var je=function(He){if(He===Q&&ut)return ut;if(!M&&He in vt)return vt[He];switch(He){case Z:return function(){return new pe(this,He)};case ae:return function(){return new pe(this,He)};case H:return function(){return new pe(this,He)}}return function(){return new pe(this)}},ze=q+" Iterator",Ue=!1,vt=z.prototype,pt=vt[B]||vt["@@iterator"]||Q&&vt[Q],ut=!M&&pt||je(Q),er=q=="Array"&&vt.entries||pt,gt,Rt,st;if(er&&(gt=X(er.call(new z)),gt!==Object.prototype&&gt.next&&(!k&&X(gt)!==w&&(te?te(gt,w):R(gt[B])||oe(gt,B,le)),re(gt,ze,!0,!0),k&&(J[ze]=le))),ee&&Q==ae&&pt&&pt.name!==ae&&(!k&&D?he(vt,"name",ae):(Ue=!0,ut=function(){return O(pt,this)})),Q)if(Rt={values:je(ae),keys:ye?ut:je(Z),entries:je(H)},ie)for(st in Rt)(M||Ue||!(st in vt))&&oe(vt,st,Rt[st]);else m({target:q,proto:!0,forced:M||Ue},Rt);return(!k||ie)&&vt[B]!==ut&&oe(vt,B,ut,{name:Q}),J[q]=ut,Rt}},98488:(S,N,c)=>{"use strict";var m=c(31982),O=c(43152),k=c(92548),L=c(73270),R=c(90851),V=c(27519),X=c(33538),te=c(39839),re=X("iterator"),he=!1,oe,fe,J;[].keys&&(J=[].keys(),"next"in J?(fe=R(R(J)),fe!==Object.prototype&&(oe=fe)):he=!0);var F=!k(oe)||m(function(){var ee={};return oe[re].call(ee)!==ee});F?oe={}:te&&(oe=L(oe)),O(oe[re])||V(oe,re,function(){return this}),S.exports={IteratorPrototype:oe,BUGGY_SAFARI_ITERATORS:he}},94609:S=>{S.exports={}},53387:(S,N,c)=>{var m=c(62567);S.exports=function(O){return m(O.length)}},99295:S=>{var N=Math.ceil,c=Math.floor;S.exports=Math.trunc||function(O){var k=+O;return(k>0?c:N)(k)}},73270:(S,N,c)=>{var m=c(35970),O=c(98911),k=c(11792),L=c(13477),R=c(19552),V=c(45511),X=c(4580),te=">",re="<",he="prototype",oe="script",fe=X("IE_PROTO"),J=function(){},F=function(B){return re+oe+te+B+re+"/"+oe+te},ee=function(B){B.write(F("")),B.close();var Z=B.parentWindow.Object;return B=null,Z},D=function(){var B=V("iframe"),Z="java"+oe+":",ae;return B.style.display="none",R.appendChild(B),B.src=String(Z),ae=B.contentWindow.document,ae.open(),ae.write(F("document.F=Object")),ae.close(),ae.F},w,M=function(){try{w=new ActiveXObject("htmlfile")}catch(Z){}M=typeof document!="undefined"?document.domain&&w?ee(w):D():ee(w);for(var B=k.length;B--;)delete M[he][k[B]];return M()};L[fe]=!0,S.exports=Object.create||function(Z,ae){var H;return Z!==null?(J[he]=m(Z),H=new J,J[he]=null,H[fe]=Z):H=M(),ae===void 0?H:O.f(H,ae)}},98911:(S,N,c)=>{var m=c(56049),O=c(98715),k=c(36133),L=c(35970),R=c(88966),V=c(16619);N.f=m&&!O?Object.defineProperties:function(te,re){L(te);for(var he=R(re),oe=V(re),fe=oe.length,J=0,F;fe>J;)k.f(te,F=oe[J++],he[F]);return te}},36133:(S,N,c)=>{var m=c(56049),O=c(11314),k=c(98715),L=c(35970),R=c(5135),V=TypeError,X=Object.defineProperty,te=Object.getOwnPropertyDescriptor,re="enumerable",he="configurable",oe="writable";N.f=m?k?function(J,F,ee){if(L(J),F=R(F),L(ee),typeof J=="function"&&F==="prototype"&&"value"in ee&&oe in ee&&!ee[oe]){var D=te(J,F);D&&D[oe]&&(J[F]=ee.value,ee={configurable:he in ee?ee[he]:D[he],enumerable:re in ee?ee[re]:D[re],writable:!1})}return X(J,F,ee)}:X:function(J,F,ee){if(L(J),F=R(F),L(ee),O)try{return X(J,F,ee)}catch(D){}if("get"in ee||"set"in ee)throw V("Accessors not supported");return"value"in ee&&(J[F]=ee.value),J}},80016:(S,N,c)=>{var m=c(56049),O=c(12461),k=c(16457),L=c(54686),R=c(88966),V=c(5135),X=c(18768),te=c(11314),re=Object.getOwnPropertyDescriptor;N.f=m?re:function(oe,fe){if(oe=R(oe),fe=V(fe),te)try{return re(oe,fe)}catch(J){}if(X(oe,fe))return L(!O(k.f,oe,fe),oe[fe])}},53515:(S,N,c)=>{var m=c(58310),O=c(88966),k=c(51203).f,L=c(67932),R=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],V=function(X){try{return k(X)}catch(te){return L(R)}};S.exports.f=function(te){return R&&m(te)=="Window"?V(te):k(O(te))}},51203:(S,N,c)=>{var m=c(4541),O=c(11792),k=O.concat("length","prototype");N.f=Object.getOwnPropertyNames||function(R){return m(R,k)}},97620:(S,N)=>{N.f=Object.getOwnPropertySymbols},90851:(S,N,c)=>{var m=c(18768),O=c(43152),k=c(53254),L=c(4580),R=c(74838),V=L("IE_PROTO"),X=Object,te=X.prototype;S.exports=R?X.getPrototypeOf:function(re){var he=k(re);if(m(he,V))return he[V];var oe=he.constructor;return O(oe)&&he instanceof oe?oe.prototype:he instanceof X?te:null}},15166:(S,N,c)=>{var m=c(90406);S.exports=m({}.isPrototypeOf)},4541:(S,N,c)=>{var m=c(90406),O=c(18768),k=c(88966),L=c(66322).indexOf,R=c(13477),V=m([].push);S.exports=function(X,te){var re=k(X),he=0,oe=[],fe;for(fe in re)!O(R,fe)&&O(re,fe)&&V(oe,fe);for(;te.length>he;)O(re,fe=te[he++])&&(~L(oe,fe)||V(oe,fe));return oe}},16619:(S,N,c)=>{var m=c(4541),O=c(11792);S.exports=Object.keys||function(L){return m(L,O)}},16457:(S,N)=>{"use strict";var c={}.propertyIsEnumerable,m=Object.getOwnPropertyDescriptor,O=m&&!c.call({1:2},1);N.f=O?function(L){var R=m(this,L);return!!R&&R.enumerable}:c},70738:(S,N,c)=>{var m=c(54518),O=c(35970),k=c(72185);S.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var L=!1,R={},V;try{V=m(Object.prototype,"__proto__","set"),V(R,[]),L=R instanceof Array}catch(X){}return function(te,re){return O(te),k(re),L?V(te,re):te.__proto__=re,te}}():void 0)},68399:(S,N,c)=>{"use strict";var m=c(48448),O=c(82059);S.exports=m?{}.toString:function(){return"[object "+O(this)+"]"}},96380:(S,N,c)=>{var m=c(12461),O=c(43152),k=c(92548),L=TypeError;S.exports=function(R,V){var X,te;if(V==="string"&&O(X=R.toString)&&!k(te=m(X,R))||O(X=R.valueOf)&&!k(te=m(X,R))||V!=="string"&&O(X=R.toString)&&!k(te=m(X,R)))return te;throw L("Can't convert object to primitive value")}},47813:(S,N,c)=>{var m=c(97080),O=c(90406),k=c(51203),L=c(97620),R=c(35970),V=O([].concat);S.exports=m("Reflect","ownKeys")||function(te){var re=k.f(R(te)),he=L.f;return he?V(re,he(te)):re}},59921:S=>{S.exports={}},31251:(S,N,c)=>{var m=c(71365),O=TypeError;S.exports=function(k){if(m(k))throw O("Can't call method on "+k);return k}},98889:(S,N,c)=>{var m=c(48448),O=c(36133).f,k=c(20410),L=c(18768),R=c(68399),V=c(33538),X=V("toStringTag");S.exports=function(te,re,he,oe){if(te){var fe=he?te:te.prototype;L(fe,X)||O(fe,X,{configurable:!0,value:re}),oe&&!m&&k(fe,"toString",R)}}},4580:(S,N,c)=>{var m=c(95976),O=c(91248),k=m("keys");S.exports=function(L){return k[L]||(k[L]=O(L))}},70716:(S,N,c)=>{var m=c(62447),O=c(9267),k="__core-js_shared__",L=m[k]||O(k,{});S.exports=L},95976:(S,N,c)=>{var m=c(39839),O=c(70716);(S.exports=function(k,L){return O[k]||(O[k]=L!==void 0?L:{})})("versions",[]).push({version:"3.29.1",mode:m?"pure":"global",copyright:"\xA9 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.1/LICENSE",source:"https://github.com/zloirock/core-js"})},18143:(S,N,c)=>{var m=c(90406),O=c(32041),k=c(46025),L=c(31251),R=m("".charAt),V=m("".charCodeAt),X=m("".slice),te=function(re){return function(he,oe){var fe=k(L(he)),J=O(oe),F=fe.length,ee,D;return J<0||J>=F?re?"":void 0:(ee=V(fe,J),ee<55296||ee>56319||J+1===F||(D=V(fe,J+1))<56320||D>57343?re?R(fe,J):ee:re?X(fe,J,J+2):(ee-55296<<10)+(D-56320)+65536)}};S.exports={codeAt:te(!1),charAt:te(!0)}},71775:(S,N,c)=>{var m=c(32438),O=c(31982);S.exports=!!Object.getOwnPropertySymbols&&!O(function(){var k=Symbol();return!String(k)||!(Object(k)instanceof Symbol)||!Symbol.sham&&m&&m<41})},95679:(S,N,c)=>{var m=c(12461),O=c(97080),k=c(33538),L=c(27519);S.exports=function(){var R=O("Symbol"),V=R&&R.prototype,X=V&&V.valueOf,te=k("toPrimitive");V&&!V[te]&&L(V,te,function(re){return m(X,this)},{arity:1})}},82294:(S,N,c)=>{var m=c(71775);S.exports=m&&!!Symbol.for&&!!Symbol.keyFor},13249:(S,N,c)=>{var m=c(32041),O=Math.max,k=Math.min;S.exports=function(L,R){var V=m(L);return V<0?O(V+R,0):k(V,R)}},88966:(S,N,c)=>{var m=c(38622),O=c(31251);S.exports=function(k){return m(O(k))}},32041:(S,N,c)=>{var m=c(99295);S.exports=function(O){var k=+O;return k!==k||k===0?0:m(k)}},62567:(S,N,c)=>{var m=c(32041),O=Math.min;S.exports=function(k){return k>0?O(m(k),9007199254740991):0}},53254:(S,N,c)=>{var m=c(31251),O=Object;S.exports=function(k){return O(m(k))}},37505:(S,N,c)=>{var m=c(12461),O=c(92548),k=c(28609),L=c(27529),R=c(96380),V=c(33538),X=TypeError,te=V("toPrimitive");S.exports=function(re,he){if(!O(re)||k(re))return re;var oe=L(re,te),fe;if(oe){if(he===void 0&&(he="default"),fe=m(oe,re,he),!O(fe)||k(fe))return fe;throw X("Can't convert object to primitive value")}return he===void 0&&(he="number"),R(re,he)}},5135:(S,N,c)=>{var m=c(37505),O=c(28609);S.exports=function(k){var L=m(k,"string");return O(L)?L:L+""}},48448:(S,N,c)=>{var m=c(33538),O=m("toStringTag"),k={};k[O]="z",S.exports=String(k)==="[object z]"},46025:(S,N,c)=>{var m=c(82059),O=String;S.exports=function(k){if(m(k)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return O(k)}},18342:S=>{var N=String;S.exports=function(c){try{return N(c)}catch(m){return"Object"}}},91248:(S,N,c)=>{var m=c(90406),O=0,k=Math.random(),L=m(1 .toString);S.exports=function(R){return"Symbol("+(R===void 0?"":R)+")_"+L(++O+k,36)}},27237:(S,N,c)=>{var m=c(71775);S.exports=m&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},98715:(S,N,c)=>{var m=c(56049),O=c(31982);S.exports=m&&O(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},57761:(S,N,c)=>{var m=c(62447),O=c(43152),k=m.WeakMap;S.exports=O(k)&&/native code/.test(String(k))},64832:(S,N,c)=>{var m=c(59921),O=c(18768),k=c(39378),L=c(36133).f;S.exports=function(R){var V=m.Symbol||(m.Symbol={});O(V,R)||L(V,R,{value:k.f(R)})}},39378:(S,N,c)=>{var m=c(33538);N.f=m},33538:(S,N,c)=>{var m=c(62447),O=c(95976),k=c(18768),L=c(91248),R=c(71775),V=c(27237),X=m.Symbol,te=O("wks"),re=V?X.for||X:X&&X.withoutSetter||L;S.exports=function(he){return k(te,he)||(te[he]=R&&k(X,he)?X[he]:re("Symbol."+he)),te[he]}},69825:(S,N,c)=>{"use strict";var m=c(30080),O=c(31982),k=c(93053),L=c(92548),R=c(53254),V=c(53387),X=c(11452),te=c(53437),re=c(69573),he=c(36844),oe=c(33538),fe=c(32438),J=oe("isConcatSpreadable"),F=fe>=51||!O(function(){var w=[];return w[J]=!1,w.concat()[0]!==w}),ee=function(w){if(!L(w))return!1;var M=w[J];return M!==void 0?!!M:k(w)},D=!F||!he("concat");m({target:"Array",proto:!0,arity:1,forced:D},{concat:function(M){var B=R(this),Z=re(B,0),ae=0,H,le,z,q,pe;for(H=-1,z=arguments.length;H<z;H++)if(pe=H===-1?B:arguments[H],ee(pe))for(q=V(pe),X(ae+q),le=0;le<q;le++,ae++)le in pe&&te(Z,ae,pe[le]);else X(ae+1),te(Z,ae++,pe);return Z.length=ae,Z}})},17802:(S,N,c)=>{"use strict";var m=c(30080),O=c(93935).filter,k=c(36844),L=k("filter");m({target:"Array",proto:!0,forced:!L},{filter:function(V){return O(this,V,arguments.length>1?arguments[1]:void 0)}})},64009:(S,N,c)=>{"use strict";var m=c(30080),O=c(24782);m({target:"Array",proto:!0,forced:[].forEach!=O},{forEach:O})},32449:(S,N,c)=>{"use strict";var m=c(30080),O=c(57953),k=c(66322).indexOf,L=c(10454),R=O([].indexOf),V=!!R&&1/R([1],1,-0)<0,X=V||!L("indexOf");m({target:"Array",proto:!0,forced:X},{indexOf:function(re){var he=arguments.length>1?arguments[1]:void 0;return V?R(this,re,he)||0:k(this,re,he)}})},44390:(S,N,c)=>{"use strict";var m=c(88966),O=c(20844),k=c(94609),L=c(44083),R=c(36133).f,V=c(78107),X=c(10248),te=c(39839),re=c(56049),he="Array Iterator",oe=L.set,fe=L.getterFor(he);S.exports=V(Array,"Array",function(F,ee){oe(this,{type:he,target:m(F),index:0,kind:ee})},function(){var F=fe(this),ee=F.target,D=F.kind,w=F.index++;return!ee||w>=ee.length?(F.target=void 0,X(void 0,!0)):D=="keys"?X(w,!1):D=="values"?X(ee[w],!1):X([w,ee[w]],!1)},"values");var J=k.Arguments=k.Array;if(O("keys"),O("values"),O("entries"),!te&&re&&J.name!=="values")try{R(J,"name",{value:"values"})}catch(F){}},91667:()=>{},39306:(S,N,c)=>{var m=c(30080),O=c(97080),k=c(82768),L=c(12461),R=c(90406),V=c(31982),X=c(43152),te=c(28609),re=c(53160),he=c(82850),oe=c(71775),fe=String,J=O("JSON","stringify"),F=R(/./.exec),ee=R("".charAt),D=R("".charCodeAt),w=R("".replace),M=R(1 .toString),B=/[\uD800-\uDFFF]/g,Z=/^[\uD800-\uDBFF]$/,ae=/^[\uDC00-\uDFFF]$/,H=!oe||V(function(){var pe=O("Symbol")();return J([pe])!="[null]"||J({a:pe})!="{}"||J(Object(pe))!="{}"}),le=V(function(){return J("\uDF06\uD834")!=='"\\udf06\\ud834"'||J("\uDEAD")!=='"\\udead"'}),z=function(pe,xe){var Q=re(arguments),ye=he(xe);if(!(!X(ye)&&(pe===void 0||te(pe))))return Q[1]=function(ie,je){if(X(ye)&&(je=L(ye,this,fe(ie),je)),!te(je))return je},k(J,null,Q)},q=function(pe,xe,Q){var ye=ee(Q,xe-1),ie=ee(Q,xe+1);return F(Z,pe)&&!F(ae,ie)||F(ae,pe)&&!F(Z,ye)?"\\u"+M(D(pe,0),16):pe};J&&m({target:"JSON",stat:!0,arity:3,forced:H||le},{stringify:function(xe,Q,ye){var ie=re(arguments),je=k(H?z:J,null,ie);return le&&typeof je=="string"?w(je,B,q):je}})},23870:(S,N,c)=>{var m=c(62447),O=c(98889);O(m.JSON,"JSON",!0)},5828:()=>{},28135:(S,N,c)=>{var m=c(30080),O=c(56049),k=c(98911).f;m({target:"Object",stat:!0,forced:Object.defineProperties!==k,sham:!O},{defineProperties:k})},70829:(S,N,c)=>{var m=c(30080),O=c(56049),k=c(36133).f;m({target:"Object",stat:!0,forced:Object.defineProperty!==k,sham:!O},{defineProperty:k})},51964:(S,N,c)=>{var m=c(30080),O=c(31982),k=c(88966),L=c(80016).f,R=c(56049),V=!R||O(function(){L(1)});m({target:"Object",stat:!0,forced:V,sham:!R},{getOwnPropertyDescriptor:function(te,re){return L(k(te),re)}})},723:(S,N,c)=>{var m=c(30080),O=c(56049),k=c(47813),L=c(88966),R=c(80016),V=c(53437);m({target:"Object",stat:!0,sham:!O},{getOwnPropertyDescriptors:function(te){for(var re=L(te),he=R.f,oe=k(re),fe={},J=0,F,ee;oe.length>J;)ee=he(re,F=oe[J++]),ee!==void 0&&V(fe,F,ee);return fe}})},86884:(S,N,c)=>{var m=c(30080),O=c(71775),k=c(31982),L=c(97620),R=c(53254),V=!O||k(function(){L.f(1)});m({target:"Object",stat:!0,forced:V},{getOwnPropertySymbols:function(te){var re=L.f;return re?re(R(te)):[]}})},38339:(S,N,c)=>{var m=c(30080),O=c(53254),k=c(16619),L=c(31982),R=L(function(){k(1)});m({target:"Object",stat:!0,forced:R},{keys:function(X){return k(O(X))}})},97829:()=>{},5708:()=>{},27626:(S,N,c)=>{"use strict";var m=c(18143).charAt,O=c(46025),k=c(44083),L=c(78107),R=c(10248),V="String Iterator",X=k.set,te=k.getterFor(V);L(String,"String",function(re){X(this,{type:V,string:O(re),index:0})},function(){var he=te(this),oe=he.string,fe=he.index,J;return fe>=oe.length?R(void 0,!0):(J=m(oe,fe),he.index+=J.length,R(J,!1))})},95353:(S,N,c)=>{var m=c(64832);m("asyncIterator")},16212:(S,N,c)=>{"use strict";var m=c(30080),O=c(62447),k=c(12461),L=c(90406),R=c(39839),V=c(56049),X=c(71775),te=c(31982),re=c(18768),he=c(15166),oe=c(35970),fe=c(88966),J=c(5135),F=c(46025),ee=c(54686),D=c(73270),w=c(16619),M=c(51203),B=c(53515),Z=c(97620),ae=c(80016),H=c(36133),le=c(98911),z=c(16457),q=c(27519),pe=c(37912),xe=c(95976),Q=c(4580),ye=c(13477),ie=c(91248),je=c(33538),ze=c(39378),Ue=c(64832),vt=c(95679),pt=c(98889),ut=c(44083),er=c(93935).forEach,gt=Q("hidden"),Rt="Symbol",st="prototype",He=ut.set,Re=ut.getterFor(Rt),Be=Object[st],lt=O.Symbol,_t=lt&&lt[st],rt=O.TypeError,Pt=O.QObject,tr=ae.f,or=H.f,kr=B.f,et=z.f,Et=L([].push),jt=xe("symbols"),_r=xe("op-symbols"),zt=xe("wks"),Bn=!Pt||!Pt[st]||!Pt[st].findChild,Vn=V&&te(function(){return D(or({},"a",{get:function(){return or(this,"a",{value:7}).a}})).a!=7})?function(St,ft,tt){var mt=tr(Be,ft);mt&&delete Be[ft],or(St,ft,tt),mt&&St!==Be&&or(Be,ft,mt)}:or,nn=function(St,ft){var tt=jt[St]=D(_t);return He(tt,{type:Rt,tag:St,description:ft}),V||(tt.description=ft),tt},Cn=function(ft,tt,mt){ft===Be&&Cn(_r,tt,mt),oe(ft);var se=J(tt);return oe(mt),re(jt,se)?(mt.enumerable?(re(ft,gt)&&ft[gt][se]&&(ft[gt][se]=!1),mt=D(mt,{enumerable:ee(0,!1)})):(re(ft,gt)||or(ft,gt,ee(1,{})),ft[gt][se]=!0),Vn(ft,se,mt)):or(ft,se,mt)},ri=function(ft,tt){oe(ft);var mt=fe(tt),se=w(mt).concat(Gt(mt));return er(se,function(we){(!V||k(an,mt,we))&&Cn(ft,we,mt[we])}),ft},jn=function(ft,tt){return tt===void 0?D(ft):ri(D(ft),tt)},an=function(ft){var tt=J(ft),mt=k(et,this,tt);return this===Be&&re(jt,tt)&&!re(_r,tt)?!1:mt||!re(this,tt)||!re(jt,tt)||re(this,gt)&&this[gt][tt]?mt:!0},Mr=function(ft,tt){var mt=fe(ft),se=J(tt);if(!(mt===Be&&re(jt,se)&&!re(_r,se))){var we=tr(mt,se);return we&&re(jt,se)&&!(re(mt,gt)&&mt[gt][se])&&(we.enumerable=!0),we}},zr=function(ft){var tt=kr(fe(ft)),mt=[];return er(tt,function(se){!re(jt,se)&&!re(ye,se)&&Et(mt,se)}),mt},Gt=function(St){var ft=St===Be,tt=kr(ft?_r:fe(St)),mt=[];return er(tt,function(se){re(jt,se)&&(!ft||re(Be,se))&&Et(mt,jt[se])}),mt};X||(lt=function(){if(he(_t,this))throw rt("Symbol is not a constructor");var ft=!arguments.length||arguments[0]===void 0?void 0:F(arguments[0]),tt=ie(ft),mt=function(se){this===Be&&k(mt,_r,se),re(this,gt)&&re(this[gt],tt)&&(this[gt][tt]=!1),Vn(this,tt,ee(1,se))};return V&&Bn&&Vn(Be,tt,{configurable:!0,set:mt}),nn(tt,ft)},_t=lt[st],q(_t,"toString",function(){return Re(this).tag}),q(lt,"withoutSetter",function(St){return nn(ie(St),St)}),z.f=an,H.f=Cn,le.f=ri,ae.f=Mr,M.f=B.f=zr,Z.f=Gt,ze.f=function(St){return nn(je(St),St)},V&&(pe(_t,"description",{configurable:!0,get:function(){return Re(this).description}}),R||q(Be,"propertyIsEnumerable",an,{unsafe:!0}))),m({global:!0,constructor:!0,wrap:!0,forced:!X,sham:!X},{Symbol:lt}),er(w(zt),function(St){Ue(St)}),m({target:Rt,stat:!0,forced:!X},{useSetter:function(){Bn=!0},useSimple:function(){Bn=!1}}),m({target:"Object",stat:!0,forced:!X,sham:!V},{create:jn,defineProperty:Cn,defineProperties:ri,getOwnPropertyDescriptor:Mr}),m({target:"Object",stat:!0,forced:!X},{getOwnPropertyNames:zr}),vt(),pt(lt,Rt),ye[gt]=!0},63906:()=>{},3598:(S,N,c)=>{var m=c(30080),O=c(97080),k=c(18768),L=c(46025),R=c(95976),V=c(82294),X=R("string-to-symbol-registry"),te=R("symbol-to-string-registry");m({target:"Symbol",stat:!0,forced:!V},{for:function(re){var he=L(re);if(k(X,he))return X[he];var oe=O("Symbol")(he);return X[he]=oe,te[oe]=he,oe}})},39542:(S,N,c)=>{var m=c(64832);m("hasInstance")},47882:(S,N,c)=>{var m=c(64832);m("isConcatSpreadable")},84911:(S,N,c)=>{var m=c(64832);m("iterator")},68030:(S,N,c)=>{c(16212),c(3598),c(50338),c(39306),c(86884)},50338:(S,N,c)=>{var m=c(30080),O=c(18768),k=c(28609),L=c(18342),R=c(95976),V=c(82294),X=R("symbol-to-string-registry");m({target:"Symbol",stat:!0,forced:!V},{keyFor:function(re){if(!k(re))throw TypeError(L(re)+" is not a symbol");if(O(X,re))return X[re]}})},47954:(S,N,c)=>{var m=c(64832);m("matchAll")},88725:(S,N,c)=>{var m=c(64832);m("match")},67703:(S,N,c)=>{var m=c(64832);m("replace")},2220:(S,N,c)=>{var m=c(64832);m("search")},48990:(S,N,c)=>{var m=c(64832);m("species")},50240:(S,N,c)=>{var m=c(64832);m("split")},99921:(S,N,c)=>{var m=c(64832),O=c(95679);m("toPrimitive"),O()},3502:(S,N,c)=>{var m=c(97080),O=c(64832),k=c(98889);O("toStringTag"),k(m("Symbol"),"Symbol")},80220:(S,N,c)=>{var m=c(64832);m("unscopables")},45987:(S,N,c)=>{var m=c(64832);m("asyncDispose")},42319:(S,N,c)=>{var m=c(64832);m("dispose")},58052:(S,N,c)=>{var m=c(30080),O=c(97080),k=c(90406),L=O("Symbol"),R=L.keyFor,V=k(L.prototype.valueOf);m({target:"Symbol",stat:!0},{isRegistered:function(te){try{return R(V(te))!==void 0}catch(re){return!1}}})},90181:(S,N,c)=>{for(var m=c(30080),O=c(95976),k=c(97080),L=c(90406),R=c(28609),V=c(33538),X=k("Symbol"),te=X.isWellKnown,re=k("Object","getOwnPropertyNames"),he=L(X.prototype.valueOf),oe=O("wks"),fe=0,J=re(X),F=J.length;fe<F;fe++)try{var ee=J[fe];R(X[ee])&&V(ee)}catch(D){}m({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(w){if(te&&te(w))return!0;try{for(var M=he(w),B=0,Z=re(oe),ae=Z.length;B<ae;B++)if(oe[Z[B]]==M)return!0}catch(H){}return!1}})},25129:(S,N,c)=>{var m=c(64832);m("matcher")},90397:(S,N,c)=>{var m=c(64832);m("metadataKey")},82793:(S,N,c)=>{var m=c(64832);m("metadata")},18097:(S,N,c)=>{var m=c(64832);m("observable")},52100:(S,N,c)=>{var m=c(64832);m("patternMatch")},20122:(S,N,c)=>{var m=c(64832);m("replaceAll")},48713:(S,N,c)=>{c(44390);var m=c(81595),O=c(62447),k=c(82059),L=c(20410),R=c(94609),V=c(33538),X=V("toStringTag");for(var te in m){var re=O[te],he=re&&re.prototype;he&&k(he)!==X&&L(he,X,te),R[te]=R.Array}},41544:(S,N,c)=>{var m=c(94537);S.exports=m},44928:(S,N,c)=>{var m=c(55794);S.exports=m},26087:(S,N,c)=>{c(48713);var m=c(82059),O=c(18768),k=c(15166),L=c(41544),R=Array.prototype,V={DOMTokenList:!0,NodeList:!0};S.exports=function(X){var te=X.forEach;return X===R||k(R,X)&&te===R.forEach||O(V,m(X))?L:te}},11783:(S,N,c)=>{var m=c(85838);S.exports=m},88462:(S,N,c)=>{var m=c(95617);S.exports=m},83531:(S,N,c)=>{var m=c(11906);S.exports=m},19941:(S,N,c)=>{var m=c(59123);S.exports=m},25081:(S,N,c)=>{var m=c(63332);S.exports=m},22145:(S,N,c)=>{var m=c(83606);S.exports=m},93690:(S,N,c)=>{var m=c(90660);S.exports=m},8429:(S,N,c)=>{var m=c(49198);c(48713),S.exports=m},13099:(S,N,c)=>{var m=c(15413);c(48713),S.exports=m},44931:(S,N,c)=>{var m=c(4793);S.exports=m},81933:function(){(function(S){var N=function(c){var m={searchParams:"URLSearchParams"in S,iterable:"Symbol"in S&&"iterator"in Symbol,blob:"FileReader"in S&&"Blob"in S&&function(){try{return new Blob,!0}catch(z){return!1}}(),formData:"FormData"in S,arrayBuffer:"ArrayBuffer"in S};function O(z){return z&&DataView.prototype.isPrototypeOf(z)}if(m.arrayBuffer)var k=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],L=ArrayBuffer.isView||function(z){return z&&k.indexOf(Object.prototype.toString.call(z))>-1};function R(z){if(typeof z!="string"&&(z=String(z)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(z))throw new TypeError("Invalid character in header field name");return z.toLowerCase()}function V(z){return typeof z!="string"&&(z=String(z)),z}function X(z){var q={next:function(){var pe=z.shift();return{done:pe===void 0,value:pe}}};return m.iterable&&(q[Symbol.iterator]=function(){return q}),q}function te(z){this.map={},z instanceof te?z.forEach(function(q,pe){this.append(pe,q)},this):Array.isArray(z)?z.forEach(function(q){this.append(q[0],q[1])},this):z&&Object.getOwnPropertyNames(z).forEach(function(q){this.append(q,z[q])},this)}te.prototype.append=function(z,q){z=R(z),q=V(q);var pe=this.map[z];this.map[z]=pe?pe+", "+q:q},te.prototype.delete=function(z){delete this.map[R(z)]},te.prototype.get=function(z){return z=R(z),this.has(z)?this.map[z]:null},te.prototype.has=function(z){return this.map.hasOwnProperty(R(z))},te.prototype.set=function(z,q){this.map[R(z)]=V(q)},te.prototype.forEach=function(z,q){for(var pe in this.map)this.map.hasOwnProperty(pe)&&z.call(q,this.map[pe],pe,this)},te.prototype.keys=function(){var z=[];return this.forEach(function(q,pe){z.push(pe)}),X(z)},te.prototype.values=function(){var z=[];return this.forEach(function(q){z.push(q)}),X(z)},te.prototype.entries=function(){var z=[];return this.forEach(function(q,pe){z.push([pe,q])}),X(z)},m.iterable&&(te.prototype[Symbol.iterator]=te.prototype.entries);function re(z){if(z.bodyUsed)return Promise.reject(new TypeError("Already read"));z.bodyUsed=!0}function he(z){return new Promise(function(q,pe){z.onload=function(){q(z.result)},z.onerror=function(){pe(z.error)}})}function oe(z){var q=new FileReader,pe=he(q);return q.readAsArrayBuffer(z),pe}function fe(z){var q=new FileReader,pe=he(q);return q.readAsText(z),pe}function J(z){for(var q=new Uint8Array(z),pe=new Array(q.length),xe=0;xe<q.length;xe++)pe[xe]=String.fromCharCode(q[xe]);return pe.join("")}function F(z){if(z.slice)return z.slice(0);var q=new Uint8Array(z.byteLength);return q.set(new Uint8Array(z)),q.buffer}function ee(){return this.bodyUsed=!1,this._initBody=function(z){this._bodyInit=z,z?typeof z=="string"?this._bodyText=z:m.blob&&Blob.prototype.isPrototypeOf(z)?this._bodyBlob=z:m.formData&&FormData.prototype.isPrototypeOf(z)?this._bodyFormData=z:m.searchParams&&URLSearchParams.prototype.isPrototypeOf(z)?this._bodyText=z.toString():m.arrayBuffer&&m.blob&&O(z)?(this._bodyArrayBuffer=F(z.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):m.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(z)||L(z))?this._bodyArrayBuffer=F(z):this._bodyText=z=Object.prototype.toString.call(z):this._bodyText="",this.headers.get("content-type")||(typeof z=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):m.searchParams&&URLSearchParams.prototype.isPrototypeOf(z)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},m.blob&&(this.blob=function(){var z=re(this);if(z)return z;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?re(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(oe)}),this.text=function(){var z=re(this);if(z)return z;if(this._bodyBlob)return fe(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(J(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},m.formData&&(this.formData=function(){return this.text().then(B)}),this.json=function(){return this.text().then(JSON.parse)},this}var D=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(z){var q=z.toUpperCase();return D.indexOf(q)>-1?q:z}function M(z,q){q=q||{};var pe=q.body;if(z instanceof M){if(z.bodyUsed)throw new TypeError("Already read");this.url=z.url,this.credentials=z.credentials,q.headers||(this.headers=new te(z.headers)),this.method=z.method,this.mode=z.mode,this.signal=z.signal,!pe&&z._bodyInit!=null&&(pe=z._bodyInit,z.bodyUsed=!0)}else this.url=String(z);if(this.credentials=q.credentials||this.credentials||"same-origin",(q.headers||!this.headers)&&(this.headers=new te(q.headers)),this.method=w(q.method||this.method||"GET"),this.mode=q.mode||this.mode||null,this.signal=q.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&pe)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(pe)}M.prototype.clone=function(){return new M(this,{body:this._bodyInit})};function B(z){var q=new FormData;return z.trim().split("&").forEach(function(pe){if(pe){var xe=pe.split("="),Q=xe.shift().replace(/\+/g," "),ye=xe.join("=").replace(/\+/g," ");q.append(decodeURIComponent(Q),decodeURIComponent(ye))}}),q}function Z(z){var q=new te,pe=z.replace(/\r?\n[\t ]+/g," ");return pe.split(/\r?\n/).forEach(function(xe){var Q=xe.split(":"),ye=Q.shift().trim();if(ye){var ie=Q.join(":").trim();q.append(ye,ie)}}),q}ee.call(M.prototype);function ae(z,q){q||(q={}),this.type="default",this.status=q.status===void 0?200:q.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in q?q.statusText:"OK",this.headers=new te(q.headers),this.url=q.url||"",this._initBody(z)}ee.call(ae.prototype),ae.prototype.clone=function(){return new ae(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new te(this.headers),url:this.url})},ae.error=function(){var z=new ae(null,{status:0,statusText:""});return z.type="error",z};var H=[301,302,303,307,308];ae.redirect=function(z,q){if(H.indexOf(q)===-1)throw new RangeError("Invalid status code");return new ae(null,{status:q,headers:{location:z}})},c.DOMException=S.DOMException;try{new c.DOMException}catch(z){c.DOMException=function(q,pe){this.message=q,this.name=pe;var xe=Error(q);this.stack=xe.stack},c.DOMException.prototype=Object.create(Error.prototype),c.DOMException.prototype.constructor=c.DOMException}function le(z,q){return new Promise(function(pe,xe){var Q=new M(z,q);if(Q.signal&&Q.signal.aborted)return xe(new c.DOMException("Aborted","AbortError"));var ye=new XMLHttpRequest;function ie(){ye.abort()}ye.onload=function(){var je={status:ye.status,statusText:ye.statusText,headers:Z(ye.getAllResponseHeaders()||"")};je.url="responseURL"in ye?ye.responseURL:je.headers.get("X-Request-URL");var ze="response"in ye?ye.response:ye.responseText;pe(new ae(ze,je))},ye.onerror=function(){xe(new TypeError("Network request failed"))},ye.ontimeout=function(){xe(new TypeError("Network request failed"))},ye.onabort=function(){xe(new c.DOMException("Aborted","AbortError"))},ye.open(Q.method,Q.url,!0),Q.credentials==="include"?ye.withCredentials=!0:Q.credentials==="omit"&&(ye.withCredentials=!1),"responseType"in ye&&m.blob&&(ye.responseType="blob"),Q.headers.forEach(function(je,ze){ye.setRequestHeader(ze,je)}),Q.signal&&(Q.signal.addEventListener("abort",ie),ye.onreadystatechange=function(){ye.readyState===4&&Q.signal.removeEventListener("abort",ie)}),ye.send(typeof Q._bodyInit=="undefined"?null:Q._bodyInit)})}return le.polyfill=!0,S.fetch||(S.fetch=le,S.Headers=te,S.Request=M,S.Response=ae),c.Headers=te,c.Request=M,c.Response=ae,c.fetch=le,Object.defineProperty(c,"__esModule",{value:!0}),c}({})})(typeof self!="undefined"?self:this)},20788:(S,N,c)=>{"use strict";c.r(N),c.d(N,{default:()=>V});var m=c(64737),O=c.n(m),k=c(62578),L=c.n(k),R=L()(O());R.push([S.id,`.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px #0003;border-radius:3px;border:1px solid silver;background:white;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto;box-sizing:border-box}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;white-space:pre;color:#000;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:#fff}
42
- `,""]);const V=R},15218:(S,N,c)=>{"use strict";c.r(N),c.d(N,{default:()=>M});var m=c(64737),O=c.n(m),k=c(62578),L=c.n(k),R=c(7125),V=c.n(R),X=new URL(c(17735),c.b),te=new URL(c(56089),c.b),re=new URL(c(46050),c.b),he=new URL(c(71090),c.b),oe=new URL(c(96192),c.b),fe=L()(O()),J=V()(X),F=V()(te),ee=V()(re),D=V()(he),w=V()(oe);fe.push([S.id,".CodeMirror-lint-markers{width:16px}.CodeMirror-lint-tooltip{background-color:#ffd;border:1px solid black;border-radius:4px;color:#000;font-family:monospace;font-size:10pt;overflow:hidden;padding:2px 5px;position:fixed;white-space:pre;white-space:pre-wrap;z-index:100;max-width:600px;opacity:0;transition:opacity .4s;-moz-transition:opacity .4s;-webkit-transition:opacity .4s;-o-transition:opacity .4s;-ms-transition:opacity .4s}.CodeMirror-lint-mark{background-position:left bottom;background-repeat:repeat-x}.CodeMirror-lint-mark-warning{background-image:url("+J+")}.CodeMirror-lint-mark-error{background-image:url("+F+")}.CodeMirror-lint-marker{background-position:center center;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:16px;width:16px;vertical-align:middle;position:relative}.CodeMirror-lint-message{padding-left:18px;background-position:top left;background-repeat:no-repeat}.CodeMirror-lint-marker-warning,.CodeMirror-lint-message-warning{background-image:url("+ee+")}.CodeMirror-lint-marker-error,.CodeMirror-lint-message-error{background-image:url("+D+")}.CodeMirror-lint-marker-multiple{background-image:url("+w+`);background-repeat:no-repeat;background-position:right bottom;width:100%;height:100%}.CodeMirror-lint-line-error{background-color:#b74c5114}.CodeMirror-lint-line-warning{background-color:#ffd3001a}
43
- `,""]);const M=fe},80766:(S,N,c)=>{"use strict";c.r(N),c.d(N,{default:()=>V});var m=c(64737),O=c.n(m),k=c(62578),L=c.n(k),R=L()(O());R.push([S.id,`.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;inset:-50px 0 0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error,.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;inset:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors,.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:#ff06}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}
44
- `,""]);const V=R},62459:(S,N,c)=>{"use strict";c.r(N),c.d(N,{default:()=>V});var m=c(64737),O=c.n(m),k=c(62578),L=c.n(k),R=L()(O());R.push([S.id,`.cm-s-material.CodeMirror{background-color:#263238;color:#eff}.cm-s-material .CodeMirror-gutters{background:#263238;color:#546e7a;border:none}.cm-s-material .CodeMirror-guttermarker,.cm-s-material .CodeMirror-guttermarker-subtle,.cm-s-material .CodeMirror-linenumber{color:#546e7a}.cm-s-material .CodeMirror-cursor{border-left:1px solid #FFCC00}.cm-s-material.cm-fat-cursor .CodeMirror-cursor,.cm-s-material .cm-animate-fat-cursor{background-color:#5d6d5c80!important}.cm-s-material div.CodeMirror-selected,.cm-s-material.CodeMirror-focused div.CodeMirror-selected{background:rgba(128,203,196,.2)}.cm-s-material .CodeMirror-line::selection,.cm-s-material .CodeMirror-line>span::selection,.cm-s-material .CodeMirror-line>span>span::selection{background:rgba(128,203,196,.2)}.cm-s-material .CodeMirror-line::-moz-selection,.cm-s-material .CodeMirror-line>span::-moz-selection,.cm-s-material .CodeMirror-line>span>span::-moz-selection{background:rgba(128,203,196,.2)}.cm-s-material .CodeMirror-activeline-background{background:rgba(0,0,0,.5)}.cm-s-material .cm-keyword{color:#c792ea}.cm-s-material .cm-operator{color:#89ddff}.cm-s-material .cm-variable-2{color:#eff}.cm-s-material .cm-variable-3,.cm-s-material .cm-type{color:#f07178}.cm-s-material .cm-builtin{color:#ffcb6b}.cm-s-material .cm-atom{color:#f78c6c}.cm-s-material .cm-number{color:#ff5370}.cm-s-material .cm-def{color:#82aaff}.cm-s-material .cm-string{color:#c3e88d}.cm-s-material .cm-string-2{color:#f07178}.cm-s-material .cm-comment{color:#546e7a}.cm-s-material .cm-variable{color:#f07178}.cm-s-material .cm-tag{color:#ff5370}.cm-s-material .cm-meta{color:#ffcb6b}.cm-s-material .cm-attribute,.cm-s-material .cm-property{color:#c792ea}.cm-s-material .cm-qualifier,.cm-s-material .cm-variable-3,.cm-s-material .cm-type{color:#decb6b}.cm-s-material .cm-error{color:#fff;background-color:#ff5370}.cm-s-material .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
45
- `,""]);const V=R},7125:S=>{"use strict";S.exports=function(N,c){return c||(c={}),N&&(N=String(N.__esModule?N.default:N),/^['"].*['"]$/.test(N)&&(N=N.slice(1,-1)),c.hash&&(N+=c.hash),/["'() \t\n]|(%20)/.test(N)||c.needQuotes?'"'.concat(N.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):N)}},5064:(S,N,c)=>{"use strict";c.r(N),c.d(N,{Console:()=>Hy});var m={};c.r(m),c.d(m,{cookie:()=>Nc,header:()=>Mc,path:()=>Fc,query:()=>Ic});var O=c(10954),k=c(70762),L=c(93652),R=c(11099),V=c(10017),X=c(86351),te=c(86751),re=c(12953),he=c(55839),oe=c(23422);function fe(e){return fe=typeof he=="function"&&typeof oe=="symbol"?function(r){return typeof r}:function(r){return r&&typeof he=="function"&&r.constructor===he&&r!==he.prototype?"symbol":typeof r},fe(e)}var J=c(47319);function F(e,r){if(fe(e)!=="object"||e===null)return e;var i=e[J];if(i!==void 0){var a=i.call(e,r||"default");if(fe(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function ee(e){var r=F(e,"string");return fe(r)==="symbol"?r:String(r)}function D(e,r,i){return r=ee(r),r in e?re(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i,e}function w(e,r){var i=O(e);if(k){var a=k(e);r&&(a=L(a).call(a,function(o){return R(e,o).enumerable})),i.push.apply(i,a)}return i}function M(e){for(var r=1;r<arguments.length;r++){var i,a,o=arguments[r]!=null?arguments[r]:{};r%2?V(i=w(Object(o),!0)).call(i,function(f){D(e,f,o[f])}):X?te(e,X(o)):V(a=w(Object(o))).call(a,function(f){re(e,f,R(o,f))})}return e}var B=c(34961);function Z(e,r){if(e==null)return{};var i={},a=O(e),o,f;for(f=0;f<a.length;f++)o=a[f],!(B(r).call(r,o)>=0)&&(i[o]=e[o]);return i}function ae(e,r){if(e==null)return{};var i=Z(e,r),a,o;if(k){var f=k(e);for(o=0;o<f.length;o++)a=f[o],!(B(r).call(r,a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var H=c(13546),le=c.n(H),z=c(51121),q=c(26179);/*!
41
+ */R.parse=O,R.serialize=k;var c=Object.prototype.toString,m=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function O(te,re){if(typeof te!="string")throw new TypeError("argument str must be a string");for(var he={},oe=re||{},fe=oe.decode||L,J=0;J<te.length;){var F=te.indexOf("=",J);if(F===-1)break;var ee=te.indexOf(";",J);if(ee===-1)ee=te.length;else if(ee<F){J=te.lastIndexOf(";",F-1)+1;continue}var N=te.slice(J,F).trim();if(he[N]===void 0){var w=te.slice(F+1,ee).trim();w.charCodeAt(0)===34&&(w=w.slice(1,-1)),he[N]=X(w,fe)}J=ee+1}return he}function k(te,re,he){var oe=he||{},fe=oe.encode||D;if(typeof fe!="function")throw new TypeError("option encode is invalid");if(!m.test(te))throw new TypeError("argument name is invalid");var J=fe(re);if(J&&!m.test(J))throw new TypeError("argument val is invalid");var F=te+"="+J;if(oe.maxAge!=null){var ee=oe.maxAge-0;if(isNaN(ee)||!isFinite(ee))throw new TypeError("option maxAge is invalid");F+="; Max-Age="+Math.floor(ee)}if(oe.domain){if(!m.test(oe.domain))throw new TypeError("option domain is invalid");F+="; Domain="+oe.domain}if(oe.path){if(!m.test(oe.path))throw new TypeError("option path is invalid");F+="; Path="+oe.path}if(oe.expires){var N=oe.expires;if(!j(N)||isNaN(N.valueOf()))throw new TypeError("option expires is invalid");F+="; Expires="+N.toUTCString()}if(oe.httpOnly&&(F+="; HttpOnly"),oe.secure&&(F+="; Secure"),oe.priority){var w=typeof oe.priority=="string"?oe.priority.toLowerCase():oe.priority;switch(w){case"low":F+="; Priority=Low";break;case"medium":F+="; Priority=Medium";break;case"high":F+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(oe.sameSite){var M=typeof oe.sameSite=="string"?oe.sameSite.toLowerCase():oe.sameSite;switch(M){case!0:F+="; SameSite=Strict";break;case"lax":F+="; SameSite=Lax";break;case"strict":F+="; SameSite=Strict";break;case"none":F+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return F}function L(te){return te.indexOf("%")!==-1?decodeURIComponent(te):te}function D(te){return encodeURIComponent(te)}function j(te){return c.call(te)==="[object Date]"||te instanceof Date}function X(te,re){try{return re(te)}catch{return te}}},97529:(S,R,c)=>{var m=c(44928);S.exports=m},75342:(S,R,c)=>{var m=c(26087);S.exports=m},64218:(S,R,c)=>{var m=c(11783);S.exports=m},95050:(S,R,c)=>{var m=c(88462);S.exports=m},84779:(S,R,c)=>{var m=c(83531);S.exports=m},17190:(S,R,c)=>{var m=c(19941);S.exports=m},96589:(S,R,c)=>{var m=c(25081);S.exports=m},32276:(S,R,c)=>{var m=c(22145);S.exports=m},15064:(S,R,c)=>{var m=c(93690);S.exports=m},31986:(S,R,c)=>{var m=c(8429);c(42319),S.exports=m},69635:(S,R,c)=>{var m=c(13099);S.exports=m},3529:(S,R,c)=>{var m=c(44931);S.exports=m},85373:(S,R,c)=>{c(17802);var m=c(70291);S.exports=m("Array").filter},94537:(S,R,c)=>{c(64009);var m=c(70291);S.exports=m("Array").forEach},27794:(S,R,c)=>{c(32449);var m=c(70291);S.exports=m("Array").indexOf},55794:(S,R,c)=>{var m=c(15166),O=c(85373),k=Array.prototype;S.exports=function(L){var D=L.filter;return L===k||m(k,L)&&D===k.filter?O:D}},85838:(S,R,c)=>{var m=c(15166),O=c(27794),k=Array.prototype;S.exports=function(L){var D=L.indexOf;return L===k||m(k,L)&&D===k.indexOf?O:D}},95617:(S,R,c)=>{c(28135);var m=c(59921),O=m.Object,k=S.exports=function(D,j){return O.defineProperties(D,j)};O.defineProperties.sham&&(k.sham=!0)},11906:(S,R,c)=>{c(70829);var m=c(59921),O=m.Object,k=S.exports=function(D,j,X){return O.defineProperty(D,j,X)};O.defineProperty.sham&&(k.sham=!0)},59123:(S,R,c)=>{c(51964);var m=c(59921),O=m.Object,k=S.exports=function(D,j){return O.getOwnPropertyDescriptor(D,j)};O.getOwnPropertyDescriptor.sham&&(k.sham=!0)},63332:(S,R,c)=>{c(723);var m=c(59921);S.exports=m.Object.getOwnPropertyDescriptors},83606:(S,R,c)=>{c(68030);var m=c(59921);S.exports=m.Object.getOwnPropertySymbols},90660:(S,R,c)=>{c(38339);var m=c(59921);S.exports=m.Object.keys},49198:(S,R,c)=>{c(69825),c(97829),c(68030),c(95353),c(63906),c(39542),c(47882),c(84911),c(88725),c(47954),c(67703),c(2220),c(48990),c(50240),c(99921),c(3502),c(80220),c(23870),c(5828),c(5708);var m=c(59921);S.exports=m.Symbol},15413:(S,R,c)=>{c(44390),c(97829),c(27626),c(84911);var m=c(39378);S.exports=m.f("iterator")},4793:(S,R,c)=>{c(91667),c(99921);var m=c(39378);S.exports=m.f("toPrimitive")},24018:(S,R,c)=>{S.exports=c(11226)},27411:(S,R,c)=>{S.exports=c(39743)},79155:(S,R,c)=>{S.exports=c(17018)},13375:(S,R,c)=>{S.exports=c(45057)},95442:(S,R,c)=>{S.exports=c(97947)},55334:(S,R,c)=>{S.exports=c(26452)},48261:(S,R,c)=>{S.exports=c(4477)},92864:(S,R,c)=>{S.exports=c(74013)},27923:(S,R,c)=>{S.exports=c(17685)},89225:(S,R,c)=>{S.exports=c(2371)},95281:(S,R,c)=>{S.exports=c(89061)},55468:(S,R,c)=>{S.exports=c(51553)},11226:(S,R,c)=>{var m=c(97529);S.exports=m},39743:(S,R,c)=>{var m=c(75342);S.exports=m},17018:(S,R,c)=>{var m=c(64218);S.exports=m},45057:(S,R,c)=>{var m=c(95050);S.exports=m},97947:(S,R,c)=>{var m=c(84779);S.exports=m},26452:(S,R,c)=>{var m=c(17190);S.exports=m},4477:(S,R,c)=>{var m=c(96589);S.exports=m},74013:(S,R,c)=>{var m=c(32276);S.exports=m},17685:(S,R,c)=>{var m=c(15064);S.exports=m},2371:(S,R,c)=>{var m=c(31986);c(45987),c(58052),c(90181),c(25129),c(90397),c(18097),c(82793),c(52100),c(20122),S.exports=m},89061:(S,R,c)=>{var m=c(69635);S.exports=m},51553:(S,R,c)=>{var m=c(3529);S.exports=m},81970:(S,R,c)=>{var m=c(43152),O=c(18342),k=TypeError;S.exports=function(L){if(m(L))return L;throw k(O(L)+" is not a function")}},72185:(S,R,c)=>{var m=c(43152),O=String,k=TypeError;S.exports=function(L){if(typeof L=="object"||m(L))return L;throw k("Can't set "+O(L)+" as a prototype")}},20844:S=>{S.exports=function(){}},35970:(S,R,c)=>{var m=c(92548),O=String,k=TypeError;S.exports=function(L){if(m(L))return L;throw k(O(L)+" is not an object")}},24782:(S,R,c)=>{"use strict";var m=c(93935).forEach,O=c(10454),k=O("forEach");S.exports=k?[].forEach:function(D){return m(this,D,arguments.length>1?arguments[1]:void 0)}},66322:(S,R,c)=>{var m=c(88966),O=c(13249),k=c(53387),L=function(D){return function(j,X,te){var re=m(j),he=k(re),oe=O(te,he),fe;if(D&&X!=X){for(;he>oe;)if(fe=re[oe++],fe!=fe)return!0}else for(;he>oe;oe++)if((D||oe in re)&&re[oe]===X)return D||oe||0;return!D&&-1}};S.exports={includes:L(!0),indexOf:L(!1)}},93935:(S,R,c)=>{var m=c(7416),O=c(90406),k=c(38622),L=c(53254),D=c(53387),j=c(69573),X=O([].push),te=function(re){var he=re==1,oe=re==2,fe=re==3,J=re==4,F=re==6,ee=re==7,N=re==5||F;return function(w,M,B,Z){for(var ae=L(w),H=k(ae),le=m(M,B),z=D(H),q=0,pe=Z||j,xe=he?pe(w,z):oe||ee?pe(w,0):void 0,Q,ye;z>q;q++)if((N||q in H)&&(Q=H[q],ye=le(Q,q,ae),re))if(he)xe[q]=ye;else if(ye)switch(re){case 3:return!0;case 5:return Q;case 6:return q;case 2:X(xe,Q)}else switch(re){case 4:return!1;case 7:X(xe,Q)}return F?-1:fe||J?J:xe}};S.exports={forEach:te(0),map:te(1),filter:te(2),some:te(3),every:te(4),find:te(5),findIndex:te(6),filterReject:te(7)}},36844:(S,R,c)=>{var m=c(31982),O=c(33538),k=c(32438),L=O("species");S.exports=function(D){return k>=51||!m(function(){var j=[],X=j.constructor={};return X[L]=function(){return{foo:1}},j[D](Boolean).foo!==1})}},10454:(S,R,c)=>{"use strict";var m=c(31982);S.exports=function(O,k){var L=[][O];return!!L&&m(function(){L.call(null,k||function(){return 1},1)})}},67932:(S,R,c)=>{var m=c(13249),O=c(53387),k=c(53437),L=Array,D=Math.max;S.exports=function(j,X,te){for(var re=O(j),he=m(X,re),oe=m(te===void 0?re:te,re),fe=L(D(oe-he,0)),J=0;he<oe;he++,J++)k(fe,J,j[he]);return fe.length=J,fe}},53160:(S,R,c)=>{var m=c(90406);S.exports=m([].slice)},76562:(S,R,c)=>{var m=c(93053),O=c(43455),k=c(92548),L=c(33538),D=L("species"),j=Array;S.exports=function(X){var te;return m(X)&&(te=X.constructor,O(te)&&(te===j||m(te.prototype))?te=void 0:k(te)&&(te=te[D],te===null&&(te=void 0))),te===void 0?j:te}},69573:(S,R,c)=>{var m=c(76562);S.exports=function(O,k){return new(m(O))(k===0?0:k)}},58310:(S,R,c)=>{var m=c(90406),O=m({}.toString),k=m("".slice);S.exports=function(L){return k(O(L),8,-1)}},82059:(S,R,c)=>{var m=c(48448),O=c(43152),k=c(58310),L=c(33538),D=L("toStringTag"),j=Object,X=k(function(){return arguments}())=="Arguments",te=function(re,he){try{return re[he]}catch{}};S.exports=m?k:function(re){var he,oe,fe;return re===void 0?"Undefined":re===null?"Null":typeof(oe=te(he=j(re),D))=="string"?oe:X?k(he):(fe=k(he))=="Object"&&O(he.callee)?"Arguments":fe}},74838:(S,R,c)=>{var m=c(31982);S.exports=!m(function(){function O(){}return O.prototype.constructor=null,Object.getPrototypeOf(new O)!==O.prototype})},10248:S=>{S.exports=function(R,c){return{value:R,done:c}}},20410:(S,R,c)=>{var m=c(56049),O=c(36133),k=c(54686);S.exports=m?function(L,D,j){return O.f(L,D,k(1,j))}:function(L,D,j){return L[D]=j,L}},54686:S=>{S.exports=function(R,c){return{enumerable:!(R&1),configurable:!(R&2),writable:!(R&4),value:c}}},53437:(S,R,c)=>{"use strict";var m=c(5135),O=c(36133),k=c(54686);S.exports=function(L,D,j){var X=m(D);X in L?O.f(L,X,k(0,j)):L[X]=j}},37912:(S,R,c)=>{var m=c(36133);S.exports=function(O,k,L){return m.f(O,k,L)}},27519:(S,R,c)=>{var m=c(20410);S.exports=function(O,k,L,D){return D&&D.enumerable?O[k]=L:m(O,k,L),O}},9267:(S,R,c)=>{var m=c(62447),O=Object.defineProperty;S.exports=function(k,L){try{O(m,k,{value:L,configurable:!0,writable:!0})}catch{m[k]=L}return L}},56049:(S,R,c)=>{var m=c(31982);S.exports=!m(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},51647:S=>{var R=typeof document=="object"&&document.all,c=typeof R>"u"&&R!==void 0;S.exports={all:R,IS_HTMLDDA:c}},45511:(S,R,c)=>{var m=c(62447),O=c(92548),k=m.document,L=O(k)&&O(k.createElement);S.exports=function(D){return L?k.createElement(D):{}}},11452:S=>{var R=TypeError,c=9007199254740991;S.exports=function(m){if(m>c)throw R("Maximum allowed index exceeded");return m}},81595:S=>{S.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},90740:S=>{S.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},32438:(S,R,c)=>{var m=c(62447),O=c(90740),k=m.process,L=m.Deno,D=k&&k.versions||L&&L.version,j=D&&D.v8,X,te;j&&(X=j.split("."),te=X[0]>0&&X[0]<4?1:+(X[0]+X[1])),!te&&O&&(X=O.match(/Edge\/(\d+)/),(!X||X[1]>=74)&&(X=O.match(/Chrome\/(\d+)/),X&&(te=+X[1]))),S.exports=te},70291:(S,R,c)=>{var m=c(59921);S.exports=function(O){return m[O+"Prototype"]}},11792:S=>{S.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},30080:(S,R,c)=>{"use strict";var m=c(62447),O=c(82768),k=c(57953),L=c(43152),D=c(80016).f,j=c(51585),X=c(59921),te=c(7416),re=c(20410),he=c(18768),oe=function(fe){var J=function(F,ee,N){if(this instanceof J){switch(arguments.length){case 0:return new fe;case 1:return new fe(F);case 2:return new fe(F,ee)}return new fe(F,ee,N)}return O(fe,this,arguments)};return J.prototype=fe.prototype,J};S.exports=function(fe,J){var F=fe.target,ee=fe.global,N=fe.stat,w=fe.proto,M=ee?m:N?m[F]:(m[F]||{}).prototype,B=ee?X:X[F]||re(X,F,{})[F],Z=B.prototype,ae,H,le,z,q,pe,xe,Q,ye;for(z in J)ae=j(ee?z:F+(N?".":"#")+z,fe.forced),H=!ae&&M&&he(M,z),pe=B[z],H&&(fe.dontCallGetSet?(ye=D(M,z),xe=ye&&ye.value):xe=M[z]),q=H&&xe?xe:J[z],!(H&&typeof pe==typeof q)&&(fe.bind&&H?Q=te(q,m):fe.wrap&&H?Q=oe(q):w&&L(q)?Q=k(q):Q=q,(fe.sham||q&&q.sham||pe&&pe.sham)&&re(Q,"sham",!0),re(B,z,Q),w&&(le=F+"Prototype",he(X,le)||re(X,le,{}),re(X[le],z,q),fe.real&&Z&&(ae||!Z[z])&&re(Z,z,q)))}},31982:S=>{S.exports=function(R){try{return!!R()}catch{return!0}}},82768:(S,R,c)=>{var m=c(97966),O=Function.prototype,k=O.apply,L=O.call;S.exports=typeof Reflect=="object"&&Reflect.apply||(m?L.bind(k):function(){return L.apply(k,arguments)})},7416:(S,R,c)=>{var m=c(57953),O=c(81970),k=c(97966),L=m(m.bind);S.exports=function(D,j){return O(D),j===void 0?D:k?L(D,j):function(){return D.apply(j,arguments)}}},97966:(S,R,c)=>{var m=c(31982);S.exports=!m(function(){var O=function(){}.bind();return typeof O!="function"||O.hasOwnProperty("prototype")})},12461:(S,R,c)=>{var m=c(97966),O=Function.prototype.call;S.exports=m?O.bind(O):function(){return O.apply(O,arguments)}},58100:(S,R,c)=>{var m=c(56049),O=c(18768),k=Function.prototype,L=m&&Object.getOwnPropertyDescriptor,D=O(k,"name"),j=D&&function(){}.name==="something",X=D&&(!m||m&&L(k,"name").configurable);S.exports={EXISTS:D,PROPER:j,CONFIGURABLE:X}},54518:(S,R,c)=>{var m=c(90406),O=c(81970);S.exports=function(k,L,D){try{return m(O(Object.getOwnPropertyDescriptor(k,L)[D]))}catch{}}},57953:(S,R,c)=>{var m=c(58310),O=c(90406);S.exports=function(k){if(m(k)==="Function")return O(k)}},90406:(S,R,c)=>{var m=c(97966),O=Function.prototype,k=O.call,L=m&&O.bind.bind(k,k);S.exports=m?L:function(D){return function(){return k.apply(D,arguments)}}},97080:(S,R,c)=>{var m=c(59921),O=c(62447),k=c(43152),L=function(D){return k(D)?D:void 0};S.exports=function(D,j){return arguments.length<2?L(m[D])||L(O[D]):m[D]&&m[D][j]||O[D]&&O[D][j]}},82850:(S,R,c)=>{var m=c(90406),O=c(93053),k=c(43152),L=c(58310),D=c(46025),j=m([].push);S.exports=function(X){if(k(X))return X;if(O(X)){for(var te=X.length,re=[],he=0;he<te;he++){var oe=X[he];typeof oe=="string"?j(re,oe):(typeof oe=="number"||L(oe)=="Number"||L(oe)=="String")&&j(re,D(oe))}var fe=re.length,J=!0;return function(F,ee){if(J)return J=!1,ee;if(O(this))return ee;for(var N=0;N<fe;N++)if(re[N]===F)return ee}}}},27529:(S,R,c)=>{var m=c(81970),O=c(71365);S.exports=function(k,L){var D=k[L];return O(D)?void 0:m(D)}},62447:(S,R,c)=>{var m=function(O){return O&&O.Math==Math&&O};S.exports=m(typeof globalThis=="object"&&globalThis)||m(typeof window=="object"&&window)||m(typeof self=="object"&&self)||m(typeof c.g=="object"&&c.g)||function(){return this}()||Function("return this")()},18768:(S,R,c)=>{var m=c(90406),O=c(53254),k=m({}.hasOwnProperty);S.exports=Object.hasOwn||function(D,j){return k(O(D),j)}},13477:S=>{S.exports={}},19552:(S,R,c)=>{var m=c(97080);S.exports=m("document","documentElement")},11314:(S,R,c)=>{var m=c(56049),O=c(31982),k=c(45511);S.exports=!m&&!O(function(){return Object.defineProperty(k("div"),"a",{get:function(){return 7}}).a!=7})},38622:(S,R,c)=>{var m=c(90406),O=c(31982),k=c(58310),L=Object,D=m("".split);S.exports=O(function(){return!L("z").propertyIsEnumerable(0)})?function(j){return k(j)=="String"?D(j,""):L(j)}:L},41524:(S,R,c)=>{var m=c(90406),O=c(43152),k=c(70716),L=m(Function.toString);O(k.inspectSource)||(k.inspectSource=function(D){return L(D)}),S.exports=k.inspectSource},44083:(S,R,c)=>{var m=c(57761),O=c(62447),k=c(92548),L=c(20410),D=c(18768),j=c(70716),X=c(4580),te=c(13477),re="Object already initialized",he=O.TypeError,oe=O.WeakMap,fe,J,F,ee=function(B){return F(B)?J(B):fe(B,{})},N=function(B){return function(Z){var ae;if(!k(Z)||(ae=J(Z)).type!==B)throw he("Incompatible receiver, "+B+" required");return ae}};if(m||j.state){var w=j.state||(j.state=new oe);w.get=w.get,w.has=w.has,w.set=w.set,fe=function(B,Z){if(w.has(B))throw he(re);return Z.facade=B,w.set(B,Z),Z},J=function(B){return w.get(B)||{}},F=function(B){return w.has(B)}}else{var M=X("state");te[M]=!0,fe=function(B,Z){if(D(B,M))throw he(re);return Z.facade=B,L(B,M,Z),Z},J=function(B){return D(B,M)?B[M]:{}},F=function(B){return D(B,M)}}S.exports={set:fe,get:J,has:F,enforce:ee,getterFor:N}},93053:(S,R,c)=>{var m=c(58310);S.exports=Array.isArray||function(k){return m(k)=="Array"}},43152:(S,R,c)=>{var m=c(51647),O=m.all;S.exports=m.IS_HTMLDDA?function(k){return typeof k=="function"||k===O}:function(k){return typeof k=="function"}},43455:(S,R,c)=>{var m=c(90406),O=c(31982),k=c(43152),L=c(82059),D=c(97080),j=c(41524),X=function(){},te=[],re=D("Reflect","construct"),he=/^\s*(?:class|function)\b/,oe=m(he.exec),fe=!he.exec(X),J=function(N){if(!k(N))return!1;try{return re(X,te,N),!0}catch{return!1}},F=function(N){if(!k(N))return!1;switch(L(N)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return fe||!!oe(he,j(N))}catch{return!0}};F.sham=!0,S.exports=!re||O(function(){var ee;return J(J.call)||!J(Object)||!J(function(){ee=!0})||ee})?F:J},51585:(S,R,c)=>{var m=c(31982),O=c(43152),k=/#|\.prototype\./,L=function(re,he){var oe=j[D(re)];return oe==te?!0:oe==X?!1:O(he)?m(he):!!he},D=L.normalize=function(re){return String(re).replace(k,".").toLowerCase()},j=L.data={},X=L.NATIVE="N",te=L.POLYFILL="P";S.exports=L},71365:S=>{S.exports=function(R){return R==null}},92548:(S,R,c)=>{var m=c(43152),O=c(51647),k=O.all;S.exports=O.IS_HTMLDDA?function(L){return typeof L=="object"?L!==null:m(L)||L===k}:function(L){return typeof L=="object"?L!==null:m(L)}},39839:S=>{S.exports=!0},28609:(S,R,c)=>{var m=c(97080),O=c(43152),k=c(15166),L=c(27237),D=Object;S.exports=L?function(j){return typeof j=="symbol"}:function(j){var X=m("Symbol");return O(X)&&k(X.prototype,D(j))}},41709:(S,R,c)=>{"use strict";var m=c(98488).IteratorPrototype,O=c(73270),k=c(54686),L=c(98889),D=c(94609),j=function(){return this};S.exports=function(X,te,re,he){var oe=te+" Iterator";return X.prototype=O(m,{next:k(+!he,re)}),L(X,oe,!1,!0),D[oe]=j,X}},78107:(S,R,c)=>{"use strict";var m=c(30080),O=c(12461),k=c(39839),L=c(58100),D=c(43152),j=c(41709),X=c(90851),te=c(70738),re=c(98889),he=c(20410),oe=c(27519),fe=c(33538),J=c(94609),F=c(98488),ee=L.PROPER,N=L.CONFIGURABLE,w=F.IteratorPrototype,M=F.BUGGY_SAFARI_ITERATORS,B=fe("iterator"),Z="keys",ae="values",H="entries",le=function(){return this};S.exports=function(z,q,pe,xe,Q,ye,ie){j(pe,q,xe);var je=function(He){if(He===Q&&ut)return ut;if(!M&&He in vt)return vt[He];switch(He){case Z:return function(){return new pe(this,He)};case ae:return function(){return new pe(this,He)};case H:return function(){return new pe(this,He)}}return function(){return new pe(this)}},ze=q+" Iterator",Ue=!1,vt=z.prototype,pt=vt[B]||vt["@@iterator"]||Q&&vt[Q],ut=!M&&pt||je(Q),er=q=="Array"&&vt.entries||pt,gt,Rt,st;if(er&&(gt=X(er.call(new z)),gt!==Object.prototype&&gt.next&&(!k&&X(gt)!==w&&(te?te(gt,w):D(gt[B])||oe(gt,B,le)),re(gt,ze,!0,!0),k&&(J[ze]=le))),ee&&Q==ae&&pt&&pt.name!==ae&&(!k&&N?he(vt,"name",ae):(Ue=!0,ut=function(){return O(pt,this)})),Q)if(Rt={values:je(ae),keys:ye?ut:je(Z),entries:je(H)},ie)for(st in Rt)(M||Ue||!(st in vt))&&oe(vt,st,Rt[st]);else m({target:q,proto:!0,forced:M||Ue},Rt);return(!k||ie)&&vt[B]!==ut&&oe(vt,B,ut,{name:Q}),J[q]=ut,Rt}},98488:(S,R,c)=>{"use strict";var m=c(31982),O=c(43152),k=c(92548),L=c(73270),D=c(90851),j=c(27519),X=c(33538),te=c(39839),re=X("iterator"),he=!1,oe,fe,J;[].keys&&(J=[].keys(),"next"in J?(fe=D(D(J)),fe!==Object.prototype&&(oe=fe)):he=!0);var F=!k(oe)||m(function(){var ee={};return oe[re].call(ee)!==ee});F?oe={}:te&&(oe=L(oe)),O(oe[re])||j(oe,re,function(){return this}),S.exports={IteratorPrototype:oe,BUGGY_SAFARI_ITERATORS:he}},94609:S=>{S.exports={}},53387:(S,R,c)=>{var m=c(62567);S.exports=function(O){return m(O.length)}},99295:S=>{var R=Math.ceil,c=Math.floor;S.exports=Math.trunc||function(O){var k=+O;return(k>0?c:R)(k)}},73270:(S,R,c)=>{var m=c(35970),O=c(98911),k=c(11792),L=c(13477),D=c(19552),j=c(45511),X=c(4580),te=">",re="<",he="prototype",oe="script",fe=X("IE_PROTO"),J=function(){},F=function(B){return re+oe+te+B+re+"/"+oe+te},ee=function(B){B.write(F("")),B.close();var Z=B.parentWindow.Object;return B=null,Z},N=function(){var B=j("iframe"),Z="java"+oe+":",ae;return B.style.display="none",D.appendChild(B),B.src=String(Z),ae=B.contentWindow.document,ae.open(),ae.write(F("document.F=Object")),ae.close(),ae.F},w,M=function(){try{w=new ActiveXObject("htmlfile")}catch{}M=typeof document<"u"?document.domain&&w?ee(w):N():ee(w);for(var B=k.length;B--;)delete M[he][k[B]];return M()};L[fe]=!0,S.exports=Object.create||function(Z,ae){var H;return Z!==null?(J[he]=m(Z),H=new J,J[he]=null,H[fe]=Z):H=M(),ae===void 0?H:O.f(H,ae)}},98911:(S,R,c)=>{var m=c(56049),O=c(98715),k=c(36133),L=c(35970),D=c(88966),j=c(16619);R.f=m&&!O?Object.defineProperties:function(te,re){L(te);for(var he=D(re),oe=j(re),fe=oe.length,J=0,F;fe>J;)k.f(te,F=oe[J++],he[F]);return te}},36133:(S,R,c)=>{var m=c(56049),O=c(11314),k=c(98715),L=c(35970),D=c(5135),j=TypeError,X=Object.defineProperty,te=Object.getOwnPropertyDescriptor,re="enumerable",he="configurable",oe="writable";R.f=m?k?function(J,F,ee){if(L(J),F=D(F),L(ee),typeof J=="function"&&F==="prototype"&&"value"in ee&&oe in ee&&!ee[oe]){var N=te(J,F);N&&N[oe]&&(J[F]=ee.value,ee={configurable:he in ee?ee[he]:N[he],enumerable:re in ee?ee[re]:N[re],writable:!1})}return X(J,F,ee)}:X:function(J,F,ee){if(L(J),F=D(F),L(ee),O)try{return X(J,F,ee)}catch{}if("get"in ee||"set"in ee)throw j("Accessors not supported");return"value"in ee&&(J[F]=ee.value),J}},80016:(S,R,c)=>{var m=c(56049),O=c(12461),k=c(16457),L=c(54686),D=c(88966),j=c(5135),X=c(18768),te=c(11314),re=Object.getOwnPropertyDescriptor;R.f=m?re:function(oe,fe){if(oe=D(oe),fe=j(fe),te)try{return re(oe,fe)}catch{}if(X(oe,fe))return L(!O(k.f,oe,fe),oe[fe])}},53515:(S,R,c)=>{var m=c(58310),O=c(88966),k=c(51203).f,L=c(67932),D=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],j=function(X){try{return k(X)}catch{return L(D)}};S.exports.f=function(te){return D&&m(te)=="Window"?j(te):k(O(te))}},51203:(S,R,c)=>{var m=c(4541),O=c(11792),k=O.concat("length","prototype");R.f=Object.getOwnPropertyNames||function(D){return m(D,k)}},97620:(S,R)=>{R.f=Object.getOwnPropertySymbols},90851:(S,R,c)=>{var m=c(18768),O=c(43152),k=c(53254),L=c(4580),D=c(74838),j=L("IE_PROTO"),X=Object,te=X.prototype;S.exports=D?X.getPrototypeOf:function(re){var he=k(re);if(m(he,j))return he[j];var oe=he.constructor;return O(oe)&&he instanceof oe?oe.prototype:he instanceof X?te:null}},15166:(S,R,c)=>{var m=c(90406);S.exports=m({}.isPrototypeOf)},4541:(S,R,c)=>{var m=c(90406),O=c(18768),k=c(88966),L=c(66322).indexOf,D=c(13477),j=m([].push);S.exports=function(X,te){var re=k(X),he=0,oe=[],fe;for(fe in re)!O(D,fe)&&O(re,fe)&&j(oe,fe);for(;te.length>he;)O(re,fe=te[he++])&&(~L(oe,fe)||j(oe,fe));return oe}},16619:(S,R,c)=>{var m=c(4541),O=c(11792);S.exports=Object.keys||function(L){return m(L,O)}},16457:(S,R)=>{"use strict";var c={}.propertyIsEnumerable,m=Object.getOwnPropertyDescriptor,O=m&&!c.call({1:2},1);R.f=O?function(L){var D=m(this,L);return!!D&&D.enumerable}:c},70738:(S,R,c)=>{var m=c(54518),O=c(35970),k=c(72185);S.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var L=!1,D={},j;try{j=m(Object.prototype,"__proto__","set"),j(D,[]),L=D instanceof Array}catch{}return function(te,re){return O(te),k(re),L?j(te,re):te.__proto__=re,te}}():void 0)},68399:(S,R,c)=>{"use strict";var m=c(48448),O=c(82059);S.exports=m?{}.toString:function(){return"[object "+O(this)+"]"}},96380:(S,R,c)=>{var m=c(12461),O=c(43152),k=c(92548),L=TypeError;S.exports=function(D,j){var X,te;if(j==="string"&&O(X=D.toString)&&!k(te=m(X,D))||O(X=D.valueOf)&&!k(te=m(X,D))||j!=="string"&&O(X=D.toString)&&!k(te=m(X,D)))return te;throw L("Can't convert object to primitive value")}},47813:(S,R,c)=>{var m=c(97080),O=c(90406),k=c(51203),L=c(97620),D=c(35970),j=O([].concat);S.exports=m("Reflect","ownKeys")||function(te){var re=k.f(D(te)),he=L.f;return he?j(re,he(te)):re}},59921:S=>{S.exports={}},31251:(S,R,c)=>{var m=c(71365),O=TypeError;S.exports=function(k){if(m(k))throw O("Can't call method on "+k);return k}},98889:(S,R,c)=>{var m=c(48448),O=c(36133).f,k=c(20410),L=c(18768),D=c(68399),j=c(33538),X=j("toStringTag");S.exports=function(te,re,he,oe){if(te){var fe=he?te:te.prototype;L(fe,X)||O(fe,X,{configurable:!0,value:re}),oe&&!m&&k(fe,"toString",D)}}},4580:(S,R,c)=>{var m=c(95976),O=c(91248),k=m("keys");S.exports=function(L){return k[L]||(k[L]=O(L))}},70716:(S,R,c)=>{var m=c(62447),O=c(9267),k="__core-js_shared__",L=m[k]||O(k,{});S.exports=L},95976:(S,R,c)=>{var m=c(39839),O=c(70716);(S.exports=function(k,L){return O[k]||(O[k]=L!==void 0?L:{})})("versions",[]).push({version:"3.29.1",mode:m?"pure":"global",copyright:"\xA9 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.1/LICENSE",source:"https://github.com/zloirock/core-js"})},18143:(S,R,c)=>{var m=c(90406),O=c(32041),k=c(46025),L=c(31251),D=m("".charAt),j=m("".charCodeAt),X=m("".slice),te=function(re){return function(he,oe){var fe=k(L(he)),J=O(oe),F=fe.length,ee,N;return J<0||J>=F?re?"":void 0:(ee=j(fe,J),ee<55296||ee>56319||J+1===F||(N=j(fe,J+1))<56320||N>57343?re?D(fe,J):ee:re?X(fe,J,J+2):(ee-55296<<10)+(N-56320)+65536)}};S.exports={codeAt:te(!1),charAt:te(!0)}},71775:(S,R,c)=>{var m=c(32438),O=c(31982);S.exports=!!Object.getOwnPropertySymbols&&!O(function(){var k=Symbol();return!String(k)||!(Object(k)instanceof Symbol)||!Symbol.sham&&m&&m<41})},95679:(S,R,c)=>{var m=c(12461),O=c(97080),k=c(33538),L=c(27519);S.exports=function(){var D=O("Symbol"),j=D&&D.prototype,X=j&&j.valueOf,te=k("toPrimitive");j&&!j[te]&&L(j,te,function(re){return m(X,this)},{arity:1})}},82294:(S,R,c)=>{var m=c(71775);S.exports=m&&!!Symbol.for&&!!Symbol.keyFor},13249:(S,R,c)=>{var m=c(32041),O=Math.max,k=Math.min;S.exports=function(L,D){var j=m(L);return j<0?O(j+D,0):k(j,D)}},88966:(S,R,c)=>{var m=c(38622),O=c(31251);S.exports=function(k){return m(O(k))}},32041:(S,R,c)=>{var m=c(99295);S.exports=function(O){var k=+O;return k!==k||k===0?0:m(k)}},62567:(S,R,c)=>{var m=c(32041),O=Math.min;S.exports=function(k){return k>0?O(m(k),9007199254740991):0}},53254:(S,R,c)=>{var m=c(31251),O=Object;S.exports=function(k){return O(m(k))}},37505:(S,R,c)=>{var m=c(12461),O=c(92548),k=c(28609),L=c(27529),D=c(96380),j=c(33538),X=TypeError,te=j("toPrimitive");S.exports=function(re,he){if(!O(re)||k(re))return re;var oe=L(re,te),fe;if(oe){if(he===void 0&&(he="default"),fe=m(oe,re,he),!O(fe)||k(fe))return fe;throw X("Can't convert object to primitive value")}return he===void 0&&(he="number"),D(re,he)}},5135:(S,R,c)=>{var m=c(37505),O=c(28609);S.exports=function(k){var L=m(k,"string");return O(L)?L:L+""}},48448:(S,R,c)=>{var m=c(33538),O=m("toStringTag"),k={};k[O]="z",S.exports=String(k)==="[object z]"},46025:(S,R,c)=>{var m=c(82059),O=String;S.exports=function(k){if(m(k)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return O(k)}},18342:S=>{var R=String;S.exports=function(c){try{return R(c)}catch{return"Object"}}},91248:(S,R,c)=>{var m=c(90406),O=0,k=Math.random(),L=m(1 .toString);S.exports=function(D){return"Symbol("+(D===void 0?"":D)+")_"+L(++O+k,36)}},27237:(S,R,c)=>{var m=c(71775);S.exports=m&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},98715:(S,R,c)=>{var m=c(56049),O=c(31982);S.exports=m&&O(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},57761:(S,R,c)=>{var m=c(62447),O=c(43152),k=m.WeakMap;S.exports=O(k)&&/native code/.test(String(k))},64832:(S,R,c)=>{var m=c(59921),O=c(18768),k=c(39378),L=c(36133).f;S.exports=function(D){var j=m.Symbol||(m.Symbol={});O(j,D)||L(j,D,{value:k.f(D)})}},39378:(S,R,c)=>{var m=c(33538);R.f=m},33538:(S,R,c)=>{var m=c(62447),O=c(95976),k=c(18768),L=c(91248),D=c(71775),j=c(27237),X=m.Symbol,te=O("wks"),re=j?X.for||X:X&&X.withoutSetter||L;S.exports=function(he){return k(te,he)||(te[he]=D&&k(X,he)?X[he]:re("Symbol."+he)),te[he]}},69825:(S,R,c)=>{"use strict";var m=c(30080),O=c(31982),k=c(93053),L=c(92548),D=c(53254),j=c(53387),X=c(11452),te=c(53437),re=c(69573),he=c(36844),oe=c(33538),fe=c(32438),J=oe("isConcatSpreadable"),F=fe>=51||!O(function(){var w=[];return w[J]=!1,w.concat()[0]!==w}),ee=function(w){if(!L(w))return!1;var M=w[J];return M!==void 0?!!M:k(w)},N=!F||!he("concat");m({target:"Array",proto:!0,arity:1,forced:N},{concat:function(M){var B=D(this),Z=re(B,0),ae=0,H,le,z,q,pe;for(H=-1,z=arguments.length;H<z;H++)if(pe=H===-1?B:arguments[H],ee(pe))for(q=j(pe),X(ae+q),le=0;le<q;le++,ae++)le in pe&&te(Z,ae,pe[le]);else X(ae+1),te(Z,ae++,pe);return Z.length=ae,Z}})},17802:(S,R,c)=>{"use strict";var m=c(30080),O=c(93935).filter,k=c(36844),L=k("filter");m({target:"Array",proto:!0,forced:!L},{filter:function(j){return O(this,j,arguments.length>1?arguments[1]:void 0)}})},64009:(S,R,c)=>{"use strict";var m=c(30080),O=c(24782);m({target:"Array",proto:!0,forced:[].forEach!=O},{forEach:O})},32449:(S,R,c)=>{"use strict";var m=c(30080),O=c(57953),k=c(66322).indexOf,L=c(10454),D=O([].indexOf),j=!!D&&1/D([1],1,-0)<0,X=j||!L("indexOf");m({target:"Array",proto:!0,forced:X},{indexOf:function(re){var he=arguments.length>1?arguments[1]:void 0;return j?D(this,re,he)||0:k(this,re,he)}})},44390:(S,R,c)=>{"use strict";var m=c(88966),O=c(20844),k=c(94609),L=c(44083),D=c(36133).f,j=c(78107),X=c(10248),te=c(39839),re=c(56049),he="Array Iterator",oe=L.set,fe=L.getterFor(he);S.exports=j(Array,"Array",function(F,ee){oe(this,{type:he,target:m(F),index:0,kind:ee})},function(){var F=fe(this),ee=F.target,N=F.kind,w=F.index++;return!ee||w>=ee.length?(F.target=void 0,X(void 0,!0)):N=="keys"?X(w,!1):N=="values"?X(ee[w],!1):X([w,ee[w]],!1)},"values");var J=k.Arguments=k.Array;if(O("keys"),O("values"),O("entries"),!te&&re&&J.name!=="values")try{D(J,"name",{value:"values"})}catch{}},91667:()=>{},39306:(S,R,c)=>{var m=c(30080),O=c(97080),k=c(82768),L=c(12461),D=c(90406),j=c(31982),X=c(43152),te=c(28609),re=c(53160),he=c(82850),oe=c(71775),fe=String,J=O("JSON","stringify"),F=D(/./.exec),ee=D("".charAt),N=D("".charCodeAt),w=D("".replace),M=D(1 .toString),B=/[\uD800-\uDFFF]/g,Z=/^[\uD800-\uDBFF]$/,ae=/^[\uDC00-\uDFFF]$/,H=!oe||j(function(){var pe=O("Symbol")();return J([pe])!="[null]"||J({a:pe})!="{}"||J(Object(pe))!="{}"}),le=j(function(){return J("\uDF06\uD834")!=='"\\udf06\\ud834"'||J("\uDEAD")!=='"\\udead"'}),z=function(pe,xe){var Q=re(arguments),ye=he(xe);if(!(!X(ye)&&(pe===void 0||te(pe))))return Q[1]=function(ie,je){if(X(ye)&&(je=L(ye,this,fe(ie),je)),!te(je))return je},k(J,null,Q)},q=function(pe,xe,Q){var ye=ee(Q,xe-1),ie=ee(Q,xe+1);return F(Z,pe)&&!F(ae,ie)||F(ae,pe)&&!F(Z,ye)?"\\u"+M(N(pe,0),16):pe};J&&m({target:"JSON",stat:!0,arity:3,forced:H||le},{stringify:function(xe,Q,ye){var ie=re(arguments),je=k(H?z:J,null,ie);return le&&typeof je=="string"?w(je,B,q):je}})},23870:(S,R,c)=>{var m=c(62447),O=c(98889);O(m.JSON,"JSON",!0)},5828:()=>{},28135:(S,R,c)=>{var m=c(30080),O=c(56049),k=c(98911).f;m({target:"Object",stat:!0,forced:Object.defineProperties!==k,sham:!O},{defineProperties:k})},70829:(S,R,c)=>{var m=c(30080),O=c(56049),k=c(36133).f;m({target:"Object",stat:!0,forced:Object.defineProperty!==k,sham:!O},{defineProperty:k})},51964:(S,R,c)=>{var m=c(30080),O=c(31982),k=c(88966),L=c(80016).f,D=c(56049),j=!D||O(function(){L(1)});m({target:"Object",stat:!0,forced:j,sham:!D},{getOwnPropertyDescriptor:function(te,re){return L(k(te),re)}})},723:(S,R,c)=>{var m=c(30080),O=c(56049),k=c(47813),L=c(88966),D=c(80016),j=c(53437);m({target:"Object",stat:!0,sham:!O},{getOwnPropertyDescriptors:function(te){for(var re=L(te),he=D.f,oe=k(re),fe={},J=0,F,ee;oe.length>J;)ee=he(re,F=oe[J++]),ee!==void 0&&j(fe,F,ee);return fe}})},86884:(S,R,c)=>{var m=c(30080),O=c(71775),k=c(31982),L=c(97620),D=c(53254),j=!O||k(function(){L.f(1)});m({target:"Object",stat:!0,forced:j},{getOwnPropertySymbols:function(te){var re=L.f;return re?re(D(te)):[]}})},38339:(S,R,c)=>{var m=c(30080),O=c(53254),k=c(16619),L=c(31982),D=L(function(){k(1)});m({target:"Object",stat:!0,forced:D},{keys:function(X){return k(O(X))}})},97829:()=>{},5708:()=>{},27626:(S,R,c)=>{"use strict";var m=c(18143).charAt,O=c(46025),k=c(44083),L=c(78107),D=c(10248),j="String Iterator",X=k.set,te=k.getterFor(j);L(String,"String",function(re){X(this,{type:j,string:O(re),index:0})},function(){var he=te(this),oe=he.string,fe=he.index,J;return fe>=oe.length?D(void 0,!0):(J=m(oe,fe),he.index+=J.length,D(J,!1))})},95353:(S,R,c)=>{var m=c(64832);m("asyncIterator")},16212:(S,R,c)=>{"use strict";var m=c(30080),O=c(62447),k=c(12461),L=c(90406),D=c(39839),j=c(56049),X=c(71775),te=c(31982),re=c(18768),he=c(15166),oe=c(35970),fe=c(88966),J=c(5135),F=c(46025),ee=c(54686),N=c(73270),w=c(16619),M=c(51203),B=c(53515),Z=c(97620),ae=c(80016),H=c(36133),le=c(98911),z=c(16457),q=c(27519),pe=c(37912),xe=c(95976),Q=c(4580),ye=c(13477),ie=c(91248),je=c(33538),ze=c(39378),Ue=c(64832),vt=c(95679),pt=c(98889),ut=c(44083),er=c(93935).forEach,gt=Q("hidden"),Rt="Symbol",st="prototype",He=ut.set,Re=ut.getterFor(Rt),Be=Object[st],lt=O.Symbol,_t=lt&&lt[st],rt=O.TypeError,Pt=O.QObject,tr=ae.f,or=H.f,kr=B.f,et=z.f,Et=L([].push),jt=xe("symbols"),_r=xe("op-symbols"),zt=xe("wks"),Bn=!Pt||!Pt[st]||!Pt[st].findChild,Vn=j&&te(function(){return N(or({},"a",{get:function(){return or(this,"a",{value:7}).a}})).a!=7})?function(St,ft,tt){var mt=tr(Be,ft);mt&&delete Be[ft],or(St,ft,tt),mt&&St!==Be&&or(Be,ft,mt)}:or,nn=function(St,ft){var tt=jt[St]=N(_t);return He(tt,{type:Rt,tag:St,description:ft}),j||(tt.description=ft),tt},Cn=function(ft,tt,mt){ft===Be&&Cn(_r,tt,mt),oe(ft);var se=J(tt);return oe(mt),re(jt,se)?(mt.enumerable?(re(ft,gt)&&ft[gt][se]&&(ft[gt][se]=!1),mt=N(mt,{enumerable:ee(0,!1)})):(re(ft,gt)||or(ft,gt,ee(1,{})),ft[gt][se]=!0),Vn(ft,se,mt)):or(ft,se,mt)},ri=function(ft,tt){oe(ft);var mt=fe(tt),se=w(mt).concat(Gt(mt));return er(se,function(we){(!j||k(an,mt,we))&&Cn(ft,we,mt[we])}),ft},jn=function(ft,tt){return tt===void 0?N(ft):ri(N(ft),tt)},an=function(ft){var tt=J(ft),mt=k(et,this,tt);return this===Be&&re(jt,tt)&&!re(_r,tt)?!1:mt||!re(this,tt)||!re(jt,tt)||re(this,gt)&&this[gt][tt]?mt:!0},Mr=function(ft,tt){var mt=fe(ft),se=J(tt);if(!(mt===Be&&re(jt,se)&&!re(_r,se))){var we=tr(mt,se);return we&&re(jt,se)&&!(re(mt,gt)&&mt[gt][se])&&(we.enumerable=!0),we}},zr=function(ft){var tt=kr(fe(ft)),mt=[];return er(tt,function(se){!re(jt,se)&&!re(ye,se)&&Et(mt,se)}),mt},Gt=function(St){var ft=St===Be,tt=kr(ft?_r:fe(St)),mt=[];return er(tt,function(se){re(jt,se)&&(!ft||re(Be,se))&&Et(mt,jt[se])}),mt};X||(lt=function(){if(he(_t,this))throw rt("Symbol is not a constructor");var ft=!arguments.length||arguments[0]===void 0?void 0:F(arguments[0]),tt=ie(ft),mt=function(se){this===Be&&k(mt,_r,se),re(this,gt)&&re(this[gt],tt)&&(this[gt][tt]=!1),Vn(this,tt,ee(1,se))};return j&&Bn&&Vn(Be,tt,{configurable:!0,set:mt}),nn(tt,ft)},_t=lt[st],q(_t,"toString",function(){return Re(this).tag}),q(lt,"withoutSetter",function(St){return nn(ie(St),St)}),z.f=an,H.f=Cn,le.f=ri,ae.f=Mr,M.f=B.f=zr,Z.f=Gt,ze.f=function(St){return nn(je(St),St)},j&&(pe(_t,"description",{configurable:!0,get:function(){return Re(this).description}}),D||q(Be,"propertyIsEnumerable",an,{unsafe:!0}))),m({global:!0,constructor:!0,wrap:!0,forced:!X,sham:!X},{Symbol:lt}),er(w(zt),function(St){Ue(St)}),m({target:Rt,stat:!0,forced:!X},{useSetter:function(){Bn=!0},useSimple:function(){Bn=!1}}),m({target:"Object",stat:!0,forced:!X,sham:!j},{create:jn,defineProperty:Cn,defineProperties:ri,getOwnPropertyDescriptor:Mr}),m({target:"Object",stat:!0,forced:!X},{getOwnPropertyNames:zr}),vt(),pt(lt,Rt),ye[gt]=!0},63906:()=>{},3598:(S,R,c)=>{var m=c(30080),O=c(97080),k=c(18768),L=c(46025),D=c(95976),j=c(82294),X=D("string-to-symbol-registry"),te=D("symbol-to-string-registry");m({target:"Symbol",stat:!0,forced:!j},{for:function(re){var he=L(re);if(k(X,he))return X[he];var oe=O("Symbol")(he);return X[he]=oe,te[oe]=he,oe}})},39542:(S,R,c)=>{var m=c(64832);m("hasInstance")},47882:(S,R,c)=>{var m=c(64832);m("isConcatSpreadable")},84911:(S,R,c)=>{var m=c(64832);m("iterator")},68030:(S,R,c)=>{c(16212),c(3598),c(50338),c(39306),c(86884)},50338:(S,R,c)=>{var m=c(30080),O=c(18768),k=c(28609),L=c(18342),D=c(95976),j=c(82294),X=D("symbol-to-string-registry");m({target:"Symbol",stat:!0,forced:!j},{keyFor:function(re){if(!k(re))throw TypeError(L(re)+" is not a symbol");if(O(X,re))return X[re]}})},47954:(S,R,c)=>{var m=c(64832);m("matchAll")},88725:(S,R,c)=>{var m=c(64832);m("match")},67703:(S,R,c)=>{var m=c(64832);m("replace")},2220:(S,R,c)=>{var m=c(64832);m("search")},48990:(S,R,c)=>{var m=c(64832);m("species")},50240:(S,R,c)=>{var m=c(64832);m("split")},99921:(S,R,c)=>{var m=c(64832),O=c(95679);m("toPrimitive"),O()},3502:(S,R,c)=>{var m=c(97080),O=c(64832),k=c(98889);O("toStringTag"),k(m("Symbol"),"Symbol")},80220:(S,R,c)=>{var m=c(64832);m("unscopables")},45987:(S,R,c)=>{var m=c(64832);m("asyncDispose")},42319:(S,R,c)=>{var m=c(64832);m("dispose")},58052:(S,R,c)=>{var m=c(30080),O=c(97080),k=c(90406),L=O("Symbol"),D=L.keyFor,j=k(L.prototype.valueOf);m({target:"Symbol",stat:!0},{isRegistered:function(te){try{return D(j(te))!==void 0}catch{return!1}}})},90181:(S,R,c)=>{for(var m=c(30080),O=c(95976),k=c(97080),L=c(90406),D=c(28609),j=c(33538),X=k("Symbol"),te=X.isWellKnown,re=k("Object","getOwnPropertyNames"),he=L(X.prototype.valueOf),oe=O("wks"),fe=0,J=re(X),F=J.length;fe<F;fe++)try{var ee=J[fe];D(X[ee])&&j(ee)}catch{}m({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(w){if(te&&te(w))return!0;try{for(var M=he(w),B=0,Z=re(oe),ae=Z.length;B<ae;B++)if(oe[Z[B]]==M)return!0}catch{}return!1}})},25129:(S,R,c)=>{var m=c(64832);m("matcher")},90397:(S,R,c)=>{var m=c(64832);m("metadataKey")},82793:(S,R,c)=>{var m=c(64832);m("metadata")},18097:(S,R,c)=>{var m=c(64832);m("observable")},52100:(S,R,c)=>{var m=c(64832);m("patternMatch")},20122:(S,R,c)=>{var m=c(64832);m("replaceAll")},48713:(S,R,c)=>{c(44390);var m=c(81595),O=c(62447),k=c(82059),L=c(20410),D=c(94609),j=c(33538),X=j("toStringTag");for(var te in m){var re=O[te],he=re&&re.prototype;he&&k(he)!==X&&L(he,X,te),D[te]=D.Array}},41544:(S,R,c)=>{var m=c(94537);S.exports=m},44928:(S,R,c)=>{var m=c(55794);S.exports=m},26087:(S,R,c)=>{c(48713);var m=c(82059),O=c(18768),k=c(15166),L=c(41544),D=Array.prototype,j={DOMTokenList:!0,NodeList:!0};S.exports=function(X){var te=X.forEach;return X===D||k(D,X)&&te===D.forEach||O(j,m(X))?L:te}},11783:(S,R,c)=>{var m=c(85838);S.exports=m},88462:(S,R,c)=>{var m=c(95617);S.exports=m},83531:(S,R,c)=>{var m=c(11906);S.exports=m},19941:(S,R,c)=>{var m=c(59123);S.exports=m},25081:(S,R,c)=>{var m=c(63332);S.exports=m},22145:(S,R,c)=>{var m=c(83606);S.exports=m},93690:(S,R,c)=>{var m=c(90660);S.exports=m},8429:(S,R,c)=>{var m=c(49198);c(48713),S.exports=m},13099:(S,R,c)=>{var m=c(15413);c(48713),S.exports=m},44931:(S,R,c)=>{var m=c(4793);S.exports=m},81933:function(){(function(S){var R=function(c){var m={searchParams:"URLSearchParams"in S,iterable:"Symbol"in S&&"iterator"in Symbol,blob:"FileReader"in S&&"Blob"in S&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in S,arrayBuffer:"ArrayBuffer"in S};function O(z){return z&&DataView.prototype.isPrototypeOf(z)}if(m.arrayBuffer)var k=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],L=ArrayBuffer.isView||function(z){return z&&k.indexOf(Object.prototype.toString.call(z))>-1};function D(z){if(typeof z!="string"&&(z=String(z)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(z))throw new TypeError("Invalid character in header field name");return z.toLowerCase()}function j(z){return typeof z!="string"&&(z=String(z)),z}function X(z){var q={next:function(){var pe=z.shift();return{done:pe===void 0,value:pe}}};return m.iterable&&(q[Symbol.iterator]=function(){return q}),q}function te(z){this.map={},z instanceof te?z.forEach(function(q,pe){this.append(pe,q)},this):Array.isArray(z)?z.forEach(function(q){this.append(q[0],q[1])},this):z&&Object.getOwnPropertyNames(z).forEach(function(q){this.append(q,z[q])},this)}te.prototype.append=function(z,q){z=D(z),q=j(q);var pe=this.map[z];this.map[z]=pe?pe+", "+q:q},te.prototype.delete=function(z){delete this.map[D(z)]},te.prototype.get=function(z){return z=D(z),this.has(z)?this.map[z]:null},te.prototype.has=function(z){return this.map.hasOwnProperty(D(z))},te.prototype.set=function(z,q){this.map[D(z)]=j(q)},te.prototype.forEach=function(z,q){for(var pe in this.map)this.map.hasOwnProperty(pe)&&z.call(q,this.map[pe],pe,this)},te.prototype.keys=function(){var z=[];return this.forEach(function(q,pe){z.push(pe)}),X(z)},te.prototype.values=function(){var z=[];return this.forEach(function(q){z.push(q)}),X(z)},te.prototype.entries=function(){var z=[];return this.forEach(function(q,pe){z.push([pe,q])}),X(z)},m.iterable&&(te.prototype[Symbol.iterator]=te.prototype.entries);function re(z){if(z.bodyUsed)return Promise.reject(new TypeError("Already read"));z.bodyUsed=!0}function he(z){return new Promise(function(q,pe){z.onload=function(){q(z.result)},z.onerror=function(){pe(z.error)}})}function oe(z){var q=new FileReader,pe=he(q);return q.readAsArrayBuffer(z),pe}function fe(z){var q=new FileReader,pe=he(q);return q.readAsText(z),pe}function J(z){for(var q=new Uint8Array(z),pe=new Array(q.length),xe=0;xe<q.length;xe++)pe[xe]=String.fromCharCode(q[xe]);return pe.join("")}function F(z){if(z.slice)return z.slice(0);var q=new Uint8Array(z.byteLength);return q.set(new Uint8Array(z)),q.buffer}function ee(){return this.bodyUsed=!1,this._initBody=function(z){this._bodyInit=z,z?typeof z=="string"?this._bodyText=z:m.blob&&Blob.prototype.isPrototypeOf(z)?this._bodyBlob=z:m.formData&&FormData.prototype.isPrototypeOf(z)?this._bodyFormData=z:m.searchParams&&URLSearchParams.prototype.isPrototypeOf(z)?this._bodyText=z.toString():m.arrayBuffer&&m.blob&&O(z)?(this._bodyArrayBuffer=F(z.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):m.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(z)||L(z))?this._bodyArrayBuffer=F(z):this._bodyText=z=Object.prototype.toString.call(z):this._bodyText="",this.headers.get("content-type")||(typeof z=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):m.searchParams&&URLSearchParams.prototype.isPrototypeOf(z)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},m.blob&&(this.blob=function(){var z=re(this);if(z)return z;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?re(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(oe)}),this.text=function(){var z=re(this);if(z)return z;if(this._bodyBlob)return fe(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(J(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},m.formData&&(this.formData=function(){return this.text().then(B)}),this.json=function(){return this.text().then(JSON.parse)},this}var N=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(z){var q=z.toUpperCase();return N.indexOf(q)>-1?q:z}function M(z,q){q=q||{};var pe=q.body;if(z instanceof M){if(z.bodyUsed)throw new TypeError("Already read");this.url=z.url,this.credentials=z.credentials,q.headers||(this.headers=new te(z.headers)),this.method=z.method,this.mode=z.mode,this.signal=z.signal,!pe&&z._bodyInit!=null&&(pe=z._bodyInit,z.bodyUsed=!0)}else this.url=String(z);if(this.credentials=q.credentials||this.credentials||"same-origin",(q.headers||!this.headers)&&(this.headers=new te(q.headers)),this.method=w(q.method||this.method||"GET"),this.mode=q.mode||this.mode||null,this.signal=q.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&pe)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(pe)}M.prototype.clone=function(){return new M(this,{body:this._bodyInit})};function B(z){var q=new FormData;return z.trim().split("&").forEach(function(pe){if(pe){var xe=pe.split("="),Q=xe.shift().replace(/\+/g," "),ye=xe.join("=").replace(/\+/g," ");q.append(decodeURIComponent(Q),decodeURIComponent(ye))}}),q}function Z(z){var q=new te,pe=z.replace(/\r?\n[\t ]+/g," ");return pe.split(/\r?\n/).forEach(function(xe){var Q=xe.split(":"),ye=Q.shift().trim();if(ye){var ie=Q.join(":").trim();q.append(ye,ie)}}),q}ee.call(M.prototype);function ae(z,q){q||(q={}),this.type="default",this.status=q.status===void 0?200:q.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in q?q.statusText:"OK",this.headers=new te(q.headers),this.url=q.url||"",this._initBody(z)}ee.call(ae.prototype),ae.prototype.clone=function(){return new ae(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new te(this.headers),url:this.url})},ae.error=function(){var z=new ae(null,{status:0,statusText:""});return z.type="error",z};var H=[301,302,303,307,308];ae.redirect=function(z,q){if(H.indexOf(q)===-1)throw new RangeError("Invalid status code");return new ae(null,{status:q,headers:{location:z}})},c.DOMException=S.DOMException;try{new c.DOMException}catch{c.DOMException=function(q,pe){this.message=q,this.name=pe;var xe=Error(q);this.stack=xe.stack},c.DOMException.prototype=Object.create(Error.prototype),c.DOMException.prototype.constructor=c.DOMException}function le(z,q){return new Promise(function(pe,xe){var Q=new M(z,q);if(Q.signal&&Q.signal.aborted)return xe(new c.DOMException("Aborted","AbortError"));var ye=new XMLHttpRequest;function ie(){ye.abort()}ye.onload=function(){var je={status:ye.status,statusText:ye.statusText,headers:Z(ye.getAllResponseHeaders()||"")};je.url="responseURL"in ye?ye.responseURL:je.headers.get("X-Request-URL");var ze="response"in ye?ye.response:ye.responseText;pe(new ae(ze,je))},ye.onerror=function(){xe(new TypeError("Network request failed"))},ye.ontimeout=function(){xe(new TypeError("Network request failed"))},ye.onabort=function(){xe(new c.DOMException("Aborted","AbortError"))},ye.open(Q.method,Q.url,!0),Q.credentials==="include"?ye.withCredentials=!0:Q.credentials==="omit"&&(ye.withCredentials=!1),"responseType"in ye&&m.blob&&(ye.responseType="blob"),Q.headers.forEach(function(je,ze){ye.setRequestHeader(ze,je)}),Q.signal&&(Q.signal.addEventListener("abort",ie),ye.onreadystatechange=function(){ye.readyState===4&&Q.signal.removeEventListener("abort",ie)}),ye.send(typeof Q._bodyInit>"u"?null:Q._bodyInit)})}return le.polyfill=!0,S.fetch||(S.fetch=le,S.Headers=te,S.Request=M,S.Response=ae),c.Headers=te,c.Request=M,c.Response=ae,c.fetch=le,Object.defineProperty(c,"__esModule",{value:!0}),c}({})})(typeof self<"u"?self:this)},20788:(S,R,c)=>{"use strict";c.r(R),c.d(R,{default:()=>j});var m=c(64737),O=c.n(m),k=c(62578),L=c.n(k),D=L()(O());D.push([S.id,`.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px #0003;border-radius:3px;border:1px solid silver;background:white;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto;box-sizing:border-box}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;white-space:pre;color:#000;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:#fff}
42
+ `,""]);const j=D},15218:(S,R,c)=>{"use strict";c.r(R),c.d(R,{default:()=>M});var m=c(64737),O=c.n(m),k=c(62578),L=c.n(k),D=c(7125),j=c.n(D),X=new URL(c(17735),c.b),te=new URL(c(56089),c.b),re=new URL(c(46050),c.b),he=new URL(c(71090),c.b),oe=new URL(c(96192),c.b),fe=L()(O()),J=j()(X),F=j()(te),ee=j()(re),N=j()(he),w=j()(oe);fe.push([S.id,".CodeMirror-lint-markers{width:16px}.CodeMirror-lint-tooltip{background-color:#ffd;border:1px solid black;border-radius:4px;color:#000;font-family:monospace;font-size:10pt;overflow:hidden;padding:2px 5px;position:fixed;white-space:pre;white-space:pre-wrap;z-index:100;max-width:600px;opacity:0;transition:opacity .4s;-moz-transition:opacity .4s;-webkit-transition:opacity .4s;-o-transition:opacity .4s;-ms-transition:opacity .4s}.CodeMirror-lint-mark{background-position:left bottom;background-repeat:repeat-x}.CodeMirror-lint-mark-warning{background-image:url("+J+")}.CodeMirror-lint-mark-error{background-image:url("+F+")}.CodeMirror-lint-marker{background-position:center center;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:16px;width:16px;vertical-align:middle;position:relative}.CodeMirror-lint-message{padding-left:18px;background-position:top left;background-repeat:no-repeat}.CodeMirror-lint-marker-warning,.CodeMirror-lint-message-warning{background-image:url("+ee+")}.CodeMirror-lint-marker-error,.CodeMirror-lint-message-error{background-image:url("+N+")}.CodeMirror-lint-marker-multiple{background-image:url("+w+`);background-repeat:no-repeat;background-position:right bottom;width:100%;height:100%}.CodeMirror-lint-line-error{background-color:#b74c5114}.CodeMirror-lint-line-warning{background-color:#ffd3001a}
43
+ `,""]);const M=fe},80766:(S,R,c)=>{"use strict";c.r(R),c.d(R,{default:()=>j});var m=c(64737),O=c.n(m),k=c(62578),L=c.n(k),D=L()(O());D.push([S.id,`.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;inset:-50px 0 0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error,.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;inset:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors,.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:#ff06}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}
44
+ `,""]);const j=D},62459:(S,R,c)=>{"use strict";c.r(R),c.d(R,{default:()=>j});var m=c(64737),O=c.n(m),k=c(62578),L=c.n(k),D=L()(O());D.push([S.id,`.cm-s-material.CodeMirror{background-color:#263238;color:#eff}.cm-s-material .CodeMirror-gutters{background:#263238;color:#546e7a;border:none}.cm-s-material .CodeMirror-guttermarker,.cm-s-material .CodeMirror-guttermarker-subtle,.cm-s-material .CodeMirror-linenumber{color:#546e7a}.cm-s-material .CodeMirror-cursor{border-left:1px solid #FFCC00}.cm-s-material.cm-fat-cursor .CodeMirror-cursor,.cm-s-material .cm-animate-fat-cursor{background-color:#5d6d5c80!important}.cm-s-material div.CodeMirror-selected,.cm-s-material.CodeMirror-focused div.CodeMirror-selected{background:rgba(128,203,196,.2)}.cm-s-material .CodeMirror-line::selection,.cm-s-material .CodeMirror-line>span::selection,.cm-s-material .CodeMirror-line>span>span::selection{background:rgba(128,203,196,.2)}.cm-s-material .CodeMirror-line::-moz-selection,.cm-s-material .CodeMirror-line>span::-moz-selection,.cm-s-material .CodeMirror-line>span>span::-moz-selection{background:rgba(128,203,196,.2)}.cm-s-material .CodeMirror-activeline-background{background:rgba(0,0,0,.5)}.cm-s-material .cm-keyword{color:#c792ea}.cm-s-material .cm-operator{color:#89ddff}.cm-s-material .cm-variable-2{color:#eff}.cm-s-material .cm-variable-3,.cm-s-material .cm-type{color:#f07178}.cm-s-material .cm-builtin{color:#ffcb6b}.cm-s-material .cm-atom{color:#f78c6c}.cm-s-material .cm-number{color:#ff5370}.cm-s-material .cm-def{color:#82aaff}.cm-s-material .cm-string{color:#c3e88d}.cm-s-material .cm-string-2{color:#f07178}.cm-s-material .cm-comment{color:#546e7a}.cm-s-material .cm-variable{color:#f07178}.cm-s-material .cm-tag{color:#ff5370}.cm-s-material .cm-meta{color:#ffcb6b}.cm-s-material .cm-attribute,.cm-s-material .cm-property{color:#c792ea}.cm-s-material .cm-qualifier,.cm-s-material .cm-variable-3,.cm-s-material .cm-type{color:#decb6b}.cm-s-material .cm-error{color:#fff;background-color:#ff5370}.cm-s-material .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
45
+ `,""]);const j=D},7125:S=>{"use strict";S.exports=function(R,c){return c||(c={}),R&&(R=String(R.__esModule?R.default:R),/^['"].*['"]$/.test(R)&&(R=R.slice(1,-1)),c.hash&&(R+=c.hash),/["'() \t\n]|(%20)/.test(R)||c.needQuotes?'"'.concat(R.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):R)}},5064:(S,R,c)=>{"use strict";c.r(R),c.d(R,{Console:()=>jy});var m={};c.r(m),c.d(m,{cookie:()=>Nc,header:()=>Mc,path:()=>Fc,query:()=>Ic});var O=c(10954),k=c(70762),L=c(93652),D=c(11099),j=c(10017),X=c(86351),te=c(86751),re=c(12953),he=c(55839),oe=c(23422);function fe(e){return fe=typeof he=="function"&&typeof oe=="symbol"?function(r){return typeof r}:function(r){return r&&typeof he=="function"&&r.constructor===he&&r!==he.prototype?"symbol":typeof r},fe(e)}var J=c(47319);function F(e,r){if(fe(e)!=="object"||e===null)return e;var i=e[J];if(i!==void 0){var a=i.call(e,r||"default");if(fe(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function ee(e){var r=F(e,"string");return fe(r)==="symbol"?r:String(r)}function N(e,r,i){return r=ee(r),r in e?re(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i,e}function w(e,r){var i=O(e);if(k){var a=k(e);r&&(a=L(a).call(a,function(o){return D(e,o).enumerable})),i.push.apply(i,a)}return i}function M(e){for(var r=1;r<arguments.length;r++){var i,a,o=arguments[r]!=null?arguments[r]:{};r%2?j(i=w(Object(o),!0)).call(i,function(f){N(e,f,o[f])}):X?te(e,X(o)):j(a=w(Object(o))).call(a,function(f){re(e,f,D(o,f))})}return e}var B=c(34961);function Z(e,r){if(e==null)return{};var i={},a=O(e),o,f;for(f=0;f<a.length;f++)o=a[f],!(B(r).call(r,o)>=0)&&(i[o]=e[o]);return i}function ae(e,r){if(e==null)return{};var i=Z(e,r),a,o;if(k){var f=k(e);for(o=0;o<f.length;o++)a=f[o],!(B(r).call(r,a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var H=c(13546),le=c.n(H),z=c(51121),q=c(26179);/*!
46
46
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
47
47
  *
48
48
  * Copyright (c) 2014-2017, Jon Schlinkert.
49
49
  * Released under the MIT License.
50
- */function pe(e){return Object.prototype.toString.call(e)==="[object Object]"}function xe(e){var r,i;return pe(e)===!1?!1:(r=e.constructor,r===void 0?!0:(i=r.prototype,!(pe(i)===!1||i.hasOwnProperty("isPrototypeOf")===!1)))}var Q=c(81933),ye=c(67905),ie=c.n(ye);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function je(e){return typeof e=="undefined"||e===null}function ze(e){return typeof e=="object"&&e!==null}function Ue(e){return Array.isArray(e)?e:je(e)?[]:[e]}function vt(e,r){var i,a,o,f;if(r)for(f=Object.keys(r),i=0,a=f.length;i<a;i+=1)o=f[i],e[o]=r[o];return e}function pt(e,r){var i="",a;for(a=0;a<r;a+=1)i+=e;return i}function ut(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var er=je,gt=ze,Rt=Ue,st=pt,He=ut,Re=vt,Be={isNothing:er,isObject:gt,toArray:Rt,repeat:st,isNegativeZero:He,extend:Re};function lt(e,r){var i="",a=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+='in "'+e.mark.name+'" '),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!r&&e.mark.snippet&&(i+=`
50
+ */function pe(e){return Object.prototype.toString.call(e)==="[object Object]"}function xe(e){var r,i;return pe(e)===!1?!1:(r=e.constructor,r===void 0?!0:(i=r.prototype,!(pe(i)===!1||i.hasOwnProperty("isPrototypeOf")===!1)))}var Q=c(81933),ye=c(67905),ie=c.n(ye);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function je(e){return typeof e>"u"||e===null}function ze(e){return typeof e=="object"&&e!==null}function Ue(e){return Array.isArray(e)?e:je(e)?[]:[e]}function vt(e,r){var i,a,o,f;if(r)for(f=Object.keys(r),i=0,a=f.length;i<a;i+=1)o=f[i],e[o]=r[o];return e}function pt(e,r){var i="",a;for(a=0;a<r;a+=1)i+=e;return i}function ut(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var er=je,gt=ze,Rt=Ue,st=pt,He=ut,Re=vt,Be={isNothing:er,isObject:gt,toArray:Rt,repeat:st,isNegativeZero:He,extend:Re};function lt(e,r){var i="",a=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+='in "'+e.mark.name+'" '),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!r&&e.mark.snippet&&(i+=`
51
51
 
52
52
  `+e.mark.snippet),a+" "+i):a}function _t(e,r){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=r,this.message=lt(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}_t.prototype=Object.create(Error.prototype),_t.prototype.constructor=_t,_t.prototype.toString=function(r){return this.name+": "+lt(this,r)};var rt=_t;function Pt(e,r,i,a,o){var f="",d="",v=Math.floor(o/2)-1;return a-r>v&&(f=" ... ",r=a-v+f.length),i-a>v&&(d=" ...",i=a+v-d.length),{str:f+e.slice(r,i).replace(/\t/g,"\u2192")+d,pos:a-r+f.length}}function tr(e,r){return Be.repeat(" ",r-e.length)+e}function or(e,r){if(r=Object.create(r||null),!e.buffer)return null;r.maxLength||(r.maxLength=79),typeof r.indent!="number"&&(r.indent=1),typeof r.linesBefore!="number"&&(r.linesBefore=3),typeof r.linesAfter!="number"&&(r.linesAfter=2);for(var i=/\r?\n|\r|\0/g,a=[0],o=[],f,d=-1;f=i.exec(e.buffer);)o.push(f.index),a.push(f.index+f[0].length),e.position<=f.index&&d<0&&(d=a.length-2);d<0&&(d=a.length-1);var v="",h,g,b=Math.min(e.line+r.linesAfter,o.length).toString().length,E=r.maxLength-(r.indent+b+3);for(h=1;h<=r.linesBefore&&!(d-h<0);h++)g=Pt(e.buffer,a[d-h],o[d-h],e.position-(a[d]-a[d-h]),E),v=Be.repeat(" ",r.indent)+tr((e.line-h+1).toString(),b)+" | "+g.str+`
53
53
  `+v;for(g=Pt(e.buffer,a[d],o[d],e.position,E),v+=Be.repeat(" ",r.indent)+tr((e.line+1).toString(),b)+" | "+g.str+`
54
54
  `,v+=Be.repeat("-",r.indent+b+3+g.pos)+`^
55
55
  `,h=1;h<=r.linesAfter&&!(d+h>=o.length);h++)g=Pt(e.buffer,a[d+h],o[d+h],e.position-(a[d]-a[d+h]),E),v+=Be.repeat(" ",r.indent)+tr((e.line+h+1).toString(),b)+" | "+g.str+`
56
- `;return v.replace(/\n$/,"")}var kr=or,et=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Et=["scalar","sequence","mapping"];function jt(e){var r={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(a){r[String(a)]=i})}),r}function _r(e,r){if(r=r||{},Object.keys(r).forEach(function(i){if(et.indexOf(i)===-1)throw new rt('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=r,this.tag=e,this.kind=r.kind||null,this.resolve=r.resolve||function(){return!0},this.construct=r.construct||function(i){return i},this.instanceOf=r.instanceOf||null,this.predicate=r.predicate||null,this.represent=r.represent||null,this.representName=r.representName||null,this.defaultStyle=r.defaultStyle||null,this.multi=r.multi||!1,this.styleAliases=jt(r.styleAliases||null),Et.indexOf(this.kind)===-1)throw new rt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var zt=_r;function Bn(e,r){var i=[];return e[r].forEach(function(a){var o=i.length;i.forEach(function(f,d){f.tag===a.tag&&f.kind===a.kind&&f.multi===a.multi&&(o=d)}),i[o]=a}),i}function Vn(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},r,i;function a(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(r=0,i=arguments.length;r<i;r+=1)arguments[r].forEach(a);return e}function nn(e){return this.extend(e)}nn.prototype.extend=function(r){var i=[],a=[];if(r instanceof zt)a.push(r);else if(Array.isArray(r))a=a.concat(r);else if(r&&(Array.isArray(r.implicit)||Array.isArray(r.explicit)))r.implicit&&(i=i.concat(r.implicit)),r.explicit&&(a=a.concat(r.explicit));else throw new rt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(f){if(!(f instanceof zt))throw new rt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(f.loadKind&&f.loadKind!=="scalar")throw new rt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(f.multi)throw new rt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),a.forEach(function(f){if(!(f instanceof zt))throw new rt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(nn.prototype);return o.implicit=(this.implicit||[]).concat(i),o.explicit=(this.explicit||[]).concat(a),o.compiledImplicit=Bn(o,"implicit"),o.compiledExplicit=Bn(o,"explicit"),o.compiledTypeMap=Vn(o.compiledImplicit,o.compiledExplicit),o};var Cn=nn,ri=new zt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),jn=new zt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),an=new zt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Mr=new Cn({explicit:[ri,jn,an]});function zr(e){if(e===null)return!0;var r=e.length;return r===1&&e==="~"||r===4&&(e==="null"||e==="Null"||e==="NULL")}function Gt(){return null}function St(e){return e===null}var ft=new zt("tag:yaml.org,2002:null",{kind:"scalar",resolve:zr,construct:Gt,predicate:St,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function tt(e){if(e===null)return!1;var r=e.length;return r===4&&(e==="true"||e==="True"||e==="TRUE")||r===5&&(e==="false"||e==="False"||e==="FALSE")}function mt(e){return e==="true"||e==="True"||e==="TRUE"}function se(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var we=new zt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:tt,construct:mt,predicate:se,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function Ve(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function nt(e){return 48<=e&&e<=55}function ht(e){return 48<=e&&e<=57}function ct(e){if(e===null)return!1;var r=e.length,i=0,a=!1,o;if(!r)return!1;if(o=e[i],(o==="-"||o==="+")&&(o=e[++i]),o==="0"){if(i+1===r)return!0;if(o=e[++i],o==="b"){for(i++;i<r;i++)if(o=e[i],o!=="_"){if(o!=="0"&&o!=="1")return!1;a=!0}return a&&o!=="_"}if(o==="x"){for(i++;i<r;i++)if(o=e[i],o!=="_"){if(!Ve(e.charCodeAt(i)))return!1;a=!0}return a&&o!=="_"}if(o==="o"){for(i++;i<r;i++)if(o=e[i],o!=="_"){if(!nt(e.charCodeAt(i)))return!1;a=!0}return a&&o!=="_"}}if(o==="_")return!1;for(;i<r;i++)if(o=e[i],o!=="_"){if(!ht(e.charCodeAt(i)))return!1;a=!0}return!(!a||o==="_")}function Qt(e){var r=e,i=1,a;if(r.indexOf("_")!==-1&&(r=r.replace(/_/g,"")),a=r[0],(a==="-"||a==="+")&&(a==="-"&&(i=-1),r=r.slice(1),a=r[0]),r==="0")return 0;if(a==="0"){if(r[1]==="b")return i*parseInt(r.slice(2),2);if(r[1]==="x")return i*parseInt(r.slice(2),16);if(r[1]==="o")return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function Gr(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Be.isNegativeZero(e)}var Ft=new zt("tag:yaml.org,2002:int",{kind:"scalar",resolve:ct,construct:Qt,predicate:Gr,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),dr=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function vi(e){return!(e===null||!dr.test(e)||e[e.length-1]==="_")}function Nr(e){var r,i;return r=e.replace(/_/g,"").toLowerCase(),i=r[0]==="-"?-1:1,"+-".indexOf(r[0])>=0&&(r=r.slice(1)),r===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:r===".nan"?NaN:i*parseFloat(r,10)}var Rr=/^[-+]?[0-9]+e/;function gi(e,r){var i;if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Be.isNegativeZero(e))return"-0.0";return i=e.toString(10),Rr.test(i)?i.replace("e",".e"):i}function $r(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Be.isNegativeZero(e))}var ni=new zt("tag:yaml.org,2002:float",{kind:"scalar",resolve:vi,construct:Nr,predicate:$r,represent:gi,defaultStyle:"lowercase"}),ii=Mr.extend({implicit:[ft,we,Ft,ni]}),Dr=ii,mi=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Wn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Ii(e){return e===null?!1:mi.exec(e)!==null||Wn.exec(e)!==null}function Ta(e){var r,i,a,o,f,d,v,h=0,g=null,b,E,j;if(r=mi.exec(e),r===null&&(r=Wn.exec(e)),r===null)throw new Error("Date resolve error");if(i=+r[1],a=+r[2]-1,o=+r[3],!r[4])return new Date(Date.UTC(i,a,o));if(f=+r[4],d=+r[5],v=+r[6],r[7]){for(h=r[7].slice(0,3);h.length<3;)h+="0";h=+h}return r[9]&&(b=+r[10],E=+(r[11]||0),g=(b*60+E)*6e4,r[9]==="-"&&(g=-g)),j=new Date(Date.UTC(i,a,o,f,d,v,h)),g&&j.setTime(j.getTime()-g),j}function hn(e){return e.toISOString()}var Jr=new zt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ii,construct:Ta,instanceOf:Date,represent:hn});function vn(e){return e==="<<"||e===null}var on=new zt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:vn}),sn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
56
+ `;return v.replace(/\n$/,"")}var kr=or,et=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Et=["scalar","sequence","mapping"];function jt(e){var r={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(a){r[String(a)]=i})}),r}function _r(e,r){if(r=r||{},Object.keys(r).forEach(function(i){if(et.indexOf(i)===-1)throw new rt('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=r,this.tag=e,this.kind=r.kind||null,this.resolve=r.resolve||function(){return!0},this.construct=r.construct||function(i){return i},this.instanceOf=r.instanceOf||null,this.predicate=r.predicate||null,this.represent=r.represent||null,this.representName=r.representName||null,this.defaultStyle=r.defaultStyle||null,this.multi=r.multi||!1,this.styleAliases=jt(r.styleAliases||null),Et.indexOf(this.kind)===-1)throw new rt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var zt=_r;function Bn(e,r){var i=[];return e[r].forEach(function(a){var o=i.length;i.forEach(function(f,d){f.tag===a.tag&&f.kind===a.kind&&f.multi===a.multi&&(o=d)}),i[o]=a}),i}function Vn(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},r,i;function a(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(r=0,i=arguments.length;r<i;r+=1)arguments[r].forEach(a);return e}function nn(e){return this.extend(e)}nn.prototype.extend=function(r){var i=[],a=[];if(r instanceof zt)a.push(r);else if(Array.isArray(r))a=a.concat(r);else if(r&&(Array.isArray(r.implicit)||Array.isArray(r.explicit)))r.implicit&&(i=i.concat(r.implicit)),r.explicit&&(a=a.concat(r.explicit));else throw new rt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(f){if(!(f instanceof zt))throw new rt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(f.loadKind&&f.loadKind!=="scalar")throw new rt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(f.multi)throw new rt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),a.forEach(function(f){if(!(f instanceof zt))throw new rt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(nn.prototype);return o.implicit=(this.implicit||[]).concat(i),o.explicit=(this.explicit||[]).concat(a),o.compiledImplicit=Bn(o,"implicit"),o.compiledExplicit=Bn(o,"explicit"),o.compiledTypeMap=Vn(o.compiledImplicit,o.compiledExplicit),o};var Cn=nn,ri=new zt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),jn=new zt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),an=new zt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Mr=new Cn({explicit:[ri,jn,an]});function zr(e){if(e===null)return!0;var r=e.length;return r===1&&e==="~"||r===4&&(e==="null"||e==="Null"||e==="NULL")}function Gt(){return null}function St(e){return e===null}var ft=new zt("tag:yaml.org,2002:null",{kind:"scalar",resolve:zr,construct:Gt,predicate:St,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function tt(e){if(e===null)return!1;var r=e.length;return r===4&&(e==="true"||e==="True"||e==="TRUE")||r===5&&(e==="false"||e==="False"||e==="FALSE")}function mt(e){return e==="true"||e==="True"||e==="TRUE"}function se(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var we=new zt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:tt,construct:mt,predicate:se,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function Ve(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function nt(e){return 48<=e&&e<=55}function ht(e){return 48<=e&&e<=57}function ct(e){if(e===null)return!1;var r=e.length,i=0,a=!1,o;if(!r)return!1;if(o=e[i],(o==="-"||o==="+")&&(o=e[++i]),o==="0"){if(i+1===r)return!0;if(o=e[++i],o==="b"){for(i++;i<r;i++)if(o=e[i],o!=="_"){if(o!=="0"&&o!=="1")return!1;a=!0}return a&&o!=="_"}if(o==="x"){for(i++;i<r;i++)if(o=e[i],o!=="_"){if(!Ve(e.charCodeAt(i)))return!1;a=!0}return a&&o!=="_"}if(o==="o"){for(i++;i<r;i++)if(o=e[i],o!=="_"){if(!nt(e.charCodeAt(i)))return!1;a=!0}return a&&o!=="_"}}if(o==="_")return!1;for(;i<r;i++)if(o=e[i],o!=="_"){if(!ht(e.charCodeAt(i)))return!1;a=!0}return!(!a||o==="_")}function Qt(e){var r=e,i=1,a;if(r.indexOf("_")!==-1&&(r=r.replace(/_/g,"")),a=r[0],(a==="-"||a==="+")&&(a==="-"&&(i=-1),r=r.slice(1),a=r[0]),r==="0")return 0;if(a==="0"){if(r[1]==="b")return i*parseInt(r.slice(2),2);if(r[1]==="x")return i*parseInt(r.slice(2),16);if(r[1]==="o")return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function Gr(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Be.isNegativeZero(e)}var Ft=new zt("tag:yaml.org,2002:int",{kind:"scalar",resolve:ct,construct:Qt,predicate:Gr,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),dr=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function vi(e){return!(e===null||!dr.test(e)||e[e.length-1]==="_")}function Nr(e){var r,i;return r=e.replace(/_/g,"").toLowerCase(),i=r[0]==="-"?-1:1,"+-".indexOf(r[0])>=0&&(r=r.slice(1)),r===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:r===".nan"?NaN:i*parseFloat(r,10)}var Rr=/^[-+]?[0-9]+e/;function gi(e,r){var i;if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Be.isNegativeZero(e))return"-0.0";return i=e.toString(10),Rr.test(i)?i.replace("e",".e"):i}function $r(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Be.isNegativeZero(e))}var ni=new zt("tag:yaml.org,2002:float",{kind:"scalar",resolve:vi,construct:Nr,predicate:$r,represent:gi,defaultStyle:"lowercase"}),ii=Mr.extend({implicit:[ft,we,Ft,ni]}),Dr=ii,mi=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Wn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Ii(e){return e===null?!1:mi.exec(e)!==null||Wn.exec(e)!==null}function Ta(e){var r,i,a,o,f,d,v,h=0,g=null,b,E,V;if(r=mi.exec(e),r===null&&(r=Wn.exec(e)),r===null)throw new Error("Date resolve error");if(i=+r[1],a=+r[2]-1,o=+r[3],!r[4])return new Date(Date.UTC(i,a,o));if(f=+r[4],d=+r[5],v=+r[6],r[7]){for(h=r[7].slice(0,3);h.length<3;)h+="0";h=+h}return r[9]&&(b=+r[10],E=+(r[11]||0),g=(b*60+E)*6e4,r[9]==="-"&&(g=-g)),V=new Date(Date.UTC(i,a,o,f,d,v,h)),g&&V.setTime(V.getTime()-g),V}function hn(e){return e.toISOString()}var Jr=new zt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ii,construct:Ta,instanceOf:Date,represent:hn});function vn(e){return e==="<<"||e===null}var on=new zt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:vn}),sn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
57
57
  \r`;function fo(e){if(e===null)return!1;var r,i,a=0,o=e.length,f=sn;for(i=0;i<o;i++)if(r=f.indexOf(e.charAt(i)),!(r>64)){if(r<0)return!1;a+=6}return a%8===0}function Hn(e){var r,i,a=e.replace(/[\r\n=]/g,""),o=a.length,f=sn,d=0,v=[];for(r=0;r<o;r++)r%4===0&&r&&(v.push(d>>16&255),v.push(d>>8&255),v.push(d&255)),d=d<<6|f.indexOf(a.charAt(r));return i=o%4*6,i===0?(v.push(d>>16&255),v.push(d>>8&255),v.push(d&255)):i===18?(v.push(d>>10&255),v.push(d>>2&255)):i===12&&v.push(d>>4&255),new Uint8Array(v)}function Qr(e){var r="",i=0,a,o,f=e.length,d=sn;for(a=0;a<f;a++)a%3===0&&a&&(r+=d[i>>18&63],r+=d[i>>12&63],r+=d[i>>6&63],r+=d[i&63]),i=(i<<8)+e[a];return o=f%3,o===0?(r+=d[i>>18&63],r+=d[i>>12&63],r+=d[i>>6&63],r+=d[i&63]):o===2?(r+=d[i>>10&63],r+=d[i>>4&63],r+=d[i<<2&63],r+=d[64]):o===1&&(r+=d[i>>2&63],r+=d[i<<4&63],r+=d[64],r+=d[64]),r}function pr(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var ai=new zt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:fo,construct:Hn,predicate:pr,represent:Qr}),An=Object.prototype.hasOwnProperty,ka=Object.prototype.toString;function Vo(e){if(e===null)return!0;var r=[],i,a,o,f,d,v=e;for(i=0,a=v.length;i<a;i+=1){if(o=v[i],d=!1,ka.call(o)!=="[object Object]")return!1;for(f in o)if(An.call(o,f))if(!d)d=!0;else return!1;if(!d)return!1;if(r.indexOf(f)===-1)r.push(f);else return!1}return!0}function Xt(e){return e!==null?e:[]}var Ge=new zt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Vo,construct:Xt}),yi=Object.prototype.toString;function Qi(e){if(e===null)return!0;var r,i,a,o,f,d=e;for(f=new Array(d.length),r=0,i=d.length;r<i;r+=1){if(a=d[r],yi.call(a)!=="[object Object]"||(o=Object.keys(a),o.length!==1))return!1;f[r]=[o[0],a[o[0]]]}return!0}function On(e){if(e===null)return[];var r,i,a,o,f,d=e;for(f=new Array(d.length),r=0,i=d.length;r<i;r+=1)a=d[r],o=Object.keys(a),f[r]=[o[0],a[o[0]]];return f}var It=new zt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Qi,construct:On}),bi=Object.prototype.hasOwnProperty;function Zi(e){if(e===null)return!0;var r,i=e;for(r in i)if(bi.call(i,r)&&i[r]!==null)return!1;return!0}function Pa(e){return e!==null?e:{}}var T=new zt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Zi,construct:Pa}),$=Dr.extend({implicit:[Jr,on],explicit:[ai,Ge,It,T]}),Pe=Object.prototype.hasOwnProperty,Fe=1,it=2,wt=3,Lt=4,$e=1,En=2,co=3,jo=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,oi=/[\x85\u2028\u2029]/,ru=/[,\[\]\{\}]/,Ws=/^(?:!|!!|![a-z\-]+!)$/i,Fa=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Wo(e){return Object.prototype.toString.call(e)}function Un(e){return e===10||e===13}function xi(e){return e===9||e===32}function Zr(e){return e===9||e===32||e===10||e===13}function qi(e){return e===44||e===91||e===93||e===123||e===125}function nu(e){var r;return 48<=e&&e<=57?e-48:(r=e|32,97<=r&&r<=102?r-97+10:-1)}function iu(e){return e===120?2:e===117?4:e===85?8:0}function nc(e){return 48<=e&&e<=57?e-48:-1}function au(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
58
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function ou(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}for(var si=new Array(256),su=new Array(256),Ia=0;Ia<256;Ia++)si[Ia]=au(Ia)?1:0,su[Ia]=au(Ia);function Ho(e,r){this.input=e,this.filename=r.filename||null,this.schema=r.schema||$,this.onWarning=r.onWarning||null,this.legacy=r.legacy||!1,this.json=r.json||!1,this.listener=r.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function La(e,r){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=kr(i),new rt(r,i)}function Ze(e,r){throw La(e,r)}function Uo(e,r){e.onWarning&&e.onWarning.call(null,La(e,r))}var lu={YAML:function(r,i,a){var o,f,d;r.version!==null&&Ze(r,"duplication of %YAML directive"),a.length!==1&&Ze(r,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(a[0]),o===null&&Ze(r,"ill-formed argument of the YAML directive"),f=parseInt(o[1],10),d=parseInt(o[2],10),f!==1&&Ze(r,"unacceptable YAML version of the document"),r.version=a[0],r.checkLineBreaks=d<2,d!==1&&d!==2&&Uo(r,"unsupported YAML version of the document")},TAG:function(r,i,a){var o,f;a.length!==2&&Ze(r,"TAG directive accepts exactly two arguments"),o=a[0],f=a[1],Ws.test(o)||Ze(r,"ill-formed tag handle (first argument) of the TAG directive"),Pe.call(r.tagMap,o)&&Ze(r,'there is a previously declared suffix for "'+o+'" tag handle'),Fa.test(f)||Ze(r,"ill-formed tag prefix (second argument) of the TAG directive");try{f=decodeURIComponent(f)}catch(d){Ze(r,"tag prefix is malformed: "+f)}r.tagMap[o]=f}};function Li(e,r,i,a){var o,f,d,v;if(r<i){if(v=e.input.slice(r,i),a)for(o=0,f=v.length;o<f;o+=1)d=v.charCodeAt(o),d===9||32<=d&&d<=1114111||Ze(e,"expected valid JSON character");else jo.test(v)&&Ze(e,"the stream contains non-printable characters");e.result+=v}}function _o(e,r,i,a){var o,f,d,v;for(Be.isObject(i)||Ze(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(i),d=0,v=o.length;d<v;d+=1)f=o[d],Pe.call(r,f)||(r[f]=i[f],a[f]=!0)}function ea(e,r,i,a,o,f,d,v,h){var g,b;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),g=0,b=o.length;g<b;g+=1)Array.isArray(o[g])&&Ze(e,"nested arrays are not supported inside keys"),typeof o=="object"&&Wo(o[g])==="[object Object]"&&(o[g]="[object Object]");if(typeof o=="object"&&Wo(o)==="[object Object]"&&(o="[object Object]"),o=String(o),r===null&&(r={}),a==="tag:yaml.org,2002:merge")if(Array.isArray(f))for(g=0,b=f.length;g<b;g+=1)_o(e,r,f[g],i);else _o(e,r,f,i);else!e.json&&!Pe.call(i,o)&&Pe.call(r,o)&&(e.line=d||e.line,e.lineStart=v||e.lineStart,e.position=h||e.position,Ze(e,"duplicated mapping key")),o==="__proto__"?Object.defineProperty(r,o,{configurable:!0,enumerable:!0,writable:!0,value:f}):r[o]=f,delete i[o];return r}function Hs(e){var r;r=e.input.charCodeAt(e.position),r===10?e.position++:r===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Ze(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function hr(e,r,i){for(var a=0,o=e.input.charCodeAt(e.position);o!==0;){for(;xi(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(r&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(Un(o))for(Hs(e),o=e.input.charCodeAt(e.position),a++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return i!==-1&&a!==0&&e.lineIndent<i&&Uo(e,"deficient indentation"),a}function po(e){var r=e.position,i;return i=e.input.charCodeAt(r),!!((i===45||i===46)&&i===e.input.charCodeAt(r+1)&&i===e.input.charCodeAt(r+2)&&(r+=3,i=e.input.charCodeAt(r),i===0||Zr(i)))}function Ma(e,r){r===1?e.result+=" ":r>1&&(e.result+=Be.repeat(`
59
- `,r-1))}function zo(e,r,i){var a,o,f,d,v,h,g,b,E=e.kind,j=e.result,I;if(I=e.input.charCodeAt(e.position),Zr(I)||qi(I)||I===35||I===38||I===42||I===33||I===124||I===62||I===39||I===34||I===37||I===64||I===96||(I===63||I===45)&&(o=e.input.charCodeAt(e.position+1),Zr(o)||i&&qi(o)))return!1;for(e.kind="scalar",e.result="",f=d=e.position,v=!1;I!==0;){if(I===58){if(o=e.input.charCodeAt(e.position+1),Zr(o)||i&&qi(o))break}else if(I===35){if(a=e.input.charCodeAt(e.position-1),Zr(a))break}else{if(e.position===e.lineStart&&po(e)||i&&qi(I))break;if(Un(I))if(h=e.line,g=e.lineStart,b=e.lineIndent,hr(e,!1,-1),e.lineIndent>=r){v=!0,I=e.input.charCodeAt(e.position);continue}else{e.position=d,e.line=h,e.lineStart=g,e.lineIndent=b;break}}v&&(Li(e,f,d,!1),Ma(e,e.line-h),f=d=e.position,v=!1),xi(I)||(d=e.position+1),I=e.input.charCodeAt(++e.position)}return Li(e,f,d,!1),e.result?!0:(e.kind=E,e.result=j,!1)}function Us(e,r){var i,a,o;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,a=o=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(Li(e,a,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)a=e.position,e.position++,o=e.position;else return!0;else Un(i)?(Li(e,a,o,!0),Ma(e,hr(e,!1,r)),a=o=e.position):e.position===e.lineStart&&po(e)?Ze(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);Ze(e,"unexpected end of the stream within a single quoted scalar")}function uu(e,r){var i,a,o,f,d,v;if(v=e.input.charCodeAt(e.position),v!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(v=e.input.charCodeAt(e.position))!==0;){if(v===34)return Li(e,i,e.position,!0),e.position++,!0;if(v===92){if(Li(e,i,e.position,!0),v=e.input.charCodeAt(++e.position),Un(v))hr(e,!1,r);else if(v<256&&si[v])e.result+=su[v],e.position++;else if((d=iu(v))>0){for(o=d,f=0;o>0;o--)v=e.input.charCodeAt(++e.position),(d=nu(v))>=0?f=(f<<4)+d:Ze(e,"expected hexadecimal character");e.result+=ou(f),e.position++}else Ze(e,"unknown escape sequence");i=a=e.position}else Un(v)?(Li(e,i,a,!0),Ma(e,hr(e,!1,r)),i=a=e.position):e.position===e.lineStart&&po(e)?Ze(e,"unexpected end of the document within a double quoted scalar"):(e.position++,a=e.position)}Ze(e,"unexpected end of the stream within a double quoted scalar")}function fu(e,r){var i=!0,a,o,f,d=e.tag,v,h=e.anchor,g,b,E,j,I,W=Object.create(null),Y,_,U,G;if(G=e.input.charCodeAt(e.position),G===91)b=93,I=!1,v=[];else if(G===123)b=125,I=!0,v={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=v),G=e.input.charCodeAt(++e.position);G!==0;){if(hr(e,!0,r),G=e.input.charCodeAt(e.position),G===b)return e.position++,e.tag=d,e.anchor=h,e.kind=I?"mapping":"sequence",e.result=v,!0;i?G===44&&Ze(e,"expected the node content, but found ','"):Ze(e,"missed comma between flow collection entries"),_=Y=U=null,E=j=!1,G===63&&(g=e.input.charCodeAt(e.position+1),Zr(g)&&(E=j=!0,e.position++,hr(e,!0,r))),a=e.line,o=e.lineStart,f=e.position,Mi(e,r,Fe,!1,!0),_=e.tag,Y=e.result,hr(e,!0,r),G=e.input.charCodeAt(e.position),(j||e.line===a)&&G===58&&(E=!0,G=e.input.charCodeAt(++e.position),hr(e,!0,r),Mi(e,r,Fe,!1,!0),U=e.result),I?ea(e,v,W,_,Y,U,a,o,f):E?v.push(ea(e,null,W,_,Y,U,a,o,f)):v.push(Y),hr(e,!0,r),G=e.input.charCodeAt(e.position),G===44?(i=!0,G=e.input.charCodeAt(++e.position)):i=!1}Ze(e,"unexpected end of the stream within a flow collection")}function Go(e,r){var i,a,o=$e,f=!1,d=!1,v=r,h=0,g=!1,b,E;if(E=e.input.charCodeAt(e.position),E===124)a=!1;else if(E===62)a=!0;else return!1;for(e.kind="scalar",e.result="";E!==0;)if(E=e.input.charCodeAt(++e.position),E===43||E===45)$e===o?o=E===43?co:En:Ze(e,"repeat of a chomping mode identifier");else if((b=nc(E))>=0)b===0?Ze(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):d?Ze(e,"repeat of an indentation width identifier"):(v=r+b-1,d=!0);else break;if(xi(E)){do E=e.input.charCodeAt(++e.position);while(xi(E));if(E===35)do E=e.input.charCodeAt(++e.position);while(!Un(E)&&E!==0)}for(;E!==0;){for(Hs(e),e.lineIndent=0,E=e.input.charCodeAt(e.position);(!d||e.lineIndent<v)&&E===32;)e.lineIndent++,E=e.input.charCodeAt(++e.position);if(!d&&e.lineIndent>v&&(v=e.lineIndent),Un(E)){h++;continue}if(e.lineIndent<v){o===co?e.result+=Be.repeat(`
58
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function ou(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}for(var si=new Array(256),su=new Array(256),Ia=0;Ia<256;Ia++)si[Ia]=au(Ia)?1:0,su[Ia]=au(Ia);function Ho(e,r){this.input=e,this.filename=r.filename||null,this.schema=r.schema||$,this.onWarning=r.onWarning||null,this.legacy=r.legacy||!1,this.json=r.json||!1,this.listener=r.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function La(e,r){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=kr(i),new rt(r,i)}function Ze(e,r){throw La(e,r)}function Uo(e,r){e.onWarning&&e.onWarning.call(null,La(e,r))}var lu={YAML:function(r,i,a){var o,f,d;r.version!==null&&Ze(r,"duplication of %YAML directive"),a.length!==1&&Ze(r,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(a[0]),o===null&&Ze(r,"ill-formed argument of the YAML directive"),f=parseInt(o[1],10),d=parseInt(o[2],10),f!==1&&Ze(r,"unacceptable YAML version of the document"),r.version=a[0],r.checkLineBreaks=d<2,d!==1&&d!==2&&Uo(r,"unsupported YAML version of the document")},TAG:function(r,i,a){var o,f;a.length!==2&&Ze(r,"TAG directive accepts exactly two arguments"),o=a[0],f=a[1],Ws.test(o)||Ze(r,"ill-formed tag handle (first argument) of the TAG directive"),Pe.call(r.tagMap,o)&&Ze(r,'there is a previously declared suffix for "'+o+'" tag handle'),Fa.test(f)||Ze(r,"ill-formed tag prefix (second argument) of the TAG directive");try{f=decodeURIComponent(f)}catch{Ze(r,"tag prefix is malformed: "+f)}r.tagMap[o]=f}};function Li(e,r,i,a){var o,f,d,v;if(r<i){if(v=e.input.slice(r,i),a)for(o=0,f=v.length;o<f;o+=1)d=v.charCodeAt(o),d===9||32<=d&&d<=1114111||Ze(e,"expected valid JSON character");else jo.test(v)&&Ze(e,"the stream contains non-printable characters");e.result+=v}}function _o(e,r,i,a){var o,f,d,v;for(Be.isObject(i)||Ze(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(i),d=0,v=o.length;d<v;d+=1)f=o[d],Pe.call(r,f)||(r[f]=i[f],a[f]=!0)}function ea(e,r,i,a,o,f,d,v,h){var g,b;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),g=0,b=o.length;g<b;g+=1)Array.isArray(o[g])&&Ze(e,"nested arrays are not supported inside keys"),typeof o=="object"&&Wo(o[g])==="[object Object]"&&(o[g]="[object Object]");if(typeof o=="object"&&Wo(o)==="[object Object]"&&(o="[object Object]"),o=String(o),r===null&&(r={}),a==="tag:yaml.org,2002:merge")if(Array.isArray(f))for(g=0,b=f.length;g<b;g+=1)_o(e,r,f[g],i);else _o(e,r,f,i);else!e.json&&!Pe.call(i,o)&&Pe.call(r,o)&&(e.line=d||e.line,e.lineStart=v||e.lineStart,e.position=h||e.position,Ze(e,"duplicated mapping key")),o==="__proto__"?Object.defineProperty(r,o,{configurable:!0,enumerable:!0,writable:!0,value:f}):r[o]=f,delete i[o];return r}function Hs(e){var r;r=e.input.charCodeAt(e.position),r===10?e.position++:r===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Ze(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function hr(e,r,i){for(var a=0,o=e.input.charCodeAt(e.position);o!==0;){for(;xi(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(r&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(Un(o))for(Hs(e),o=e.input.charCodeAt(e.position),a++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return i!==-1&&a!==0&&e.lineIndent<i&&Uo(e,"deficient indentation"),a}function po(e){var r=e.position,i;return i=e.input.charCodeAt(r),!!((i===45||i===46)&&i===e.input.charCodeAt(r+1)&&i===e.input.charCodeAt(r+2)&&(r+=3,i=e.input.charCodeAt(r),i===0||Zr(i)))}function Ma(e,r){r===1?e.result+=" ":r>1&&(e.result+=Be.repeat(`
59
+ `,r-1))}function zo(e,r,i){var a,o,f,d,v,h,g,b,E=e.kind,V=e.result,I;if(I=e.input.charCodeAt(e.position),Zr(I)||qi(I)||I===35||I===38||I===42||I===33||I===124||I===62||I===39||I===34||I===37||I===64||I===96||(I===63||I===45)&&(o=e.input.charCodeAt(e.position+1),Zr(o)||i&&qi(o)))return!1;for(e.kind="scalar",e.result="",f=d=e.position,v=!1;I!==0;){if(I===58){if(o=e.input.charCodeAt(e.position+1),Zr(o)||i&&qi(o))break}else if(I===35){if(a=e.input.charCodeAt(e.position-1),Zr(a))break}else{if(e.position===e.lineStart&&po(e)||i&&qi(I))break;if(Un(I))if(h=e.line,g=e.lineStart,b=e.lineIndent,hr(e,!1,-1),e.lineIndent>=r){v=!0,I=e.input.charCodeAt(e.position);continue}else{e.position=d,e.line=h,e.lineStart=g,e.lineIndent=b;break}}v&&(Li(e,f,d,!1),Ma(e,e.line-h),f=d=e.position,v=!1),xi(I)||(d=e.position+1),I=e.input.charCodeAt(++e.position)}return Li(e,f,d,!1),e.result?!0:(e.kind=E,e.result=V,!1)}function Us(e,r){var i,a,o;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,a=o=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(Li(e,a,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)a=e.position,e.position++,o=e.position;else return!0;else Un(i)?(Li(e,a,o,!0),Ma(e,hr(e,!1,r)),a=o=e.position):e.position===e.lineStart&&po(e)?Ze(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);Ze(e,"unexpected end of the stream within a single quoted scalar")}function uu(e,r){var i,a,o,f,d,v;if(v=e.input.charCodeAt(e.position),v!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(v=e.input.charCodeAt(e.position))!==0;){if(v===34)return Li(e,i,e.position,!0),e.position++,!0;if(v===92){if(Li(e,i,e.position,!0),v=e.input.charCodeAt(++e.position),Un(v))hr(e,!1,r);else if(v<256&&si[v])e.result+=su[v],e.position++;else if((d=iu(v))>0){for(o=d,f=0;o>0;o--)v=e.input.charCodeAt(++e.position),(d=nu(v))>=0?f=(f<<4)+d:Ze(e,"expected hexadecimal character");e.result+=ou(f),e.position++}else Ze(e,"unknown escape sequence");i=a=e.position}else Un(v)?(Li(e,i,a,!0),Ma(e,hr(e,!1,r)),i=a=e.position):e.position===e.lineStart&&po(e)?Ze(e,"unexpected end of the document within a double quoted scalar"):(e.position++,a=e.position)}Ze(e,"unexpected end of the stream within a double quoted scalar")}function fu(e,r){var i=!0,a,o,f,d=e.tag,v,h=e.anchor,g,b,E,V,I,W=Object.create(null),Y,_,U,G;if(G=e.input.charCodeAt(e.position),G===91)b=93,I=!1,v=[];else if(G===123)b=125,I=!0,v={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=v),G=e.input.charCodeAt(++e.position);G!==0;){if(hr(e,!0,r),G=e.input.charCodeAt(e.position),G===b)return e.position++,e.tag=d,e.anchor=h,e.kind=I?"mapping":"sequence",e.result=v,!0;i?G===44&&Ze(e,"expected the node content, but found ','"):Ze(e,"missed comma between flow collection entries"),_=Y=U=null,E=V=!1,G===63&&(g=e.input.charCodeAt(e.position+1),Zr(g)&&(E=V=!0,e.position++,hr(e,!0,r))),a=e.line,o=e.lineStart,f=e.position,Mi(e,r,Fe,!1,!0),_=e.tag,Y=e.result,hr(e,!0,r),G=e.input.charCodeAt(e.position),(V||e.line===a)&&G===58&&(E=!0,G=e.input.charCodeAt(++e.position),hr(e,!0,r),Mi(e,r,Fe,!1,!0),U=e.result),I?ea(e,v,W,_,Y,U,a,o,f):E?v.push(ea(e,null,W,_,Y,U,a,o,f)):v.push(Y),hr(e,!0,r),G=e.input.charCodeAt(e.position),G===44?(i=!0,G=e.input.charCodeAt(++e.position)):i=!1}Ze(e,"unexpected end of the stream within a flow collection")}function Go(e,r){var i,a,o=$e,f=!1,d=!1,v=r,h=0,g=!1,b,E;if(E=e.input.charCodeAt(e.position),E===124)a=!1;else if(E===62)a=!0;else return!1;for(e.kind="scalar",e.result="";E!==0;)if(E=e.input.charCodeAt(++e.position),E===43||E===45)$e===o?o=E===43?co:En:Ze(e,"repeat of a chomping mode identifier");else if((b=nc(E))>=0)b===0?Ze(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):d?Ze(e,"repeat of an indentation width identifier"):(v=r+b-1,d=!0);else break;if(xi(E)){do E=e.input.charCodeAt(++e.position);while(xi(E));if(E===35)do E=e.input.charCodeAt(++e.position);while(!Un(E)&&E!==0)}for(;E!==0;){for(Hs(e),e.lineIndent=0,E=e.input.charCodeAt(e.position);(!d||e.lineIndent<v)&&E===32;)e.lineIndent++,E=e.input.charCodeAt(++e.position);if(!d&&e.lineIndent>v&&(v=e.lineIndent),Un(E)){h++;continue}if(e.lineIndent<v){o===co?e.result+=Be.repeat(`
60
60
  `,f?1+h:h):o===$e&&f&&(e.result+=`
61
61
  `);break}for(a?xi(E)?(g=!0,e.result+=Be.repeat(`
62
62
  `,f?1+h:h)):g?(g=!1,e.result+=Be.repeat(`
63
63
  `,h+1)):h===0?f&&(e.result+=" "):e.result+=Be.repeat(`
64
64
  `,h):e.result+=Be.repeat(`
65
- `,f?1+h:h),f=!0,d=!0,h=0,i=e.position;!Un(E)&&E!==0;)E=e.input.charCodeAt(++e.position);Li(e,i,e.position,!1)}return!0}function cu(e,r){var i,a=e.tag,o=e.anchor,f=[],d,v=!1,h;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=f),h=e.input.charCodeAt(e.position);h!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ze(e,"tab characters must not be used in indentation")),!(h!==45||(d=e.input.charCodeAt(e.position+1),!Zr(d))));){if(v=!0,e.position++,hr(e,!0,-1)&&e.lineIndent<=r){f.push(null),h=e.input.charCodeAt(e.position);continue}if(i=e.line,Mi(e,r,wt,!1,!0),f.push(e.result),hr(e,!0,-1),h=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>r)&&h!==0)Ze(e,"bad indentation of a sequence entry");else if(e.lineIndent<r)break}return v?(e.tag=a,e.anchor=o,e.kind="sequence",e.result=f,!0):!1}function du(e,r,i){var a,o,f,d,v,h,g=e.tag,b=e.anchor,E={},j=Object.create(null),I=null,W=null,Y=null,_=!1,U=!1,G;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=E),G=e.input.charCodeAt(e.position);G!==0;){if(!_&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ze(e,"tab characters must not be used in indentation")),a=e.input.charCodeAt(e.position+1),f=e.line,(G===63||G===58)&&Zr(a))G===63?(_&&(ea(e,E,j,I,W,null,d,v,h),I=W=Y=null),U=!0,_=!0,o=!0):_?(_=!1,o=!0):Ze(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,G=a;else{if(d=e.line,v=e.lineStart,h=e.position,!Mi(e,i,it,!1,!0))break;if(e.line===f){for(G=e.input.charCodeAt(e.position);xi(G);)G=e.input.charCodeAt(++e.position);if(G===58)G=e.input.charCodeAt(++e.position),Zr(G)||Ze(e,"a whitespace character is expected after the key-value separator within a block mapping"),_&&(ea(e,E,j,I,W,null,d,v,h),I=W=Y=null),U=!0,_=!1,o=!1,I=e.tag,W=e.result;else if(U)Ze(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=g,e.anchor=b,!0}else if(U)Ze(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=g,e.anchor=b,!0}if((e.line===f||e.lineIndent>r)&&(_&&(d=e.line,v=e.lineStart,h=e.position),Mi(e,r,Lt,!0,o)&&(_?W=e.result:Y=e.result),_||(ea(e,E,j,I,W,Y,d,v,h),I=W=Y=null),hr(e,!0,-1),G=e.input.charCodeAt(e.position)),(e.line===f||e.lineIndent>r)&&G!==0)Ze(e,"bad indentation of a mapping entry");else if(e.lineIndent<r)break}return _&&ea(e,E,j,I,W,null,d,v,h),U&&(e.tag=g,e.anchor=b,e.kind="mapping",e.result=E),U}function _n(e){var r,i=!1,a=!1,o,f,d;if(d=e.input.charCodeAt(e.position),d!==33)return!1;if(e.tag!==null&&Ze(e,"duplication of a tag property"),d=e.input.charCodeAt(++e.position),d===60?(i=!0,d=e.input.charCodeAt(++e.position)):d===33?(a=!0,o="!!",d=e.input.charCodeAt(++e.position)):o="!",r=e.position,i){do d=e.input.charCodeAt(++e.position);while(d!==0&&d!==62);e.position<e.length?(f=e.input.slice(r,e.position),d=e.input.charCodeAt(++e.position)):Ze(e,"unexpected end of the stream within a verbatim tag")}else{for(;d!==0&&!Zr(d);)d===33&&(a?Ze(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(r-1,e.position+1),Ws.test(o)||Ze(e,"named tag handle cannot contain such characters"),a=!0,r=e.position+1)),d=e.input.charCodeAt(++e.position);f=e.input.slice(r,e.position),ru.test(f)&&Ze(e,"tag suffix cannot contain flow indicator characters")}f&&!Fa.test(f)&&Ze(e,"tag name cannot contain such characters: "+f);try{f=decodeURIComponent(f)}catch(v){Ze(e,"tag name is malformed: "+f)}return i?e.tag=f:Pe.call(e.tagMap,o)?e.tag=e.tagMap[o]+f:o==="!"?e.tag="!"+f:o==="!!"?e.tag="tag:yaml.org,2002:"+f:Ze(e,'undeclared tag handle "'+o+'"'),!0}function ic(e){var r,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&Ze(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),r=e.position;i!==0&&!Zr(i)&&!qi(i);)i=e.input.charCodeAt(++e.position);return e.position===r&&Ze(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(r,e.position),!0}function ac(e){var r,i,a;if(a=e.input.charCodeAt(e.position),a!==42)return!1;for(a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!Zr(a)&&!qi(a);)a=e.input.charCodeAt(++e.position);return e.position===r&&Ze(e,"name of an alias node must contain at least one character"),i=e.input.slice(r,e.position),Pe.call(e.anchorMap,i)||Ze(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],hr(e,!0,-1),!0}function Mi(e,r,i,a,o){var f,d,v,h=1,g=!1,b=!1,E,j,I,W,Y,_;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,f=d=v=Lt===i||wt===i,a&&hr(e,!0,-1)&&(g=!0,e.lineIndent>r?h=1:e.lineIndent===r?h=0:e.lineIndent<r&&(h=-1)),h===1)for(;_n(e)||ic(e);)hr(e,!0,-1)?(g=!0,v=f,e.lineIndent>r?h=1:e.lineIndent===r?h=0:e.lineIndent<r&&(h=-1)):v=!1;if(v&&(v=g||o),(h===1||Lt===i)&&(Fe===i||it===i?Y=r:Y=r+1,_=e.position-e.lineStart,h===1?v&&(cu(e,_)||du(e,_,Y))||fu(e,Y)?b=!0:(d&&Go(e,Y)||Us(e,Y)||uu(e,Y)?b=!0:ac(e)?(b=!0,(e.tag!==null||e.anchor!==null)&&Ze(e,"alias node should not have any properties")):zo(e,Y,Fe===i)&&(b=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):h===0&&(b=v&&cu(e,_))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Ze(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),E=0,j=e.implicitTypes.length;E<j;E+=1)if(W=e.implicitTypes[E],W.resolve(e.result)){e.result=W.construct(e.result),e.tag=W.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Pe.call(e.typeMap[e.kind||"fallback"],e.tag))W=e.typeMap[e.kind||"fallback"][e.tag];else for(W=null,I=e.typeMap.multi[e.kind||"fallback"],E=0,j=I.length;E<j;E+=1)if(e.tag.slice(0,I[E].tag.length)===I[E].tag){W=I[E];break}W||Ze(e,"unknown tag !<"+e.tag+">"),e.result!==null&&W.kind!==e.kind&&Ze(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+W.kind+'", not "'+e.kind+'"'),W.resolve(e.result,e.tag)?(e.result=W.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Ze(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||b}function pu(e){var r=e.position,i,a,o,f=!1,d;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(d=e.input.charCodeAt(e.position))!==0&&(hr(e,!0,-1),d=e.input.charCodeAt(e.position),!(e.lineIndent>0||d!==37));){for(f=!0,d=e.input.charCodeAt(++e.position),i=e.position;d!==0&&!Zr(d);)d=e.input.charCodeAt(++e.position);for(a=e.input.slice(i,e.position),o=[],a.length<1&&Ze(e,"directive name must not be less than one character in length");d!==0;){for(;xi(d);)d=e.input.charCodeAt(++e.position);if(d===35){do d=e.input.charCodeAt(++e.position);while(d!==0&&!Un(d));break}if(Un(d))break;for(i=e.position;d!==0&&!Zr(d);)d=e.input.charCodeAt(++e.position);o.push(e.input.slice(i,e.position))}d!==0&&Hs(e),Pe.call(lu,a)?lu[a](e,a,o):Uo(e,'unknown document directive "'+a+'"')}if(hr(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,hr(e,!0,-1)):f&&Ze(e,"directives end mark is expected"),Mi(e,e.lineIndent-1,Lt,!1,!0),hr(e,!0,-1),e.checkLineBreaks&&oi.test(e.input.slice(r,e.position))&&Uo(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&po(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,hr(e,!0,-1));return}if(e.position<e.length-1)Ze(e,"end of the stream or a document separator is expected");else return}function Si(e,r){e=String(e),r=r||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
66
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new Ho(e,r),a=e.indexOf("\0");for(a!==-1&&(i.position=a,Ze(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)pu(i);return i.documents}function _s(e,r,i){r!==null&&typeof r=="object"&&typeof i=="undefined"&&(i=r,r=null);var a=Si(e,i);if(typeof r!="function")return a;for(var o=0,f=a.length;o<f;o+=1)r(a[o])}function wi(e,r){var i=Si(e,r);if(i.length!==0){if(i.length===1)return i[0];throw new rt("expected a single document in the stream, but found more")}}var $o=_s,zs=wi,ta={loadAll:$o,load:zs},hu=Object.prototype.toString,vu=Object.prototype.hasOwnProperty,Gs=65279,oc=9,Na=10,gu=13,sc=32,lc=33,uc=34,$s=35,mu=37,fc=38,yu=39,Ko=42,ra=44,cc=45,Yo=58,dc=61,ho=62,yr=63,pc=64,Ks=91,Ra=93,hc=96,Ys=123,vc=124,Xo=125,Br={};Br[0]="\\0",Br[7]="\\a",Br[8]="\\b",Br[9]="\\t",Br[10]="\\n",Br[11]="\\v",Br[12]="\\f",Br[13]="\\r",Br[27]="\\e",Br[34]='\\"',Br[92]="\\\\",Br[133]="\\N",Br[160]="\\_",Br[8232]="\\L",Br[8233]="\\P";var gc=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],mc=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function bu(e,r){var i,a,o,f,d,v,h;if(r===null)return{};for(i={},a=Object.keys(r),o=0,f=a.length;o<f;o+=1)d=a[o],v=String(r[d]),d.slice(0,2)==="!!"&&(d="tag:yaml.org,2002:"+d.slice(2)),h=e.compiledTypeMap.fallback[d],h&&vu.call(h.styleAliases,v)&&(v=h.styleAliases[v]),i[d]=v;return i}function xu(e){var r,i,a;if(r=e.toString(16).toUpperCase(),e<=255)i="x",a=2;else if(e<=65535)i="u",a=4;else if(e<=4294967295)i="U",a=8;else throw new rt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+Be.repeat("0",a-r.length)+r}var yc=1,Ci=2;function Ai(e){this.schema=e.schema||$,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Be.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=bu(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Ci:yc,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function vo(e,r){for(var i=Be.repeat(" ",r),a=0,o=-1,f="",d,v=e.length;a<v;)o=e.indexOf(`
65
+ `,f?1+h:h),f=!0,d=!0,h=0,i=e.position;!Un(E)&&E!==0;)E=e.input.charCodeAt(++e.position);Li(e,i,e.position,!1)}return!0}function cu(e,r){var i,a=e.tag,o=e.anchor,f=[],d,v=!1,h;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=f),h=e.input.charCodeAt(e.position);h!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ze(e,"tab characters must not be used in indentation")),!(h!==45||(d=e.input.charCodeAt(e.position+1),!Zr(d))));){if(v=!0,e.position++,hr(e,!0,-1)&&e.lineIndent<=r){f.push(null),h=e.input.charCodeAt(e.position);continue}if(i=e.line,Mi(e,r,wt,!1,!0),f.push(e.result),hr(e,!0,-1),h=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>r)&&h!==0)Ze(e,"bad indentation of a sequence entry");else if(e.lineIndent<r)break}return v?(e.tag=a,e.anchor=o,e.kind="sequence",e.result=f,!0):!1}function du(e,r,i){var a,o,f,d,v,h,g=e.tag,b=e.anchor,E={},V=Object.create(null),I=null,W=null,Y=null,_=!1,U=!1,G;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=E),G=e.input.charCodeAt(e.position);G!==0;){if(!_&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ze(e,"tab characters must not be used in indentation")),a=e.input.charCodeAt(e.position+1),f=e.line,(G===63||G===58)&&Zr(a))G===63?(_&&(ea(e,E,V,I,W,null,d,v,h),I=W=Y=null),U=!0,_=!0,o=!0):_?(_=!1,o=!0):Ze(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,G=a;else{if(d=e.line,v=e.lineStart,h=e.position,!Mi(e,i,it,!1,!0))break;if(e.line===f){for(G=e.input.charCodeAt(e.position);xi(G);)G=e.input.charCodeAt(++e.position);if(G===58)G=e.input.charCodeAt(++e.position),Zr(G)||Ze(e,"a whitespace character is expected after the key-value separator within a block mapping"),_&&(ea(e,E,V,I,W,null,d,v,h),I=W=Y=null),U=!0,_=!1,o=!1,I=e.tag,W=e.result;else if(U)Ze(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=g,e.anchor=b,!0}else if(U)Ze(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=g,e.anchor=b,!0}if((e.line===f||e.lineIndent>r)&&(_&&(d=e.line,v=e.lineStart,h=e.position),Mi(e,r,Lt,!0,o)&&(_?W=e.result:Y=e.result),_||(ea(e,E,V,I,W,Y,d,v,h),I=W=Y=null),hr(e,!0,-1),G=e.input.charCodeAt(e.position)),(e.line===f||e.lineIndent>r)&&G!==0)Ze(e,"bad indentation of a mapping entry");else if(e.lineIndent<r)break}return _&&ea(e,E,V,I,W,null,d,v,h),U&&(e.tag=g,e.anchor=b,e.kind="mapping",e.result=E),U}function _n(e){var r,i=!1,a=!1,o,f,d;if(d=e.input.charCodeAt(e.position),d!==33)return!1;if(e.tag!==null&&Ze(e,"duplication of a tag property"),d=e.input.charCodeAt(++e.position),d===60?(i=!0,d=e.input.charCodeAt(++e.position)):d===33?(a=!0,o="!!",d=e.input.charCodeAt(++e.position)):o="!",r=e.position,i){do d=e.input.charCodeAt(++e.position);while(d!==0&&d!==62);e.position<e.length?(f=e.input.slice(r,e.position),d=e.input.charCodeAt(++e.position)):Ze(e,"unexpected end of the stream within a verbatim tag")}else{for(;d!==0&&!Zr(d);)d===33&&(a?Ze(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(r-1,e.position+1),Ws.test(o)||Ze(e,"named tag handle cannot contain such characters"),a=!0,r=e.position+1)),d=e.input.charCodeAt(++e.position);f=e.input.slice(r,e.position),ru.test(f)&&Ze(e,"tag suffix cannot contain flow indicator characters")}f&&!Fa.test(f)&&Ze(e,"tag name cannot contain such characters: "+f);try{f=decodeURIComponent(f)}catch{Ze(e,"tag name is malformed: "+f)}return i?e.tag=f:Pe.call(e.tagMap,o)?e.tag=e.tagMap[o]+f:o==="!"?e.tag="!"+f:o==="!!"?e.tag="tag:yaml.org,2002:"+f:Ze(e,'undeclared tag handle "'+o+'"'),!0}function ic(e){var r,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&Ze(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),r=e.position;i!==0&&!Zr(i)&&!qi(i);)i=e.input.charCodeAt(++e.position);return e.position===r&&Ze(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(r,e.position),!0}function ac(e){var r,i,a;if(a=e.input.charCodeAt(e.position),a!==42)return!1;for(a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!Zr(a)&&!qi(a);)a=e.input.charCodeAt(++e.position);return e.position===r&&Ze(e,"name of an alias node must contain at least one character"),i=e.input.slice(r,e.position),Pe.call(e.anchorMap,i)||Ze(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],hr(e,!0,-1),!0}function Mi(e,r,i,a,o){var f,d,v,h=1,g=!1,b=!1,E,V,I,W,Y,_;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,f=d=v=Lt===i||wt===i,a&&hr(e,!0,-1)&&(g=!0,e.lineIndent>r?h=1:e.lineIndent===r?h=0:e.lineIndent<r&&(h=-1)),h===1)for(;_n(e)||ic(e);)hr(e,!0,-1)?(g=!0,v=f,e.lineIndent>r?h=1:e.lineIndent===r?h=0:e.lineIndent<r&&(h=-1)):v=!1;if(v&&(v=g||o),(h===1||Lt===i)&&(Fe===i||it===i?Y=r:Y=r+1,_=e.position-e.lineStart,h===1?v&&(cu(e,_)||du(e,_,Y))||fu(e,Y)?b=!0:(d&&Go(e,Y)||Us(e,Y)||uu(e,Y)?b=!0:ac(e)?(b=!0,(e.tag!==null||e.anchor!==null)&&Ze(e,"alias node should not have any properties")):zo(e,Y,Fe===i)&&(b=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):h===0&&(b=v&&cu(e,_))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Ze(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),E=0,V=e.implicitTypes.length;E<V;E+=1)if(W=e.implicitTypes[E],W.resolve(e.result)){e.result=W.construct(e.result),e.tag=W.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Pe.call(e.typeMap[e.kind||"fallback"],e.tag))W=e.typeMap[e.kind||"fallback"][e.tag];else for(W=null,I=e.typeMap.multi[e.kind||"fallback"],E=0,V=I.length;E<V;E+=1)if(e.tag.slice(0,I[E].tag.length)===I[E].tag){W=I[E];break}W||Ze(e,"unknown tag !<"+e.tag+">"),e.result!==null&&W.kind!==e.kind&&Ze(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+W.kind+'", not "'+e.kind+'"'),W.resolve(e.result,e.tag)?(e.result=W.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Ze(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||b}function pu(e){var r=e.position,i,a,o,f=!1,d;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(d=e.input.charCodeAt(e.position))!==0&&(hr(e,!0,-1),d=e.input.charCodeAt(e.position),!(e.lineIndent>0||d!==37));){for(f=!0,d=e.input.charCodeAt(++e.position),i=e.position;d!==0&&!Zr(d);)d=e.input.charCodeAt(++e.position);for(a=e.input.slice(i,e.position),o=[],a.length<1&&Ze(e,"directive name must not be less than one character in length");d!==0;){for(;xi(d);)d=e.input.charCodeAt(++e.position);if(d===35){do d=e.input.charCodeAt(++e.position);while(d!==0&&!Un(d));break}if(Un(d))break;for(i=e.position;d!==0&&!Zr(d);)d=e.input.charCodeAt(++e.position);o.push(e.input.slice(i,e.position))}d!==0&&Hs(e),Pe.call(lu,a)?lu[a](e,a,o):Uo(e,'unknown document directive "'+a+'"')}if(hr(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,hr(e,!0,-1)):f&&Ze(e,"directives end mark is expected"),Mi(e,e.lineIndent-1,Lt,!1,!0),hr(e,!0,-1),e.checkLineBreaks&&oi.test(e.input.slice(r,e.position))&&Uo(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&po(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,hr(e,!0,-1));return}if(e.position<e.length-1)Ze(e,"end of the stream or a document separator is expected");else return}function Si(e,r){e=String(e),r=r||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
66
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new Ho(e,r),a=e.indexOf("\0");for(a!==-1&&(i.position=a,Ze(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)pu(i);return i.documents}function _s(e,r,i){r!==null&&typeof r=="object"&&typeof i>"u"&&(i=r,r=null);var a=Si(e,i);if(typeof r!="function")return a;for(var o=0,f=a.length;o<f;o+=1)r(a[o])}function wi(e,r){var i=Si(e,r);if(i.length!==0){if(i.length===1)return i[0];throw new rt("expected a single document in the stream, but found more")}}var $o=_s,zs=wi,ta={loadAll:$o,load:zs},hu=Object.prototype.toString,vu=Object.prototype.hasOwnProperty,Gs=65279,oc=9,Na=10,gu=13,sc=32,lc=33,uc=34,$s=35,mu=37,fc=38,yu=39,Ko=42,ra=44,cc=45,Yo=58,dc=61,ho=62,yr=63,pc=64,Ks=91,Ra=93,hc=96,Ys=123,vc=124,Xo=125,Br={};Br[0]="\\0",Br[7]="\\a",Br[8]="\\b",Br[9]="\\t",Br[10]="\\n",Br[11]="\\v",Br[12]="\\f",Br[13]="\\r",Br[27]="\\e",Br[34]='\\"',Br[92]="\\\\",Br[133]="\\N",Br[160]="\\_",Br[8232]="\\L",Br[8233]="\\P";var gc=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],mc=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function bu(e,r){var i,a,o,f,d,v,h;if(r===null)return{};for(i={},a=Object.keys(r),o=0,f=a.length;o<f;o+=1)d=a[o],v=String(r[d]),d.slice(0,2)==="!!"&&(d="tag:yaml.org,2002:"+d.slice(2)),h=e.compiledTypeMap.fallback[d],h&&vu.call(h.styleAliases,v)&&(v=h.styleAliases[v]),i[d]=v;return i}function xu(e){var r,i,a;if(r=e.toString(16).toUpperCase(),e<=255)i="x",a=2;else if(e<=65535)i="u",a=4;else if(e<=4294967295)i="U",a=8;else throw new rt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+Be.repeat("0",a-r.length)+r}var yc=1,Ci=2;function Ai(e){this.schema=e.schema||$,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Be.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=bu(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Ci:yc,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function vo(e,r){for(var i=Be.repeat(" ",r),a=0,o=-1,f="",d,v=e.length;a<v;)o=e.indexOf(`
67
67
  `,a),o===-1?(d=e.slice(a),a=v):(d=e.slice(a,o+1),a=o+1),d.length&&d!==`
68
68
  `&&(f+=i),f+=d;return f}function go(e,r){return`
69
- `+Be.repeat(" ",e.indent*r)}function Su(e,r){var i,a,o;for(i=0,a=e.implicitTypes.length;i<a;i+=1)if(o=e.implicitTypes[i],o.resolve(r))return!0;return!1}function gn(e){return e===sc||e===oc}function zn(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Gs||65536<=e&&e<=1114111}function Jo(e){return zn(e)&&e!==Gs&&e!==gu&&e!==Na}function wu(e,r,i){var a=Jo(e),o=a&&!gn(e);return(i?a:a&&e!==ra&&e!==Ks&&e!==Ra&&e!==Ys&&e!==Xo)&&e!==$s&&!(r===Yo&&!o)||Jo(r)&&!gn(r)&&e===$s||r===Yo&&o}function Cu(e){return zn(e)&&e!==Gs&&!gn(e)&&e!==cc&&e!==yr&&e!==Yo&&e!==ra&&e!==Ks&&e!==Ra&&e!==Ys&&e!==Xo&&e!==$s&&e!==fc&&e!==Ko&&e!==lc&&e!==vc&&e!==dc&&e!==ho&&e!==yu&&e!==uc&&e!==mu&&e!==pc&&e!==hc}function bc(e){return!gn(e)&&e!==Yo}function Da(e,r){var i=e.charCodeAt(r),a;return i>=55296&&i<=56319&&r+1<e.length&&(a=e.charCodeAt(r+1),a>=56320&&a<=57343)?(i-55296)*1024+a-56320+65536:i}function Qo(e){var r=/^\n* /;return r.test(e)}var na=1,Tn=2,Xs=3,Js=4,Ba=5;function xc(e,r,i,a,o,f,d,v){var h,g=0,b=null,E=!1,j=!1,I=a!==-1,W=-1,Y=Cu(Da(e,0))&&bc(Da(e,e.length-1));if(r||d)for(h=0;h<e.length;g>=65536?h+=2:h++){if(g=Da(e,h),!zn(g))return Ba;Y=Y&&wu(g,b,v),b=g}else{for(h=0;h<e.length;g>=65536?h+=2:h++){if(g=Da(e,h),g===Na)E=!0,I&&(j=j||h-W-1>a&&e[W+1]!==" ",W=h);else if(!zn(g))return Ba;Y=Y&&wu(g,b,v),b=g}j=j||I&&h-W-1>a&&e[W+1]!==" "}return!E&&!j?Y&&!d&&!o(e)?na:f===Ci?Ba:Tn:i>9&&Qo(e)?Ba:d?f===Ci?Ba:Tn:j?Js:Xs}function Sc(e,r,i,a,o){e.dump=function(){if(r.length===0)return e.quotingType===Ci?'""':"''";if(!e.noCompatMode&&(gc.indexOf(r)!==-1||mc.test(r)))return e.quotingType===Ci?'"'+r+'"':"'"+r+"'";var f=e.indent*Math.max(1,i),d=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-f),v=a||e.flowLevel>-1&&i>=e.flowLevel;function h(g){return Su(e,g)}switch(xc(r,v,e.indent,d,h,e.quotingType,e.forceQuotes&&!a,o)){case na:return r;case Tn:return"'"+r.replace(/'/g,"''")+"'";case Xs:return"|"+Qs(r,e.indent)+Zs(vo(r,f));case Js:return">"+Qs(r,e.indent)+Zs(vo(mo(r,d),f));case Ba:return'"'+Au(r)+'"';default:throw new rt("impossible error: invalid scalar style")}}()}function Qs(e,r){var i=Qo(e)?String(r):"",a=e[e.length-1]===`
69
+ `+Be.repeat(" ",e.indent*r)}function Su(e,r){var i,a,o;for(i=0,a=e.implicitTypes.length;i<a;i+=1)if(o=e.implicitTypes[i],o.resolve(r))return!0;return!1}function gn(e){return e===sc||e===oc}function zn(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Gs||65536<=e&&e<=1114111}function Jo(e){return zn(e)&&e!==Gs&&e!==gu&&e!==Na}function wu(e,r,i){var a=Jo(e),o=a&&!gn(e);return(i?a:a&&e!==ra&&e!==Ks&&e!==Ra&&e!==Ys&&e!==Xo)&&e!==$s&&!(r===Yo&&!o)||Jo(r)&&!gn(r)&&e===$s||r===Yo&&o}function Cu(e){return zn(e)&&e!==Gs&&!gn(e)&&e!==cc&&e!==yr&&e!==Yo&&e!==ra&&e!==Ks&&e!==Ra&&e!==Ys&&e!==Xo&&e!==$s&&e!==fc&&e!==Ko&&e!==lc&&e!==vc&&e!==dc&&e!==ho&&e!==yu&&e!==uc&&e!==mu&&e!==pc&&e!==hc}function bc(e){return!gn(e)&&e!==Yo}function Da(e,r){var i=e.charCodeAt(r),a;return i>=55296&&i<=56319&&r+1<e.length&&(a=e.charCodeAt(r+1),a>=56320&&a<=57343)?(i-55296)*1024+a-56320+65536:i}function Qo(e){var r=/^\n* /;return r.test(e)}var na=1,Tn=2,Xs=3,Js=4,Ba=5;function xc(e,r,i,a,o,f,d,v){var h,g=0,b=null,E=!1,V=!1,I=a!==-1,W=-1,Y=Cu(Da(e,0))&&bc(Da(e,e.length-1));if(r||d)for(h=0;h<e.length;g>=65536?h+=2:h++){if(g=Da(e,h),!zn(g))return Ba;Y=Y&&wu(g,b,v),b=g}else{for(h=0;h<e.length;g>=65536?h+=2:h++){if(g=Da(e,h),g===Na)E=!0,I&&(V=V||h-W-1>a&&e[W+1]!==" ",W=h);else if(!zn(g))return Ba;Y=Y&&wu(g,b,v),b=g}V=V||I&&h-W-1>a&&e[W+1]!==" "}return!E&&!V?Y&&!d&&!o(e)?na:f===Ci?Ba:Tn:i>9&&Qo(e)?Ba:d?f===Ci?Ba:Tn:V?Js:Xs}function Sc(e,r,i,a,o){e.dump=function(){if(r.length===0)return e.quotingType===Ci?'""':"''";if(!e.noCompatMode&&(gc.indexOf(r)!==-1||mc.test(r)))return e.quotingType===Ci?'"'+r+'"':"'"+r+"'";var f=e.indent*Math.max(1,i),d=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-f),v=a||e.flowLevel>-1&&i>=e.flowLevel;function h(g){return Su(e,g)}switch(xc(r,v,e.indent,d,h,e.quotingType,e.forceQuotes&&!a,o)){case na:return r;case Tn:return"'"+r.replace(/'/g,"''")+"'";case Xs:return"|"+Qs(r,e.indent)+Zs(vo(r,f));case Js:return">"+Qs(r,e.indent)+Zs(vo(mo(r,d),f));case Ba:return'"'+Au(r)+'"';default:throw new rt("impossible error: invalid scalar style")}}()}function Qs(e,r){var i=Qo(e)?String(r):"",a=e[e.length-1]===`
70
70
  `,o=a&&(e[e.length-2]===`
71
71
  `||e===`
72
72
  `),f=o?"+":a?"":"-";return i+f+`
@@ -77,8 +77,8 @@ b`.split(/\n/).length!=3?function(t){for(var n=0,l=[],s=t.length;n<=s;){var u=t.
77
77
  `:"")+qs(h,r),o=f}return a}function qs(e,r){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,a,o=0,f,d=0,v=0,h="";a=i.exec(e);)v=a.index,v-o>r&&(f=d>o?d:v,h+=`
78
78
  `+e.slice(o,f),o=f+1),d=v;return h+=`
79
79
  `,e.length-o>r&&d>o?h+=e.slice(o,d)+`
80
- `+e.slice(d+1):h+=e.slice(o),h.slice(1)}function Au(e){for(var r="",i=0,a,o=0;o<e.length;i>=65536?o+=2:o++)i=Da(e,o),a=Br[i],!a&&zn(i)?(r+=e[o],i>=65536&&(r+=e[o+1])):r+=a||xu(i);return r}function el(e,r,i){var a="",o=e.tag,f,d,v;for(f=0,d=i.length;f<d;f+=1)v=i[f],e.replacer&&(v=e.replacer.call(i,String(f),v)),(li(e,r,v,!1,!1)||typeof v=="undefined"&&li(e,r,null,!1,!1))&&(a!==""&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=o,e.dump="["+a+"]"}function yo(e,r,i,a){var o="",f=e.tag,d,v,h;for(d=0,v=i.length;d<v;d+=1)h=i[d],e.replacer&&(h=e.replacer.call(i,String(d),h)),(li(e,r+1,h,!0,!0,!1,!0)||typeof h=="undefined"&&li(e,r+1,null,!0,!0,!1,!0))&&((!a||o!=="")&&(o+=go(e,r)),e.dump&&Na===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=f,e.dump=o||"[]"}function Ou(e,r,i){var a="",o=e.tag,f=Object.keys(i),d,v,h,g,b;for(d=0,v=f.length;d<v;d+=1)b="",a!==""&&(b+=", "),e.condenseFlow&&(b+='"'),h=f[d],g=i[h],e.replacer&&(g=e.replacer.call(i,h,g)),li(e,r,h,!1,!1)&&(e.dump.length>1024&&(b+="? "),b+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),li(e,r,g,!1,!1)&&(b+=e.dump,a+=b));e.tag=o,e.dump="{"+a+"}"}function Zo(e,r,i,a){var o="",f=e.tag,d=Object.keys(i),v,h,g,b,E,j;if(e.sortKeys===!0)d.sort();else if(typeof e.sortKeys=="function")d.sort(e.sortKeys);else if(e.sortKeys)throw new rt("sortKeys must be a boolean or a function");for(v=0,h=d.length;v<h;v+=1)j="",(!a||o!=="")&&(j+=go(e,r)),g=d[v],b=i[g],e.replacer&&(b=e.replacer.call(i,g,b)),li(e,r+1,g,!0,!0,!0)&&(E=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,E&&(e.dump&&Na===e.dump.charCodeAt(0)?j+="?":j+="? "),j+=e.dump,E&&(j+=go(e,r)),li(e,r+1,b,!0,E)&&(e.dump&&Na===e.dump.charCodeAt(0)?j+=":":j+=": ",j+=e.dump,o+=j));e.tag=f,e.dump=o||"{}"}function kn(e,r,i){var a,o,f,d,v,h;for(o=i?e.explicitTypes:e.implicitTypes,f=0,d=o.length;f<d;f+=1)if(v=o[f],(v.instanceOf||v.predicate)&&(!v.instanceOf||typeof r=="object"&&r instanceof v.instanceOf)&&(!v.predicate||v.predicate(r))){if(i?v.multi&&v.representName?e.tag=v.representName(r):e.tag=v.tag:e.tag="?",v.represent){if(h=e.styleMap[v.tag]||v.defaultStyle,hu.call(v.represent)==="[object Function]")a=v.represent(r,h);else if(vu.call(v.represent,h))a=v.represent[h](r,h);else throw new rt("!<"+v.tag+'> tag resolver accepts not "'+h+'" style');e.dump=a}return!0}return!1}function li(e,r,i,a,o,f,d){e.tag=null,e.dump=i,kn(e,i,!1)||kn(e,i,!0);var v=hu.call(e.dump),h=a,g;a&&(a=e.flowLevel<0||e.flowLevel>r);var b=v==="[object Object]"||v==="[object Array]",E,j;if(b&&(E=e.duplicates.indexOf(i),j=E!==-1),(e.tag!==null&&e.tag!=="?"||j||e.indent!==2&&r>0)&&(o=!1),j&&e.usedDuplicates[E])e.dump="*ref_"+E;else{if(b&&j&&!e.usedDuplicates[E]&&(e.usedDuplicates[E]=!0),v==="[object Object]")a&&Object.keys(e.dump).length!==0?(Zo(e,r,e.dump,o),j&&(e.dump="&ref_"+E+e.dump)):(Ou(e,r,e.dump),j&&(e.dump="&ref_"+E+" "+e.dump));else if(v==="[object Array]")a&&e.dump.length!==0?(e.noArrayIndent&&!d&&r>0?yo(e,r-1,e.dump,o):yo(e,r,e.dump,o),j&&(e.dump="&ref_"+E+e.dump)):(el(e,r,e.dump),j&&(e.dump="&ref_"+E+" "+e.dump));else if(v==="[object String]")e.tag!=="?"&&Sc(e,e.dump,r,f,h);else{if(v==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new rt("unacceptable kind of an object to dump "+v)}e.tag!==null&&e.tag!=="?"&&(g=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?g="!"+g:g.slice(0,18)==="tag:yaml.org,2002:"?g="!!"+g.slice(18):g="!<"+g+">",e.dump=g+" "+e.dump)}return!0}function tl(e,r){var i=[],a=[],o,f;for(bo(e,i,a),o=0,f=a.length;o<f;o+=1)r.duplicates.push(i[a[o]]);r.usedDuplicates=new Array(f)}function bo(e,r,i){var a,o,f;if(e!==null&&typeof e=="object")if(o=r.indexOf(e),o!==-1)i.indexOf(o)===-1&&i.push(o);else if(r.push(e),Array.isArray(e))for(o=0,f=e.length;o<f;o+=1)bo(e[o],r,i);else for(a=Object.keys(e),o=0,f=a.length;o<f;o+=1)bo(e[a[o]],r,i)}function Eu(e,r){r=r||{};var i=new Ai(r);i.noRefs||tl(e,i);var a=e;return i.replacer&&(a=i.replacer.call({"":a},"",a)),li(i,0,a,!0,!0)?i.dump+`
81
- `:""}var Tu=Eu,rl={dump:Tu};function nl(e,r){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+r+" instead, which is now safe by default.")}}var wc=zt,Cc=Cn,ia=Mr,Va=ii,ja=Dr,il=$,al=ta.load,ku=ta.loadAll,ol=rl.dump,aa=rt,oa={binary:ai,float:ni,map:an,null:ft,pairs:It,set:T,timestamp:Jr,bool:we,int:Ft,merge:on,omap:Ge,seq:jn,str:ri},qr=nl("safeLoad","load"),Ni=nl("safeLoadAll","loadAll"),Ri=nl("safeDump","dump"),qo={Type:wc,Schema:Cc,FAILSAFE_SCHEMA:ia,JSON_SCHEMA:Va,CORE_SCHEMA:ja,DEFAULT_SCHEMA:il,load:al,loadAll:ku,dump:ol,YAMLException:aa,types:oa,safeLoad:qr,safeLoadAll:Ni,safeDump:Ri};const Ac=qo,Pu=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:window}(),{FormData:Wa,Blob:xo,File:es}=Pu,ts=e=>":/?#[]@!$&'()*+,;=".indexOf(e)>-1,Oc=e=>/^[a-z0-9\-._~]+$/i.test(e);function Di(e){let{escape:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;return typeof e=="number"&&(e=e.toString()),typeof e!="string"||!e.length||!r?e:i?JSON.parse(e):[...e].map(a=>{if(Oc(a)||ts(a)&&r==="unsafe")return a;const o=new TextEncoder;return Array.from(o.encode(a)).map(d=>`0${d.toString(16).toUpperCase()}`.slice(-2)).map(d=>`%${d}`).join("")}).join("")}function rs(e){const{value:r}=e;return Array.isArray(r)?sl(e):typeof r=="object"?ll(e):Ha(e)}function sl(e){let{key:r,value:i,style:a,explode:o,escape:f}=e;const d=v=>Di(v,{escape:f});if(a==="simple")return i.map(v=>d(v)).join(",");if(a==="label")return`.${i.map(v=>d(v)).join(".")}`;if(a==="matrix")return i.map(v=>d(v)).reduce((v,h)=>!v||o?`${v||""};${r}=${h}`:`${v},${h}`,"");if(a==="form"){const v=o?`&${r}=`:",";return i.map(h=>d(h)).join(v)}if(a==="spaceDelimited"){const v=o?`${r}=`:"";return i.map(h=>d(h)).join(` ${v}`)}if(a==="pipeDelimited"){const v=o?`${r}=`:"";return i.map(h=>d(h)).join(`|${v}`)}}function ll(e){let{key:r,value:i,style:a,explode:o,escape:f}=e;const d=h=>Di(h,{escape:f}),v=Object.keys(i);if(a==="simple")return v.reduce((h,g)=>{const b=d(i[g]),E=o?"=":",";return`${h?`${h},`:""}${g}${E}${b}`},"");if(a==="label")return v.reduce((h,g)=>{const b=d(i[g]),E=o?"=":".";return`${h?`${h}.`:"."}${g}${E}${b}`},"");if(a==="matrix"&&o)return v.reduce((h,g)=>{const b=d(i[g]);return`${h?`${h};`:";"}${g}=${b}`},"");if(a==="matrix")return v.reduce((h,g)=>{const b=d(i[g]);return`${h?`${h},`:`;${r}=`}${g},${b}`},"");if(a==="form")return v.reduce((h,g)=>{const b=d(i[g]);return`${h?`${h}${o?"&":","}`:""}${g}${o?"=":","}${b}`},"")}function Ha(e){let{key:r,value:i,style:a,escape:o}=e;const f=d=>Di(d,{escape:o});if(a==="simple")return f(i);if(a==="label")return`.${f(i)}`;if(a==="matrix")return`;${r}=${f(i)}`;if(a==="form")return f(i);if(a==="deepObject")return f(i,{},!0)}const Fu=(e,r)=>{r.body=e},Ua={serializeRes:fl,mergeInQueryOrForm:Bi};function Ec(r){return fv(this,arguments,function*(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof e=="object"&&(i=e,e=i.url),i.headers=i.headers||{},Ua.mergeInQueryOrForm(i),i.headers&&Object.keys(i.headers).forEach(f=>{const d=i.headers[f];typeof d=="string"&&(i.headers[f]=d.replace(/\n+/g," "))}),i.requestInterceptor&&(i=(yield i.requestInterceptor(i))||i);const a=i.headers["content-type"]||i.headers["Content-Type"];/multipart\/form-data/i.test(a)&&i.body instanceof Wa&&(delete i.headers["content-type"],delete i.headers["Content-Type"]);let o;try{o=yield(i.userFetch||fetch)(i.url,i),o=yield Ua.serializeRes(o,e,i),i.responseInterceptor&&(o=(yield i.responseInterceptor(o))||o)}catch(f){if(!o)throw f;const d=new Error(o.statusText||`response status is ${o.status}`);throw d.status=o.status,d.statusCode=o.status,d.responseError=f,d}if(!o.ok){const f=new Error(o.statusText||`response status is ${o.status}`);throw f.status=o.status,f.statusCode=o.status,f.response=o,f}return o})}const Tc=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return/(json|xml|yaml|text)\b/.test(e)};function kc(e,r){return r&&(r.indexOf("application/json")===0||r.indexOf("+json")>0)?JSON.parse(e):Ac.load(e)}function fl(e,r){let{loadSpec:i=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a={ok:e.ok,url:e.url||r,status:e.status,statusText:e.statusText,headers:_a(e.headers)},o=a.headers["content-type"],f=i||Tc(o);return(f?e.text:e.blob||e.buffer).call(e).then(v=>{if(a.text=v,a.data=v,f)try{const h=kc(v,o);a.body=h,a.obj=h}catch(h){a.parseError=h}return a})}function cl(e){return e.includes(", ")?e.split(", "):e}function _a(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return typeof e.entries!="function"?{}:Array.from(e.entries()).reduce((r,i)=>{let[a,o]=i;return r[a]=cl(o),r},{})}function sa(e,r){return!r&&typeof navigator!="undefined"&&(r=navigator),r&&r.product==="ReactNative"?!!(e&&typeof e=="object"&&typeof e.uri=="string"):typeof es!="undefined"&&e instanceof es||typeof xo!="undefined"&&e instanceof xo||ArrayBuffer.isView(e)?!0:e!==null&&typeof e=="object"&&typeof e.pipe=="function"}function Iu(e,r){return Array.isArray(e)&&e.some(i=>sa(i,r))}const ns={form:",",spaceDelimited:"%20",pipeDelimited:"|"},Lu={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function za(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{collectionFormat:a,allowEmptyValue:o,serializationOption:f,encoding:d}=r,v=typeof r=="object"&&!Array.isArray(r)?r.value:r,h=i?b=>b.toString():b=>encodeURIComponent(b),g=h(e);if(typeof v=="undefined"&&o)return[[g,""]];if(sa(v)||Iu(v))return[[g,v]];if(f)return dl(e,v,i,f);if(d){if([typeof d.style,typeof d.explode,typeof d.allowReserved].some(b=>b!=="undefined")){const{style:b,explode:E,allowReserved:j}=d;return dl(e,v,i,{style:b,explode:E,allowReserved:j})}if(d.contentType){if(d.contentType==="application/json"){const b=typeof v=="string"?v:JSON.stringify(v);return[[g,h(b)]]}return[[g,h(v.toString())]]}return typeof v!="object"?[[g,h(v)]]:Array.isArray(v)&&v.every(b=>typeof b!="object")?[[g,v.map(h).join(",")]]:[[g,h(JSON.stringify(v))]]}return typeof v!="object"?[[g,h(v)]]:Array.isArray(v)?a==="multi"?[[g,v.map(h)]]:[[g,v.map(h).join(Lu[a||"csv"])]]:[[g,""]]}function dl(e,r,i,a){const o=a.style||"form",f=typeof a.explode=="undefined"?o==="form":a.explode,d=i?!1:a&&a.allowReserved?"unsafe":"reserved",v=g=>Di(g,{escape:d}),h=i?g=>g:g=>Di(g,{escape:d});return typeof r!="object"?[[h(e),v(r)]]:Array.isArray(r)?f?[[h(e),r.map(v)]]:[[h(e),r.map(v).join(ns[o])]]:o==="deepObject"?Object.keys(r).map(g=>[h(`${e}[${g}]`),v(r[g])]):f?Object.keys(r).map(g=>[h(g),v(r[g])]):[[h(e),Object.keys(r).map(g=>[`${h(g)},${v(r[g])}`]).join(",")]]}function la(e){return Object.entries(e).reduce((r,i)=>{let[a,o]=i;for(const[f,d]of za(a,o,!0))if(Array.isArray(d))for(const v of d)if(ArrayBuffer.isView(v)){const h=new xo([v]);r.append(f,h)}else r.append(f,v);else if(ArrayBuffer.isView(d)){const v=new xo([d]);r.append(f,v)}else r.append(f,d);return r},new Wa)}function Ga(e){const r=Object.keys(e).reduce((i,a)=>{for(const[o,f]of za(a,e[a]))i[o]=f;return i},{});return ie().stringify(r,{encode:!1,indices:!1})||""}function Bi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{url:r="",query:i,form:a}=e,o=function(){for(var f=arguments.length,d=new Array(f),v=0;v<f;v++)d[v]=arguments[v];const h=d.filter(g=>g).join("&");return h?`?${h}`:""};if(a){const f=Object.keys(a).some(v=>{const{value:h}=a[v];return sa(h)||Iu(h)}),d=e.headers["content-type"]||e.headers["Content-Type"];if(f||/multipart\/form-data/i.test(d)){const v=la(e.form);Fu(v,e)}else e.body=Ga(a);delete e.form}if(i){const[f,d]=r.split("?");let v="";if(d){const g=ie().parse(d);Object.keys(i).forEach(E=>delete g[E]),v=ie().stringify(g,{encode:!0})}const h=o(v,Ga(i));e.url=f+h,delete e.query}return e}function is(e,r,i){return i=i||(a=>a),r=r||(a=>a),a=>(typeof a=="string"&&(a={url:a}),Ua.mergeInQueryOrForm(a),a=r(a),i(e(a)))}function $a(e,r){function i(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack;for(var a=arguments.length,o=new Array(a),f=0;f<a;f++)o[f]=arguments[f];[this.message]=o,r&&r.apply(this,o)}return i.prototype=new Error,i.prototype.name=e,i.prototype.constructor=i,i}const Mu={body:Nu,header:Pc,query:fa,path:ua,formData:Ru};function Nu(e){let{req:r,value:i}=e;r.body=i}function Ru(e){let{req:r,value:i,parameter:a}=e;(i||a.allowEmptyValue)&&(r.form=r.form||{},r.form[a.name]={value:i,allowEmptyValue:a.allowEmptyValue,collectionFormat:a.collectionFormat})}function Pc(e){let{req:r,parameter:i,value:a}=e;r.headers=r.headers||{},typeof a!="undefined"&&(r.headers[i.name]=a)}function ua(e){let{req:r,value:i,parameter:a}=e;r.url=r.url.split(`{${a.name}}`).join(encodeURIComponent(i))}function fa(e){let{req:r,value:i,parameter:a}=e;if(r.query=r.query||{},i===!1&&a.type==="boolean"&&(i="false"),i===0&&["number","integer"].indexOf(a.type)>-1&&(i="0"),i)r.query[a.name]={collectionFormat:a.collectionFormat,value:i};else if(a.allowEmptyValue&&i!==void 0){const o=a.name;r.query[o]=r.query[o]||{},r.query[o].allowEmptyValue=!0}}function as(e,r){return r.includes("application/json")?typeof e=="string"?e:JSON.stringify(e):e.toString()}function Fc(e){let{req:r,value:i,parameter:a}=e;const{name:o,style:f,explode:d,content:v}=a;if(v){const g=Object.keys(v)[0];r.url=r.url.split(`{${o}}`).join(Di(as(i,g),{escape:!0}));return}const h=rs({key:a.name,value:i,style:f||"simple",explode:d||!1,escape:!0});r.url=r.url.split(`{${o}}`).join(h)}function Ic(e){let{req:r,value:i,parameter:a}=e;if(r.query=r.query||{},a.content){const o=Object.keys(a.content)[0],f=as(i,o);if(f)r.query[a.name]=f;else if(a.allowEmptyValue&&i!==void 0){const d=a.name;r.query[d]=r.query[d]||{},r.query[d].allowEmptyValue=!0}return}if(i===!1&&(i="false"),i===0&&(i="0"),i){const{style:o,explode:f,allowReserved:d}=a;r.query[a.name]={value:i,serializationOption:{style:o,explode:f,allowReserved:d}}}else if(a.allowEmptyValue&&i!==void 0){const o=a.name;r.query[o]=r.query[o]||{},r.query[o].allowEmptyValue=!0}}const Lc=["accept","authorization","content-type"];function Mc(e){let{req:r,parameter:i,value:a}=e;if(r.headers=r.headers||{},!(Lc.indexOf(i.name.toLowerCase())>-1)){if(i.content){const o=Object.keys(i.content)[0];r.headers[i.name]=as(a,o);return}typeof a!="undefined"&&(r.headers[i.name]=rs({key:i.name,value:a,style:i.style||"simple",explode:typeof i.explode=="undefined"?!1:i.explode,escape:!1}))}}function Nc(e){let{req:r,parameter:i,value:a}=e;r.headers=r.headers||{};const o=typeof a;if(i.content){const f=Object.keys(i.content)[0];r.headers.Cookie=`${i.name}=${as(a,f)}`;return}if(o!=="undefined"){const f=o==="object"&&!Array.isArray(a)&&i.explode?"":`${i.name}=`;r.headers.Cookie=f+rs({key:i.name,value:a,escape:!1,style:i.style||"form",explode:typeof i.explode=="undefined"?!1:i.explode})}}const ln=(()=>typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:window)(),{btoa:br}=ln,Vr=br;function xr(e,r){const{operation:i,requestBody:a,securities:o,spec:f,attachContentTypeForEmptyPayload:d}=e;let{requestContentType:v}=e;r=So({request:r,securities:o,operation:i,spec:f});const h=i.requestBody||{},g=Object.keys(h.content||{}),b=v&&g.indexOf(v)>-1;if(a||d){if(v&&b)r.headers["Content-Type"]=v;else if(!v){const E=g[0];E&&(r.headers["Content-Type"]=E,v=E)}}else v&&b&&(r.headers["Content-Type"]=v);if(!e.responseContentType&&i.responses){const E=Object.entries(i.responses).filter(j=>{let[I,W]=j;const Y=parseInt(I,10);return Y>=200&&Y<300&&xe(W.content)}).reduce((j,I)=>{let[,W]=I;return j.concat(Object.keys(W.content))},[]);E.length>0&&(r.headers.accept=E.join(", "))}if(a)if(v){if(g.indexOf(v)>-1)if(v==="application/x-www-form-urlencoded"||v==="multipart/form-data")if(typeof a=="object"){const E=(h.content[v]||{}).encoding||{};r.form={},Object.keys(a).forEach(j=>{r.form[j]={value:a[j],encoding:E[j]||{}}})}else r.form=a;else r.body=a}else r.body=a;return r}function So(e){let{request:r,securities:i={},operation:a={},spec:o}=e;const f=M({},r),{authorized:d={}}=i,v=a.security||o.security||[],h=d&&!!Object.keys(d).length,g=le()(o,["components","securitySchemes"])||{};return f.headers=f.headers||{},f.query=f.query||{},!Object.keys(i).length||!h||!v||Array.isArray(a.security)&&!a.security.length?r:(v.forEach(b=>{Object.keys(b).forEach(E=>{const j=d[E],I=g[E];if(!j)return;const W=j.value||j,{type:Y}=I;if(j){if(Y==="apiKey")I.in==="query"&&(f.query[I.name]=W),I.in==="header"&&(f.headers[I.name]=W),I.in==="cookie"&&(f.cookies[I.name]=W);else if(Y==="http"){if(/^basic$/i.test(I.scheme)){const _=W.username||"",U=W.password||"",G=Vr(`${_}:${U}`);f.headers.Authorization=`Basic ${G}`}/^bearer$/i.test(I.scheme)&&(f.headers.Authorization=`Bearer ${W}`)}else if(Y==="oauth2"||Y==="openIdConnect"){const _=j.token||{},U=I["x-tokenName"]||"access_token",G=_[U];let ce=_.token_type;(!ce||ce.toLowerCase()==="bearer")&&(ce="Bearer"),f.headers.Authorization=`${ce} ${G}`}}})}),f)}function Rc(e,r){const{spec:i,operation:a,securities:o,requestContentType:f,responseContentType:d,attachContentTypeForEmptyPayload:v}=e;if(r=os({request:r,securities:o,operation:a,spec:i}),r.body||r.form||v)f?r.headers["Content-Type"]=f:Array.isArray(a.consumes)?[r.headers["Content-Type"]]=a.consumes:Array.isArray(i.consumes)?[r.headers["Content-Type"]]=i.consumes:a.parameters&&a.parameters.filter(h=>h.type==="file").length?r.headers["Content-Type"]="multipart/form-data":a.parameters&&a.parameters.filter(h=>h.in==="formData").length&&(r.headers["Content-Type"]="application/x-www-form-urlencoded");else if(f){const h=a.parameters&&a.parameters.filter(b=>b.in==="body").length>0,g=a.parameters&&a.parameters.filter(b=>b.in==="formData").length>0;(h||g)&&(r.headers["Content-Type"]=f)}return!d&&Array.isArray(a.produces)&&a.produces.length>0&&(r.headers.accept=a.produces.join(", ")),r}function os(e){let{request:r,securities:i={},operation:a={},spec:o}=e;const f=M({},r),{authorized:d={},specSecurity:v=[]}=i,h=a.security||v,g=d&&!!Object.keys(d).length,b=o.securityDefinitions;return f.headers=f.headers||{},f.query=f.query||{},!Object.keys(i).length||!g||!h||Array.isArray(a.security)&&!a.security.length?r:(h.forEach(E=>{Object.keys(E).forEach(j=>{const I=d[j];if(!I)return;const{token:W}=I,Y=I.value||I,_=b[j],{type:U}=_,G=_["x-tokenName"]||"access_token",ce=W&&W[G];let Ce=W&&W.token_type;if(I)if(U==="apiKey"){const ge=_.in==="query"?"query":"headers";f[ge]=f[ge]||{},f[ge][_.name]=Y}else if(U==="basic")if(Y.header)f.headers.authorization=Y.header;else{const ge=Y.username||"",ke=Y.password||"";Y.base64=Vr(`${ge}:${ke}`),f.headers.authorization=`Basic ${Y.base64}`}else U==="oauth2"&&ce&&(Ce=!Ce||Ce.toLowerCase()==="bearer"?"Bearer":Ce,f.headers.authorization=`${Ce} ${ce}`)})}),f)}function Du(e,r){return`${r.toLowerCase()}-${e}`}function Dc(e,r,i){if(!e||typeof e!="object"||!e.paths||typeof e.paths!="object")return null;const{paths:a}=e;for(const o in a)for(const f in a[o]){if(f.toUpperCase()==="PARAMETERS")continue;const d=a[o][f];if(!d||typeof d!="object")continue;const v={spec:e,pathName:o,method:f.toUpperCase(),operation:d},h=r(v);if(i&&h)return v}}function Bc(e,r){return Dc(e,r,!0)||null}const pl=e=>e.replace(/\W/gi,"_");function hl(e,r){let{v2OperationIdCompatibilityMode:i}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(i){let a=`${r.toLowerCase()}_${e}`.replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return a=a||`${e.substring(1)}_${r}`,a.replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return`${r.toLowerCase()}${pl(e)}`}function Vc(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",{v2OperationIdCompatibilityMode:a}=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return!e||typeof e!="object"?null:(e.operationId||"").replace(/\s/g,"").length?pl(e.operationId):hl(r,i,{v2OperationIdCompatibilityMode:a})}function vl(e,r){return!e||!e.paths?null:Bc(e,i=>{let{pathName:a,method:o,operation:f}=i;if(!f||typeof f!="object")return!1;const d=f.operationId,v=Vc(f,a,o),h=Du(a,o);return[v,h,d].some(g=>g&&g===r)})}const Vu=e=>{try{const{swagger:r}=e;return r==="2.0"}catch(r){return!1}},ju=e=>{try{const{openapi:r}=e;return typeof r=="string"&&/^3\.0\.([0123])(?:-rc[012])?$/.test(r)}catch(r){return!1}},Wu=e=>{try{const{openapi:r}=e;return typeof r=="string"&&/^3\.1\.(?:[1-9]\d*|0)$/.test(r)}catch(r){return!1}},ss=e=>ju(e)||Wu(e),Hu=["http","fetch","spec","operationId","pathName","method","parameters","securities"],Ka=e=>Array.isArray(e)?e:[],jc=$a("OperationNotFoundError",function(r,i,a){this.originalError=a,Object.assign(this,i||{})}),ls=(e,r)=>r.filter(i=>i.name===e),Oi=e=>{const r={};e.forEach(a=>{r[a.in]||(r[a.in]={}),r[a.in][a.name]=a});const i=[];return Object.keys(r).forEach(a=>{Object.keys(r[a]).forEach(o=>{i.push(r[a][o])})}),i},Uu={buildRequest:_u};function Wc(e){let{http:r,fetch:i,spec:a,operationId:o,pathName:f,method:d,parameters:v,securities:h}=e,g=ae(e,Hu);const b=r||i||Ec;f&&d&&!o&&(o=Du(f,d));const E=Uu.buildRequest(M({spec:a,operationId:o,parameters:v,securities:h,http:b},g));return E.body&&(xe(E.body)||Array.isArray(E.body))&&(E.body=JSON.stringify(E.body)),b(E)}function _u(e){const{spec:r,operationId:i,responseContentType:a,scheme:o,requestInterceptor:f,responseInterceptor:d,contextUrl:v,userFetch:h,server:g,serverVariables:b,http:E,signal:j}=e;let{parameters:I,parameterBuilders:W}=e;const Y=ss(r);W||(Y?W=m:W=Mu);let U={url:"",credentials:E&&E.withCredentials?"include":"same-origin",headers:{},cookies:{}};j&&(U.signal=j),f&&(U.requestInterceptor=f),d&&(U.responseInterceptor=d),h&&(U.userFetch=h);const G=vl(r,i);if(!G)throw new jc(`Operation ${i} not found`);const{operation:ce={},method:Ce,pathName:ge}=G;if(U.url+=Dt({spec:r,scheme:o,contextUrl:v,server:g,serverVariables:b,pathName:ge,method:Ce}),!i)return delete U.cookies,U;U.url+=ge,U.method=`${Ce}`.toUpperCase(),I=I||{};const ke=r.paths[ge]||{};a&&(U.headers.accept=a);const be=Oi([].concat(Ka(ce.parameters)).concat(Ka(ke.parameters)));be.forEach(ue=>{const Oe=W[ue.in];let Te;if(ue.in==="body"&&ue.schema&&ue.schema.properties&&(Te=I),Te=ue&&ue.name&&I[ue.name],typeof Te=="undefined"?Te=ue&&ue.name&&I[`${ue.in}.${ue.name}`]:ls(ue.name,be).length>1&&console.warn(`Parameter '${ue.name}' is ambiguous because the defined spec has more than one parameter with the name: '${ue.name}' and the passed-in parameter values did not define an 'in' value.`),Te!==null){if(typeof ue.default!="undefined"&&typeof Te=="undefined"&&(Te=ue.default),typeof Te=="undefined"&&ue.required&&!ue.allowEmptyValue)throw new Error(`Required parameter ${ue.name} is not provided`);if(Y&&ue.schema&&ue.schema.type==="object"&&typeof Te=="string")try{Te=JSON.parse(Te)}catch(Me){throw new Error("Could not parse object parameter value string as JSON")}Oe&&Oe({req:U,parameter:ue,value:Te,operation:ce,spec:r})}});const me=M(M({},e),{},{operation:ce});if(Y?U=xr(me,U):U=Rc(me,U),U.cookies&&Object.keys(U.cookies).length){const ue=Object.keys(U.cookies).reduce((Oe,Te)=>{const Me=U.cookies[Te],Xe=Oe?"&":"",yt=q.serialize(Te,Me);return Oe+Xe+yt},"");U.headers.Cookie=ue}return U.cookies&&delete U.cookies,Bi(U),U}const en=e=>e?e.replace(/\W/g,""):null;function Dt(e){return ss(e.spec)?Gn(e):zu(e)}function Gn(e){let{spec:r,pathName:i,method:a,server:o,contextUrl:f,serverVariables:d={}}=e;const v=le()(r,["paths",i,(a||"").toLowerCase(),"servers"])||le()(r,["paths",i,"servers"])||le()(r,["servers"]);let h="",g=null;if(o&&v&&v.length){const b=v.map(E=>E.url);b.indexOf(o)>-1&&(h=o,g=v[b.indexOf(o)])}return!h&&v&&v.length&&(h=v[0].url,[g]=v),h.indexOf("{")>-1&&ji(h).forEach(E=>{if(g.variables&&g.variables[E]){const j=g.variables[E],I=d[E]||j.default,W=new RegExp(`{${E}}`,"g");h=h.replace(W,I)}}),Vi(h,f)}function Vi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e&&r?z.parse(z.resolve(r,e)):z.parse(e),a=z.parse(r),o=en(i.protocol)||en(a.protocol)||"",f=i.host||a.host,d=i.pathname||"";let v;return o&&f?v=`${o}://${f+d}`:v=d,v[v.length-1]==="/"?v.slice(0,-1):v}function ji(e){const r=[],i=/{([^}]+)}/g;let a;for(;a=i.exec(e);)r.push(a[1]);return r}function zu(e){let{spec:r,scheme:i,contextUrl:a=""}=e;const o=z.parse(a),f=Array.isArray(r.schemes)?r.schemes[0]:null,d=i||f||en(o.protocol)||"http",v=r.host||o.host||"",h=r.basePath||"";let g;return d&&v?g=`${d}://${v+h}`:g=h,g[g.length-1]==="/"?g.slice(0,-1):g}var A=c(29901),Jt=c(20202),ui=c(21999),gl=c(89103),wo=c(69490),Gu=c(2526),ml=Object.defineProperty,Wi=Object.defineProperties,$u=Object.getOwnPropertyDescriptors,yl=Object.getOwnPropertySymbols,Hc=Object.prototype.hasOwnProperty,us=Object.prototype.propertyIsEnumerable,fs=(e,r,i)=>r in e?ml(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Ku=(e,r)=>{for(var i in r||(r={}))Hc.call(r,i)&&fs(e,i,r[i]);if(yl)for(var i of yl(r))us.call(r,i)&&fs(e,i,r[i]);return e},Uc=(e,r)=>Wi(e,$u(r)),Yu=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});function _c(e,r){return Yu(this,null,function*(){var i,a,o,f;const d=JSON.parse(JSON.stringify(r)),v=d.openapi?{openapi:d.openapi}:d.swagger?{swagger:d.swagger}:{},h=Uc(Ku({},v),{components:d.components,paths:{[e.path]:{[e.httpVerb]:(a=(i=d.paths)==null?void 0:i[e.path])==null?void 0:a[e.httpVerb],parameters:(f=(o=d.paths)==null?void 0:o[e.path])==null?void 0:f.parameters}}}),g=new wo.Config({}),b=(0,Gu.I)(h),E={config:g,doc:b,dereference:!0};return yield(0,gl.bundle)(E),d})}var zc=c(98910),ca=c(84862),$n=c(53134),Xu=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});const Ju=Object.values($n.FileUploadFormats),Qu=["application/octet-stream","application/pdf","application/gzip","application/zip"],da=["image/","audio/","video/"];function cs(e){if(da.some(r=>e.startsWith(r)))return e}function pa(e){return Qu.includes(e)?!0:da.some(r=>e.startsWith(r))}function Zu(e){const r=e.type==="array"?e.items:e;if(!r||!r.type||(r==null?void 0:r.type)==="any")return!0;const i=r.contentMediaType||"",a=r.format||r.contentEncoding||(pa(i)?"binary":"");return r.type===$n.DefinitionTypes.STRING&&Ju.includes(a)}function ds(e,r){if(!e||!e.type||e.type==="any")return pa(r);const i=e.format||e.contentEncoding||"";return e.type===$n.DefinitionTypes.STRING&&Ju.includes(i)}function bl(e){return new Promise((r,i)=>{const a=new FileReader;a.onload=()=>{const f=a.result.replace(/data:.*\/.*;base64,/g,"");r(f)},a.onerror=()=>i(a.error),a.readAsDataURL(e)})}function qu({format:e,contentEncoding:r,contentMediaType:i}){return[e,r,i].includes($n.FileUploadFormats.BASE64)}function ef(e,r){return Xu(this,null,function*(){const i=Object.values(e);let a=i.length===1?i[0]:i;return r.type===$n.DefinitionTypes.STRING&&qu(r)?a=yield bl(i[0]):r.type===$n.DefinitionTypes.ARRAY&&r.items&&(qu(r.items)?a=yield Promise.all(i.map(f=>Xu(this,null,function*(){return yield bl(f)}))):a=i),a})}var Sr=c(84622),xt=c(38612),At=c(11991),dt=c(68176),mn=c(71608),Ya=c(64393);function ps({response:e}){return A.createElement(A.Fragment,null,A.createElement(mn.EE,null," Body: "),tf(e))}function tf(e){return e.body?A.createElement(Jt.JsonViewer,{data:e.body,jsonSampleExpandLevel:1}):e.fileInfo?A.createElement(Ya.s,{fileInfo:e.fileInfo}):e.data!==null?e.data?A.createElement(Jt.CodeBlock,{lang:(0,dt.M)(e.headers["Content-Type"]||"text/plain"),source:e.data,header:{controls:{copy:{}}}}):A.createElement(Jt.CodeBlockContainer,{withControls:!0},A.createElement("i",null,"(no content)")):null}var Hi=c(79216);function rf({headers:e}){const r=(0,ui.useRecoilValue)(Hi.lk),[i,a]=(0,A.useState)(!0),{maxResponseHeadersToShowInTryIt:o}=r,f=Object.keys(e),d=!!o&&f.length>o,v=d&&i?[...f].splice(0,o):[...f],h=()=>{a(!i)};return A.createElement(A.Fragment,null,A.createElement(mn.EE,null," Headers: "),A.createElement(Jt.CodeBlockContainer,{withControls:!0},v.map(g=>A.createElement("div",{key:g},A.createElement(ha,null,g,":"),A.createElement("code",null,e[g]))),d&&A.createElement(xl,{onClick:h},i?"Show more...":"Hide headers")))}const ha=At.ZP.strong`
80
+ `+e.slice(d+1):h+=e.slice(o),h.slice(1)}function Au(e){for(var r="",i=0,a,o=0;o<e.length;i>=65536?o+=2:o++)i=Da(e,o),a=Br[i],!a&&zn(i)?(r+=e[o],i>=65536&&(r+=e[o+1])):r+=a||xu(i);return r}function el(e,r,i){var a="",o=e.tag,f,d,v;for(f=0,d=i.length;f<d;f+=1)v=i[f],e.replacer&&(v=e.replacer.call(i,String(f),v)),(li(e,r,v,!1,!1)||typeof v>"u"&&li(e,r,null,!1,!1))&&(a!==""&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=o,e.dump="["+a+"]"}function yo(e,r,i,a){var o="",f=e.tag,d,v,h;for(d=0,v=i.length;d<v;d+=1)h=i[d],e.replacer&&(h=e.replacer.call(i,String(d),h)),(li(e,r+1,h,!0,!0,!1,!0)||typeof h>"u"&&li(e,r+1,null,!0,!0,!1,!0))&&((!a||o!=="")&&(o+=go(e,r)),e.dump&&Na===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=f,e.dump=o||"[]"}function Ou(e,r,i){var a="",o=e.tag,f=Object.keys(i),d,v,h,g,b;for(d=0,v=f.length;d<v;d+=1)b="",a!==""&&(b+=", "),e.condenseFlow&&(b+='"'),h=f[d],g=i[h],e.replacer&&(g=e.replacer.call(i,h,g)),li(e,r,h,!1,!1)&&(e.dump.length>1024&&(b+="? "),b+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),li(e,r,g,!1,!1)&&(b+=e.dump,a+=b));e.tag=o,e.dump="{"+a+"}"}function Zo(e,r,i,a){var o="",f=e.tag,d=Object.keys(i),v,h,g,b,E,V;if(e.sortKeys===!0)d.sort();else if(typeof e.sortKeys=="function")d.sort(e.sortKeys);else if(e.sortKeys)throw new rt("sortKeys must be a boolean or a function");for(v=0,h=d.length;v<h;v+=1)V="",(!a||o!=="")&&(V+=go(e,r)),g=d[v],b=i[g],e.replacer&&(b=e.replacer.call(i,g,b)),li(e,r+1,g,!0,!0,!0)&&(E=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,E&&(e.dump&&Na===e.dump.charCodeAt(0)?V+="?":V+="? "),V+=e.dump,E&&(V+=go(e,r)),li(e,r+1,b,!0,E)&&(e.dump&&Na===e.dump.charCodeAt(0)?V+=":":V+=": ",V+=e.dump,o+=V));e.tag=f,e.dump=o||"{}"}function kn(e,r,i){var a,o,f,d,v,h;for(o=i?e.explicitTypes:e.implicitTypes,f=0,d=o.length;f<d;f+=1)if(v=o[f],(v.instanceOf||v.predicate)&&(!v.instanceOf||typeof r=="object"&&r instanceof v.instanceOf)&&(!v.predicate||v.predicate(r))){if(i?v.multi&&v.representName?e.tag=v.representName(r):e.tag=v.tag:e.tag="?",v.represent){if(h=e.styleMap[v.tag]||v.defaultStyle,hu.call(v.represent)==="[object Function]")a=v.represent(r,h);else if(vu.call(v.represent,h))a=v.represent[h](r,h);else throw new rt("!<"+v.tag+'> tag resolver accepts not "'+h+'" style');e.dump=a}return!0}return!1}function li(e,r,i,a,o,f,d){e.tag=null,e.dump=i,kn(e,i,!1)||kn(e,i,!0);var v=hu.call(e.dump),h=a,g;a&&(a=e.flowLevel<0||e.flowLevel>r);var b=v==="[object Object]"||v==="[object Array]",E,V;if(b&&(E=e.duplicates.indexOf(i),V=E!==-1),(e.tag!==null&&e.tag!=="?"||V||e.indent!==2&&r>0)&&(o=!1),V&&e.usedDuplicates[E])e.dump="*ref_"+E;else{if(b&&V&&!e.usedDuplicates[E]&&(e.usedDuplicates[E]=!0),v==="[object Object]")a&&Object.keys(e.dump).length!==0?(Zo(e,r,e.dump,o),V&&(e.dump="&ref_"+E+e.dump)):(Ou(e,r,e.dump),V&&(e.dump="&ref_"+E+" "+e.dump));else if(v==="[object Array]")a&&e.dump.length!==0?(e.noArrayIndent&&!d&&r>0?yo(e,r-1,e.dump,o):yo(e,r,e.dump,o),V&&(e.dump="&ref_"+E+e.dump)):(el(e,r,e.dump),V&&(e.dump="&ref_"+E+" "+e.dump));else if(v==="[object String]")e.tag!=="?"&&Sc(e,e.dump,r,f,h);else{if(v==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new rt("unacceptable kind of an object to dump "+v)}e.tag!==null&&e.tag!=="?"&&(g=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?g="!"+g:g.slice(0,18)==="tag:yaml.org,2002:"?g="!!"+g.slice(18):g="!<"+g+">",e.dump=g+" "+e.dump)}return!0}function tl(e,r){var i=[],a=[],o,f;for(bo(e,i,a),o=0,f=a.length;o<f;o+=1)r.duplicates.push(i[a[o]]);r.usedDuplicates=new Array(f)}function bo(e,r,i){var a,o,f;if(e!==null&&typeof e=="object")if(o=r.indexOf(e),o!==-1)i.indexOf(o)===-1&&i.push(o);else if(r.push(e),Array.isArray(e))for(o=0,f=e.length;o<f;o+=1)bo(e[o],r,i);else for(a=Object.keys(e),o=0,f=a.length;o<f;o+=1)bo(e[a[o]],r,i)}function Eu(e,r){r=r||{};var i=new Ai(r);i.noRefs||tl(e,i);var a=e;return i.replacer&&(a=i.replacer.call({"":a},"",a)),li(i,0,a,!0,!0)?i.dump+`
81
+ `:""}var Tu=Eu,rl={dump:Tu};function nl(e,r){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+r+" instead, which is now safe by default.")}}var wc=zt,Cc=Cn,ia=Mr,Va=ii,ja=Dr,il=$,al=ta.load,ku=ta.loadAll,ol=rl.dump,aa=rt,oa={binary:ai,float:ni,map:an,null:ft,pairs:It,set:T,timestamp:Jr,bool:we,int:Ft,merge:on,omap:Ge,seq:jn,str:ri},qr=nl("safeLoad","load"),Ni=nl("safeLoadAll","loadAll"),Ri=nl("safeDump","dump"),qo={Type:wc,Schema:Cc,FAILSAFE_SCHEMA:ia,JSON_SCHEMA:Va,CORE_SCHEMA:ja,DEFAULT_SCHEMA:il,load:al,loadAll:ku,dump:ol,YAMLException:aa,types:oa,safeLoad:qr,safeLoadAll:Ni,safeDump:Ri};const Ac=qo,Pu=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:window}(),{FormData:Wa,Blob:xo,File:es}=Pu,ts=e=>":/?#[]@!$&'()*+,;=".indexOf(e)>-1,Oc=e=>/^[a-z0-9\-._~]+$/i.test(e);function Di(e){let{escape:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;return typeof e=="number"&&(e=e.toString()),typeof e!="string"||!e.length||!r?e:i?JSON.parse(e):[...e].map(a=>{if(Oc(a)||ts(a)&&r==="unsafe")return a;const o=new TextEncoder;return Array.from(o.encode(a)).map(d=>`0${d.toString(16).toUpperCase()}`.slice(-2)).map(d=>`%${d}`).join("")}).join("")}function rs(e){const{value:r}=e;return Array.isArray(r)?sl(e):typeof r=="object"?ll(e):Ha(e)}function sl(e){let{key:r,value:i,style:a,explode:o,escape:f}=e;const d=v=>Di(v,{escape:f});if(a==="simple")return i.map(v=>d(v)).join(",");if(a==="label")return`.${i.map(v=>d(v)).join(".")}`;if(a==="matrix")return i.map(v=>d(v)).reduce((v,h)=>!v||o?`${v||""};${r}=${h}`:`${v},${h}`,"");if(a==="form"){const v=o?`&${r}=`:",";return i.map(h=>d(h)).join(v)}if(a==="spaceDelimited"){const v=o?`${r}=`:"";return i.map(h=>d(h)).join(` ${v}`)}if(a==="pipeDelimited"){const v=o?`${r}=`:"";return i.map(h=>d(h)).join(`|${v}`)}}function ll(e){let{key:r,value:i,style:a,explode:o,escape:f}=e;const d=h=>Di(h,{escape:f}),v=Object.keys(i);if(a==="simple")return v.reduce((h,g)=>{const b=d(i[g]),E=o?"=":",";return`${h?`${h},`:""}${g}${E}${b}`},"");if(a==="label")return v.reduce((h,g)=>{const b=d(i[g]),E=o?"=":".";return`${h?`${h}.`:"."}${g}${E}${b}`},"");if(a==="matrix"&&o)return v.reduce((h,g)=>{const b=d(i[g]);return`${h?`${h};`:";"}${g}=${b}`},"");if(a==="matrix")return v.reduce((h,g)=>{const b=d(i[g]);return`${h?`${h},`:`;${r}=`}${g},${b}`},"");if(a==="form")return v.reduce((h,g)=>{const b=d(i[g]);return`${h?`${h}${o?"&":","}`:""}${g}${o?"=":","}${b}`},"")}function Ha(e){let{key:r,value:i,style:a,escape:o}=e;const f=d=>Di(d,{escape:o});if(a==="simple")return f(i);if(a==="label")return`.${f(i)}`;if(a==="matrix")return`;${r}=${f(i)}`;if(a==="form")return f(i);if(a==="deepObject")return f(i,{},!0)}const Fu=(e,r)=>{r.body=e},Ua={serializeRes:fl,mergeInQueryOrForm:Bi};async function Ec(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof e=="object"&&(r=e,e=r.url),r.headers=r.headers||{},Ua.mergeInQueryOrForm(r),r.headers&&Object.keys(r.headers).forEach(o=>{const f=r.headers[o];typeof f=="string"&&(r.headers[o]=f.replace(/\n+/g," "))}),r.requestInterceptor&&(r=await r.requestInterceptor(r)||r);const i=r.headers["content-type"]||r.headers["Content-Type"];/multipart\/form-data/i.test(i)&&r.body instanceof Wa&&(delete r.headers["content-type"],delete r.headers["Content-Type"]);let a;try{a=await(r.userFetch||fetch)(r.url,r),a=await Ua.serializeRes(a,e,r),r.responseInterceptor&&(a=await r.responseInterceptor(a)||a)}catch(o){if(!a)throw o;const f=new Error(a.statusText||`response status is ${a.status}`);throw f.status=a.status,f.statusCode=a.status,f.responseError=o,f}if(!a.ok){const o=new Error(a.statusText||`response status is ${a.status}`);throw o.status=a.status,o.statusCode=a.status,o.response=a,o}return a}const Tc=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return/(json|xml|yaml|text)\b/.test(e)};function kc(e,r){return r&&(r.indexOf("application/json")===0||r.indexOf("+json")>0)?JSON.parse(e):Ac.load(e)}function fl(e,r){let{loadSpec:i=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a={ok:e.ok,url:e.url||r,status:e.status,statusText:e.statusText,headers:_a(e.headers)},o=a.headers["content-type"],f=i||Tc(o);return(f?e.text:e.blob||e.buffer).call(e).then(v=>{if(a.text=v,a.data=v,f)try{const h=kc(v,o);a.body=h,a.obj=h}catch(h){a.parseError=h}return a})}function cl(e){return e.includes(", ")?e.split(", "):e}function _a(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return typeof e.entries!="function"?{}:Array.from(e.entries()).reduce((r,i)=>{let[a,o]=i;return r[a]=cl(o),r},{})}function sa(e,r){return!r&&typeof navigator<"u"&&(r=navigator),r&&r.product==="ReactNative"?!!(e&&typeof e=="object"&&typeof e.uri=="string"):typeof es<"u"&&e instanceof es||typeof xo<"u"&&e instanceof xo||ArrayBuffer.isView(e)?!0:e!==null&&typeof e=="object"&&typeof e.pipe=="function"}function Iu(e,r){return Array.isArray(e)&&e.some(i=>sa(i,r))}const ns={form:",",spaceDelimited:"%20",pipeDelimited:"|"},Lu={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function za(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{collectionFormat:a,allowEmptyValue:o,serializationOption:f,encoding:d}=r,v=typeof r=="object"&&!Array.isArray(r)?r.value:r,h=i?b=>b.toString():b=>encodeURIComponent(b),g=h(e);if(typeof v>"u"&&o)return[[g,""]];if(sa(v)||Iu(v))return[[g,v]];if(f)return dl(e,v,i,f);if(d){if([typeof d.style,typeof d.explode,typeof d.allowReserved].some(b=>b!=="undefined")){const{style:b,explode:E,allowReserved:V}=d;return dl(e,v,i,{style:b,explode:E,allowReserved:V})}if(d.contentType){if(d.contentType==="application/json"){const b=typeof v=="string"?v:JSON.stringify(v);return[[g,h(b)]]}return[[g,h(v.toString())]]}return typeof v!="object"?[[g,h(v)]]:Array.isArray(v)&&v.every(b=>typeof b!="object")?[[g,v.map(h).join(",")]]:[[g,h(JSON.stringify(v))]]}return typeof v!="object"?[[g,h(v)]]:Array.isArray(v)?a==="multi"?[[g,v.map(h)]]:[[g,v.map(h).join(Lu[a||"csv"])]]:[[g,""]]}function dl(e,r,i,a){const o=a.style||"form",f=typeof a.explode>"u"?o==="form":a.explode,d=i?!1:a&&a.allowReserved?"unsafe":"reserved",v=g=>Di(g,{escape:d}),h=i?g=>g:g=>Di(g,{escape:d});return typeof r!="object"?[[h(e),v(r)]]:Array.isArray(r)?f?[[h(e),r.map(v)]]:[[h(e),r.map(v).join(ns[o])]]:o==="deepObject"?Object.keys(r).map(g=>[h(`${e}[${g}]`),v(r[g])]):f?Object.keys(r).map(g=>[h(g),v(r[g])]):[[h(e),Object.keys(r).map(g=>[`${h(g)},${v(r[g])}`]).join(",")]]}function la(e){return Object.entries(e).reduce((r,i)=>{let[a,o]=i;for(const[f,d]of za(a,o,!0))if(Array.isArray(d))for(const v of d)if(ArrayBuffer.isView(v)){const h=new xo([v]);r.append(f,h)}else r.append(f,v);else if(ArrayBuffer.isView(d)){const v=new xo([d]);r.append(f,v)}else r.append(f,d);return r},new Wa)}function Ga(e){const r=Object.keys(e).reduce((i,a)=>{for(const[o,f]of za(a,e[a]))i[o]=f;return i},{});return ie().stringify(r,{encode:!1,indices:!1})||""}function Bi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{url:r="",query:i,form:a}=e,o=function(){for(var f=arguments.length,d=new Array(f),v=0;v<f;v++)d[v]=arguments[v];const h=d.filter(g=>g).join("&");return h?`?${h}`:""};if(a){const f=Object.keys(a).some(v=>{const{value:h}=a[v];return sa(h)||Iu(h)}),d=e.headers["content-type"]||e.headers["Content-Type"];if(f||/multipart\/form-data/i.test(d)){const v=la(e.form);Fu(v,e)}else e.body=Ga(a);delete e.form}if(i){const[f,d]=r.split("?");let v="";if(d){const g=ie().parse(d);Object.keys(i).forEach(E=>delete g[E]),v=ie().stringify(g,{encode:!0})}const h=o(v,Ga(i));e.url=f+h,delete e.query}return e}function is(e,r,i){return i=i||(a=>a),r=r||(a=>a),a=>(typeof a=="string"&&(a={url:a}),Ua.mergeInQueryOrForm(a),a=r(a),i(e(a)))}function $a(e,r){function i(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack;for(var a=arguments.length,o=new Array(a),f=0;f<a;f++)o[f]=arguments[f];[this.message]=o,r&&r.apply(this,o)}return i.prototype=new Error,i.prototype.name=e,i.prototype.constructor=i,i}const Mu={body:Nu,header:Pc,query:fa,path:ua,formData:Ru};function Nu(e){let{req:r,value:i}=e;r.body=i}function Ru(e){let{req:r,value:i,parameter:a}=e;(i||a.allowEmptyValue)&&(r.form=r.form||{},r.form[a.name]={value:i,allowEmptyValue:a.allowEmptyValue,collectionFormat:a.collectionFormat})}function Pc(e){let{req:r,parameter:i,value:a}=e;r.headers=r.headers||{},typeof a<"u"&&(r.headers[i.name]=a)}function ua(e){let{req:r,value:i,parameter:a}=e;r.url=r.url.split(`{${a.name}}`).join(encodeURIComponent(i))}function fa(e){let{req:r,value:i,parameter:a}=e;if(r.query=r.query||{},i===!1&&a.type==="boolean"&&(i="false"),i===0&&["number","integer"].indexOf(a.type)>-1&&(i="0"),i)r.query[a.name]={collectionFormat:a.collectionFormat,value:i};else if(a.allowEmptyValue&&i!==void 0){const o=a.name;r.query[o]=r.query[o]||{},r.query[o].allowEmptyValue=!0}}function as(e,r){return r.includes("application/json")?typeof e=="string"?e:JSON.stringify(e):e.toString()}function Fc(e){let{req:r,value:i,parameter:a}=e;const{name:o,style:f,explode:d,content:v}=a;if(v){const g=Object.keys(v)[0];r.url=r.url.split(`{${o}}`).join(Di(as(i,g),{escape:!0}));return}const h=rs({key:a.name,value:i,style:f||"simple",explode:d||!1,escape:!0});r.url=r.url.split(`{${o}}`).join(h)}function Ic(e){let{req:r,value:i,parameter:a}=e;if(r.query=r.query||{},a.content){const o=Object.keys(a.content)[0],f=as(i,o);if(f)r.query[a.name]=f;else if(a.allowEmptyValue&&i!==void 0){const d=a.name;r.query[d]=r.query[d]||{},r.query[d].allowEmptyValue=!0}return}if(i===!1&&(i="false"),i===0&&(i="0"),i){const{style:o,explode:f,allowReserved:d}=a;r.query[a.name]={value:i,serializationOption:{style:o,explode:f,allowReserved:d}}}else if(a.allowEmptyValue&&i!==void 0){const o=a.name;r.query[o]=r.query[o]||{},r.query[o].allowEmptyValue=!0}}const Lc=["accept","authorization","content-type"];function Mc(e){let{req:r,parameter:i,value:a}=e;if(r.headers=r.headers||{},!(Lc.indexOf(i.name.toLowerCase())>-1)){if(i.content){const o=Object.keys(i.content)[0];r.headers[i.name]=as(a,o);return}typeof a<"u"&&(r.headers[i.name]=rs({key:i.name,value:a,style:i.style||"simple",explode:typeof i.explode>"u"?!1:i.explode,escape:!1}))}}function Nc(e){let{req:r,parameter:i,value:a}=e;r.headers=r.headers||{};const o=typeof a;if(i.content){const f=Object.keys(i.content)[0];r.headers.Cookie=`${i.name}=${as(a,f)}`;return}if(o!=="undefined"){const f=o==="object"&&!Array.isArray(a)&&i.explode?"":`${i.name}=`;r.headers.Cookie=f+rs({key:i.name,value:a,escape:!1,style:i.style||"form",explode:typeof i.explode>"u"?!1:i.explode})}}const ln=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:window)(),{btoa:br}=ln,Vr=br;function xr(e,r){const{operation:i,requestBody:a,securities:o,spec:f,attachContentTypeForEmptyPayload:d}=e;let{requestContentType:v}=e;r=So({request:r,securities:o,operation:i,spec:f});const h=i.requestBody||{},g=Object.keys(h.content||{}),b=v&&g.indexOf(v)>-1;if(a||d){if(v&&b)r.headers["Content-Type"]=v;else if(!v){const E=g[0];E&&(r.headers["Content-Type"]=E,v=E)}}else v&&b&&(r.headers["Content-Type"]=v);if(!e.responseContentType&&i.responses){const E=Object.entries(i.responses).filter(V=>{let[I,W]=V;const Y=parseInt(I,10);return Y>=200&&Y<300&&xe(W.content)}).reduce((V,I)=>{let[,W]=I;return V.concat(Object.keys(W.content))},[]);E.length>0&&(r.headers.accept=E.join(", "))}if(a)if(v){if(g.indexOf(v)>-1)if(v==="application/x-www-form-urlencoded"||v==="multipart/form-data")if(typeof a=="object"){const E=(h.content[v]||{}).encoding||{};r.form={},Object.keys(a).forEach(V=>{r.form[V]={value:a[V],encoding:E[V]||{}}})}else r.form=a;else r.body=a}else r.body=a;return r}function So(e){let{request:r,securities:i={},operation:a={},spec:o}=e;const f=M({},r),{authorized:d={}}=i,v=a.security||o.security||[],h=d&&!!Object.keys(d).length,g=le()(o,["components","securitySchemes"])||{};return f.headers=f.headers||{},f.query=f.query||{},!Object.keys(i).length||!h||!v||Array.isArray(a.security)&&!a.security.length?r:(v.forEach(b=>{Object.keys(b).forEach(E=>{const V=d[E],I=g[E];if(!V)return;const W=V.value||V,{type:Y}=I;if(V){if(Y==="apiKey")I.in==="query"&&(f.query[I.name]=W),I.in==="header"&&(f.headers[I.name]=W),I.in==="cookie"&&(f.cookies[I.name]=W);else if(Y==="http"){if(/^basic$/i.test(I.scheme)){const _=W.username||"",U=W.password||"",G=Vr(`${_}:${U}`);f.headers.Authorization=`Basic ${G}`}/^bearer$/i.test(I.scheme)&&(f.headers.Authorization=`Bearer ${W}`)}else if(Y==="oauth2"||Y==="openIdConnect"){const _=V.token||{},U=I["x-tokenName"]||"access_token",G=_[U];let ce=_.token_type;(!ce||ce.toLowerCase()==="bearer")&&(ce="Bearer"),f.headers.Authorization=`${ce} ${G}`}}})}),f)}function Rc(e,r){const{spec:i,operation:a,securities:o,requestContentType:f,responseContentType:d,attachContentTypeForEmptyPayload:v}=e;if(r=os({request:r,securities:o,operation:a,spec:i}),r.body||r.form||v)f?r.headers["Content-Type"]=f:Array.isArray(a.consumes)?[r.headers["Content-Type"]]=a.consumes:Array.isArray(i.consumes)?[r.headers["Content-Type"]]=i.consumes:a.parameters&&a.parameters.filter(h=>h.type==="file").length?r.headers["Content-Type"]="multipart/form-data":a.parameters&&a.parameters.filter(h=>h.in==="formData").length&&(r.headers["Content-Type"]="application/x-www-form-urlencoded");else if(f){const h=a.parameters&&a.parameters.filter(b=>b.in==="body").length>0,g=a.parameters&&a.parameters.filter(b=>b.in==="formData").length>0;(h||g)&&(r.headers["Content-Type"]=f)}return!d&&Array.isArray(a.produces)&&a.produces.length>0&&(r.headers.accept=a.produces.join(", ")),r}function os(e){let{request:r,securities:i={},operation:a={},spec:o}=e;const f=M({},r),{authorized:d={},specSecurity:v=[]}=i,h=a.security||v,g=d&&!!Object.keys(d).length,b=o.securityDefinitions;return f.headers=f.headers||{},f.query=f.query||{},!Object.keys(i).length||!g||!h||Array.isArray(a.security)&&!a.security.length?r:(h.forEach(E=>{Object.keys(E).forEach(V=>{const I=d[V];if(!I)return;const{token:W}=I,Y=I.value||I,_=b[V],{type:U}=_,G=_["x-tokenName"]||"access_token",ce=W&&W[G];let Ce=W&&W.token_type;if(I)if(U==="apiKey"){const ge=_.in==="query"?"query":"headers";f[ge]=f[ge]||{},f[ge][_.name]=Y}else if(U==="basic")if(Y.header)f.headers.authorization=Y.header;else{const ge=Y.username||"",ke=Y.password||"";Y.base64=Vr(`${ge}:${ke}`),f.headers.authorization=`Basic ${Y.base64}`}else U==="oauth2"&&ce&&(Ce=!Ce||Ce.toLowerCase()==="bearer"?"Bearer":Ce,f.headers.authorization=`${Ce} ${ce}`)})}),f)}function Du(e,r){return`${r.toLowerCase()}-${e}`}function Dc(e,r,i){if(!e||typeof e!="object"||!e.paths||typeof e.paths!="object")return null;const{paths:a}=e;for(const o in a)for(const f in a[o]){if(f.toUpperCase()==="PARAMETERS")continue;const d=a[o][f];if(!d||typeof d!="object")continue;const v={spec:e,pathName:o,method:f.toUpperCase(),operation:d},h=r(v);if(i&&h)return v}}function Bc(e,r){return Dc(e,r,!0)||null}const pl=e=>e.replace(/\W/gi,"_");function hl(e,r){let{v2OperationIdCompatibilityMode:i}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(i){let a=`${r.toLowerCase()}_${e}`.replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return a=a||`${e.substring(1)}_${r}`,a.replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return`${r.toLowerCase()}${pl(e)}`}function Vc(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",{v2OperationIdCompatibilityMode:a}=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return!e||typeof e!="object"?null:(e.operationId||"").replace(/\s/g,"").length?pl(e.operationId):hl(r,i,{v2OperationIdCompatibilityMode:a})}function vl(e,r){return!e||!e.paths?null:Bc(e,i=>{let{pathName:a,method:o,operation:f}=i;if(!f||typeof f!="object")return!1;const d=f.operationId,v=Vc(f,a,o),h=Du(a,o);return[v,h,d].some(g=>g&&g===r)})}const Vu=e=>{try{const{swagger:r}=e;return r==="2.0"}catch{return!1}},ju=e=>{try{const{openapi:r}=e;return typeof r=="string"&&/^3\.0\.([0123])(?:-rc[012])?$/.test(r)}catch{return!1}},Wu=e=>{try{const{openapi:r}=e;return typeof r=="string"&&/^3\.1\.(?:[1-9]\d*|0)$/.test(r)}catch{return!1}},ss=e=>ju(e)||Wu(e),Hu=["http","fetch","spec","operationId","pathName","method","parameters","securities"],Ka=e=>Array.isArray(e)?e:[],jc=$a("OperationNotFoundError",function(r,i,a){this.originalError=a,Object.assign(this,i||{})}),ls=(e,r)=>r.filter(i=>i.name===e),Oi=e=>{const r={};e.forEach(a=>{r[a.in]||(r[a.in]={}),r[a.in][a.name]=a});const i=[];return Object.keys(r).forEach(a=>{Object.keys(r[a]).forEach(o=>{i.push(r[a][o])})}),i},Uu={buildRequest:_u};function Wc(e){let{http:r,fetch:i,spec:a,operationId:o,pathName:f,method:d,parameters:v,securities:h}=e,g=ae(e,Hu);const b=r||i||Ec;f&&d&&!o&&(o=Du(f,d));const E=Uu.buildRequest(M({spec:a,operationId:o,parameters:v,securities:h,http:b},g));return E.body&&(xe(E.body)||Array.isArray(E.body))&&(E.body=JSON.stringify(E.body)),b(E)}function _u(e){const{spec:r,operationId:i,responseContentType:a,scheme:o,requestInterceptor:f,responseInterceptor:d,contextUrl:v,userFetch:h,server:g,serverVariables:b,http:E,signal:V}=e;let{parameters:I,parameterBuilders:W}=e;const Y=ss(r);W||(Y?W=m:W=Mu);let U={url:"",credentials:E&&E.withCredentials?"include":"same-origin",headers:{},cookies:{}};V&&(U.signal=V),f&&(U.requestInterceptor=f),d&&(U.responseInterceptor=d),h&&(U.userFetch=h);const G=vl(r,i);if(!G)throw new jc(`Operation ${i} not found`);const{operation:ce={},method:Ce,pathName:ge}=G;if(U.url+=Dt({spec:r,scheme:o,contextUrl:v,server:g,serverVariables:b,pathName:ge,method:Ce}),!i)return delete U.cookies,U;U.url+=ge,U.method=`${Ce}`.toUpperCase(),I=I||{};const ke=r.paths[ge]||{};a&&(U.headers.accept=a);const be=Oi([].concat(Ka(ce.parameters)).concat(Ka(ke.parameters)));be.forEach(ue=>{const Oe=W[ue.in];let Te;if(ue.in==="body"&&ue.schema&&ue.schema.properties&&(Te=I),Te=ue&&ue.name&&I[ue.name],typeof Te>"u"?Te=ue&&ue.name&&I[`${ue.in}.${ue.name}`]:ls(ue.name,be).length>1&&console.warn(`Parameter '${ue.name}' is ambiguous because the defined spec has more than one parameter with the name: '${ue.name}' and the passed-in parameter values did not define an 'in' value.`),Te!==null){if(typeof ue.default<"u"&&typeof Te>"u"&&(Te=ue.default),typeof Te>"u"&&ue.required&&!ue.allowEmptyValue)throw new Error(`Required parameter ${ue.name} is not provided`);if(Y&&ue.schema&&ue.schema.type==="object"&&typeof Te=="string")try{Te=JSON.parse(Te)}catch{throw new Error("Could not parse object parameter value string as JSON")}Oe&&Oe({req:U,parameter:ue,value:Te,operation:ce,spec:r})}});const me=M(M({},e),{},{operation:ce});if(Y?U=xr(me,U):U=Rc(me,U),U.cookies&&Object.keys(U.cookies).length){const ue=Object.keys(U.cookies).reduce((Oe,Te)=>{const Me=U.cookies[Te],Xe=Oe?"&":"",yt=q.serialize(Te,Me);return Oe+Xe+yt},"");U.headers.Cookie=ue}return U.cookies&&delete U.cookies,Bi(U),U}const en=e=>e?e.replace(/\W/g,""):null;function Dt(e){return ss(e.spec)?Gn(e):zu(e)}function Gn(e){let{spec:r,pathName:i,method:a,server:o,contextUrl:f,serverVariables:d={}}=e;const v=le()(r,["paths",i,(a||"").toLowerCase(),"servers"])||le()(r,["paths",i,"servers"])||le()(r,["servers"]);let h="",g=null;if(o&&v&&v.length){const b=v.map(E=>E.url);b.indexOf(o)>-1&&(h=o,g=v[b.indexOf(o)])}return!h&&v&&v.length&&(h=v[0].url,[g]=v),h.indexOf("{")>-1&&ji(h).forEach(E=>{if(g.variables&&g.variables[E]){const V=g.variables[E],I=d[E]||V.default,W=new RegExp(`{${E}}`,"g");h=h.replace(W,I)}}),Vi(h,f)}function Vi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e&&r?z.parse(z.resolve(r,e)):z.parse(e),a=z.parse(r),o=en(i.protocol)||en(a.protocol)||"",f=i.host||a.host,d=i.pathname||"";let v;return o&&f?v=`${o}://${f+d}`:v=d,v[v.length-1]==="/"?v.slice(0,-1):v}function ji(e){const r=[],i=/{([^}]+)}/g;let a;for(;a=i.exec(e);)r.push(a[1]);return r}function zu(e){let{spec:r,scheme:i,contextUrl:a=""}=e;const o=z.parse(a),f=Array.isArray(r.schemes)?r.schemes[0]:null,d=i||f||en(o.protocol)||"http",v=r.host||o.host||"",h=r.basePath||"";let g;return d&&v?g=`${d}://${v+h}`:g=h,g[g.length-1]==="/"?g.slice(0,-1):g}var A=c(29901),Jt=c(20202),ui=c(21999),gl=c(37837),wo=c(96244),Gu=c(2526),ml=Object.defineProperty,Wi=Object.defineProperties,$u=Object.getOwnPropertyDescriptors,yl=Object.getOwnPropertySymbols,Hc=Object.prototype.hasOwnProperty,us=Object.prototype.propertyIsEnumerable,fs=(e,r,i)=>r in e?ml(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Ku=(e,r)=>{for(var i in r||(r={}))Hc.call(r,i)&&fs(e,i,r[i]);if(yl)for(var i of yl(r))us.call(r,i)&&fs(e,i,r[i]);return e},Uc=(e,r)=>Wi(e,$u(r)),Yu=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});function _c(e,r){return Yu(this,null,function*(){var i,a,o,f;const d=JSON.parse(JSON.stringify(r)),v=d.openapi?{openapi:d.openapi}:d.swagger?{swagger:d.swagger}:{},h=Uc(Ku({},v),{components:d.components,paths:{[e.path]:{[e.httpVerb]:(a=(i=d.paths)==null?void 0:i[e.path])==null?void 0:a[e.httpVerb],parameters:(f=(o=d.paths)==null?void 0:o[e.path])==null?void 0:f.parameters}}}),g=new wo.Config({}),b=(0,Gu.I)(h),E={config:g,doc:b,dereference:!0};return yield(0,gl.bundle)(E),d})}var zc=c(98910),ca=c(84862),$n=c(53134),Xu=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});const Ju=Object.values($n.FileUploadFormats),Qu=["application/octet-stream","application/pdf","application/gzip","application/zip"],da=["image/","audio/","video/"];function cs(e){if(da.some(r=>e.startsWith(r)))return e}function pa(e){return Qu.includes(e)?!0:da.some(r=>e.startsWith(r))}function Zu(e){const r=e.type==="array"?e.items:e;if(!r||!r.type||r?.type==="any")return!0;const i=r.contentMediaType||"",a=r.format||r.contentEncoding||(pa(i)?"binary":"");return r.type===$n.DefinitionTypes.STRING&&Ju.includes(a)}function ds(e,r){if(!e||!e.type||e.type==="any")return pa(r);const i=e.format||e.contentEncoding||"";return e.type===$n.DefinitionTypes.STRING&&Ju.includes(i)}function bl(e){return new Promise((r,i)=>{const a=new FileReader;a.onload=()=>{const f=a.result.replace(/data:.*\/.*;base64,/g,"");r(f)},a.onerror=()=>i(a.error),a.readAsDataURL(e)})}function qu({format:e,contentEncoding:r,contentMediaType:i}){return[e,r,i].includes($n.FileUploadFormats.BASE64)}function ef(e,r){return Xu(this,null,function*(){const i=Object.values(e);let a=i.length===1?i[0]:i;return r.type===$n.DefinitionTypes.STRING&&qu(r)?a=yield bl(i[0]):r.type===$n.DefinitionTypes.ARRAY&&r.items&&(qu(r.items)?a=yield Promise.all(i.map(f=>Xu(this,null,function*(){return yield bl(f)}))):a=i),a})}var Sr=c(84622),xt=c(38612),At=c(38779),dt=c(68176),mn=c(71608),Ya=c(64393);function ps({response:e}){return A.createElement(A.Fragment,null,A.createElement(mn.EE,null," Body: "),tf(e))}function tf(e){return e.body?A.createElement(Jt.JsonViewer,{data:e.body,jsonSampleExpandLevel:1}):e.fileInfo?A.createElement(Ya.s,{fileInfo:e.fileInfo}):e.data!==null?e.data?A.createElement(Jt.CodeBlock,{lang:(0,dt.M)(e.headers["Content-Type"]||"text/plain"),source:e.data,header:{controls:{copy:{}}}}):A.createElement(Jt.CodeBlockContainer,{withControls:!0},A.createElement("i",null,"(no content)")):null}var Hi=c(79216);function rf({headers:e}){const r=(0,ui.useRecoilValue)(Hi.lk),[i,a]=(0,A.useState)(!0),{maxResponseHeadersToShowInTryIt:o}=r,f=Object.keys(e),d=!!o&&f.length>o,v=d&&i?[...f].splice(0,o):[...f],h=()=>{a(!i)};return A.createElement(A.Fragment,null,A.createElement(mn.EE,null," Headers: "),A.createElement(Jt.CodeBlockContainer,{withControls:!0},v.map(g=>A.createElement("div",{key:g},A.createElement(ha,null,g,":"),A.createElement("code",null,e[g]))),d&&A.createElement(xl,{onClick:h},i?"Show more...":"Hide headers")))}const ha=At.ZP.strong`
82
82
  text-transform: capitalize;
83
83
  display: inline-block;
84
84
  padding-right: 5px;
@@ -150,12 +150,12 @@ b`.split(/\n/).length!=3?function(t){for(var n=0,l=[],s=t.length;n<=s;){var u=t.
150
150
  `||""}
151
151
  `;function Ao({onChange:e,active:r,hasResponse:i}){return A.createElement(of,null,A.createElement(Sl,{onClick:()=>e(0),active:r===0},i?"Edit Request":"Request"),A.createElement(Sl,{onClick:()=>i&&e(1),active:r===1,disabled:!i}," ","Response"," "))}var va=c(82155),Ja=c(79198);function Oo(e,r,i){const a=r.path||{},o=r.query||{},f=Object.keys(o);let d=(0,xt.v5)(e,a);const v=h=>i.find(g=>g.name===h&&g.in==="query");return f.length&&(d+="?"+f.map(h=>{if(!o[h])return"";const g=v(h);return g?(0,dt.d$)(g,o[h]):`${h}=${encodeURIComponent(o[h])}`}).filter(Boolean).join("&")),d}const sf=({loading:e,operation:r,hasResponse:i,execute:a,params:o={}})=>A.createElement(ca.k1,null,A.createElement(va.__,null,A.createElement(Ja.FH,{type:r.httpVerb},r.httpVerb),A.createElement(va.y$,{wrap:"true"},Oo(r.path,o,r.parameters))),A.createElement(Gc,{"data-cy":"send-button",color:"primary",blinking:e,onClick:()=>!e&&a()},e?"Sending...":i?"Resend":"Send")),Gc=(0,At.ZP)(va.ev)`
152
152
  width: var(--panel-try-it-action-button-width);
153
- `,lf=(0,A.memo)(sf);function fi(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function ga(e,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function ma(e,r,i){return r&&ga(e.prototype,r),i&&ga(e,i),e}function $c(e,r,i){return r in e?Object.defineProperty(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i,e}function ir(){return ir=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},ir.apply(this,arguments)}function uf(e,r){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),i.push.apply(i,a)}return i}function ot(e){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?uf(Object(i),!0).forEach(function(a){$c(e,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):uf(Object(i)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(i,a))})}return e}function Kc(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&gs(e,r)}function Pr(e){return Pr=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},Pr(e)}function gs(e,r){return gs=Object.setPrototypeOf||function(a,o){return a.__proto__=o,a},gs(e,r)}function Yc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function Xc(e,r){if(e==null)return{};var i={},a=Object.keys(e),o,f;for(f=0;f<a.length;f++)o=a[f],!(r.indexOf(o)>=0)&&(i[o]=e[o]);return i}function sr(e,r){if(e==null)return{};var i=Xc(e,r),a,o;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(o=0;o<f.length;o++)a=f[o],!(r.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}function ff(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cf(e,r){return r&&(typeof r=="object"||typeof r=="function")?r:ff(e)}function df(e){var r=Yc();return function(){var a=Pr(e),o;if(r){var f=Pr(this).constructor;o=Reflect.construct(a,arguments,f)}else o=a.apply(this,arguments);return cf(this,o)}}function ar(e,r){return Ui(e)||ms(e,r)||ya(e,r)||Zc()}function Fr(e){return Jc(e)||Eo(e)||ya(e)||Qc()}function Jc(e){if(Array.isArray(e))return Kn(e)}function Ui(e){if(Array.isArray(e))return e}function Eo(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function ms(e,r){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(e)))){var i=[],a=!0,o=!1,f=void 0;try{for(var d=e[Symbol.iterator](),v;!(a=(v=d.next()).done)&&(i.push(v.value),!(r&&i.length===r));a=!0);}catch(h){o=!0,f=h}finally{try{!a&&d.return!=null&&d.return()}finally{if(o)throw f}}return i}}function ya(e,r){if(e){if(typeof e=="string")return Kn(e,r);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Kn(e,r)}}function Kn(e,r){(r==null||r>e.length)&&(r=e.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=e[i];return a}function Qc(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
153
+ `,lf=(0,A.memo)(sf);function fi(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function ga(e,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function ma(e,r,i){return r&&ga(e.prototype,r),i&&ga(e,i),e}function $c(e,r,i){return r in e?Object.defineProperty(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i,e}function ir(){return ir=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},ir.apply(this,arguments)}function uf(e,r){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),i.push.apply(i,a)}return i}function ot(e){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?uf(Object(i),!0).forEach(function(a){$c(e,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):uf(Object(i)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(i,a))})}return e}function Kc(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&gs(e,r)}function Pr(e){return Pr=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},Pr(e)}function gs(e,r){return gs=Object.setPrototypeOf||function(a,o){return a.__proto__=o,a},gs(e,r)}function Yc(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Xc(e,r){if(e==null)return{};var i={},a=Object.keys(e),o,f;for(f=0;f<a.length;f++)o=a[f],!(r.indexOf(o)>=0)&&(i[o]=e[o]);return i}function sr(e,r){if(e==null)return{};var i=Xc(e,r),a,o;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(o=0;o<f.length;o++)a=f[o],!(r.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}function ff(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cf(e,r){return r&&(typeof r=="object"||typeof r=="function")?r:ff(e)}function df(e){var r=Yc();return function(){var a=Pr(e),o;if(r){var f=Pr(this).constructor;o=Reflect.construct(a,arguments,f)}else o=a.apply(this,arguments);return cf(this,o)}}function ar(e,r){return Ui(e)||ms(e,r)||ya(e,r)||Zc()}function Fr(e){return Jc(e)||Eo(e)||ya(e)||Qc()}function Jc(e){if(Array.isArray(e))return Kn(e)}function Ui(e){if(Array.isArray(e))return e}function Eo(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function ms(e,r){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var i=[],a=!0,o=!1,f=void 0;try{for(var d=e[Symbol.iterator](),v;!(a=(v=d.next()).done)&&(i.push(v.value),!(r&&i.length===r));a=!0);}catch(h){o=!0,f=h}finally{try{!a&&d.return!=null&&d.return()}finally{if(o)throw f}}return i}}function ya(e,r){if(e){if(typeof e=="string")return Kn(e,r);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Kn(e,r)}}function Kn(e,r){(r==null||r>e.length)&&(r=e.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=e[i];return a}function Qc(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
154
154
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
155
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qa(e,r){var i;if(typeof Symbol=="undefined"||e[Symbol.iterator]==null){if(Array.isArray(e)||(i=ya(e))||r&&e&&typeof e.length=="number"){i&&(e=i);var a=0,o=function(){};return{s:o,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(h){throw h},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
156
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var f=!0,d=!1,v;return{s:function(){i=e[Symbol.iterator]()},n:function(){var h=i.next();return f=h.done,h},e:function(h){d=!0,v=h},f:function(){try{!f&&i.return!=null&&i.return()}finally{if(d)throw v}}}}function pf(e,r){return r={exports:{}},e(r,r.exports),r.exports}var Yn=pf(function(e){function r(b,E){for(var j=0,I=0;I<b.length;I++)j=(j<<5)-j+b.charCodeAt(I),j|=0;return E[Math.abs(j)%E.length]}function i(b,E){var j=E.namespace;if(E.useColors){var I=E.color,W="\x1B[3"+(I<8?I:"8;5;"+I),Y=" ".concat(W,";1m").concat(j," \x1B[0m");b[0]=Y+b[0].split(`
155
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qa(e,r){var i;if(typeof Symbol>"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(i=ya(e))||r&&e&&typeof e.length=="number"){i&&(e=i);var a=0,o=function(){};return{s:o,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(h){throw h},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
156
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var f=!0,d=!1,v;return{s:function(){i=e[Symbol.iterator]()},n:function(){var h=i.next();return f=h.done,h},e:function(h){d=!0,v=h},f:function(){try{!f&&i.return!=null&&i.return()}finally{if(d)throw v}}}}function pf(e,r){return r={exports:{}},e(r,r.exports),r.exports}var Yn=pf(function(e){function r(b,E){for(var V=0,I=0;I<b.length;I++)V=(V<<5)-V+b.charCodeAt(I),V|=0;return E[Math.abs(V)%E.length]}function i(b,E){var V=E.namespace;if(E.useColors){var I=E.color,W="\x1B[3"+(I<8?I:"8;5;"+I),Y=" ".concat(W,";1m").concat(V," \x1B[0m");b[0]=Y+b[0].split(`
157
157
  `).join(`
158
- `+Y)}else b[0]=j+" "+b[0]}function a(b,E){if(b[0]=(E.useColors?"%c":"")+E.namespace,!!E.useColors){var j="color: "+E.color,I=0,W=0;b[0].replace(/%[a-zA-Z%]/g,function(Y){Y!=="%%"&&(I++,Y==="%c"&&(W=I))}),b.splice(W,0,j)}}var o=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function f(){var b;try{b=localStorage.getItem("debug")}catch(E){}return!b&&typeof process!="undefined"&&"env"in process&&(b={}.DEBUG),{namespaces:b||"",colors:o,useColors:!0,formatArgs:a}}function d(){return{namespaces:{}.DEBUG||"",colors:[6,2,3,4,5,1],useColors:!0,formatArgs:i}}function v(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,E=arguments.length>1?arguments[1]:void 0;return function(){for(var j=arguments.length,I=new Array(j),W=0;W<j;W++)I[W]=arguments[W];b&&I.unshift(b);var Y=E.namespaces.split(",").map(function(ce){return ce[ce.length-1]==="*"?new RegExp("^"+ce.slice(0,ce.length-1)+".*$"):new RegExp("^"+ce+"$")}),_=Y.some(function(ce){return ce.test(b)}),U={color:r(b,E.colors),namespace:b,useColors:E.useColors};if(!1)var G}}function h(b){return v(b,d())}function g(b){return v(b,f())}typeof process=="undefined"||process.type==="renderer"||process.browser===!0||process.__nwjs?e.exports=g:e.exports=h}),_i=Yn("informed:ObjMap "),ba=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return String.prototype.replace.call(r,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean)},Ei=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=arguments.length>2?arguments[2]:void 0,o=String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(f,d){return f!=null?f[d]:f},r);return o===void 0||o===r?a:o},ys=function(r){return".".concat(r).replace(/(.*)[.[].*/,"$1").replace(/\./,"")},wl=function(r){return r.replace(ys(r),"").replace(/\./,"")},Cl=function(r,i){var a=ys(i),o=wl(i),f=a?Ei(r,a):r;return!!(f&&Object.hasOwnProperty.call(f,o.replace(/\[(.*)\]/,"$1")))},hf=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=arguments.length>2?arguments[2]:void 0;String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(o,f,d,v){return d===v.length-1?(o[f]=a,o[f]):o[f]===void 0?(Number.isInteger(+v[d+1])?o[f]=[]:o[f]={},o[f]):(Number.isInteger(+v[d+1])&&!Array.isArray(o[f])&&(o[f]=[]),o[f])},r)},Za=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=!1;return String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(o,f,d,v){return o===void 0?o:(d===v.length-1&&(delete o[f],a=!0),o[f])},r),a},vf=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a;return String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(o,f,d,v){return o===void 0?o:(d===v.length-1&&Array.isArray(o)&&(a=o.splice(f,1)),o[f])},r),a},qc=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=Object.keys(r);return i.map(function(a){return r[a]})},bs=function(r){var i=ba(r);return Number.isInteger(+i[i.length-1])},Je=function(){function e(){fi(this,e)}return ma(e,null,[{key:"empty",value:function(i){return qc(i).length===0}},{key:"get",value:function(i,a){var o=Ei(i,a);return o}},{key:"has",value:function(i,a){return Cl(i,a)}},{key:"set",value:function(i,a,o){if(o!==void 0)_i("SETTING",a,o),hf(i,a,o);else if(bs(a)&&e.get(i,a)!==void 0){_i("Special case SETTING",a,"to undefined"),hf(i,a,void 0);var f=ba(a);f=f.slice(0,f.length-1),xs(i,f)}else!bs(a)&&e.get(i,a)!==void 0&&(_i("Special case REMOVING",a,"from object completley"),e.delete(i,a))}},{key:"delete",value:function(i,a){_i("DELETE",a),bs(a)?(_i("ARRAY",a),this.pullOut(i,a)):Za(i,a);var o=ba(a);o=o.slice(0,o.length-1),xs(i,o)}},{key:"pullOut",value:function(i,a){var o=ba(a),f=o[o.length-1];o=o.slice(0,o.length-1),_i("Pulling out:",o,"index",f);var d=Ei(i,o);_i("Array",d),Array.isArray(d)&&vf(d,f),xs(i,o)}}]),e}();function xs(e,r){if(r.length!==0){var i=Ei(e,r);(Array.isArray(i)?i.every(function(a){return a==null}):JSON.stringify(i)==="{}")&&Za(e,r),xs(e,r.slice(0,r.length-1))}}var yn=A.createContext({register:function(){},deregister:function(){},setValue:function(){},setTouched:function(){},setError:function(){},update:function(){},getField:function(){},expectRemoval:function(){},getInitialValue:function(){},getSavedValue:function(){}}),Ti=A.createContext({}),qa=A.createContext({getFullField:function(){},getValues:function(){},getOptions:function(){return{}},setInitialValue:function(){},getInitialValue:function(){},getDerrivedValue:function(){},getSavedValue:function(){},removeSavedState:function(){}}),Al=A.createContext(),gf=A.createContext(),Ss=A.createContext(),ws=A.createContext(),mf=A.createContext(),Ol=A.createContext(),El=A.createContext(),yf=A.createContext();function bn(){var e=(0,A.useContext)(qa);return e}function xn(e){var r=(0,A.useRef)(),i=(0,A.useRef)(!0),a=(0,A.useState)(e),o=ar(a,2),f=o[0],d=o[1];r.current=f;var v=function(b){r.current=b,i.current&&d(b)},h=function(){return r.current};return(0,A.useEffect)(function(){return function(){i.current=!1}},[]),[f,v,h]}var eo=function(r){return r.type&&r.type.name?r.type.name:r.displayName||r.name||"Component"},bf=function(r){var i={};if(r.inner){if(r.inner.length===0){Je.set(i,r.path,r.message);return}var a=Qa(r.inner),o;try{for(a.s();!(o=a.n()).done;){var f=o.value;Je.get(i,f.path)||Je.set(i,f.path,f.message)}}catch(d){a.e(d)}finally{a.f()}}return i},Tl=function(r,i){try{r.validateSync(i,{abortEarly:!1})}catch(o){var a=bf(o);return a}},xf=function(r){if(r.inner){if(r.inner.length===0)return;var i=r.inner[0];return i.message}},Sf=function(r,i){try{r.validateSync(i,{abortEarly:!1})}catch(a){return xf(a)}},wf=function(r,i){r(i);var a={};return r.errors&&r.errors.forEach(function(o){var f=o.message,d=o.dataPath,v=o.keyword,h=o.params,g=d;v==="required"&&(g="".concat(g,".").concat(h.missingProperty)),g=g.replace(".",""),Je.set(a,g,f)}),a},xa=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){var i=Math.random()*16|0,a=r=="x"?i:i&3|8;return a.toString(16)})},Cf=function(r,i){var a;return function(){for(var f=arguments.length,d=new Array(f),v=0;v<f;v++)d[v]=arguments[v];var h=function(){clearTimeout(a),r.apply(void 0,d)};clearTimeout(a),a=setTimeout(h,i)}},kl=function(r,i,a){var o=i["ui:control"],f=i["informed:props"],d=i["input:props"],v=i["ui:before"],h=i["ui:after"],g=i.oneOf,b=i.items,E=i.enum,j=i.title,I=i.minimum,W=i.maximum,Y=i.minLength,_=i.maxLength,U=i.pattern,G=i.type,ce=i.properties,Ce=xa();d&&d.id&&(Ce=d.id);var ge={componentType:o,field:a?"".concat(a,".").concat(r):r,type:G,uiBefore:v,uiAfter:h,properties:G==="object"?ce:void 0,items:G==="array"?b:void 0,props:ot(ot({label:j,id:Ce,min:I,max:W,minLength:Y,maxLength:_,pattern:U},f),d)};if(g){var ke=i.oneOf.map(function(ue){var Oe=ue["input:props"],Te=Oe===void 0?{}:Oe;return ot({value:ue.const,label:ue.title},Te)});ge.props.options=ke}if(E){var be=i.enum.map(function(ue){return{value:ue,label:ue}});ge.props.options=be}if(b&&b.oneOf){var me=b.oneOf.map(function(ue){var Oe=ue["input:props"],Te=Oe===void 0?{}:Oe;return ot({value:ue.const,label:ue.title},Te)});ge.props.options=me}return ge},Af=function(r,i,a){if(!r||i)return[];var o=r.properties,f=o===void 0?{}:o,d=r.allOf,v=r.propertyOrder,h=v===void 0?[]:v;if(Object.keys(f).length>0){var g=Object.keys(f).sort(function(b,E){var j=h.indexOf(b),I=h.indexOf(E);return(j>-1?j:h.length+1)-(I>-1?I:h.length+1)}).map(function(b){var E=f[b],j=kl(b,E,a);return j});return d&&g.push({componentType:"conditionals",allOf:d}),g}return[]},Pl=function(r){var i=r.replace(/\./g,".properties.").replace(/\[/g,".itmes[");return i="properties.".concat(i),i},Fl=function(r,i){if(typeof r=="string")return r.split("").map(function(a){return a==="#"?/\d/:a==="*"?/[\w]/:a});if(typeof r=="function")return r(i);if(Array.isArray(r))return r;throw new Error("Formatter must be string, array, or function")},Of=function(r,i){for(var a=0,o=-1,f=!0;f&&a<r.length;)r[a]==i[a]?o=a:f=!1,a=a+1;return o},Cs=function(r,i){if(!r)return{val:r,offset:0};var a="".concat(r),o=Fl(i,a),f=o.findIndex(function(_){return typeof _!="string"}),d=o.length-Fr(o).reverse().findIndex(function(_){return typeof _!="string"}),v=[],h=a.split(""),g=0,b=0,E=Of(o.slice(0,f),h.slice(0,f));E>-1&&(g=E+1,v=v.concat(o.slice(0,E+1)),b=E+1),E<0&&(v=v.concat(o.slice(0,f)),b=f);for(var j=b;j<o.length;j++){var I=o[j];if(g!=h.length){var W=h[g];if(typeof I=="function")v.push(I(W)),g=g+1;else{var Y=typeof I=="string"?I===W:I.test(W);Y&&typeof I=="string"?(v.push(I),g=g+1):!Y&&typeof I=="string"?g!=h.length&&v.push(I):Y&&typeof I!="string"?(v.push(W),g=g+1):!Y&&typeof I!="string"&&(g=g+1,j=j-1)}}else if(typeof I=="string"&&j>=d)v.push(I);else break}return{value:v.join(""),offset:a?v.length-a.length:0}},Ef=function(r,i){var a,o,f=new Intl.NumberFormat(r,i),d=new Intl.NumberFormat(r),v=(a=(o=d.formatToParts(.1).find(function(_){var U=_.type;return U==="decimal"}))===null||o===void 0?void 0:o.value)!==null&&a!==void 0?a:".";function h(_,U){return _ instanceof RegExp&&U instanceof RegExp&&_.source===U.source&&_.global===U.global&&_.ignoreCase===U.ignoreCase&&_.multiline===U.multiline}function g(_,U){for(var G=_.length;G--;)if(U(_[G]))return G;return-1}function b(_,U,G){var ce=Fr(_);return Array.isArray(G)?ce.splice.apply(ce,[U,0].concat(Fr(G))):ce.splice(U,0,G),ce}function E(_){return"".concat(_).replace(/\D/g,"")}function j(_){return"".concat(_).split(v).map(function(U){return E(U)}).join(".")}function I(_){if(typeof _=="number")return _;var U=parseFloat(j(_));return Number.isNaN(U)?void 0:U}function W(_){var U=j(_),G="".concat(U).split(".")[1],ce=f.formatToParts(Number(U));G==="0"&&ce.push({type:"decimal",value:v},{type:"fraction",value:G});var Ce=ce.reduce(function(be,me){var ue=me.type,Oe=me.value;return["decimal","fraction"].includes(ue)&&G==null?be:["integer","fraction"].includes(ue)?[].concat(Fr(be),Fr(Oe.split("").filter(function(Te,Me){return ue==="fraction"?Me<G.length:!0}).map(function(){return/\d/}))):ue==="currency"?[].concat(Fr(be),Fr(Oe.split(""))):[].concat(Fr(be),[Oe])},[]),ge=g(Ce,function(be){return h(be,/\d/)});Ce.indexOf(v)===-1&&"".concat(_).indexOf(v)!==-1&&(Ce=b(Ce,ge+1,[v,"[]"]),ge+=2);var ke=Ce.slice(ge+1).join("");return Ce=[].concat(Fr(Ce.slice(0,ge+1)),[ke]),Ce}var Y=function(U){if(U!=null)return I(U)};return{formatter:W,parser:Y}},To=Object.freeze({__proto__:null,getChildDisplayName:eo,yupToFormErrors:bf,validateYupSchema:Tl,yupToFormError:xf,validateYupField:Sf,validateAjvSchema:wf,uuidv4:xa,debounce:Cf,computeFieldFromProperty:kl,computeFieldsFromSchema:Af,getSchemaPathFromJsonPath:Pl,informedFormat:Cs,createIntlNumberFormatter:Ef}),Pn=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?A.useLayoutEffect:A.useEffect,As=function(r){var i=r.value,a=r.inputRef,o=r.maintainCursor,f=o===void 0?!0:o,d=xn(0),v=ar(d,3),h=v[0],g=v[1],b=v[2],E=xn(0),j=ar(E,3),I=j[0],W=j[1],Y=j[2];return Pn(function(){if(a.current!=null&&b()){var _=b()+Y();Y()!=0&&f?a.current.setSelectionRange(_+1,_+1):f&&a.current.setSelectionRange(_,_)}},[i]),{setCursorOffset:W,setCursor:g,cursor:h,getCursor:b,cursorOffset:I}},ed=function(r,i){var a=(0,A.useRef)(!0),o=a.current;(0,A.useEffect)(function(){if(o)a.current=!1;else return r()},i)},un=Yn("informed:useField "),Tf=function(r,i,a,o,f){if(r!=null){if(f)return f(r);if(i)return i(r);if(a&&!o){var d=Cs(r,a);return d.value}return r}},Zt=function(r,i,a,o){if(i&&a)return i(r);if(o){var f=Cs(r,o);return f.value}return r},td=function(r,i,a){var o=a.required;if(r||i)return function(f,d){if(i)return Sf(i,f);if(r)return r(f,d)};if(o)return function(f){return Ll(f,o)}},Il=function(r){var i=r.fieldType,a=r.setValue,o=r.onChange,f=r.multiple,d=r.ref,v=function(g){return a(g)};return(i==="text"||i==="textArea"||i==="number")&&(v=function(g){return a(g.target.value,g)}),i==="select"&&(v=function(){var g=Array.from(d.current).filter(function(b){return b.selected}).map(function(b){return b.value});a(f?g:g[0]||"")}),i==="checkbox"&&(v=function(g){a(g.target.checked),o&&o(g)}),function(h){v(h)}},ko=function(r){var i=r.setTouched,a=r.onBlur;return function(o){i(!0),a&&a(o)}},Xn=function(r){var i=r.fieldType,a=r.maskedValue,o=r.multiple,f=r.value;switch(i){case"text":case"number":return!a&&a!==0?"":a;case"textArea":return a||"";case"select":return f||(o?[]:"");case"checkbox":return!!f;default:return f}},Os=function(r){switch(r){case"text":return r;case"number":return r;case"checkbox":return r;default:return}},Ll=function(r,i){if(i&&(r==null||r===""))return typeof i=="string"?i:"This field is required"};function to(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=e.field,a=e.validate,o=e.asyncValidate,f=e.validationSchema,d=e.mask,v=e.maskWithCursorOffset,h=e.format,g=e.parse,b=e.formatter,E=e.parser,j=e.initialValue,I=e.validateOnChange,W=e.validateOnBlur,Y=e.validateOnMount,_=e.asyncValidateOnBlur,U=e.maskOnBlur,G=e.allowEmptyString,ce=e.onValueChange,Ce=e.notify,ge=e.keepState,ke=e.maintainCursor,be=e.debug,me=e.shadow,ue=e.step,Oe=e.fieldType,Te=e.multiple,Me=e.onChange,Xe=e.onBlur,yt=e.formController,at=e.relevant,fr=e.required,Er=e.keepStateIfRelevant,cr=e.initialize,Tr=e.formatterDependencies,nr=Tr===void 0?[]:Tr,kt=sr(e,["field","validate","asyncValidate","validationSchema","mask","maskWithCursorOffset","format","parse","formatter","parser","initialValue","validateOnChange","validateOnBlur","validateOnMount","asyncValidateOnBlur","maskOnBlur","allowEmptyString","onValueChange","notify","keepState","maintainCursor","debug","shadow","step","fieldType","multiple","onChange","onBlur","formController","relevant","required","keepStateIfRelevant","initialize","formatterDependencies"]),Yt=(0,A.useState)(xa()),Ht=ar(Yt,1),_e=Ht[0],qe=(0,A.useContext)(yn),Tt=(0,A.useContext)(yf),Vt=Tt||Er,Ot=bn(),pn=(0,A.useRef)(),Ki=(0,A.useRef)(!0),qn=(0,A.useRef)(),Kr=(0,A.useRef)(!1),uo=function(){return!Kr.current},No=function(){return Kr.current};yt&&(qe=yt.updater,Ot=yt.getFormApi());var Nn=td(a,f,{required:fr}),Aa=(0,A.useState)(function(){return qe.getInitialValue(i)}),tc=ar(Aa,1),Fi=tc[0],Vs=qe.getSavedValue(i),Yi,Oa;(ge||Vt)&&Vs?(un("Setting field ".concat(zd,"'s kept state"),Vs),Yi=Vs.value,Oa=Vs.touched,Ot.removeSavedState(zd)):j!=null?Yi=j:Yi=Fi;var Ld=xn(Tf(Yi,d,b,E,cr)),Xi=ar(Ld,3),Yr=Xi[0],js=Xi[1],Jl=Xi[2],Md=xn(Y?Nn(Yr):void 0),ei=ar(Md,3),Ea=ei[0],Ro=ei[1],Ql=ei[2],Zl=xn(Oa),Mt=ar(Zl,3),ti=Mt[0],Uy=Mt[1],nv=Mt[2],_y=(0,A.useState)(function(){return Zt(Yr,h,g,b)}),iv=ar(_y,2),Nd=iv[0],Rd=iv[1],av=(0,A.useRef)();av.current=Nd;var ov=(0,A.useRef)(j),Do=(0,A.useRef)(i),sv=(0,A.useRef)();ov.current=j,Do.current=i;var zy=(0,A.useRef)(null),Ji=A.useMemo(function(){return r||zy},[]),Dd=As({value:Yr,inputRef:Ji,maintainCursor:!!ke}),Bd=Dd.getCursor,Gy=Dd.setCursor,Vd=Dd.setCursorOffset,$y=function(){return!0},jd=function(Kt){var Xr=at||$y,Rn=Ot.getFullField(Do.current)||Do.current,Nt={path:Rn,parentPath:Rn.replace(/(.*)[.[].*/,"$1"),get:function(Dn,tu){return Je.get(Dn,tu)}};return Tt&&Tt.relevant?Xr(Kt,Nt)&&Tt.relevant(Kt,Nt):Xr(Kt,Nt)},Ky=xn(jd(Ot.getValues())),Wd=ar(Ky,3),rc=Wd[0],Yy=Wd[1],lv=Wd[2],Xy=function(Kt){return Tt&&Tt.relevant?Tt.relevant(Kt):!0},Jy=function(){var Kt=jd(Ot.getValues()),Xr=lv();return Kt!=Xr&&Yy(Kt),Kt};(0,A.useEffect)(function(){!rc&&!ge&&pn.current.reset()},[rc]);var hi=function(){return me?Ot.getDerrivedValue(i):Jl()},ql=function(Kt){var Xr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Rn=Xr.preventUpdate;ue&&Ot.getStep()<ue?(un("Setting ".concat(i,"'s error to undefined as we are not at that step")),Ro(void 0),qe.setError(_e,void 0,!Rn)):(un("Setting ".concat(i,"'s error to ").concat(Kt)),Ro(Kt),qe.setError(_e,Kt,!Rn))},Hd=function(Kt,Xr){var Rn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Nt=Kt;Kr.current=!0,un("Setting ".concat(i," to ").concat(Nt)),cr&&(Nt=cr(Nt));var Bo=Ot.getOptions(),Dn=Nt;if(Nt===""&&!G&&!Rn.allowEmptyString&&!Bo.allowEmptyStrings&&(Nt=void 0),(e.type==="number"||Oe==="number")&&Nt!==void 0&&(Nt=+Nt),Xr&&Xr.target&&Xr.target.selectionStart&&Gy(Xr.target.selectionStart),d&&!U&&(Dn=d(Nt,Bd()),Nt=d(Nt,Bd())),v&&!U){var tu=v(Nt,Bd());Dn=tu.value,Nt=tu.value,Vd(tu.offset)}if(h&&g&&(Nt=g(Nt),Dn=h(Nt)),b){var uv=Cs(Nt,b);Vd(uv.offset),Dn=uv.value,Nt=Dn}E&&(Nt=Nt!=null?E(Nt):Nt),Nn&&I&&!Rn.initial&&(un("Validating after change ".concat(i," ").concat(Nt)),ql(Nn(Nt,Ot.getValues()))),js(Nt),Rd(Dn),ce&&ce(Nt),qe.setValue(_e,Nt,!Rn.preventUpdate)};ed(function(){pn.current.setValue(av.current)},Fr(nr));var Ud=function(Kt,Xr){var Rn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Nt=Rn.preventUpdate;if(un("Field ".concat(i," has been touched")),Nn&&W&&!Xr&&Kt&&(un("Validating after blur ".concat(i," ").concat(hi())),ql(Nn(hi(),Ot.getValues()))),o&&_&&!Xr&&Kt&&(un("Validating async after blur ".concat(i," ").concat(hi())),o(hi(),Ot.getValues())),d&&U){var Bo=d(hi());js(Bo),Rd(Bo),ce&&ce(Bo),qe.setValue(_e,Bo,!Nt)}if(v&&U){var Dn=v(hi());Vd(Dn.offset),js(Dn.value),Rd(Dn.value),ce&&ce(Dn.value),qe.setValue(_e,Dn.value,!Nt)}Uy(Kt),qe.setTouched(_e,Kt,!Nt)},Qy=function(){var Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Xr=Kt.preventUpdate,Rn=Tf(ov.current||qe.getInitialValue(Do.current),d,b,E,cr);Hd(Rn,null,{initial:!0,preventUpdate:Xr}),ql(Y?Nn(Rn):void 0,{preventUpdate:Xr}),Ud(void 0,!0,{preventUpdate:Xr}),Kr.current=!1},Zy=function(Kt){Nn&&(un("Field validating ".concat(i," ").concat(hi())),ql(Nn(hi(),Kt||Ot.getValues())))},qy=function(Kt){o&&(un("Field async validating ".concat(i," ").concat(hi())),o(hi(),Kt||Ot.getValues()))},_d={setValue:Hd,setTouched:Ud,setError:ql,reset:Qy,validate:Zy,asyncValidate:qy,getValue:hi,getTouched:nv,getError:Ql,getIsRelevant:lv,getDirty:No,getPristine:uo,getFieldState:function(){return{value:hi(),touched:nv(),dirty:No(),pristine:uo()}},relevant:jd,multistepRelevant:Xy,checkRelevant:Jy};pn.current=_d;var eu={value:Yr,error:Ea,touched:ti,maskedValue:Nd,isRelevant:rc,dirty:Kr.current,pristine:!Kr.current};me&&(eu={error:Ea,touched:ti}),un("Render",Ot.getFullField(i),eu),Pn(function(){var Ur=Ot.getFullField(Do.current);return un("Register",_e,Do.current),qn.current={field:Ur,fieldId:_e,fieldApi:_d,fieldState:eu,notify:Ce,keepState:ge,inMultistep:Vt,shadow:me},qe.register(_e,qn.current),function(){var Kt=Ot.getFullField(Do.current);un("Deregister",_e,Kt),qe.deregister(_e)}},[]),(0,A.useEffect)(function(){var Ur=Ot.getFullField(i);return Ki.current?Ki.current=!1:(un("Update",i,Vt),qn.current.field=Ur,qe.update(_e,qn.current,sv.current)),function(){sv.current=Ur}},[i]),Pn(function(){be&&Ji&&(Ji.current.style.border="5px solid orange",setTimeout(function(){Ji.current.style.borderWidth="2px",Ji.current.style.borderStyle="inset",Ji.current.style.borderColor="initial",Ji.current.style.borderImage="initial"},500))});var e0=[].concat(Fr(Object.values(eu)),Fr(Object.values(e)),Fr(Object.values(kt))),t0=function(Kt){return(0,A.useMemo)(function(){return rc?Kt:null},Fr(e0))},zd=i,r0=Il({fieldType:Oe,setValue:Hd,onChange:Me,multiple:Te,ref:Ji}),n0=ko({setTouched:Ud,onBlur:Xe}),i0=Xn({fieldType:Oe,maskedValue:Nd,multiple:Te,value:Yr}),a0=Os(Oe);return{fieldState:eu,fieldApi:_d,render:t0,ref:Ji,userProps:ot(ot({},kt),{},{multiple:Te,onChange:Me,onBlur:Xe,id:kt.id||_e}),informed:ot({name:zd,multiple:Te,onChange:r0,onBlur:n0,value:i0,ref:Ji,type:a0,id:kt.id||_e},kt)}}var ci=function(r){var i=A.forwardRef(function(a,o){var f=to(a,o),d=f.fieldState,v=f.fieldApi,h=f.render,g=f.ref,b=f.userProps;return h(A.createElement(r,ir({fieldApi:v,fieldState:d,field:a.field,forwardedRef:g,debug:a.debug,type:a.type},b)))});return i.displayName="asField(".concat(eo(r),")"),i},kf=Yn("informed:Text "),Ml=function(r){var i=r.fieldApi,a=r.fieldState,o=sr(r,["fieldApi","fieldState"]),f=a.maskedValue,d=i.setValue,v=i.setTouched,h=o.onChange,g=o.onBlur,b=o.field,E=o.initialValue,j=o.forwardedRef,I=o.debug,W=o.label,Y=o.title,_=o.id,U=sr(o,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","title","id"]);return kf("Render",b),Pn(function(){I&&j&&(j.current.style.background="red",setTimeout(function(){j.current.style.background="white"},500))}),A.createElement(A.Fragment,null,W?A.createElement("label",{htmlFor:_}," ",W," "):null,A.createElement("input",ir({},U,{id:_,name:b,ref:j,value:!f&&f!==0?"":f,onChange:function(ce){d(ce.target.value,ce),h&&h(ce)},onBlur:function(ce){v(!0),g&&g(ce)}})))},Pf=ci(Ml),rd=function(r){var i=r.fieldApi,a=r.fieldState,o=sr(r,["fieldApi","fieldState"]),f=a.maskedValue,d=i.setValue,v=i.setTouched,h=o.onChange,g=o.onBlur,b=o.field,E=o.initialValue,j=o.forwardedRef,I=o.debug,W=o.label,Y=o.id,_=sr(o,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","id"]);return Pn(function(){I&&j&&(j.current.style.background="red",setTimeout(function(){j.current.style.background="white"},500))}),A.createElement(A.Fragment,null,W?A.createElement("label",{htmlFor:Y}," ",W," "):null,A.createElement("textarea",ir({},_,{id:Y,name:b,ref:j,value:f||"",onChange:function(G){d(G.target.value,G),h&&h(G)},onBlur:function(G){v(!0),g&&g(G)}})))},Nl=ci(rd),Ff=Yn("informed:Select "),Ut=function(r){var i=r.fieldApi,a=r.fieldState,o=sr(r,["fieldApi","fieldState"]),f=a.value,d=i.setTouched,v=o.onChange,h=o.onBlur,g=o.field,b=o.initialValue,E=o.options,j=o.children,I=o.forwardedRef,W=o.debug,Y=o.multiple,_=o.label,U=o.id,G=sr(o,["onChange","onBlur","field","initialValue","options","children","forwardedRef","debug","multiple","label","id"]),ce=(0,A.useRef)(),Ce=function(ke){var be=Array.from((I||ce).current).filter(function(me){return me.selected}).map(function(me){return me.value});i.setValue(Y?be:be[0]||""),v&&ke&&v(ke)};return Pn(function(){W&&I&&(I.current.style.background="red",setTimeout(function(){I.current.style.background="white"},500))}),Ff("Render",g,f),A.createElement(A.Fragment,null,_?A.createElement("label",{htmlFor:U}," ",_," "):null,A.createElement("select",ir({},G,{id:U,multiple:Y,name:g,ref:I||ce,value:f||(Y?[]:""),onChange:Ce,onBlur:function(ke){d(!0),h&&h(ke)}}),E?E.map(function(ge){return A.createElement("option",{key:ge.value,value:ge.value,disabled:ge.disabled},ge.label)}):j))},If=ci(Ut),nd=function(r){var i=r.fieldApi,a=r.fieldState,o=sr(r,["fieldApi","fieldState"]),f=a.value,d=i.setValue,v=i.setTouched,h=o.onChange,g=o.onBlur,b=o.field,E=o.initialValue,j=o.debug,I=o.forwardedRef,W=o.id,Y=o.label,_=sr(o,["onChange","onBlur","field","initialValue","debug","forwardedRef","id","label"]);return A.createElement(A.Fragment,null,Y?A.createElement("label",{htmlFor:W}," ",Y," "):null,A.createElement("input",ir({},_,{id:W,name:b,ref:I,checked:!!f,onChange:function(G){d(G.target.checked),h&&h(G)},onBlur:function(G){v(!0),g&&g(G)},type:"checkbox"})))},ro=ci(nd),id=function(r){return A.forwardRef(function(i,a){return A.createElement(Al.Consumer,null,function(o){var f=o.radioGroupApi,d=o.radioGroupState;return A.createElement(r,ir({radioGroupApi:f,radioGroupState:d,ref:a},i))})})},Es=function(r){var i=r.radioGroupApi,a=r.radioGroupState,o=sr(r,["radioGroupApi","radioGroupState"]),f=a.value,d=i.setValue,v=i.setTouched,h=i.onChange,g=i.onBlur,b=o.value,E=o.onChange,j=o.onBlur,I=o.field,W=o.initialValue,Y=o.forwardedRef,_=sr(o,["value","onChange","onBlur","field","initialValue","forwardedRef"]);return A.createElement("input",ir({},_,{name:I,ref:Y,value:b,checked:f===b,onChange:function(G){G.target.checked&&(d(b),E&&E(G),h&&h(G))},onBlur:function(G){v(!0),j&&j(G),g&&g(G)},type:"radio"}))},ad=id(Es),lr=function(e){Kc(i,e);var r=df(i);function i(){return fi(this,i),r.apply(this,arguments)}return ma(i,[{key:"render",value:function(){var o=this.props,f=o.options,d=o.children;return A.createElement(Al.Provider,{value:this.groupContext},f?f.map(function(v){return A.createElement("label",{key:v.value},v.label," ",A.createElement(ad,{value:v.value}))}):d)}},{key:"groupContext",get:function(){return{radioGroupApi:ot(ot({},this.props.fieldApi),{},{onChange:this.props.onChange,onBlur:this.props.onBlur}),radioGroupState:this.props.fieldState}}}]),i}(A.Component),od=ci(lr);function sd(){return(0,A.useContext)(Ss)}var ld=function(){var r=sd(),i=r.add;return A.createElement("button",{onClick:function(){i()},type:"button"},"Add")};function Ts(){return(0,A.useContext)(ws)}var t=function(){var r=Ts(),i=r.remove;return A.createElement("button",{onClick:function(){i()},type:"button"},"Remove")},n=Yn("informed:useArrayField "),l=function(r){var i=r.field,a=r.initialValue,o=r.validate,f=r.arrayFieldApiRef,d=sr(r,["field","initialValue","validate","arrayFieldApiRef"]),v=bn(),h=(0,A.useState)(new Map),g=ar(h,1),b=g[0],E=(0,A.useContext)(yn),j=v.getFullField(i),I=E.getInitialValue(i)||a||[],W=v.getSavedValue(j)&&v.getSavedValue(j).value,Y=xn(W||I),_=ar(Y,3),U=_[0],G=_[1],ce=_[2],Ce=U?U.map(function(){return xa()}):[],ge=xn(Ce),ke=ar(ge,3),be=ke[0],me=ke[1],ue=ke[2],Oe=(0,A.useMemo)(function(){return function(Ht,_e){var qe=ue()==null?0:ue().length;return o?o(Ht,qe,_e):void 0}}),Te=to(ot({field:i,validate:o?Oe:void 0,shadow:!0},d)),Me=Te.fieldApi;Pn(function(){var Ht=function(qe){qe!==j&&(n("".concat(j," changed")),RegExp("".concat(j,"\\[[0-9]+\\]")).test(qe)&&Me.validate())};return v.emitter.on("value",Ht),function(){v.emitter.removeListener("value",Ht)}},[i]);var Xe=function(_e){n("EXPECTING REMOVAL OF","".concat(i,"[").concat(_e,"] and ").concat(i,"[").concat(be.length-1,"]")),E.expectRemoval("".concat(i,"[").concat(_e,"]")),E.expectRemoval("".concat(i,"[").concat(be.length-1,"]"));var qe=be.slice(0,_e).concat(be.slice(_e+1,be.length));me(qe);var Tt=ce(),Vt=Tt.slice(0,_e).concat(Tt.slice(_e+1,Tt.length));G(Vt)},yt=function(_e,qe){n("Swapping","".concat(i,"[").concat(_e,"] and ").concat(i,"[").concat(qe,"]"));var Tt=Fr(be);be[_e]&&be[qe]?(Tt[_e]=be[qe],Tt[qe]=be[_e]):console.warn("Attempted to swap ".concat(_e," with ").concat(qe," but one of them does not exist :(")),me(Tt)},at=function(){be.push(xa()),me(Fr(be))},fr=function(_e){be.push(xa()),me(Fr(be));var qe=Fr(ce());qe[be.length-1]=_e,G(qe)},Er=function(){var _e=E.getInitialValue(i)||a||[];G(_e);var qe=_e?_e.map(function(){return xa()}):[];me(qe)},cr=be.map(function(Ht,_e){var qe={remove:function(){return Xe(_e)}},Tt={initialValue:U&&U[_e],key:Ht,field:"".concat(i,"[").concat(_e,"]"),index:_e};return ot(ot({arrayFieldItemApi:qe,arrayFieldItemState:Tt},qe),Tt)}),Tr={add:at,swap:yt,addWithInitialValue:fr,reset:Er};f&&(f.current=Tr);var nr={fields:cr,field:i},kt=ot(ot({},E),{},{register:function(_e,qe){b.set(_e,qe);for(var Tt=arguments.length,Vt=new Array(Tt>2?Tt-2:0),Ot=2;Ot<Tt;Ot++)Vt[Ot-2]=arguments[Ot];E.register.apply(E,[_e,qe].concat(Vt))},deregister:function(_e){b.delete(_e);for(var qe=arguments.length,Tt=new Array(qe>1?qe-1:0),Vt=1;Vt<qe;Vt++)Tt[Vt-1]=arguments[Vt];E.deregister.apply(E,[_e].concat(Tt))},getInitialValue:function(_e){if(RegExp("".concat(j,"\\[[0-9]+\\]")).test(_e)){var qe=_e.replace(i,""),Tt=Je.get(ce(),qe);return n("Resetting ".concat(qe," to ").concat(Tt)),Tt}return E.getInitialValue(_e)}}),Yt=function(_e){return A.createElement(yn.Provider,{value:kt},A.createElement(Ss.Provider,{value:Tr},A.createElement(gf.Provider,{value:nr},_e)))};return{render:Yt,add:at,swap:yt,addWithInitialValue:fr,fields:cr,arrayFieldState:nr,arrayFieldApi:Tr,field:i}},s=function(r,i){return ot(ot({},i),{},{getValue:function(o){return i.getValue("".concat(r,".").concat(o))},getTouched:function(o){return i.getTouched("".concat(r,".").concat(o))},getError:function(o){return i.getError("".concat(r,".").concat(o))},setValue:function(o,f){return i.setValue("".concat(r,".").concat(o),f)},setTouched:function(o,f){return i.setTouched("".concat(r,".").concat(o),f)},setError:function(o,f){return i.setError("".concat(r,".").concat(o),f)},getInitialValue:function(o){return i.getInitialValue("".concat(r,".").concat(o))},getSavedValue:function(o){return i.getSavedValue("".concat(r,".").concat(o))},getFullField:function(o){return"".concat(i.getFullField(r),".").concat(o)}})};function u(e){var r=bn(),i=(0,A.useMemo)(function(){return s(e,r)},[e]);return i}function p(){var e=(0,A.useContext)(Ti);return e}var y=function(r){var i=r.when,a=r.children,o=p(),f=i(o);return f?a:null},x=function(r){var i=r.relevant,a=r.field,o=sr(r,["relevant","field"]),f=bn();if(i){var d=f.getFullField(a),v={path:d,parentPath:d.replace(/(.*)[.[].*/,"$1"),get:function(b,E){return Je.get(b,E)}},h=function(b){var E=b.values;return i(E,v)};return A.createElement(y,{when:h},A.createElement(C,ir({field:a},o)))}else return A.createElement(C,ir({field:a},o))},C=function(r){var i=r.children,a=sr(r,["children"]),o=l(a),f=o.render,d=o.arrayFieldState,v=o.arrayFieldApi,h=o.field;return f(typeof i=="function"?i(ot(ot({field:h,arrayFieldApi:v,arrayFieldState:d},v),d)):i)},P=function(r){var i=r.arrayFieldItemState,a=r.arrayFieldItemApi,o=r.children,f=(0,A.useContext)(yn),d=bn(),v=(0,A.useState)(0),h=ar(v,2),g=h[0],b=h[1],E=(0,A.useState)(new Map),j=ar(E,1),I=j[0],W=i.field,Y=u(W),_=function(){var be=d.getState(),me=be.values,ue=be.errors,Oe=be.touched,Te={values:Je.get(me,W),errors:Je.get(ue,W),touched:Je.get(Oe,W)};return Te};(0,A.useEffect)(function(){var ke=function(me){var ue=me.slice(0,me.lastIndexOf("[")!=-1?me.lastIndexOf("]")+1:me.length);ue===W&&b(Math.random())};return d.emitter.on("value",ke),function(){d.emitter.removeListener("value",ke)}},[W]);var U=function(){I.forEach(function(be){be.fieldApi.reset()})},G=_(),ce=ot(ot({},f),{},{register:function(be,me,ue){I.set(be,me),f.register(be,me,ue)},deregister:function(be){I.delete(be);for(var me=arguments.length,ue=new Array(me>1?me-1:0),Oe=1;Oe<me;Oe++)ue[Oe-1]=arguments[Oe];f.deregister.apply(f,[be].concat(ue))}}),Ce=ot(ot(ot({},a),Y),{},{reset:U}),ge=ot(ot({},i),G);return typeof o=="function"?A.createElement(yn.Provider,{value:ce},A.createElement(ws.Provider,{value:Ce},A.createElement(mf.Provider,{value:ge},o(ot(ot({arrayFieldItemApi:Ce,arrayFieldItemState:ge},Ce),ge))))):A.createElement(yn.Provider,{value:ce},A.createElement(ws.Provider,{value:Ce},A.createElement(mf.Provider,{value:ge},o)))};x.Items=function(e){var r=e.children,i=(0,A.useContext)(gf),a=i.fields;return a.map(function(o){var f=o.arrayFieldItemState,d=o.arrayFieldItemApi,v=f.key;return A.createElement(P,{key:v,arrayFieldItemApi:d,arrayFieldItemState:f},r)})};var K=function(r){var i=r.components,a=(0,A.useContext)(yn),o=a.fieldMap;return i?i.map(function(f,d){var v=f["ui:control"],h=o[v];return A.createElement(h,{key:"ui-comp-".concat(d)})}):null},ne=Yn("informed:FormFields "),ve=function e(r){var i=r.schema,a=r.prefix,o=r.onlyValidateSchema,f=(0,A.useContext)(yn),d=f.fieldMap,v=(0,A.useMemo)(function(){var h=Af(i,o,a),g=h.map(function(b,E){var j=b.field,I=b.props,W=b.type,Y=b.properties,_=b.items,U=b.componentType,G=b.uiBefore,ce=b.uiAfter,Ce=b.allOf,ge=d[U];return ne("Rendering Field",j,b),!ge&&W==="object"&&Y?A.createElement(e,{schema:b,prefix:j,key:"ScheamField-".concat(E)}):!ge&&W==="array"&&_?A.createElement(de,ir({key:"ScheamField-".concat(E),field:j,items:_,uiBefore:G,uiAfter:ce},I)):ge&&U==="array"&&_&&W==="array"?A.createElement(ge,ir({key:"ScheamField-".concat(E),field:j,items:_,uiBefore:G,uiAfter:ce},I)):U==="conditionals"?Ce.map(function(ke){var be=ke.then,me=ke.if.properties,ue=function(Te){var Me=Te.values;return Object.keys(me).every(function(Xe){var yt=me[Xe];return Me[Xe]===yt.const})};return A.createElement(y,{key:"ScheamField-".concat(E),when:ue},A.createElement(e,{schema:be}))}):ge?A.createElement(ge,ir({key:"ScheamField-".concat(E),field:j},I)):null});return g},[i,a]);return v},de=function(r){var i=r.field,a=r.items,o=r.uiBefore,f=r.uiAfter,d=sr(r,["field","items","uiBefore","uiAfter"]);return A.createElement(x,ir({field:i},d),A.createElement(K,{components:o}),A.createElement(x.Items,null,function(v){var h=v.field;return A.createElement(A.Fragment,null,A.createElement(K,{components:a["ui:before"]}),A.createElement(ve,{schema:a,prefix:h}),A.createElement(K,{components:a["ui:after"]}))}),A.createElement(K,{components:f}))},Ee={select:If,input:Pf,textarea:Nl,checkbox:ro,radio:od,add:ld,remove:t,array:de},Ae=Yn("informed:Controller "),Ie=function(r,i){var a=Object.keys(i).find(function(f){return r.includes(f)});if(a){var o=r.slice(0,a.length);return o===a}},Le=function(){},De=function(){function e(){var r=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};fi(this,e),this.options=i,this.subscriptions=new Map;var a=i.ajv,o=i.schema,f=i.fieldMap;this.ajv=a?new a({allErrors:!0}):null,this.ajvValidate=a?this.ajv.compile(o):null,this.fieldMap=f||Ee,this.fieldsById=new Map,this.fieldsByName={get:function(v){var h;return r.fieldsById.forEach(function(g){g&&g.field===v&&(h=g)}),h}},this.onScreen={},this.expectedRemovals={},this.pulledOut={},this.savedValues={},this.state={pristine:!0,dirty:!1,invalid:!1,submits:0,step:0,validating:0,submitting:!1,values:{},errors:{},touched:{}},this.dummyField={fieldApi:{setValue:Le,setTouched:Le,setError:Le,reset:Le,validate:Le,getValue:Le,getTouched:Le,getError:Le,getFieldState:Le,checkRelevant:Le,getPristine:Le,getDirty:Le}},this.deregister=this.deregister.bind(this),this.register=this.register.bind(this),this.getValue=this.getValue.bind(this),this.getTouched=this.getTouched.bind(this),this.getError=this.getError.bind(this),this.getErrors=this.getErrors.bind(this),this.setValue=this.setValue.bind(this),this.getValues=this.getValues.bind(this),this.getStep=this.getStep.bind(this),this.setStep=this.setStep.bind(this),this.back=this.back.bind(this),this.next=this.next.bind(this),this.setCurrent=this.setCurrent.bind(this),this.setTouched=this.setTouched.bind(this),this.setError=this.setError.bind(this),this.setFormError=this.setFormError.bind(this),this.submitForm=this.submitForm.bind(this),this.reset=this.reset.bind(this),this.update=this.update.bind(this),this.validate=this.validate.bind(this),this.screenValid=this.screenValid.bind(this),this.keyDown=this.keyDown.bind(this),this.getField=this.getField.bind(this),this.getInitialValue=this.getInitialValue.bind(this),this.setInitialValue=this.setInitialValue.bind(this),this.getOptions=this.getOptions.bind(this),this.getFormState=this.getFormState.bind(this),this.expectRemoval=this.expectRemoval.bind(this),this.getSavedValue=this.getSavedValue.bind(this),this.removeSavedState=this.removeSavedState.bind(this),this.getDerrivedValue=this.getDerrivedValue.bind(this),this.setValues=this.setValues.bind(this),this.resetField=this.resetField.bind(this),this.fieldExists=this.fieldExists.bind(this),this.validateField=this.validateField.bind(this),this.notify=this.notify.bind(this),this.validating=this.validating.bind(this),this.validated=this.validated.bind(this),this.getDirty=this.getDirty.bind(this),this.getPristine=this.getPristine.bind(this),this.on=this.on.bind(this),this.emit=this.emit.bind(this),this.removeListener=this.removeListener.bind(this),this.updater={register:this.register,deregister:this.deregister,getField:this.getField,update:this.update,fieldMap:this.fieldMap,setValue:function(v,h){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,b=r.fieldsById.get(v);b.shadow||Je.set(r.state.values,b.field,b.fieldApi.getValue()),b.fieldApi.relevant(r.state.values)||Je.delete(r.state.values,b.field),r.fieldsById.forEach(function(E){var j=E.fieldApi.checkRelevant();(!E.fieldApi.multistepRelevant(r.state.values)||!j&&!E.keepState)&&(Je.delete(r.state.values,E.field),Je.delete(r.state.touched,E.field),Je.delete(r.state.errors,E.field))}),g&&(r.emit("change"),r.emit("field",b.field),r.emit("value",b.field,h))},setTouched:function(v,h){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,b=r.fieldsById.get(v);!b.shadow&&b.fieldApi.getIsRelevant()&&Je.set(r.state.touched,b.field,b.fieldApi.getTouched()),b.shadow&&b.fieldApi.getError()!=null&&b.fieldApi.relevant(r.state.values)&&Je.set(r.state.touched,b.field,b.fieldApi.getTouched()),g&&(r.emit("change"),r.emit("field",b.field))},setError:function(v,h){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,b=r.fieldsById.get(v);!b.shadow&&b.fieldApi.getIsRelevant()&&Je.set(r.state.errors,b.field,b.fieldApi.getError());var E=Je.get(r.state.errors,b.field);(b.shadow&&b.fieldApi.getError()!=null&&b.fieldApi.relevant(r.state.values)||b.shadow&&b.fieldApi.getError()===void 0&&b.fieldApi.relevant(r.state.values)&&typeof E=="string")&&Je.set(r.state.errors,b.field,b.fieldApi.getError()),g&&(r.emit("change"),r.emit("field",b.field))},expectRemoval:this.expectRemoval,getInitialValue:this.getInitialValue,getSavedValue:this.getSavedValue},this.formApi={setValue:this.setValue,setTouched:this.setTouched,setError:this.setError,setFormError:this.setFormError,setValues:this.setValues,setInitialValue:this.setInitialValue,getValue:this.getValue,getTouched:this.getTouched,getError:this.getError,reset:this.reset,submitForm:this.submitForm,getState:this.getFormState,getValues:this.getValues,getFullField:this.getFullField,fieldExists:this.fieldExists,getInitialValue:this.getInitialValue,validate:this.validate,validateField:this.validateField,screenValid:this.screenValid,resetField:this.resetField,getOptions:this.getOptions,emitter:this,getSavedValue:this.getSavedValue,removeSavedState:this.removeSavedState,getDerrivedValue:this.getDerrivedValue,getStep:this.getStep,setStep:this.setStep,next:this.next,back:this.back,setCurrent:this.setCurrent,validated:this.validated,validating:this.validating,getDirty:this.getDirty,getPristine:this.getPristine,getField:this.getField},this.on("value",function(d){delete r.state.error,r.notify(d)})}return ma(e,[{key:"emit",value:function(i){for(var a=arguments.length,o=new Array(a>1?a-1:0),f=1;f<a;f++)o[f-1]=arguments[f];var d=this.subscriptions.get(i);d&&d.forEach(function(v){return v.apply(void 0,o)})}},{key:"on",value:function(i,a){this.subscriptions.get(i)||this.subscriptions.set(i,new Set);var o=this.subscriptions.get(i);o.add(a)}},{key:"removeListener",value:function(i,a){var o=this.subscriptions.get(i);o.delete(a)}},{key:"setOptions",value:function(i){this.options=i}},{key:"setValue",value:function(i,a,o){this.getField(i).fieldApi.setValue(a,null,ot({allowEmptyString:this.options.allowEmptyStrings},o))}},{key:"setTouched",value:function(i,a){this.getField(i).fieldApi.setTouched(a)}},{key:"setError",value:function(i,a){this.getField(i).fieldApi.setError(a)}},{key:"setFormError",value:function(i){this.state.error=i,this.emit("change")}},{key:"validating",value:function(){this.state.validating=this.state.validating+1,this.emit("change")}},{key:"validated",value:function(i,a){if(this.state.validating=this.state.validating-1,this.getError(i)||this.setError(i,a),this.state.validating>0){this.emit("change");return}this.state.submitting&&(this.valid()?(Ae("Submit",this.state),this.emit("submit")):(Ae("Submit",this.state),this.emit("failure")),this.state.submitting=!1),this.emit("change")}},{key:"setStep",value:function(i){this.state.step=i,this.emit("change")}},{key:"setCurrent",value:function(i){this.state.Current=i,this.emit("change")}},{key:"back",value:function(i){this.state.step=this.state.step-1,this.state.Current=i,this.emit("change")}},{key:"next",value:function(i){this.validate(),this.screenValid()&&(this.state.step=this.state.step+1,this.state.Current=i),this.emit("change")}},{key:"setInitialValue",value:function(i,a){Je.set(this.options.initialValues,i,a)}},{key:"getFormState",value:function(){return Ae("Returning form state"),ot(ot({},this.state),{},{pristine:this.pristine(),dirty:this.dirty(),invalid:this.invalid()})}},{key:"getFormApi",value:function(){return this.formApi}},{key:"getDerrivedValue",value:function(i){var a=this.getValues();return Je.get(a,i)}},{key:"getValue",value:function(i){var a=this.getField(i).fieldApi.getValue();return Ae("Getting value for",i,a),a}},{key:"getTouched",value:function(i){var a=this.getField(i).fieldApi.getTouched();return Ae("Getting touched for",i,a),a}},{key:"getError",value:function(i){var a=this.getField(i).fieldApi.getError();return Ae("Getting error for",i,a),a}},{key:"getDirty",value:function(i){var a=this.getField(i).fieldApi.getDirty();return Ae("Getting dirty for",i,a),a}},{key:"getPristine",value:function(i){var a=this.getField(i).fieldApi.getPristine();return Ae("Getting pristine for",i,a),a}},{key:"getValues",value:function(){return Ae("Gettings values"),this.state.values}},{key:"getAllTouched",value:function(){return Ae("Gettings touched"),this.state.touched}},{key:"getErrors",value:function(){return Ae("Gettings errors"),this.state.errors}},{key:"getOptions",value:function(){return this.options}},{key:"getStep",value:function(){return this.state.step}},{key:"getSavedValue",value:function(i){var a=this.fieldsByName.get(i);return a&&a.shadow?Je.get(this.savedValues,"shadow-".concat(i)):Je.get(this.savedValues,i)}},{key:"removeSavedState",value:function(i){var a=this.fieldsByName.get(i);return a&&a.shadow?Je.delete(this.savedValues,"shadow-".concat(i)):Je.delete(this.savedValues,i)}},{key:"getFullField",value:function(i){return i}},{key:"getInitialValue",value:function(i){return Je.get(this.options.initialValues,i)}},{key:"getField",value:function(i){Ae("Getting Field",i);var a=this.fieldsByName.get(i);return a||(console.warn("Attempting to get field ".concat(i," but it does not exist")),this.dummyField)}},{key:"notify",value:function(i){var a=this,o=this.getField(i);o&&o.notify&&o.notify.forEach(function(f){var d=".".concat(i),v="".concat(d.replace(/(.*)[.[].*/,"$1"),".").concat(f).slice(1),h=a.getField(v);h&&(Ae("Notifying",h.field),h.fieldApi.validate(),h.fieldApi.checkRelevant())})}},{key:"validateField",value:function(i){this.getField(i).fieldApi.validate()}},{key:"resetField",value:function(i){this.getField(i).fieldApi.reset()}},{key:"fieldExists",value:function(i){return this.fieldsByName.get(i)!=null}},{key:"valid",value:function(){var i=this.getErrors();return!!(Je.empty(i)&&!this.state.error)}},{key:"screenValid",value:function(){var i=Object.entries(this.onScreen).some(function(a){var o=ar(a,2),f=o[1];return f.fieldApi.getError()});return!i}},{key:"invalid",value:function(){var i=this.getErrors();return!!(!Je.empty(i)||this.state.error)}},{key:"pristine",value:function(){var i=!0;return this.fieldsById.forEach(function(a){a.fieldApi.getPristine()||(i=!1)}),i}},{key:"dirty",value:function(){return!this.pristine()}},{key:"reset",value:function(){Ae("Resetting"),this.fieldsById.forEach(function(i){i.fieldApi.reset({preventUpdate:!0})}),this.emit("reset"),this.emit("change")}},{key:"setValues",value:function(i){Ae("Setting values"),this.fieldsById.forEach(function(a){var o=Je.get(i,a.field);o!==void 0&&a.fieldApi.setValue(o,null,{preventUpdate:!0})}),this.emit("change")}},{key:"validate",value:function(){var i=this;Ae("Validating all fields");var a=this.getValues();if(this.options.validationSchema){var o=Tl(this.options.validationSchema,a);this.fieldsById.forEach(function(h){if(Je.has(o,h.field)){var g=Je.get(o,h.field);i.setError(h.field,g)}else i.setError(h.field,void 0)})}if(this.options.schema&&this.options.ajv){var f=wf(this.ajvValidate,a);this.fieldsById.forEach(function(h){if(Je.has(f,h.field)){var g=Je.get(f,h.field);i.setError(h.field,g)}else i.setError(h.field,void 0)})}if(this.fieldsById.forEach(function(h){h.fieldApi.validate(a),h.fieldApi.setTouched(!0,!0)}),this.options.validate){var d=this.options.validate(a);this.setFormError(d)}if(this.options.validateFields){var v=this.options.validateFields(a);this.fieldsById.forEach(function(h){if(Je.has(v,h.field)){var g=Je.get(v,h.field);i.setError(h.field,g)}})}}},{key:"asyncValidate",value:function(){Ae("Async Validating all fields");var i=this.getValues();this.fieldsById.forEach(function(a){a.fieldApi.asyncValidate(i)})}},{key:"keyDown",value:function(i){if(i.keyCode==13&&this.options.preventEnter)return i.preventDefault(i),!1}},{key:"submitForm",value:function(i){this.state.submits=this.state.submits+1,this.state.submitting=!0,!this.options.dontPreventDefault&&i&&i.preventDefault(i),this.validate(),this.emit("change"),this.asyncValidate(),!(this.state.validating>0)&&(this.valid()?(Ae("Submit",this.state),this.emit("submit")):(Ae("Submit",this.state),this.emit("failure")),this.state.submitting=!1,this.emit("change"))}},{key:"mount",value:function(){var i=this;this.fieldsById.forEach(function(a){i.emit("field",a.field)})}},{key:"register",value:function(i,a,o){var f=a.field,d=a.state;Ae("Register ID:",i,"Name:",f,d,"Initial",o);var v=f.slice(0,f.lastIndexOf("[")!=-1?f.lastIndexOf("]")+1:f.length),h;this.fieldsById.forEach(function(g,b){g&&g.field===f&&(h=b)}),h&&(a.keepState||a.inMultistep)?(Ae("Already Registered",f),this.fieldsById.delete(h)):h&&(!a.keepState||!a.inMultistep)&&console.warn("Check to make sure you have not registered two fields with the fieldName",f),Ae("Fields Registered",this.fieldsById.size),this.onScreen[i]=a,this.fieldsById.set(i,a),Ae("clearing expected removal",v),delete this.expectedRemovals[v],delete this.pulledOut[v],!a.shadow&&(this.updater.setValue(i,a.fieldApi.getValue(),!1),this.updater.setError(i,a.fieldApi.getError(),!1),this.updater.setTouched(i,a.fieldApi.getTouched(),!1),o||this.emit("change"),this.emit("field",f))}},{key:"deregister",value:function(i){var a=this.fieldsById.get(i),o=a.field;Ae("Deregister",i,o),delete this.onScreen[i];var f=Ie(o,this.expectedRemovals),d=o.slice(0,o.lastIndexOf("[")!=-1?o.lastIndexOf("]")+1:o.length);(a.keepState||a.inMultistep)&&!f&&(Ae("Saving field ".concat(o,"'s value"),a.fieldApi.getFieldState()),a.shadow?Je.set(this.savedValues,"shadow-".concat(o),a.fieldApi.getFieldState()):Je.set(this.savedValues,o,a.fieldApi.getFieldState())),(f||!a.keepState&&!a.inMultistep||!a.fieldApi.getIsRelevant()&&!a.keepState)&&(Ae("Removing field",o),this.fieldsById.delete(i),f||(Je.delete(this.state.values,o),Je.delete(this.state.touched,o),Je.delete(this.state.errors,o),a.shadow?Je.delete(this.savedValues,"shadow-".concat(o)):Je.delete(this.savedValues,o)),f&&this.pulledOut[d]&&(Ae("Pulling out",o,"with magic value",d),Je.pullOut(this.state.values,d),Je.pullOut(this.state.touched,d),Je.pullOut(this.state.errors,d),Je.pullOut(this.savedValues,d),delete this.pulledOut[d])),this.emit("change")}},{key:"expectRemoval",value:function(i){Ae("Expecting removal of",i),this.expectedRemovals[i]=!0,this.pulledOut[i]=!0}},{key:"update",value:function(i,a,o){Ae("Update",i,a.field,o,a.fieldState.value);var f=a.fieldApi.getValue(),d=a.fieldApi.getError(),v=a.fieldApi.getTouched(),h=this.fieldsByName.get(o);o&&!h&&(Je.set(this.state.values,o),Je.set(this.state.errors,o),Je.set(this.state.touched,o)),Je.set(this.state.values,a.field,f),Je.set(this.state.errors,a.field,d),Je.set(this.state.touched,a.field,v),this.emit("change")}}]),e}(),Ne=Yn("informed:FormProvider "),We=function(r){var i=r.children,a=r.formApi,o=r.formController,f=r.formState,d=sr(r,["children","formApi","formController","formState"]);if(Ne("Render FormProvider"),a)return Ne("Render FormProvider with given values"),A.createElement(yn.Provider,{value:o.updater},A.createElement(qa.Provider,{value:a},A.createElement(Ti.Provider,{value:f},i)));Ne("Render FormProvider with generated values");var v=Ke(d);return A.createElement(yn.Provider,{value:v.formController.updater},A.createElement(qa.Provider,{value:v.formApi},A.createElement(Ti.Provider,{value:v.formState},i)))},Qe=Yn("informed:useForm "),Ke=function(r){var i=r.dontPreventDefault,a=r.initialValues,o=r.validate,f=r.validateFields,d=r.allowEmptyStrings,v=r.preventEnter,h=r.getApi,g=r.apiRef,b=r.onChange,E=r.onReset,j=r.onSubmit,I=r.onValueChange,W=r.onSubmitFailure,Y=r.validationSchema,_=r.schema,U=r.ajv,G=r.fieldMap,ce=r.onlyValidateSchema,Ce=sr(r,["dontPreventDefault","initialValues","validate","validateFields","allowEmptyStrings","preventEnter","getApi","apiRef","onChange","onReset","onSubmit","onValueChange","onSubmitFailure","validationSchema","schema","ajv","fieldMap","onlyValidateSchema"]);Qe("Render useForm");var ge=(0,A.useMemo)(function(){return{dontPreventDefault:i,initialValues:a,validate:o,validateFields:f,allowEmptyStrings:d,preventEnter:v,validationSchema:Y,schema:_,ajv:U,fieldMap:G}},[i,a,o,f,d,v,Y,_,U,G]),ke=(0,A.useState)(function(){return new De(ge)}),be=ar(ke,1),me=be[0];(0,A.useEffect)(function(){me.setOptions(ge)},[ge]),Pn(function(){me.mount()},[]);var ue=(0,A.useState)(function(){return me.getFormState()}),Oe=ar(ue,2),Te=Oe[0],Me=Oe[1];Pn(function(){var Er=function(){return b&&b(me.getFormState())},cr=function(){return E&&E()},Tr=function(){return j&&j(me.getFormState().values)},nr=function(){return I&&I(me.getFormState().values)},kt=function(){return W&&W(me.getFormState().errors)};return me.on("change",Er),me.on("reset",cr),me.on("submit",Tr),me.on("value",nr),me.on("failure",kt),function(){me.removeListener("change",Er),me.removeListener("reset",cr),me.removeListener("submit",Tr),me.removeListener("value",nr),me.removeListener("failure",kt)}},[b,E,j,I,W]),(0,A.useState)(function(){var Er=function(){Qe("Setting form state"),Me(me.getFormState())};me.on("change",Er),h&&h(me.getFormApi()),g&&(g.current=me.getFormApi())});var Xe=(0,A.useState)(function(){return me.getFormApi()}),yt=ar(Xe,1),at=yt[0],fr=function(cr){return A.createElement(We,{formApi:at,formState:Te,formController:me},A.createElement(A.Fragment,null,cr||A.createElement(ve,{schema:_,onlyValidateSchema:ce})))};return{formApi:at,formState:Te,formController:me,render:fr,userProps:Ce}},bt=Yn("informed:Form "),$t=function(r){var i=r.children,a=r.render,o=r.component,f=sr(r,["children","render","component"]);bt("Render FORM");var d=Ke(f),v=d.formApi,h=d.formController,g=d.formState,b=d.render,E=d.userProps,j=function(){var W={formState:g,formApi:v};return o?A.createElement(o,W,i):a?a(W):typeof i=="function"?i(W):i};return b(A.createElement("form",ir({},E,{onReset:h.reset,onSubmit:h.submitForm,onKeyDown:h.keyDown}),j()))},wr=function(r,i){return ot(ot({},i),{},{getValue:function(o){return i.getValue("".concat(r,".").concat(o))},getTouched:function(o){return i.getTouched("".concat(r,".").concat(o))},getError:function(o){return i.getError("".concat(r,".").concat(o))},setValue:function(o,f){return i.setValue("".concat(r,".").concat(o),f)},setTouched:function(o,f){return i.setTouched("".concat(r,".").concat(o),f)},setError:function(o,f){return i.setError("".concat(r,".").concat(o),f)},getInitialValue:function(o){return i.getInitialValue("".concat(r,".").concat(o))},getFullField:function(o){return"".concat(i.getFullField(r),".").concat(o)}})},rr=function(r,i){var a=i.register,o=i.deregister,f=i.setValue,d=i.setTouched,v=i.setError,h=i.update,g=i.getField,b=i.expectRemoval,E=i.getInitialValue,j=i.fieldMap,I=i.getSavedValue;return{register:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return a.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},deregister:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return o.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},update:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return h.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},setValue:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return f.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},setTouched:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return d.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},setError:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return v.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},getField:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return g.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},expectRemoval:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return b.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},getInitialValue:function(Y){return E("".concat(r,".").concat(Y))},getSavedValue:function(Y){return I("".concat(r,".").concat(Y))},fieldMap:j}},Sn=function(r){var i=r.scope,a=r.children,o=useContext(yn),f=bn(),d=p(),v=useMemo(function(){return wr(i,f)},[i]),h=useMemo(function(){return rr(i,o)},[i]);return React.createElement(yn.Provider,{value:h},React.createElement(qa.Provider,{value:v},React.createElement(Ti.Provider,{value:d},a)))},fn=function(r){var i=p(),a={};Object.keys(r).length>0?Object.keys(r).forEach(function(I){a[I]=i[I]}):a=i;var o=a,f=o.pristine,d=o.dirty,v=o.invalid,h=o.values,g=o.errors,b=o.touched,E=o.validating,j=o.submitting;return React.createElement("pre",null,React.createElement("code",null,JSON.stringify({pristine:f,dirty:d,invalid:v,values:h,errors:g,touched:b,validating:E,submitting:j},null,2)))},vr=function(r){var i=r.initialStep,a=r.multistepApiRef,o=bn(),f=o.getValues,d=o.validate,v=o.screenValid,h=(0,A.useState)(new Map),g=ar(h,1),b=g[0],E=(0,A.useRef)(0),j=xn({current:i,steps:[],goal:null}),I=ar(j,3),W=I[0],Y=I[1],_=I[2],U=(0,A.useState)(function(){var ge=function(){var me=_(),ue=me.current,Oe=b.get(ue);return Oe},ke={getState:function(){return _()},getCurrentStep:ge,getStep:function(me){return b.get(me)},getNumberOfSteps:function(){return b.size},next:function(){if(d(),v()){var me=ge(),ue=me.getNext,Oe=ue(),Te=typeof Oe=="function"?Oe(f()):Oe;Te&&Y(function(Me){return ot(ot({},Me),{},{current:Te})})}},back:function(){var me=ge(),ue=me.getPrevious,Oe=ue(),Te=typeof Oe=="function"?Oe(f()):Oe;Te&&Y(function(Me){return ot(ot({},Me),{},{current:Te})})},setCurrent:function(me){if(me){var ue=b.get(me).index;ue<ge().index?Y(function(Oe){return ot(ot({},Oe),{},{current:me,goal:null})}):Y(function(Oe){return ot(ot({},Oe),{},{goal:me})})}},register:function(me,ue,Oe){Oe?(E.current=E.current+1,b.set(me,ot(ot({},ue),{},{index:E.current}))):Y(function(Te){return ot(ot({},Te),{},{steps:Array.from(b.keys())})})},deregister:function(me){b.delete(me),E.current=E.current-1,Y(function(ue){return ot(ot({},ue),{},{steps:Array.from(b.keys())})})}};return a&&(a.current=ke),ke}),G=ar(U,1),ce=G[0],Ce=function(ke){return A.createElement(El.Provider,{value:ce},A.createElement(Ol.Provider,{value:W},ke))};return ot(ot(ot({},ce),W),{},{render:Ce})};function tn(){return(0,A.useContext)(Ol)}function Ir(){return(0,A.useContext)(El)}var mr=function(r){var i=r.step,a=r.next,o=r.previous,f=r.relevant,d=p(),v=d.values,h=tn(),g=h.current,b=h.goal,E=Ir(),j=E.register,I=E.deregister,W=E.next,Y=i===g,_=f?f(v):!0,U=(0,A.useRef)(a),G=(0,A.useRef)(o),ce=(0,A.useRef)();U.current=a,G.current=o,ce.current=f,(0,A.useState)(function(){j(i,{name:i,getNext:function(){return U.current},getPrevious:function(){return G.current}},!0)}),(0,A.useEffect)(function(){return j(i,{name:i,getNext:function(){return U.current},getPrevious:function(){return G.current}}),function(){I(i)}},[i]),(0,A.useEffect)(function(){b&&Y&&b!==i&&W()},[b,Y]);var Ce=function(ke){return A.createElement(yf.Provider,{value:{relevant:function(me){return ce.current?ce.current(me):!0},multistep:!0}},Y&&_?ke:null)};return{isCurrent:Y,isRelevant:_,step:i,render:Ce}};function gr(e){var r=e.children,i=sr(e,["children"]),a=vr(i),o=a.render,f=sr(a,["render"]);return o(typeof r=="function"?r(f):r)}gr.Step=function(r){var i=r.children,a=sr(r,["children"]),o=mr(a),f=o.render;return f(i)};var ur=function(r){var i=r.field,a=useContext(yn),o=a.fieldMap,f=bn(),d=f.getFullField,v=f.getOptions,h=d(i),g=v(),b=g.schema,E=Pl(h),j=Je.get(b,E);if(!j)return null;var I=kl(i,j),W=I.props,Y=I.componentType,_=o[Y];return React.createElement(_,ir({field:i},W))},cn=function(){var r=bn(),i=r.getOptions,a=i(),o=a.schema;return React.createElement(ve,{schema:o})},Po=function(r){return React.forwardRef(function(i,a){return React.createElement(qa.Consumer,null,function(o){return React.createElement(r,ir({formApi:o,ref:a},i))})})},Sa=function(r){return React.forwardRef(function(i,a){return React.createElement(Ti.Consumer,null,function(o){return React.createElement(r,ir({formState:o,ref:a},i))})})},jr=function(r,i){return{getValue:function(){return r.getValue(i)},setValue:function(o){return r.setValue(i,o)},getTouched:function(){return r.getTouched(i)},setTouched:function(o){return r.setTouched(i,o)},getError:function(){return r.getError(i)},setError:function(o){return r.setError(i,o)},reset:function(){return r.resetField(i)},validate:function(){return r.validateField(i)},exists:function(){return r.fieldExists(i)},getDirty:function(){return r.getDirty(i)},getPristine:function(){return r.getPristine(i)},getFieldState:function(){return r.getField(i).fieldApi.getFieldState()}}};function Jn(e){var r=bn(),i=useMemo(function(){return jr(r,e)},[e]);return i}function Cr(e){var r=Jn(e),i=bn(),a=React.useState(),o=ar(a,2),f=o[1],d=React.useCallback(function(){return f({})},[]);return Pn(function(){var v=function(g){g===e&&d()};return i.emitter.on("field",v),function(){i.emitter.removeListener("field",v)}},[]),Pn(function(){d()},[]),r.getFieldState()||{}}var Lf=function(r){return function(i){return function(a){var o=Cr(r);return React.createElement(i,ir({fieldState:o},a))}}},zi=function(r){return function(i){return function(a){var o=Jn(r);return React.createElement(i,ir({fieldApi:o},a))}}},no=function(r){var i=r.value,a=r.forwardedRef,o=r.children,f=sr(r,["value","forwardedRef","children"]);return React.createElement("option",ir({ref:a,value:i,key:i},f),o)},io=null,Wr=c(81105),Fn=c(26225),Rl=Object.defineProperty,cv=Object.defineProperties,dv=Object.getOwnPropertyDescriptors,$d=Object.getOwnPropertySymbols,pv=Object.prototype.hasOwnProperty,hv=Object.prototype.propertyIsEnumerable,Kd=(e,r,i)=>r in e?Rl(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Dl=(e,r)=>{for(var i in r||(r={}))pv.call(r,i)&&Kd(e,i,r[i]);if($d)for(var i of $d(r))hv.call(r,i)&&Kd(e,i,r[i]);return e},vv=(e,r)=>cv(e,dv(r)),Mf=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});const Yd="/oauth2-redirect.html";class ki{static authorizeImplicit({authorizationUrl:r,clientId:i,scopes:a,extraParams:o={},routingBasePath:f,redirectUri:d,successCallback:v,errorCallback:h}){const g=(0,Fn.p8)({date:new Date().toString()}),b=new URL(r),E=f==="/"?"":f,j=`${window.location.origin}${E}${Yd}`;b.searchParams.set("client_id",i),b.searchParams.set("redirect_uri",d||j),b.searchParams.set("response_type","token"),b.searchParams.set("state",g),Array.isArray(a)&&b.searchParams.set("scope",a.join(" "));for(const I in o)b.searchParams.set(I,o[I]);window.redirectOAuth2={flow:"implicit",data:{authorizationUrl:r,clientId:i,scopes:a},state:g,successCallback:I=>{v(I),ki.clearRedirectData("implicit")},errorCallback:I=>{h(I),ki.clearRedirectData("implicit")}},window.open(b.toString())}static authorizeAuthorizationCode({authorizationUrl:r,tokenUrl:i,clientId:a,clientSecret:o,codeVerifier:f,codeChallenge:d,scopes:v,extraParams:h={},extraHeaders:g={},routingBasePath:b,redirectUri:E,successCallback:j,errorCallback:I}){const W=new URL(r),Y=b==="/"?"":b,_=`${window.location.origin}${Y}${Yd}`,U=(0,Fn.p8)({date:new Date().toString()});W.searchParams.set("client_id",a),W.searchParams.set("redirect_uri",E||_),W.searchParams.set("response_type","code"),W.searchParams.set("state",U),Array.isArray(v)&&W.searchParams.set("scope",v.join(" ")),d&&(W.searchParams.set("code_challenge",d),W.searchParams.set("code_challenge_method","S256"));for(const G in h)W.searchParams.set(G,h[G]);window.redirectOAuth2={flow:"authorizationCode",data:{authorizationUrl:r,clientId:a,scopes:v},state:U,successCallback:G=>Mf(this,[G],function*({auth_code:ce}){try{const Ce=yield fetch(i,{method:"POST",headers:Dl({"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},g),body:Wr.stringify(Dl(vv(Dl({client_id:a,client_secret:o},f&&{code_verifier:f}),{code:ce,grant_type:"authorization_code",redirect_uri:E||_}),h))});yield Xd(Ce,j,I)}catch(Ce){I(Ce)}ki.clearRedirectData("authorizationCode")}),errorCallback:G=>{I(G),ki.clearRedirectData("authorizationCode")}},window.open(W.toString())}static clearRedirectData(r){window.redirectOAuth2={flow:r,data:{authorizationUrl:"",clientId:"",scopes:[]},state:"",successCallback:()=>{},errorCallback:()=>{}}}static authorizeClientCredentials(r){return Mf(this,arguments,function*({tokenUrl:i,clientId:a,clientSecret:o,scopes:f=[],extraParams:d={},extraHeaders:v={},successCallback:h,errorCallback:g}){try{const b=JSON.parse(JSON.stringify(Dl({client_id:a,client_secret:o,grant_type:"client_credentials",scope:Array.isArray(f)&&f.length?f.join(" "):void 0},d))),E=yield fetch(i,{method:"POST",headers:Dl({"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},v),body:Wr.stringify(b)});yield Xd(E,h,g)}catch(b){g(b)}})}}const l0=new ki;function Xd(e,r,i){return Mf(this,null,function*(){if(e.ok){const a=yield e.json();r(a)}else i(new Error((e.headers.get("Content-Type")||"").indexOf("json")>-1?JSON.stringify(yield e.json()):yield e.text()))})}function Jd(e){return Mf(this,null,function*(){return(0,Fn.rS)(yield(0,Fn.JQ)(e))})}var Bl=c(95709),Ye=c(9612),gv=c(39012),mv=c(76951),yv=Object.defineProperty,bv=Object.defineProperties,xv=Object.getOwnPropertyDescriptors,Nf=Object.getOwnPropertySymbols,Qd=Object.prototype.hasOwnProperty,Zd=Object.prototype.propertyIsEnumerable,qd=(e,r,i)=>r in e?yv(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Rf=(e,r)=>{for(var i in r||(r={}))Qd.call(r,i)&&qd(e,i,r[i]);if(Nf)for(var i of Nf(r))Zd.call(r,i)&&qd(e,i,r[i]);return e},Sv=(e,r)=>bv(e,xv(r)),wv=(e,r)=>{var i={};for(var a in e)Qd.call(e,a)&&r.indexOf(a)<0&&(i[a]=e[a]);if(e!=null&&Nf)for(var a of Nf(e))r.indexOf(a)<0&&Zd.call(e,a)&&(i[a]=e[a]);return i};const ep=e=>(0,At.iv)`
158
+ `+Y)}else b[0]=V+" "+b[0]}function a(b,E){if(b[0]=(E.useColors?"%c":"")+E.namespace,!!E.useColors){var V="color: "+E.color,I=0,W=0;b[0].replace(/%[a-zA-Z%]/g,function(Y){Y!=="%%"&&(I++,Y==="%c"&&(W=I))}),b.splice(W,0,V)}}var o=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function f(){var b;try{b=localStorage.getItem("debug")}catch{}return!b&&typeof process<"u"&&"env"in process&&(b={}.DEBUG),{namespaces:b||"",colors:o,useColors:!0,formatArgs:a}}function d(){return{namespaces:{}.DEBUG||"",colors:[6,2,3,4,5,1],useColors:!0,formatArgs:i}}function v(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,E=arguments.length>1?arguments[1]:void 0;return function(){for(var V=arguments.length,I=new Array(V),W=0;W<V;W++)I[W]=arguments[W];b&&I.unshift(b);var Y=E.namespaces.split(",").map(function(ce){return ce[ce.length-1]==="*"?new RegExp("^"+ce.slice(0,ce.length-1)+".*$"):new RegExp("^"+ce+"$")}),_=Y.some(function(ce){return ce.test(b)}),U={color:r(b,E.colors),namespace:b,useColors:E.useColors};if(!1)var G}}function h(b){return v(b,d())}function g(b){return v(b,f())}typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?e.exports=g:e.exports=h}),_i=Yn("informed:ObjMap "),ba=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return String.prototype.replace.call(r,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean)},Ei=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=arguments.length>2?arguments[2]:void 0,o=String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(f,d){return f!=null?f[d]:f},r);return o===void 0||o===r?a:o},ys=function(r){return".".concat(r).replace(/(.*)[.[].*/,"$1").replace(/\./,"")},wl=function(r){return r.replace(ys(r),"").replace(/\./,"")},Cl=function(r,i){var a=ys(i),o=wl(i),f=a?Ei(r,a):r;return!!(f&&Object.hasOwnProperty.call(f,o.replace(/\[(.*)\]/,"$1")))},hf=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=arguments.length>2?arguments[2]:void 0;String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(o,f,d,v){return d===v.length-1?(o[f]=a,o[f]):o[f]===void 0?(Number.isInteger(+v[d+1])?o[f]=[]:o[f]={},o[f]):(Number.isInteger(+v[d+1])&&!Array.isArray(o[f])&&(o[f]=[]),o[f])},r)},Za=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=!1;return String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(o,f,d,v){return o===void 0?o:(d===v.length-1&&(delete o[f],a=!0),o[f])},r),a},vf=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a;return String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(o,f,d,v){return o===void 0?o:(d===v.length-1&&Array.isArray(o)&&(a=o.splice(f,1)),o[f])},r),a},qc=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=Object.keys(r);return i.map(function(a){return r[a]})},bs=function(r){var i=ba(r);return Number.isInteger(+i[i.length-1])},Je=function(){function e(){fi(this,e)}return ma(e,null,[{key:"empty",value:function(i){return qc(i).length===0}},{key:"get",value:function(i,a){var o=Ei(i,a);return o}},{key:"has",value:function(i,a){return Cl(i,a)}},{key:"set",value:function(i,a,o){if(o!==void 0)_i("SETTING",a,o),hf(i,a,o);else if(bs(a)&&e.get(i,a)!==void 0){_i("Special case SETTING",a,"to undefined"),hf(i,a,void 0);var f=ba(a);f=f.slice(0,f.length-1),xs(i,f)}else!bs(a)&&e.get(i,a)!==void 0&&(_i("Special case REMOVING",a,"from object completley"),e.delete(i,a))}},{key:"delete",value:function(i,a){_i("DELETE",a),bs(a)?(_i("ARRAY",a),this.pullOut(i,a)):Za(i,a);var o=ba(a);o=o.slice(0,o.length-1),xs(i,o)}},{key:"pullOut",value:function(i,a){var o=ba(a),f=o[o.length-1];o=o.slice(0,o.length-1),_i("Pulling out:",o,"index",f);var d=Ei(i,o);_i("Array",d),Array.isArray(d)&&vf(d,f),xs(i,o)}}]),e}();function xs(e,r){if(r.length!==0){var i=Ei(e,r);(Array.isArray(i)?i.every(function(a){return a==null}):JSON.stringify(i)==="{}")&&Za(e,r),xs(e,r.slice(0,r.length-1))}}var yn=A.createContext({register:function(){},deregister:function(){},setValue:function(){},setTouched:function(){},setError:function(){},update:function(){},getField:function(){},expectRemoval:function(){},getInitialValue:function(){},getSavedValue:function(){}}),Ti=A.createContext({}),qa=A.createContext({getFullField:function(){},getValues:function(){},getOptions:function(){return{}},setInitialValue:function(){},getInitialValue:function(){},getDerrivedValue:function(){},getSavedValue:function(){},removeSavedState:function(){}}),Al=A.createContext(),gf=A.createContext(),Ss=A.createContext(),ws=A.createContext(),mf=A.createContext(),Ol=A.createContext(),El=A.createContext(),yf=A.createContext();function bn(){var e=(0,A.useContext)(qa);return e}function xn(e){var r=(0,A.useRef)(),i=(0,A.useRef)(!0),a=(0,A.useState)(e),o=ar(a,2),f=o[0],d=o[1];r.current=f;var v=function(b){r.current=b,i.current&&d(b)},h=function(){return r.current};return(0,A.useEffect)(function(){return function(){i.current=!1}},[]),[f,v,h]}var eo=function(r){return r.type&&r.type.name?r.type.name:r.displayName||r.name||"Component"},bf=function(r){var i={};if(r.inner){if(r.inner.length===0){Je.set(i,r.path,r.message);return}var a=Qa(r.inner),o;try{for(a.s();!(o=a.n()).done;){var f=o.value;Je.get(i,f.path)||Je.set(i,f.path,f.message)}}catch(d){a.e(d)}finally{a.f()}}return i},Tl=function(r,i){try{r.validateSync(i,{abortEarly:!1})}catch(o){var a=bf(o);return a}},xf=function(r){if(r.inner){if(r.inner.length===0)return;var i=r.inner[0];return i.message}},Sf=function(r,i){try{r.validateSync(i,{abortEarly:!1})}catch(a){return xf(a)}},wf=function(r,i){r(i);var a={};return r.errors&&r.errors.forEach(function(o){var f=o.message,d=o.dataPath,v=o.keyword,h=o.params,g=d;v==="required"&&(g="".concat(g,".").concat(h.missingProperty)),g=g.replace(".",""),Je.set(a,g,f)}),a},xa=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){var i=Math.random()*16|0,a=r=="x"?i:i&3|8;return a.toString(16)})},Cf=function(r,i){var a;return function(){for(var f=arguments.length,d=new Array(f),v=0;v<f;v++)d[v]=arguments[v];var h=function(){clearTimeout(a),r.apply(void 0,d)};clearTimeout(a),a=setTimeout(h,i)}},kl=function(r,i,a){var o=i["ui:control"],f=i["informed:props"],d=i["input:props"],v=i["ui:before"],h=i["ui:after"],g=i.oneOf,b=i.items,E=i.enum,V=i.title,I=i.minimum,W=i.maximum,Y=i.minLength,_=i.maxLength,U=i.pattern,G=i.type,ce=i.properties,Ce=xa();d&&d.id&&(Ce=d.id);var ge={componentType:o,field:a?"".concat(a,".").concat(r):r,type:G,uiBefore:v,uiAfter:h,properties:G==="object"?ce:void 0,items:G==="array"?b:void 0,props:ot(ot({label:V,id:Ce,min:I,max:W,minLength:Y,maxLength:_,pattern:U},f),d)};if(g){var ke=i.oneOf.map(function(ue){var Oe=ue["input:props"],Te=Oe===void 0?{}:Oe;return ot({value:ue.const,label:ue.title},Te)});ge.props.options=ke}if(E){var be=i.enum.map(function(ue){return{value:ue,label:ue}});ge.props.options=be}if(b&&b.oneOf){var me=b.oneOf.map(function(ue){var Oe=ue["input:props"],Te=Oe===void 0?{}:Oe;return ot({value:ue.const,label:ue.title},Te)});ge.props.options=me}return ge},Af=function(r,i,a){if(!r||i)return[];var o=r.properties,f=o===void 0?{}:o,d=r.allOf,v=r.propertyOrder,h=v===void 0?[]:v;if(Object.keys(f).length>0){var g=Object.keys(f).sort(function(b,E){var V=h.indexOf(b),I=h.indexOf(E);return(V>-1?V:h.length+1)-(I>-1?I:h.length+1)}).map(function(b){var E=f[b],V=kl(b,E,a);return V});return d&&g.push({componentType:"conditionals",allOf:d}),g}return[]},Pl=function(r){var i=r.replace(/\./g,".properties.").replace(/\[/g,".itmes[");return i="properties.".concat(i),i},Fl=function(r,i){if(typeof r=="string")return r.split("").map(function(a){return a==="#"?/\d/:a==="*"?/[\w]/:a});if(typeof r=="function")return r(i);if(Array.isArray(r))return r;throw new Error("Formatter must be string, array, or function")},Of=function(r,i){for(var a=0,o=-1,f=!0;f&&a<r.length;)r[a]==i[a]?o=a:f=!1,a=a+1;return o},Cs=function(r,i){if(!r)return{val:r,offset:0};var a="".concat(r),o=Fl(i,a),f=o.findIndex(function(_){return typeof _!="string"}),d=o.length-Fr(o).reverse().findIndex(function(_){return typeof _!="string"}),v=[],h=a.split(""),g=0,b=0,E=Of(o.slice(0,f),h.slice(0,f));E>-1&&(g=E+1,v=v.concat(o.slice(0,E+1)),b=E+1),E<0&&(v=v.concat(o.slice(0,f)),b=f);for(var V=b;V<o.length;V++){var I=o[V];if(g!=h.length){var W=h[g];if(typeof I=="function")v.push(I(W)),g=g+1;else{var Y=typeof I=="string"?I===W:I.test(W);Y&&typeof I=="string"?(v.push(I),g=g+1):!Y&&typeof I=="string"?g!=h.length&&v.push(I):Y&&typeof I!="string"?(v.push(W),g=g+1):!Y&&typeof I!="string"&&(g=g+1,V=V-1)}}else if(typeof I=="string"&&V>=d)v.push(I);else break}return{value:v.join(""),offset:a?v.length-a.length:0}},Ef=function(r,i){var a,o,f=new Intl.NumberFormat(r,i),d=new Intl.NumberFormat(r),v=(a=(o=d.formatToParts(.1).find(function(_){var U=_.type;return U==="decimal"}))===null||o===void 0?void 0:o.value)!==null&&a!==void 0?a:".";function h(_,U){return _ instanceof RegExp&&U instanceof RegExp&&_.source===U.source&&_.global===U.global&&_.ignoreCase===U.ignoreCase&&_.multiline===U.multiline}function g(_,U){for(var G=_.length;G--;)if(U(_[G]))return G;return-1}function b(_,U,G){var ce=Fr(_);return Array.isArray(G)?ce.splice.apply(ce,[U,0].concat(Fr(G))):ce.splice(U,0,G),ce}function E(_){return"".concat(_).replace(/\D/g,"")}function V(_){return"".concat(_).split(v).map(function(U){return E(U)}).join(".")}function I(_){if(typeof _=="number")return _;var U=parseFloat(V(_));return Number.isNaN(U)?void 0:U}function W(_){var U=V(_),G="".concat(U).split(".")[1],ce=f.formatToParts(Number(U));G==="0"&&ce.push({type:"decimal",value:v},{type:"fraction",value:G});var Ce=ce.reduce(function(be,me){var ue=me.type,Oe=me.value;return["decimal","fraction"].includes(ue)&&G==null?be:["integer","fraction"].includes(ue)?[].concat(Fr(be),Fr(Oe.split("").filter(function(Te,Me){return ue==="fraction"?Me<G.length:!0}).map(function(){return/\d/}))):ue==="currency"?[].concat(Fr(be),Fr(Oe.split(""))):[].concat(Fr(be),[Oe])},[]),ge=g(Ce,function(be){return h(be,/\d/)});Ce.indexOf(v)===-1&&"".concat(_).indexOf(v)!==-1&&(Ce=b(Ce,ge+1,[v,"[]"]),ge+=2);var ke=Ce.slice(ge+1).join("");return Ce=[].concat(Fr(Ce.slice(0,ge+1)),[ke]),Ce}var Y=function(U){if(U!=null)return I(U)};return{formatter:W,parser:Y}},To=Object.freeze({__proto__:null,getChildDisplayName:eo,yupToFormErrors:bf,validateYupSchema:Tl,yupToFormError:xf,validateYupField:Sf,validateAjvSchema:wf,uuidv4:xa,debounce:Cf,computeFieldFromProperty:kl,computeFieldsFromSchema:Af,getSchemaPathFromJsonPath:Pl,informedFormat:Cs,createIntlNumberFormatter:Ef}),Pn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?A.useLayoutEffect:A.useEffect,As=function(r){var i=r.value,a=r.inputRef,o=r.maintainCursor,f=o===void 0?!0:o,d=xn(0),v=ar(d,3),h=v[0],g=v[1],b=v[2],E=xn(0),V=ar(E,3),I=V[0],W=V[1],Y=V[2];return Pn(function(){if(a.current!=null&&b()){var _=b()+Y();Y()!=0&&f?a.current.setSelectionRange(_+1,_+1):f&&a.current.setSelectionRange(_,_)}},[i]),{setCursorOffset:W,setCursor:g,cursor:h,getCursor:b,cursorOffset:I}},ed=function(r,i){var a=(0,A.useRef)(!0),o=a.current;(0,A.useEffect)(function(){if(o)a.current=!1;else return r()},i)},un=Yn("informed:useField "),Tf=function(r,i,a,o,f){if(r!=null){if(f)return f(r);if(i)return i(r);if(a&&!o){var d=Cs(r,a);return d.value}return r}},Zt=function(r,i,a,o){if(i&&a)return i(r);if(o){var f=Cs(r,o);return f.value}return r},td=function(r,i,a){var o=a.required;if(r||i)return function(f,d){if(i)return Sf(i,f);if(r)return r(f,d)};if(o)return function(f){return Ll(f,o)}},Il=function(r){var i=r.fieldType,a=r.setValue,o=r.onChange,f=r.multiple,d=r.ref,v=function(g){return a(g)};return(i==="text"||i==="textArea"||i==="number")&&(v=function(g){return a(g.target.value,g)}),i==="select"&&(v=function(){var g=Array.from(d.current).filter(function(b){return b.selected}).map(function(b){return b.value});a(f?g:g[0]||"")}),i==="checkbox"&&(v=function(g){a(g.target.checked),o&&o(g)}),function(h){v(h)}},ko=function(r){var i=r.setTouched,a=r.onBlur;return function(o){i(!0),a&&a(o)}},Xn=function(r){var i=r.fieldType,a=r.maskedValue,o=r.multiple,f=r.value;switch(i){case"text":case"number":return!a&&a!==0?"":a;case"textArea":return a||"";case"select":return f||(o?[]:"");case"checkbox":return!!f;default:return f}},Os=function(r){switch(r){case"text":return r;case"number":return r;case"checkbox":return r;default:return}},Ll=function(r,i){if(i&&(r==null||r===""))return typeof i=="string"?i:"This field is required"};function to(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=e.field,a=e.validate,o=e.asyncValidate,f=e.validationSchema,d=e.mask,v=e.maskWithCursorOffset,h=e.format,g=e.parse,b=e.formatter,E=e.parser,V=e.initialValue,I=e.validateOnChange,W=e.validateOnBlur,Y=e.validateOnMount,_=e.asyncValidateOnBlur,U=e.maskOnBlur,G=e.allowEmptyString,ce=e.onValueChange,Ce=e.notify,ge=e.keepState,ke=e.maintainCursor,be=e.debug,me=e.shadow,ue=e.step,Oe=e.fieldType,Te=e.multiple,Me=e.onChange,Xe=e.onBlur,yt=e.formController,at=e.relevant,fr=e.required,Er=e.keepStateIfRelevant,cr=e.initialize,Tr=e.formatterDependencies,nr=Tr===void 0?[]:Tr,kt=sr(e,["field","validate","asyncValidate","validationSchema","mask","maskWithCursorOffset","format","parse","formatter","parser","initialValue","validateOnChange","validateOnBlur","validateOnMount","asyncValidateOnBlur","maskOnBlur","allowEmptyString","onValueChange","notify","keepState","maintainCursor","debug","shadow","step","fieldType","multiple","onChange","onBlur","formController","relevant","required","keepStateIfRelevant","initialize","formatterDependencies"]),Yt=(0,A.useState)(xa()),Ht=ar(Yt,1),_e=Ht[0],qe=(0,A.useContext)(yn),Tt=(0,A.useContext)(yf),Vt=Tt||Er,Ot=bn(),pn=(0,A.useRef)(),Ki=(0,A.useRef)(!0),qn=(0,A.useRef)(),Kr=(0,A.useRef)(!1),uo=function(){return!Kr.current},No=function(){return Kr.current};yt&&(qe=yt.updater,Ot=yt.getFormApi());var Nn=td(a,f,{required:fr}),Aa=(0,A.useState)(function(){return qe.getInitialValue(i)}),tc=ar(Aa,1),Fi=tc[0],Vs=qe.getSavedValue(i),Yi,Oa;(ge||Vt)&&Vs?(un("Setting field ".concat(zd,"'s kept state"),Vs),Yi=Vs.value,Oa=Vs.touched,Ot.removeSavedState(zd)):V!=null?Yi=V:Yi=Fi;var Ld=xn(Tf(Yi,d,b,E,cr)),Xi=ar(Ld,3),Yr=Xi[0],js=Xi[1],Jl=Xi[2],Md=xn(Y?Nn(Yr):void 0),ei=ar(Md,3),Ea=ei[0],Ro=ei[1],Ql=ei[2],Zl=xn(Oa),Mt=ar(Zl,3),ti=Mt[0],Wy=Mt[1],rv=Mt[2],Hy=(0,A.useState)(function(){return Zt(Yr,h,g,b)}),nv=ar(Hy,2),Nd=nv[0],Rd=nv[1],iv=(0,A.useRef)();iv.current=Nd;var av=(0,A.useRef)(V),Do=(0,A.useRef)(i),ov=(0,A.useRef)();av.current=V,Do.current=i;var Uy=(0,A.useRef)(null),Ji=A.useMemo(function(){return r||Uy},[]),Dd=As({value:Yr,inputRef:Ji,maintainCursor:!!ke}),Bd=Dd.getCursor,_y=Dd.setCursor,Vd=Dd.setCursorOffset,zy=function(){return!0},jd=function(Kt){var Xr=at||zy,Rn=Ot.getFullField(Do.current)||Do.current,Nt={path:Rn,parentPath:Rn.replace(/(.*)[.[].*/,"$1"),get:function(Dn,tu){return Je.get(Dn,tu)}};return Tt&&Tt.relevant?Xr(Kt,Nt)&&Tt.relevant(Kt,Nt):Xr(Kt,Nt)},Gy=xn(jd(Ot.getValues())),Wd=ar(Gy,3),rc=Wd[0],$y=Wd[1],sv=Wd[2],Ky=function(Kt){return Tt&&Tt.relevant?Tt.relevant(Kt):!0},Yy=function(){var Kt=jd(Ot.getValues()),Xr=sv();return Kt!=Xr&&$y(Kt),Kt};(0,A.useEffect)(function(){!rc&&!ge&&pn.current.reset()},[rc]);var hi=function(){return me?Ot.getDerrivedValue(i):Jl()},ql=function(Kt){var Xr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Rn=Xr.preventUpdate;ue&&Ot.getStep()<ue?(un("Setting ".concat(i,"'s error to undefined as we are not at that step")),Ro(void 0),qe.setError(_e,void 0,!Rn)):(un("Setting ".concat(i,"'s error to ").concat(Kt)),Ro(Kt),qe.setError(_e,Kt,!Rn))},Hd=function(Kt,Xr){var Rn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Nt=Kt;Kr.current=!0,un("Setting ".concat(i," to ").concat(Nt)),cr&&(Nt=cr(Nt));var Bo=Ot.getOptions(),Dn=Nt;if(Nt===""&&!G&&!Rn.allowEmptyString&&!Bo.allowEmptyStrings&&(Nt=void 0),(e.type==="number"||Oe==="number")&&Nt!==void 0&&(Nt=+Nt),Xr&&Xr.target&&Xr.target.selectionStart&&_y(Xr.target.selectionStart),d&&!U&&(Dn=d(Nt,Bd()),Nt=d(Nt,Bd())),v&&!U){var tu=v(Nt,Bd());Dn=tu.value,Nt=tu.value,Vd(tu.offset)}if(h&&g&&(Nt=g(Nt),Dn=h(Nt)),b){var lv=Cs(Nt,b);Vd(lv.offset),Dn=lv.value,Nt=Dn}E&&(Nt=Nt!=null?E(Nt):Nt),Nn&&I&&!Rn.initial&&(un("Validating after change ".concat(i," ").concat(Nt)),ql(Nn(Nt,Ot.getValues()))),js(Nt),Rd(Dn),ce&&ce(Nt),qe.setValue(_e,Nt,!Rn.preventUpdate)};ed(function(){pn.current.setValue(iv.current)},Fr(nr));var Ud=function(Kt,Xr){var Rn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Nt=Rn.preventUpdate;if(un("Field ".concat(i," has been touched")),Nn&&W&&!Xr&&Kt&&(un("Validating after blur ".concat(i," ").concat(hi())),ql(Nn(hi(),Ot.getValues()))),o&&_&&!Xr&&Kt&&(un("Validating async after blur ".concat(i," ").concat(hi())),o(hi(),Ot.getValues())),d&&U){var Bo=d(hi());js(Bo),Rd(Bo),ce&&ce(Bo),qe.setValue(_e,Bo,!Nt)}if(v&&U){var Dn=v(hi());Vd(Dn.offset),js(Dn.value),Rd(Dn.value),ce&&ce(Dn.value),qe.setValue(_e,Dn.value,!Nt)}Wy(Kt),qe.setTouched(_e,Kt,!Nt)},Xy=function(){var Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Xr=Kt.preventUpdate,Rn=Tf(av.current||qe.getInitialValue(Do.current),d,b,E,cr);Hd(Rn,null,{initial:!0,preventUpdate:Xr}),ql(Y?Nn(Rn):void 0,{preventUpdate:Xr}),Ud(void 0,!0,{preventUpdate:Xr}),Kr.current=!1},Jy=function(Kt){Nn&&(un("Field validating ".concat(i," ").concat(hi())),ql(Nn(hi(),Kt||Ot.getValues())))},Qy=function(Kt){o&&(un("Field async validating ".concat(i," ").concat(hi())),o(hi(),Kt||Ot.getValues()))},_d={setValue:Hd,setTouched:Ud,setError:ql,reset:Xy,validate:Jy,asyncValidate:Qy,getValue:hi,getTouched:rv,getError:Ql,getIsRelevant:sv,getDirty:No,getPristine:uo,getFieldState:function(){return{value:hi(),touched:rv(),dirty:No(),pristine:uo()}},relevant:jd,multistepRelevant:Ky,checkRelevant:Yy};pn.current=_d;var eu={value:Yr,error:Ea,touched:ti,maskedValue:Nd,isRelevant:rc,dirty:Kr.current,pristine:!Kr.current};me&&(eu={error:Ea,touched:ti}),un("Render",Ot.getFullField(i),eu),Pn(function(){var Ur=Ot.getFullField(Do.current);return un("Register",_e,Do.current),qn.current={field:Ur,fieldId:_e,fieldApi:_d,fieldState:eu,notify:Ce,keepState:ge,inMultistep:Vt,shadow:me},qe.register(_e,qn.current),function(){var Kt=Ot.getFullField(Do.current);un("Deregister",_e,Kt),qe.deregister(_e)}},[]),(0,A.useEffect)(function(){var Ur=Ot.getFullField(i);return Ki.current?Ki.current=!1:(un("Update",i,Vt),qn.current.field=Ur,qe.update(_e,qn.current,ov.current)),function(){ov.current=Ur}},[i]),Pn(function(){be&&Ji&&(Ji.current.style.border="5px solid orange",setTimeout(function(){Ji.current.style.borderWidth="2px",Ji.current.style.borderStyle="inset",Ji.current.style.borderColor="initial",Ji.current.style.borderImage="initial"},500))});var Zy=[].concat(Fr(Object.values(eu)),Fr(Object.values(e)),Fr(Object.values(kt))),qy=function(Kt){return(0,A.useMemo)(function(){return rc?Kt:null},Fr(Zy))},zd=i,e0=Il({fieldType:Oe,setValue:Hd,onChange:Me,multiple:Te,ref:Ji}),t0=ko({setTouched:Ud,onBlur:Xe}),r0=Xn({fieldType:Oe,maskedValue:Nd,multiple:Te,value:Yr}),n0=Os(Oe);return{fieldState:eu,fieldApi:_d,render:qy,ref:Ji,userProps:ot(ot({},kt),{},{multiple:Te,onChange:Me,onBlur:Xe,id:kt.id||_e}),informed:ot({name:zd,multiple:Te,onChange:e0,onBlur:t0,value:r0,ref:Ji,type:n0,id:kt.id||_e},kt)}}var ci=function(r){var i=A.forwardRef(function(a,o){var f=to(a,o),d=f.fieldState,v=f.fieldApi,h=f.render,g=f.ref,b=f.userProps;return h(A.createElement(r,ir({fieldApi:v,fieldState:d,field:a.field,forwardedRef:g,debug:a.debug,type:a.type},b)))});return i.displayName="asField(".concat(eo(r),")"),i},kf=Yn("informed:Text "),Ml=function(r){var i=r.fieldApi,a=r.fieldState,o=sr(r,["fieldApi","fieldState"]),f=a.maskedValue,d=i.setValue,v=i.setTouched,h=o.onChange,g=o.onBlur,b=o.field,E=o.initialValue,V=o.forwardedRef,I=o.debug,W=o.label,Y=o.title,_=o.id,U=sr(o,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","title","id"]);return kf("Render",b),Pn(function(){I&&V&&(V.current.style.background="red",setTimeout(function(){V.current.style.background="white"},500))}),A.createElement(A.Fragment,null,W?A.createElement("label",{htmlFor:_}," ",W," "):null,A.createElement("input",ir({},U,{id:_,name:b,ref:V,value:!f&&f!==0?"":f,onChange:function(ce){d(ce.target.value,ce),h&&h(ce)},onBlur:function(ce){v(!0),g&&g(ce)}})))},Pf=ci(Ml),rd=function(r){var i=r.fieldApi,a=r.fieldState,o=sr(r,["fieldApi","fieldState"]),f=a.maskedValue,d=i.setValue,v=i.setTouched,h=o.onChange,g=o.onBlur,b=o.field,E=o.initialValue,V=o.forwardedRef,I=o.debug,W=o.label,Y=o.id,_=sr(o,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","id"]);return Pn(function(){I&&V&&(V.current.style.background="red",setTimeout(function(){V.current.style.background="white"},500))}),A.createElement(A.Fragment,null,W?A.createElement("label",{htmlFor:Y}," ",W," "):null,A.createElement("textarea",ir({},_,{id:Y,name:b,ref:V,value:f||"",onChange:function(G){d(G.target.value,G),h&&h(G)},onBlur:function(G){v(!0),g&&g(G)}})))},Nl=ci(rd),Ff=Yn("informed:Select "),Ut=function(r){var i=r.fieldApi,a=r.fieldState,o=sr(r,["fieldApi","fieldState"]),f=a.value,d=i.setTouched,v=o.onChange,h=o.onBlur,g=o.field,b=o.initialValue,E=o.options,V=o.children,I=o.forwardedRef,W=o.debug,Y=o.multiple,_=o.label,U=o.id,G=sr(o,["onChange","onBlur","field","initialValue","options","children","forwardedRef","debug","multiple","label","id"]),ce=(0,A.useRef)(),Ce=function(ke){var be=Array.from((I||ce).current).filter(function(me){return me.selected}).map(function(me){return me.value});i.setValue(Y?be:be[0]||""),v&&ke&&v(ke)};return Pn(function(){W&&I&&(I.current.style.background="red",setTimeout(function(){I.current.style.background="white"},500))}),Ff("Render",g,f),A.createElement(A.Fragment,null,_?A.createElement("label",{htmlFor:U}," ",_," "):null,A.createElement("select",ir({},G,{id:U,multiple:Y,name:g,ref:I||ce,value:f||(Y?[]:""),onChange:Ce,onBlur:function(ke){d(!0),h&&h(ke)}}),E?E.map(function(ge){return A.createElement("option",{key:ge.value,value:ge.value,disabled:ge.disabled},ge.label)}):V))},If=ci(Ut),nd=function(r){var i=r.fieldApi,a=r.fieldState,o=sr(r,["fieldApi","fieldState"]),f=a.value,d=i.setValue,v=i.setTouched,h=o.onChange,g=o.onBlur,b=o.field,E=o.initialValue,V=o.debug,I=o.forwardedRef,W=o.id,Y=o.label,_=sr(o,["onChange","onBlur","field","initialValue","debug","forwardedRef","id","label"]);return A.createElement(A.Fragment,null,Y?A.createElement("label",{htmlFor:W}," ",Y," "):null,A.createElement("input",ir({},_,{id:W,name:b,ref:I,checked:!!f,onChange:function(G){d(G.target.checked),h&&h(G)},onBlur:function(G){v(!0),g&&g(G)},type:"checkbox"})))},ro=ci(nd),id=function(r){return A.forwardRef(function(i,a){return A.createElement(Al.Consumer,null,function(o){var f=o.radioGroupApi,d=o.radioGroupState;return A.createElement(r,ir({radioGroupApi:f,radioGroupState:d,ref:a},i))})})},Es=function(r){var i=r.radioGroupApi,a=r.radioGroupState,o=sr(r,["radioGroupApi","radioGroupState"]),f=a.value,d=i.setValue,v=i.setTouched,h=i.onChange,g=i.onBlur,b=o.value,E=o.onChange,V=o.onBlur,I=o.field,W=o.initialValue,Y=o.forwardedRef,_=sr(o,["value","onChange","onBlur","field","initialValue","forwardedRef"]);return A.createElement("input",ir({},_,{name:I,ref:Y,value:b,checked:f===b,onChange:function(G){G.target.checked&&(d(b),E&&E(G),h&&h(G))},onBlur:function(G){v(!0),V&&V(G),g&&g(G)},type:"radio"}))},ad=id(Es),lr=function(e){Kc(i,e);var r=df(i);function i(){return fi(this,i),r.apply(this,arguments)}return ma(i,[{key:"render",value:function(){var o=this.props,f=o.options,d=o.children;return A.createElement(Al.Provider,{value:this.groupContext},f?f.map(function(v){return A.createElement("label",{key:v.value},v.label," ",A.createElement(ad,{value:v.value}))}):d)}},{key:"groupContext",get:function(){return{radioGroupApi:ot(ot({},this.props.fieldApi),{},{onChange:this.props.onChange,onBlur:this.props.onBlur}),radioGroupState:this.props.fieldState}}}]),i}(A.Component),od=ci(lr);function sd(){return(0,A.useContext)(Ss)}var ld=function(){var r=sd(),i=r.add;return A.createElement("button",{onClick:function(){i()},type:"button"},"Add")};function Ts(){return(0,A.useContext)(ws)}var t=function(){var r=Ts(),i=r.remove;return A.createElement("button",{onClick:function(){i()},type:"button"},"Remove")},n=Yn("informed:useArrayField "),l=function(r){var i=r.field,a=r.initialValue,o=r.validate,f=r.arrayFieldApiRef,d=sr(r,["field","initialValue","validate","arrayFieldApiRef"]),v=bn(),h=(0,A.useState)(new Map),g=ar(h,1),b=g[0],E=(0,A.useContext)(yn),V=v.getFullField(i),I=E.getInitialValue(i)||a||[],W=v.getSavedValue(V)&&v.getSavedValue(V).value,Y=xn(W||I),_=ar(Y,3),U=_[0],G=_[1],ce=_[2],Ce=U?U.map(function(){return xa()}):[],ge=xn(Ce),ke=ar(ge,3),be=ke[0],me=ke[1],ue=ke[2],Oe=(0,A.useMemo)(function(){return function(Ht,_e){var qe=ue()==null?0:ue().length;return o?o(Ht,qe,_e):void 0}}),Te=to(ot({field:i,validate:o?Oe:void 0,shadow:!0},d)),Me=Te.fieldApi;Pn(function(){var Ht=function(qe){qe!==V&&(n("".concat(V," changed")),RegExp("".concat(V,"\\[[0-9]+\\]")).test(qe)&&Me.validate())};return v.emitter.on("value",Ht),function(){v.emitter.removeListener("value",Ht)}},[i]);var Xe=function(_e){n("EXPECTING REMOVAL OF","".concat(i,"[").concat(_e,"] and ").concat(i,"[").concat(be.length-1,"]")),E.expectRemoval("".concat(i,"[").concat(_e,"]")),E.expectRemoval("".concat(i,"[").concat(be.length-1,"]"));var qe=be.slice(0,_e).concat(be.slice(_e+1,be.length));me(qe);var Tt=ce(),Vt=Tt.slice(0,_e).concat(Tt.slice(_e+1,Tt.length));G(Vt)},yt=function(_e,qe){n("Swapping","".concat(i,"[").concat(_e,"] and ").concat(i,"[").concat(qe,"]"));var Tt=Fr(be);be[_e]&&be[qe]?(Tt[_e]=be[qe],Tt[qe]=be[_e]):console.warn("Attempted to swap ".concat(_e," with ").concat(qe," but one of them does not exist :(")),me(Tt)},at=function(){be.push(xa()),me(Fr(be))},fr=function(_e){be.push(xa()),me(Fr(be));var qe=Fr(ce());qe[be.length-1]=_e,G(qe)},Er=function(){var _e=E.getInitialValue(i)||a||[];G(_e);var qe=_e?_e.map(function(){return xa()}):[];me(qe)},cr=be.map(function(Ht,_e){var qe={remove:function(){return Xe(_e)}},Tt={initialValue:U&&U[_e],key:Ht,field:"".concat(i,"[").concat(_e,"]"),index:_e};return ot(ot({arrayFieldItemApi:qe,arrayFieldItemState:Tt},qe),Tt)}),Tr={add:at,swap:yt,addWithInitialValue:fr,reset:Er};f&&(f.current=Tr);var nr={fields:cr,field:i},kt=ot(ot({},E),{},{register:function(_e,qe){b.set(_e,qe);for(var Tt=arguments.length,Vt=new Array(Tt>2?Tt-2:0),Ot=2;Ot<Tt;Ot++)Vt[Ot-2]=arguments[Ot];E.register.apply(E,[_e,qe].concat(Vt))},deregister:function(_e){b.delete(_e);for(var qe=arguments.length,Tt=new Array(qe>1?qe-1:0),Vt=1;Vt<qe;Vt++)Tt[Vt-1]=arguments[Vt];E.deregister.apply(E,[_e].concat(Tt))},getInitialValue:function(_e){if(RegExp("".concat(V,"\\[[0-9]+\\]")).test(_e)){var qe=_e.replace(i,""),Tt=Je.get(ce(),qe);return n("Resetting ".concat(qe," to ").concat(Tt)),Tt}return E.getInitialValue(_e)}}),Yt=function(_e){return A.createElement(yn.Provider,{value:kt},A.createElement(Ss.Provider,{value:Tr},A.createElement(gf.Provider,{value:nr},_e)))};return{render:Yt,add:at,swap:yt,addWithInitialValue:fr,fields:cr,arrayFieldState:nr,arrayFieldApi:Tr,field:i}},s=function(r,i){return ot(ot({},i),{},{getValue:function(o){return i.getValue("".concat(r,".").concat(o))},getTouched:function(o){return i.getTouched("".concat(r,".").concat(o))},getError:function(o){return i.getError("".concat(r,".").concat(o))},setValue:function(o,f){return i.setValue("".concat(r,".").concat(o),f)},setTouched:function(o,f){return i.setTouched("".concat(r,".").concat(o),f)},setError:function(o,f){return i.setError("".concat(r,".").concat(o),f)},getInitialValue:function(o){return i.getInitialValue("".concat(r,".").concat(o))},getSavedValue:function(o){return i.getSavedValue("".concat(r,".").concat(o))},getFullField:function(o){return"".concat(i.getFullField(r),".").concat(o)}})};function u(e){var r=bn(),i=(0,A.useMemo)(function(){return s(e,r)},[e]);return i}function p(){var e=(0,A.useContext)(Ti);return e}var y=function(r){var i=r.when,a=r.children,o=p(),f=i(o);return f?a:null},x=function(r){var i=r.relevant,a=r.field,o=sr(r,["relevant","field"]),f=bn();if(i){var d=f.getFullField(a),v={path:d,parentPath:d.replace(/(.*)[.[].*/,"$1"),get:function(b,E){return Je.get(b,E)}},h=function(b){var E=b.values;return i(E,v)};return A.createElement(y,{when:h},A.createElement(C,ir({field:a},o)))}else return A.createElement(C,ir({field:a},o))},C=function(r){var i=r.children,a=sr(r,["children"]),o=l(a),f=o.render,d=o.arrayFieldState,v=o.arrayFieldApi,h=o.field;return f(typeof i=="function"?i(ot(ot({field:h,arrayFieldApi:v,arrayFieldState:d},v),d)):i)},P=function(r){var i=r.arrayFieldItemState,a=r.arrayFieldItemApi,o=r.children,f=(0,A.useContext)(yn),d=bn(),v=(0,A.useState)(0),h=ar(v,2),g=h[0],b=h[1],E=(0,A.useState)(new Map),V=ar(E,1),I=V[0],W=i.field,Y=u(W),_=function(){var be=d.getState(),me=be.values,ue=be.errors,Oe=be.touched,Te={values:Je.get(me,W),errors:Je.get(ue,W),touched:Je.get(Oe,W)};return Te};(0,A.useEffect)(function(){var ke=function(me){var ue=me.slice(0,me.lastIndexOf("[")!=-1?me.lastIndexOf("]")+1:me.length);ue===W&&b(Math.random())};return d.emitter.on("value",ke),function(){d.emitter.removeListener("value",ke)}},[W]);var U=function(){I.forEach(function(be){be.fieldApi.reset()})},G=_(),ce=ot(ot({},f),{},{register:function(be,me,ue){I.set(be,me),f.register(be,me,ue)},deregister:function(be){I.delete(be);for(var me=arguments.length,ue=new Array(me>1?me-1:0),Oe=1;Oe<me;Oe++)ue[Oe-1]=arguments[Oe];f.deregister.apply(f,[be].concat(ue))}}),Ce=ot(ot(ot({},a),Y),{},{reset:U}),ge=ot(ot({},i),G);return typeof o=="function"?A.createElement(yn.Provider,{value:ce},A.createElement(ws.Provider,{value:Ce},A.createElement(mf.Provider,{value:ge},o(ot(ot({arrayFieldItemApi:Ce,arrayFieldItemState:ge},Ce),ge))))):A.createElement(yn.Provider,{value:ce},A.createElement(ws.Provider,{value:Ce},A.createElement(mf.Provider,{value:ge},o)))};x.Items=function(e){var r=e.children,i=(0,A.useContext)(gf),a=i.fields;return a.map(function(o){var f=o.arrayFieldItemState,d=o.arrayFieldItemApi,v=f.key;return A.createElement(P,{key:v,arrayFieldItemApi:d,arrayFieldItemState:f},r)})};var K=function(r){var i=r.components,a=(0,A.useContext)(yn),o=a.fieldMap;return i?i.map(function(f,d){var v=f["ui:control"],h=o[v];return A.createElement(h,{key:"ui-comp-".concat(d)})}):null},ne=Yn("informed:FormFields "),ve=function e(r){var i=r.schema,a=r.prefix,o=r.onlyValidateSchema,f=(0,A.useContext)(yn),d=f.fieldMap,v=(0,A.useMemo)(function(){var h=Af(i,o,a),g=h.map(function(b,E){var V=b.field,I=b.props,W=b.type,Y=b.properties,_=b.items,U=b.componentType,G=b.uiBefore,ce=b.uiAfter,Ce=b.allOf,ge=d[U];return ne("Rendering Field",V,b),!ge&&W==="object"&&Y?A.createElement(e,{schema:b,prefix:V,key:"ScheamField-".concat(E)}):!ge&&W==="array"&&_?A.createElement(de,ir({key:"ScheamField-".concat(E),field:V,items:_,uiBefore:G,uiAfter:ce},I)):ge&&U==="array"&&_&&W==="array"?A.createElement(ge,ir({key:"ScheamField-".concat(E),field:V,items:_,uiBefore:G,uiAfter:ce},I)):U==="conditionals"?Ce.map(function(ke){var be=ke.then,me=ke.if.properties,ue=function(Te){var Me=Te.values;return Object.keys(me).every(function(Xe){var yt=me[Xe];return Me[Xe]===yt.const})};return A.createElement(y,{key:"ScheamField-".concat(E),when:ue},A.createElement(e,{schema:be}))}):ge?A.createElement(ge,ir({key:"ScheamField-".concat(E),field:V},I)):null});return g},[i,a]);return v},de=function(r){var i=r.field,a=r.items,o=r.uiBefore,f=r.uiAfter,d=sr(r,["field","items","uiBefore","uiAfter"]);return A.createElement(x,ir({field:i},d),A.createElement(K,{components:o}),A.createElement(x.Items,null,function(v){var h=v.field;return A.createElement(A.Fragment,null,A.createElement(K,{components:a["ui:before"]}),A.createElement(ve,{schema:a,prefix:h}),A.createElement(K,{components:a["ui:after"]}))}),A.createElement(K,{components:f}))},Ee={select:If,input:Pf,textarea:Nl,checkbox:ro,radio:od,add:ld,remove:t,array:de},Ae=Yn("informed:Controller "),Ie=function(r,i){var a=Object.keys(i).find(function(f){return r.includes(f)});if(a){var o=r.slice(0,a.length);return o===a}},Le=function(){},De=function(){function e(){var r=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};fi(this,e),this.options=i,this.subscriptions=new Map;var a=i.ajv,o=i.schema,f=i.fieldMap;this.ajv=a?new a({allErrors:!0}):null,this.ajvValidate=a?this.ajv.compile(o):null,this.fieldMap=f||Ee,this.fieldsById=new Map,this.fieldsByName={get:function(v){var h;return r.fieldsById.forEach(function(g){g&&g.field===v&&(h=g)}),h}},this.onScreen={},this.expectedRemovals={},this.pulledOut={},this.savedValues={},this.state={pristine:!0,dirty:!1,invalid:!1,submits:0,step:0,validating:0,submitting:!1,values:{},errors:{},touched:{}},this.dummyField={fieldApi:{setValue:Le,setTouched:Le,setError:Le,reset:Le,validate:Le,getValue:Le,getTouched:Le,getError:Le,getFieldState:Le,checkRelevant:Le,getPristine:Le,getDirty:Le}},this.deregister=this.deregister.bind(this),this.register=this.register.bind(this),this.getValue=this.getValue.bind(this),this.getTouched=this.getTouched.bind(this),this.getError=this.getError.bind(this),this.getErrors=this.getErrors.bind(this),this.setValue=this.setValue.bind(this),this.getValues=this.getValues.bind(this),this.getStep=this.getStep.bind(this),this.setStep=this.setStep.bind(this),this.back=this.back.bind(this),this.next=this.next.bind(this),this.setCurrent=this.setCurrent.bind(this),this.setTouched=this.setTouched.bind(this),this.setError=this.setError.bind(this),this.setFormError=this.setFormError.bind(this),this.submitForm=this.submitForm.bind(this),this.reset=this.reset.bind(this),this.update=this.update.bind(this),this.validate=this.validate.bind(this),this.screenValid=this.screenValid.bind(this),this.keyDown=this.keyDown.bind(this),this.getField=this.getField.bind(this),this.getInitialValue=this.getInitialValue.bind(this),this.setInitialValue=this.setInitialValue.bind(this),this.getOptions=this.getOptions.bind(this),this.getFormState=this.getFormState.bind(this),this.expectRemoval=this.expectRemoval.bind(this),this.getSavedValue=this.getSavedValue.bind(this),this.removeSavedState=this.removeSavedState.bind(this),this.getDerrivedValue=this.getDerrivedValue.bind(this),this.setValues=this.setValues.bind(this),this.resetField=this.resetField.bind(this),this.fieldExists=this.fieldExists.bind(this),this.validateField=this.validateField.bind(this),this.notify=this.notify.bind(this),this.validating=this.validating.bind(this),this.validated=this.validated.bind(this),this.getDirty=this.getDirty.bind(this),this.getPristine=this.getPristine.bind(this),this.on=this.on.bind(this),this.emit=this.emit.bind(this),this.removeListener=this.removeListener.bind(this),this.updater={register:this.register,deregister:this.deregister,getField:this.getField,update:this.update,fieldMap:this.fieldMap,setValue:function(v,h){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,b=r.fieldsById.get(v);b.shadow||Je.set(r.state.values,b.field,b.fieldApi.getValue()),b.fieldApi.relevant(r.state.values)||Je.delete(r.state.values,b.field),r.fieldsById.forEach(function(E){var V=E.fieldApi.checkRelevant();(!E.fieldApi.multistepRelevant(r.state.values)||!V&&!E.keepState)&&(Je.delete(r.state.values,E.field),Je.delete(r.state.touched,E.field),Je.delete(r.state.errors,E.field))}),g&&(r.emit("change"),r.emit("field",b.field),r.emit("value",b.field,h))},setTouched:function(v,h){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,b=r.fieldsById.get(v);!b.shadow&&b.fieldApi.getIsRelevant()&&Je.set(r.state.touched,b.field,b.fieldApi.getTouched()),b.shadow&&b.fieldApi.getError()!=null&&b.fieldApi.relevant(r.state.values)&&Je.set(r.state.touched,b.field,b.fieldApi.getTouched()),g&&(r.emit("change"),r.emit("field",b.field))},setError:function(v,h){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,b=r.fieldsById.get(v);!b.shadow&&b.fieldApi.getIsRelevant()&&Je.set(r.state.errors,b.field,b.fieldApi.getError());var E=Je.get(r.state.errors,b.field);(b.shadow&&b.fieldApi.getError()!=null&&b.fieldApi.relevant(r.state.values)||b.shadow&&b.fieldApi.getError()===void 0&&b.fieldApi.relevant(r.state.values)&&typeof E=="string")&&Je.set(r.state.errors,b.field,b.fieldApi.getError()),g&&(r.emit("change"),r.emit("field",b.field))},expectRemoval:this.expectRemoval,getInitialValue:this.getInitialValue,getSavedValue:this.getSavedValue},this.formApi={setValue:this.setValue,setTouched:this.setTouched,setError:this.setError,setFormError:this.setFormError,setValues:this.setValues,setInitialValue:this.setInitialValue,getValue:this.getValue,getTouched:this.getTouched,getError:this.getError,reset:this.reset,submitForm:this.submitForm,getState:this.getFormState,getValues:this.getValues,getFullField:this.getFullField,fieldExists:this.fieldExists,getInitialValue:this.getInitialValue,validate:this.validate,validateField:this.validateField,screenValid:this.screenValid,resetField:this.resetField,getOptions:this.getOptions,emitter:this,getSavedValue:this.getSavedValue,removeSavedState:this.removeSavedState,getDerrivedValue:this.getDerrivedValue,getStep:this.getStep,setStep:this.setStep,next:this.next,back:this.back,setCurrent:this.setCurrent,validated:this.validated,validating:this.validating,getDirty:this.getDirty,getPristine:this.getPristine,getField:this.getField},this.on("value",function(d){delete r.state.error,r.notify(d)})}return ma(e,[{key:"emit",value:function(i){for(var a=arguments.length,o=new Array(a>1?a-1:0),f=1;f<a;f++)o[f-1]=arguments[f];var d=this.subscriptions.get(i);d&&d.forEach(function(v){return v.apply(void 0,o)})}},{key:"on",value:function(i,a){this.subscriptions.get(i)||this.subscriptions.set(i,new Set);var o=this.subscriptions.get(i);o.add(a)}},{key:"removeListener",value:function(i,a){var o=this.subscriptions.get(i);o.delete(a)}},{key:"setOptions",value:function(i){this.options=i}},{key:"setValue",value:function(i,a,o){this.getField(i).fieldApi.setValue(a,null,ot({allowEmptyString:this.options.allowEmptyStrings},o))}},{key:"setTouched",value:function(i,a){this.getField(i).fieldApi.setTouched(a)}},{key:"setError",value:function(i,a){this.getField(i).fieldApi.setError(a)}},{key:"setFormError",value:function(i){this.state.error=i,this.emit("change")}},{key:"validating",value:function(){this.state.validating=this.state.validating+1,this.emit("change")}},{key:"validated",value:function(i,a){if(this.state.validating=this.state.validating-1,this.getError(i)||this.setError(i,a),this.state.validating>0){this.emit("change");return}this.state.submitting&&(this.valid()?(Ae("Submit",this.state),this.emit("submit")):(Ae("Submit",this.state),this.emit("failure")),this.state.submitting=!1),this.emit("change")}},{key:"setStep",value:function(i){this.state.step=i,this.emit("change")}},{key:"setCurrent",value:function(i){this.state.Current=i,this.emit("change")}},{key:"back",value:function(i){this.state.step=this.state.step-1,this.state.Current=i,this.emit("change")}},{key:"next",value:function(i){this.validate(),this.screenValid()&&(this.state.step=this.state.step+1,this.state.Current=i),this.emit("change")}},{key:"setInitialValue",value:function(i,a){Je.set(this.options.initialValues,i,a)}},{key:"getFormState",value:function(){return Ae("Returning form state"),ot(ot({},this.state),{},{pristine:this.pristine(),dirty:this.dirty(),invalid:this.invalid()})}},{key:"getFormApi",value:function(){return this.formApi}},{key:"getDerrivedValue",value:function(i){var a=this.getValues();return Je.get(a,i)}},{key:"getValue",value:function(i){var a=this.getField(i).fieldApi.getValue();return Ae("Getting value for",i,a),a}},{key:"getTouched",value:function(i){var a=this.getField(i).fieldApi.getTouched();return Ae("Getting touched for",i,a),a}},{key:"getError",value:function(i){var a=this.getField(i).fieldApi.getError();return Ae("Getting error for",i,a),a}},{key:"getDirty",value:function(i){var a=this.getField(i).fieldApi.getDirty();return Ae("Getting dirty for",i,a),a}},{key:"getPristine",value:function(i){var a=this.getField(i).fieldApi.getPristine();return Ae("Getting pristine for",i,a),a}},{key:"getValues",value:function(){return Ae("Gettings values"),this.state.values}},{key:"getAllTouched",value:function(){return Ae("Gettings touched"),this.state.touched}},{key:"getErrors",value:function(){return Ae("Gettings errors"),this.state.errors}},{key:"getOptions",value:function(){return this.options}},{key:"getStep",value:function(){return this.state.step}},{key:"getSavedValue",value:function(i){var a=this.fieldsByName.get(i);return a&&a.shadow?Je.get(this.savedValues,"shadow-".concat(i)):Je.get(this.savedValues,i)}},{key:"removeSavedState",value:function(i){var a=this.fieldsByName.get(i);return a&&a.shadow?Je.delete(this.savedValues,"shadow-".concat(i)):Je.delete(this.savedValues,i)}},{key:"getFullField",value:function(i){return i}},{key:"getInitialValue",value:function(i){return Je.get(this.options.initialValues,i)}},{key:"getField",value:function(i){Ae("Getting Field",i);var a=this.fieldsByName.get(i);return a||(console.warn("Attempting to get field ".concat(i," but it does not exist")),this.dummyField)}},{key:"notify",value:function(i){var a=this,o=this.getField(i);o&&o.notify&&o.notify.forEach(function(f){var d=".".concat(i),v="".concat(d.replace(/(.*)[.[].*/,"$1"),".").concat(f).slice(1),h=a.getField(v);h&&(Ae("Notifying",h.field),h.fieldApi.validate(),h.fieldApi.checkRelevant())})}},{key:"validateField",value:function(i){this.getField(i).fieldApi.validate()}},{key:"resetField",value:function(i){this.getField(i).fieldApi.reset()}},{key:"fieldExists",value:function(i){return this.fieldsByName.get(i)!=null}},{key:"valid",value:function(){var i=this.getErrors();return!!(Je.empty(i)&&!this.state.error)}},{key:"screenValid",value:function(){var i=Object.entries(this.onScreen).some(function(a){var o=ar(a,2),f=o[1];return f.fieldApi.getError()});return!i}},{key:"invalid",value:function(){var i=this.getErrors();return!!(!Je.empty(i)||this.state.error)}},{key:"pristine",value:function(){var i=!0;return this.fieldsById.forEach(function(a){a.fieldApi.getPristine()||(i=!1)}),i}},{key:"dirty",value:function(){return!this.pristine()}},{key:"reset",value:function(){Ae("Resetting"),this.fieldsById.forEach(function(i){i.fieldApi.reset({preventUpdate:!0})}),this.emit("reset"),this.emit("change")}},{key:"setValues",value:function(i){Ae("Setting values"),this.fieldsById.forEach(function(a){var o=Je.get(i,a.field);o!==void 0&&a.fieldApi.setValue(o,null,{preventUpdate:!0})}),this.emit("change")}},{key:"validate",value:function(){var i=this;Ae("Validating all fields");var a=this.getValues();if(this.options.validationSchema){var o=Tl(this.options.validationSchema,a);this.fieldsById.forEach(function(h){if(Je.has(o,h.field)){var g=Je.get(o,h.field);i.setError(h.field,g)}else i.setError(h.field,void 0)})}if(this.options.schema&&this.options.ajv){var f=wf(this.ajvValidate,a);this.fieldsById.forEach(function(h){if(Je.has(f,h.field)){var g=Je.get(f,h.field);i.setError(h.field,g)}else i.setError(h.field,void 0)})}if(this.fieldsById.forEach(function(h){h.fieldApi.validate(a),h.fieldApi.setTouched(!0,!0)}),this.options.validate){var d=this.options.validate(a);this.setFormError(d)}if(this.options.validateFields){var v=this.options.validateFields(a);this.fieldsById.forEach(function(h){if(Je.has(v,h.field)){var g=Je.get(v,h.field);i.setError(h.field,g)}})}}},{key:"asyncValidate",value:function(){Ae("Async Validating all fields");var i=this.getValues();this.fieldsById.forEach(function(a){a.fieldApi.asyncValidate(i)})}},{key:"keyDown",value:function(i){if(i.keyCode==13&&this.options.preventEnter)return i.preventDefault(i),!1}},{key:"submitForm",value:function(i){this.state.submits=this.state.submits+1,this.state.submitting=!0,!this.options.dontPreventDefault&&i&&i.preventDefault(i),this.validate(),this.emit("change"),this.asyncValidate(),!(this.state.validating>0)&&(this.valid()?(Ae("Submit",this.state),this.emit("submit")):(Ae("Submit",this.state),this.emit("failure")),this.state.submitting=!1,this.emit("change"))}},{key:"mount",value:function(){var i=this;this.fieldsById.forEach(function(a){i.emit("field",a.field)})}},{key:"register",value:function(i,a,o){var f=a.field,d=a.state;Ae("Register ID:",i,"Name:",f,d,"Initial",o);var v=f.slice(0,f.lastIndexOf("[")!=-1?f.lastIndexOf("]")+1:f.length),h;this.fieldsById.forEach(function(g,b){g&&g.field===f&&(h=b)}),h&&(a.keepState||a.inMultistep)?(Ae("Already Registered",f),this.fieldsById.delete(h)):h&&(!a.keepState||!a.inMultistep)&&console.warn("Check to make sure you have not registered two fields with the fieldName",f),Ae("Fields Registered",this.fieldsById.size),this.onScreen[i]=a,this.fieldsById.set(i,a),Ae("clearing expected removal",v),delete this.expectedRemovals[v],delete this.pulledOut[v],!a.shadow&&(this.updater.setValue(i,a.fieldApi.getValue(),!1),this.updater.setError(i,a.fieldApi.getError(),!1),this.updater.setTouched(i,a.fieldApi.getTouched(),!1),o||this.emit("change"),this.emit("field",f))}},{key:"deregister",value:function(i){var a=this.fieldsById.get(i),o=a.field;Ae("Deregister",i,o),delete this.onScreen[i];var f=Ie(o,this.expectedRemovals),d=o.slice(0,o.lastIndexOf("[")!=-1?o.lastIndexOf("]")+1:o.length);(a.keepState||a.inMultistep)&&!f&&(Ae("Saving field ".concat(o,"'s value"),a.fieldApi.getFieldState()),a.shadow?Je.set(this.savedValues,"shadow-".concat(o),a.fieldApi.getFieldState()):Je.set(this.savedValues,o,a.fieldApi.getFieldState())),(f||!a.keepState&&!a.inMultistep||!a.fieldApi.getIsRelevant()&&!a.keepState)&&(Ae("Removing field",o),this.fieldsById.delete(i),f||(Je.delete(this.state.values,o),Je.delete(this.state.touched,o),Je.delete(this.state.errors,o),a.shadow?Je.delete(this.savedValues,"shadow-".concat(o)):Je.delete(this.savedValues,o)),f&&this.pulledOut[d]&&(Ae("Pulling out",o,"with magic value",d),Je.pullOut(this.state.values,d),Je.pullOut(this.state.touched,d),Je.pullOut(this.state.errors,d),Je.pullOut(this.savedValues,d),delete this.pulledOut[d])),this.emit("change")}},{key:"expectRemoval",value:function(i){Ae("Expecting removal of",i),this.expectedRemovals[i]=!0,this.pulledOut[i]=!0}},{key:"update",value:function(i,a,o){Ae("Update",i,a.field,o,a.fieldState.value);var f=a.fieldApi.getValue(),d=a.fieldApi.getError(),v=a.fieldApi.getTouched(),h=this.fieldsByName.get(o);o&&!h&&(Je.set(this.state.values,o),Je.set(this.state.errors,o),Je.set(this.state.touched,o)),Je.set(this.state.values,a.field,f),Je.set(this.state.errors,a.field,d),Je.set(this.state.touched,a.field,v),this.emit("change")}}]),e}(),Ne=Yn("informed:FormProvider "),We=function(r){var i=r.children,a=r.formApi,o=r.formController,f=r.formState,d=sr(r,["children","formApi","formController","formState"]);if(Ne("Render FormProvider"),a)return Ne("Render FormProvider with given values"),A.createElement(yn.Provider,{value:o.updater},A.createElement(qa.Provider,{value:a},A.createElement(Ti.Provider,{value:f},i)));Ne("Render FormProvider with generated values");var v=Ke(d);return A.createElement(yn.Provider,{value:v.formController.updater},A.createElement(qa.Provider,{value:v.formApi},A.createElement(Ti.Provider,{value:v.formState},i)))},Qe=Yn("informed:useForm "),Ke=function(r){var i=r.dontPreventDefault,a=r.initialValues,o=r.validate,f=r.validateFields,d=r.allowEmptyStrings,v=r.preventEnter,h=r.getApi,g=r.apiRef,b=r.onChange,E=r.onReset,V=r.onSubmit,I=r.onValueChange,W=r.onSubmitFailure,Y=r.validationSchema,_=r.schema,U=r.ajv,G=r.fieldMap,ce=r.onlyValidateSchema,Ce=sr(r,["dontPreventDefault","initialValues","validate","validateFields","allowEmptyStrings","preventEnter","getApi","apiRef","onChange","onReset","onSubmit","onValueChange","onSubmitFailure","validationSchema","schema","ajv","fieldMap","onlyValidateSchema"]);Qe("Render useForm");var ge=(0,A.useMemo)(function(){return{dontPreventDefault:i,initialValues:a,validate:o,validateFields:f,allowEmptyStrings:d,preventEnter:v,validationSchema:Y,schema:_,ajv:U,fieldMap:G}},[i,a,o,f,d,v,Y,_,U,G]),ke=(0,A.useState)(function(){return new De(ge)}),be=ar(ke,1),me=be[0];(0,A.useEffect)(function(){me.setOptions(ge)},[ge]),Pn(function(){me.mount()},[]);var ue=(0,A.useState)(function(){return me.getFormState()}),Oe=ar(ue,2),Te=Oe[0],Me=Oe[1];Pn(function(){var Er=function(){return b&&b(me.getFormState())},cr=function(){return E&&E()},Tr=function(){return V&&V(me.getFormState().values)},nr=function(){return I&&I(me.getFormState().values)},kt=function(){return W&&W(me.getFormState().errors)};return me.on("change",Er),me.on("reset",cr),me.on("submit",Tr),me.on("value",nr),me.on("failure",kt),function(){me.removeListener("change",Er),me.removeListener("reset",cr),me.removeListener("submit",Tr),me.removeListener("value",nr),me.removeListener("failure",kt)}},[b,E,V,I,W]),(0,A.useState)(function(){var Er=function(){Qe("Setting form state"),Me(me.getFormState())};me.on("change",Er),h&&h(me.getFormApi()),g&&(g.current=me.getFormApi())});var Xe=(0,A.useState)(function(){return me.getFormApi()}),yt=ar(Xe,1),at=yt[0],fr=function(cr){return A.createElement(We,{formApi:at,formState:Te,formController:me},A.createElement(A.Fragment,null,cr||A.createElement(ve,{schema:_,onlyValidateSchema:ce})))};return{formApi:at,formState:Te,formController:me,render:fr,userProps:Ce}},bt=Yn("informed:Form "),$t=function(r){var i=r.children,a=r.render,o=r.component,f=sr(r,["children","render","component"]);bt("Render FORM");var d=Ke(f),v=d.formApi,h=d.formController,g=d.formState,b=d.render,E=d.userProps,V=function(){var W={formState:g,formApi:v};return o?A.createElement(o,W,i):a?a(W):typeof i=="function"?i(W):i};return b(A.createElement("form",ir({},E,{onReset:h.reset,onSubmit:h.submitForm,onKeyDown:h.keyDown}),V()))},wr=function(r,i){return ot(ot({},i),{},{getValue:function(o){return i.getValue("".concat(r,".").concat(o))},getTouched:function(o){return i.getTouched("".concat(r,".").concat(o))},getError:function(o){return i.getError("".concat(r,".").concat(o))},setValue:function(o,f){return i.setValue("".concat(r,".").concat(o),f)},setTouched:function(o,f){return i.setTouched("".concat(r,".").concat(o),f)},setError:function(o,f){return i.setError("".concat(r,".").concat(o),f)},getInitialValue:function(o){return i.getInitialValue("".concat(r,".").concat(o))},getFullField:function(o){return"".concat(i.getFullField(r),".").concat(o)}})},rr=function(r,i){var a=i.register,o=i.deregister,f=i.setValue,d=i.setTouched,v=i.setError,h=i.update,g=i.getField,b=i.expectRemoval,E=i.getInitialValue,V=i.fieldMap,I=i.getSavedValue;return{register:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return a.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},deregister:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return o.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},update:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return h.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},setValue:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return f.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},setTouched:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return d.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},setError:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return v.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},getField:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return g.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},expectRemoval:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return b.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},getInitialValue:function(Y){return E("".concat(r,".").concat(Y))},getSavedValue:function(Y){return I("".concat(r,".").concat(Y))},fieldMap:V}},Sn=function(r){var i=r.scope,a=r.children,o=useContext(yn),f=bn(),d=p(),v=useMemo(function(){return wr(i,f)},[i]),h=useMemo(function(){return rr(i,o)},[i]);return React.createElement(yn.Provider,{value:h},React.createElement(qa.Provider,{value:v},React.createElement(Ti.Provider,{value:d},a)))},fn=function(r){var i=p(),a={};Object.keys(r).length>0?Object.keys(r).forEach(function(I){a[I]=i[I]}):a=i;var o=a,f=o.pristine,d=o.dirty,v=o.invalid,h=o.values,g=o.errors,b=o.touched,E=o.validating,V=o.submitting;return React.createElement("pre",null,React.createElement("code",null,JSON.stringify({pristine:f,dirty:d,invalid:v,values:h,errors:g,touched:b,validating:E,submitting:V},null,2)))},vr=function(r){var i=r.initialStep,a=r.multistepApiRef,o=bn(),f=o.getValues,d=o.validate,v=o.screenValid,h=(0,A.useState)(new Map),g=ar(h,1),b=g[0],E=(0,A.useRef)(0),V=xn({current:i,steps:[],goal:null}),I=ar(V,3),W=I[0],Y=I[1],_=I[2],U=(0,A.useState)(function(){var ge=function(){var me=_(),ue=me.current,Oe=b.get(ue);return Oe},ke={getState:function(){return _()},getCurrentStep:ge,getStep:function(me){return b.get(me)},getNumberOfSteps:function(){return b.size},next:function(){if(d(),v()){var me=ge(),ue=me.getNext,Oe=ue(),Te=typeof Oe=="function"?Oe(f()):Oe;Te&&Y(function(Me){return ot(ot({},Me),{},{current:Te})})}},back:function(){var me=ge(),ue=me.getPrevious,Oe=ue(),Te=typeof Oe=="function"?Oe(f()):Oe;Te&&Y(function(Me){return ot(ot({},Me),{},{current:Te})})},setCurrent:function(me){if(me){var ue=b.get(me).index;ue<ge().index?Y(function(Oe){return ot(ot({},Oe),{},{current:me,goal:null})}):Y(function(Oe){return ot(ot({},Oe),{},{goal:me})})}},register:function(me,ue,Oe){Oe?(E.current=E.current+1,b.set(me,ot(ot({},ue),{},{index:E.current}))):Y(function(Te){return ot(ot({},Te),{},{steps:Array.from(b.keys())})})},deregister:function(me){b.delete(me),E.current=E.current-1,Y(function(ue){return ot(ot({},ue),{},{steps:Array.from(b.keys())})})}};return a&&(a.current=ke),ke}),G=ar(U,1),ce=G[0],Ce=function(ke){return A.createElement(El.Provider,{value:ce},A.createElement(Ol.Provider,{value:W},ke))};return ot(ot(ot({},ce),W),{},{render:Ce})};function tn(){return(0,A.useContext)(Ol)}function Ir(){return(0,A.useContext)(El)}var mr=function(r){var i=r.step,a=r.next,o=r.previous,f=r.relevant,d=p(),v=d.values,h=tn(),g=h.current,b=h.goal,E=Ir(),V=E.register,I=E.deregister,W=E.next,Y=i===g,_=f?f(v):!0,U=(0,A.useRef)(a),G=(0,A.useRef)(o),ce=(0,A.useRef)();U.current=a,G.current=o,ce.current=f,(0,A.useState)(function(){V(i,{name:i,getNext:function(){return U.current},getPrevious:function(){return G.current}},!0)}),(0,A.useEffect)(function(){return V(i,{name:i,getNext:function(){return U.current},getPrevious:function(){return G.current}}),function(){I(i)}},[i]),(0,A.useEffect)(function(){b&&Y&&b!==i&&W()},[b,Y]);var Ce=function(ke){return A.createElement(yf.Provider,{value:{relevant:function(me){return ce.current?ce.current(me):!0},multistep:!0}},Y&&_?ke:null)};return{isCurrent:Y,isRelevant:_,step:i,render:Ce}};function gr(e){var r=e.children,i=sr(e,["children"]),a=vr(i),o=a.render,f=sr(a,["render"]);return o(typeof r=="function"?r(f):r)}gr.Step=function(r){var i=r.children,a=sr(r,["children"]),o=mr(a),f=o.render;return f(i)};var ur=function(r){var i=r.field,a=useContext(yn),o=a.fieldMap,f=bn(),d=f.getFullField,v=f.getOptions,h=d(i),g=v(),b=g.schema,E=Pl(h),V=Je.get(b,E);if(!V)return null;var I=kl(i,V),W=I.props,Y=I.componentType,_=o[Y];return React.createElement(_,ir({field:i},W))},cn=function(){var r=bn(),i=r.getOptions,a=i(),o=a.schema;return React.createElement(ve,{schema:o})},Po=function(r){return React.forwardRef(function(i,a){return React.createElement(qa.Consumer,null,function(o){return React.createElement(r,ir({formApi:o,ref:a},i))})})},Sa=function(r){return React.forwardRef(function(i,a){return React.createElement(Ti.Consumer,null,function(o){return React.createElement(r,ir({formState:o,ref:a},i))})})},jr=function(r,i){return{getValue:function(){return r.getValue(i)},setValue:function(o){return r.setValue(i,o)},getTouched:function(){return r.getTouched(i)},setTouched:function(o){return r.setTouched(i,o)},getError:function(){return r.getError(i)},setError:function(o){return r.setError(i,o)},reset:function(){return r.resetField(i)},validate:function(){return r.validateField(i)},exists:function(){return r.fieldExists(i)},getDirty:function(){return r.getDirty(i)},getPristine:function(){return r.getPristine(i)},getFieldState:function(){return r.getField(i).fieldApi.getFieldState()}}};function Jn(e){var r=bn(),i=useMemo(function(){return jr(r,e)},[e]);return i}function Cr(e){var r=Jn(e),i=bn(),a=React.useState(),o=ar(a,2),f=o[1],d=React.useCallback(function(){return f({})},[]);return Pn(function(){var v=function(g){g===e&&d()};return i.emitter.on("field",v),function(){i.emitter.removeListener("field",v)}},[]),Pn(function(){d()},[]),r.getFieldState()||{}}var Lf=function(r){return function(i){return function(a){var o=Cr(r);return React.createElement(i,ir({fieldState:o},a))}}},zi=function(r){return function(i){return function(a){var o=Jn(r);return React.createElement(i,ir({fieldApi:o},a))}}},no=function(r){var i=r.value,a=r.forwardedRef,o=r.children,f=sr(r,["value","forwardedRef","children"]);return React.createElement("option",ir({ref:a,value:i,key:i},f),o)},io=null,Wr=c(81105),Fn=c(26225),Rl=Object.defineProperty,uv=Object.defineProperties,fv=Object.getOwnPropertyDescriptors,Gd=Object.getOwnPropertySymbols,cv=Object.prototype.hasOwnProperty,dv=Object.prototype.propertyIsEnumerable,$d=(e,r,i)=>r in e?Rl(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Dl=(e,r)=>{for(var i in r||(r={}))cv.call(r,i)&&$d(e,i,r[i]);if(Gd)for(var i of Gd(r))dv.call(r,i)&&$d(e,i,r[i]);return e},pv=(e,r)=>uv(e,fv(r)),Mf=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});const Kd="/oauth2-redirect.html";class ki{static authorizeImplicit({authorizationUrl:r,clientId:i,scopes:a,extraParams:o={},routingBasePath:f,redirectUri:d,successCallback:v,errorCallback:h}){const g=(0,Fn.p8)({date:new Date().toString()}),b=new URL(r),E=f==="/"?"":f,V=`${window.location.origin}${E}${Kd}`;b.searchParams.set("client_id",i),b.searchParams.set("redirect_uri",d||V),b.searchParams.set("response_type","token"),b.searchParams.set("state",g),Array.isArray(a)&&b.searchParams.set("scope",a.join(" "));for(const I in o)b.searchParams.set(I,o[I]);window.redirectOAuth2={flow:"implicit",data:{authorizationUrl:r,clientId:i,scopes:a},state:g,successCallback:I=>{v(I),ki.clearRedirectData("implicit")},errorCallback:I=>{h(I),ki.clearRedirectData("implicit")}},window.open(b.toString())}static authorizeAuthorizationCode({authorizationUrl:r,tokenUrl:i,clientId:a,clientSecret:o,codeVerifier:f,codeChallenge:d,scopes:v,extraParams:h={},extraHeaders:g={},routingBasePath:b,redirectUri:E,successCallback:V,errorCallback:I}){const W=new URL(r),Y=b==="/"?"":b,_=`${window.location.origin}${Y}${Kd}`,U=(0,Fn.p8)({date:new Date().toString()});W.searchParams.set("client_id",a),W.searchParams.set("redirect_uri",E||_),W.searchParams.set("response_type","code"),W.searchParams.set("state",U),Array.isArray(v)&&W.searchParams.set("scope",v.join(" ")),d&&(W.searchParams.set("code_challenge",d),W.searchParams.set("code_challenge_method","S256"));for(const G in h)W.searchParams.set(G,h[G]);window.redirectOAuth2={flow:"authorizationCode",data:{authorizationUrl:r,clientId:a,scopes:v},state:U,successCallback:G=>Mf(this,[G],function*({auth_code:ce}){try{const Ce=yield fetch(i,{method:"POST",headers:Dl({"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},g),body:Wr.stringify(Dl(pv(Dl({client_id:a,client_secret:o},f&&{code_verifier:f}),{code:ce,grant_type:"authorization_code",redirect_uri:E||_}),h))});yield Yd(Ce,V,I)}catch(Ce){I(Ce)}ki.clearRedirectData("authorizationCode")}),errorCallback:G=>{I(G),ki.clearRedirectData("authorizationCode")}},window.open(W.toString())}static clearRedirectData(r){window.redirectOAuth2={flow:r,data:{authorizationUrl:"",clientId:"",scopes:[]},state:"",successCallback:()=>{},errorCallback:()=>{}}}static authorizeClientCredentials(r){return Mf(this,arguments,function*({tokenUrl:i,clientId:a,clientSecret:o,scopes:f=[],extraParams:d={},extraHeaders:v={},successCallback:h,errorCallback:g}){try{const b=JSON.parse(JSON.stringify(Dl({client_id:a,client_secret:o,grant_type:"client_credentials",scope:Array.isArray(f)&&f.length?f.join(" "):void 0},d))),E=yield fetch(i,{method:"POST",headers:Dl({"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},v),body:Wr.stringify(b)});yield Yd(E,h,g)}catch(b){g(b)}})}}const i0=new ki;function Yd(e,r,i){return Mf(this,null,function*(){if(e.ok){const a=yield e.json();r(a)}else i(new Error((e.headers.get("Content-Type")||"").indexOf("json")>-1?JSON.stringify(yield e.json()):yield e.text()))})}function Xd(e){return Mf(this,null,function*(){return(0,Fn.rS)(yield(0,Fn.JQ)(e))})}var Bl=c(95709),Ye=c(9612),hv=c(39012),vv=c(76951),gv=Object.defineProperty,mv=Object.defineProperties,yv=Object.getOwnPropertyDescriptors,Nf=Object.getOwnPropertySymbols,Jd=Object.prototype.hasOwnProperty,Qd=Object.prototype.propertyIsEnumerable,Zd=(e,r,i)=>r in e?gv(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Rf=(e,r)=>{for(var i in r||(r={}))Jd.call(r,i)&&Zd(e,i,r[i]);if(Nf)for(var i of Nf(r))Qd.call(r,i)&&Zd(e,i,r[i]);return e},bv=(e,r)=>mv(e,yv(r)),xv=(e,r)=>{var i={};for(var a in e)Jd.call(e,a)&&r.indexOf(a)<0&&(i[a]=e[a]);if(e!=null&&Nf)for(var a of Nf(e))r.indexOf(a)<0&&Qd.call(e,a)&&(i[a]=e[a]);return i};const qd=e=>(0,At.iv)`
159
159
  border: var(--input-border);
160
160
  outline: none;
161
161
  padding: var(--input-padding);
@@ -184,16 +184,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
184
184
  &:-webkit-autofill {
185
185
  background-color: var(--panel-${e}-input-background-color);
186
186
  }
187
- `,tp=At.ZP.div`
187
+ `,ep=At.ZP.div`
188
188
  display: ${({type:e})=>e==="hidden"?"none":"inline-block"};
189
189
  ${({fullWidth:e})=>e?"width: 100%;":""}
190
- `,Cv=At.ZP.div`
190
+ `,Sv=At.ZP.div`
191
191
  position: relative;
192
- `,Av=At.ZP.input`
193
- ${({panel:e})=>ep(e)}
192
+ `,wv=At.ZP.input`
193
+ ${({panel:e})=>qd(e)}
194
194
  ${({inputType:e,inputActionButton:r})=>e==="password"||r?"padding-right: 40px;":""};
195
195
  ${({fullWidth:e})=>e?"width: 100%;":""}
196
- `,rp=At.ZP.span`
196
+ `,tp=At.ZP.span`
197
197
  position: absolute;
198
198
  right: 0;
199
199
  line-height: normal;
@@ -203,15 +203,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
203
203
  cursor: pointer;
204
204
  text-align: center;
205
205
  color: var(--panel-samples-text-color);
206
- `;function Ov(e,r){var i=e,{fullWidth:a,errorMessage:o,type:f,inputActionButton:d,panel:v="samples"}=i,h=wv(i,["fullWidth","errorMessage","type","inputActionButton","panel"]);const[g,b]=(0,A.useState)(f==="password"),E=(0,A.useCallback)(()=>{b(!g)},[g]);return A.createElement(tp,{fullWidth:a,type:f},A.createElement(Cv,null,A.createElement(Av,Rf({fullWidth:a,inputActionButton:d,type:g?"password":"text",inputType:f,ref:r,panel:v},h)),d?A.createElement(rp,{onClick:d.onClick},d.label):f==="password"?A.createElement(rp,{onClick:E},g?"show":"hide"):null),o?A.createElement(Ye.Xq,null,o):null)}const Vl=(0,A.forwardRef)(Ov);function In(e){const r=to(Rf({fieldType:"text"},e)),{userProps:i,render:a,fieldState:o}=r,f=r.informed;return a(A.createElement(Vl,Sv(Rf(Rf({},i),f),{errorMessage:o.error})))}const jl=ci(({initValue:e,options:r,fieldApi:i,fieldState:a})=>{const o=r.map((g,b)=>({value:g.title||g.value,idx:b,origValue:g.value})),f=o.find(g=>g.origValue===e),[d,v]=(0,A.useState)(f==null?void 0:f.value);(0,Jt.useMount)(()=>{e&&i.setValue(e)});const h=(0,A.useCallback)(g=>{i.setValue(o[g.idx].origValue),v(o[g.idx].value)},[i,o]);return A.createElement(tp,{fullWidth:!0},A.createElement(mv.Dropdown,{fullWidth:!0,variant:"dark",value:d,options:o,onChange:h}),a.error?A.createElement(Ye.Xq,null,a.error):null)});function Ev({name:e,value:r,description:i,variableEnum:a,onChange:o,defaultValue:f}){const d=(0,A.useCallback)(g=>o(g.target.value),[o]),v=(0,A.useCallback)(g=>o(g.value),[o]),h=a?a.map((g,b)=>({value:g,idx:b})):[];return A.createElement(Ye.NI,null,A.createElement(Ye.lX,null,e,":"),h&&h.length?A.createElement(mn.VD,{fullWidth:!0,variant:"dark",value:r,options:h,onChange:v}):A.createElement(Vl,{fullWidth:!0,value:r,onChange:d,placeholder:f,panel:"try-it"}),i&&A.createElement(Tv,{source:i}))}const Tv=(0,At.ZP)(gv.Markdown)`
206
+ `;function Cv(e,r){var i=e,{fullWidth:a,errorMessage:o,type:f,inputActionButton:d,panel:v="samples"}=i,h=xv(i,["fullWidth","errorMessage","type","inputActionButton","panel"]);const[g,b]=(0,A.useState)(f==="password"),E=(0,A.useCallback)(()=>{b(!g)},[g]);return A.createElement(ep,{fullWidth:a,type:f},A.createElement(Sv,null,A.createElement(wv,Rf({fullWidth:a,inputActionButton:d,type:g?"password":"text",inputType:f,ref:r,panel:v},h)),d?A.createElement(tp,{onClick:d.onClick},d.label):f==="password"?A.createElement(tp,{onClick:E},g?"show":"hide"):null),o?A.createElement(Ye.Xq,null,o):null)}const Vl=(0,A.forwardRef)(Cv);function In(e){const r=to(Rf({fieldType:"text"},e)),{userProps:i,render:a,fieldState:o}=r,f=r.informed;return a(A.createElement(Vl,bv(Rf(Rf({},i),f),{errorMessage:o.error})))}const jl=ci(({initValue:e,options:r,fieldApi:i,fieldState:a})=>{const o=r.map((g,b)=>({value:g.title||g.value,idx:b,origValue:g.value})),f=o.find(g=>g.origValue===e),[d,v]=(0,A.useState)(f?.value);(0,Jt.useMount)(()=>{e&&i.setValue(e)});const h=(0,A.useCallback)(g=>{i.setValue(o[g.idx].origValue),v(o[g.idx].value)},[i,o]);return A.createElement(ep,{fullWidth:!0},A.createElement(vv.Dropdown,{fullWidth:!0,variant:"dark",value:d,options:o,onChange:h}),a.error?A.createElement(Ye.Xq,null,a.error):null)});function Av({name:e,value:r,description:i,variableEnum:a,onChange:o,defaultValue:f}){const d=(0,A.useCallback)(g=>o(g.target.value),[o]),v=(0,A.useCallback)(g=>o(g.value),[o]),h=a?a.map((g,b)=>({value:g,idx:b})):[];return A.createElement(Ye.NI,null,A.createElement(Ye.lX,null,e,":"),h&&h.length?A.createElement(mn.VD,{fullWidth:!0,variant:"dark",value:r,options:h,onChange:v}):A.createElement(Vl,{fullWidth:!0,value:r,onChange:d,placeholder:f,panel:"try-it"}),i&&A.createElement(Ov,{source:i}))}const Ov=(0,At.ZP)(hv.Markdown)`
207
207
  margin-top: 5px;
208
208
  color: #d0d0d0;
209
- `;var kv=Object.defineProperty,Pv=Object.defineProperties,Fv=Object.getOwnPropertyDescriptors,np=Object.getOwnPropertySymbols,Iv=Object.prototype.hasOwnProperty,Lv=Object.prototype.propertyIsEnumerable,ip=(e,r,i)=>r in e?kv(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,ap=(e,r)=>{for(var i in r||(r={}))Iv.call(r,i)&&ip(e,i,r[i]);if(np)for(var i of np(r))Lv.call(r,i)&&ip(e,i,r[i]);return e},op=(e,r)=>Pv(e,Fv(r));function Mv({operation:e,onChange:r}){const{events:i}=(0,ui.useRecoilValue)(Hi.lk),{servers:a}=e,o=(0,dt.YQ)("serverUrl"),f=a.findIndex(W=>W.url===o),[d,v]=(0,A.useState)(f<0?0:f),[h,g]=(0,A.useState)({});(0,Jt.useMount)(()=>{const W=(0,xt.fz)(a,d);r(W),g(W.variables)});const b=({serverUrl:W=""})=>{var Y;const _=a.find(Ce=>Ce.url===W),U=a.findIndex(Ce=>Ce.url===W),G=(0,xt.mj)(_);r({url:W,variables:G}),(0,dt.WW)("serverUrl",W),v(U),g(G);const ce=(0,Sr.Ze)({operation:e,serverUrl:W});(Y=i.targetServerSwitch)==null||Y.call(i,ce)},E=(W,Y)=>{const _=a[d],U=Y||Y===""?Y:(0,xt.mj)(_)[W],G=op(ap({},h),{[W]:U});g(G),(0,xt.UY)(W,U),r(op(ap({},_),{variables:G}))},j=a.map((W,Y)=>({idx:Y,serverUrl:W.url,value:`
209
+ `;var Ev=Object.defineProperty,Tv=Object.defineProperties,kv=Object.getOwnPropertyDescriptors,rp=Object.getOwnPropertySymbols,Pv=Object.prototype.hasOwnProperty,Fv=Object.prototype.propertyIsEnumerable,np=(e,r,i)=>r in e?Ev(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,ip=(e,r)=>{for(var i in r||(r={}))Pv.call(r,i)&&np(e,i,r[i]);if(rp)for(var i of rp(r))Fv.call(r,i)&&np(e,i,r[i]);return e},ap=(e,r)=>Tv(e,kv(r));function Iv({operation:e,onChange:r}){const{events:i}=(0,ui.useRecoilValue)(Hi.lk),{servers:a}=e,o=(0,dt.YQ)("serverUrl"),f=a.findIndex(W=>W.url===o),[d,v]=(0,A.useState)(f<0?0:f),[h,g]=(0,A.useState)({});(0,Jt.useMount)(()=>{const W=(0,xt.fz)(a,d);r(W),g(W.variables)});const b=({serverUrl:W=""})=>{var Y;const _=a.find(Ce=>Ce.url===W),U=a.findIndex(Ce=>Ce.url===W),G=(0,xt.mj)(_);r({url:W,variables:G}),(0,dt.WW)("serverUrl",W),v(U),g(G);const ce=(0,Sr.Ze)({operation:e,serverUrl:W});(Y=i.targetServerSwitch)==null||Y.call(i,ce)},E=(W,Y)=>{const _=a[d],U=Y||Y===""?Y:(0,xt.mj)(_)[W],G=ap(ip({},h),{[W]:U});g(G),(0,xt.UY)(W,U),r(ap(ip({},_),{variables:G}))},V=a.map((W,Y)=>({idx:Y,serverUrl:W.url,value:`
210
210
  ${(0,xt.nq)((0,xt.v5)(W.url,h),W.variables)}
211
211
  - ${(0,dt.bG)(W.description)||"Default"}
212
- `})),I=Object.keys(h);return A.createElement(Rv,{"data-cy":"console-target-server"},A.createElement(Ye.lX,{htmlFor:"server"},"Target server: "),A.createElement(Ye.NI,null,A.createElement(mn.VD,{variant:"dark",value:j[d].value,options:j,fullWidth:!0,onChange:b})),I==null?void 0:I.map(W=>{var Y;const _=(Y=a[d].variables)==null?void 0:Y[W];if(_)return A.createElement(Ev,{key:W,name:W,value:h[W],defaultValue:_.default,onChange:U=>E(W,U),variableEnum:_.enum,description:_.description})}))}const Nv=(0,A.memo)(Mv),Rv=At.ZP.div`
212
+ `})),I=Object.keys(h);return A.createElement(Mv,{"data-cy":"console-target-server"},A.createElement(Ye.lX,{htmlFor:"server"},"Target server: "),A.createElement(Ye.NI,null,A.createElement(mn.VD,{variant:"dark",value:V[d].value,options:V,fullWidth:!0,onChange:b})),I?.map(W=>{var Y;const _=(Y=a[d].variables)==null?void 0:Y[W];if(_)return A.createElement(Av,{key:W,name:W,value:h[W],defaultValue:_.default,onChange:U=>E(W,U),variableEnum:_.enum,description:_.description})}))}const Lv=(0,A.memo)(Iv),Mv=At.ZP.div`
213
213
  margin-bottom: 20px;
214
- `;var sp=c(86220),Dv=Object.defineProperty,Bv=Object.defineProperties,Vv=Object.getOwnPropertyDescriptors,Df=Object.getOwnPropertySymbols,lp=Object.prototype.hasOwnProperty,up=Object.prototype.propertyIsEnumerable,fp=(e,r,i)=>r in e?Dv(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,jv=(e,r)=>{for(var i in r||(r={}))lp.call(r,i)&&fp(e,i,r[i]);if(Df)for(var i of Df(r))up.call(r,i)&&fp(e,i,r[i]);return e},Wv=(e,r)=>Bv(e,Vv(r)),Hv=(e,r)=>{var i={};for(var a in e)lp.call(e,a)&&r.indexOf(a)<0&&(i[a]=e[a]);if(e!=null&&Df)for(var a of Df(e))r.indexOf(a)<0&&up.call(e,a)&&(i[a]=e[a]);return i};function ud(e){var r=e,{header:i,error:a,success:o}=r,f=Hv(r,["header","error","success"]);const d=({toggle:v,expanded:h=!1})=>A.createElement(Jt.PanelHeader,{onClick:v,expanded:h,"data-cy":f["data-cy"]},A.createElement(ca.xz,null,A.createElement(Jt.PanelHeaderTitle,null,i),A.createElement(Jt.ShelfIcon,{direction:h?"down":"right"})),a&&A.createElement(sp.CrossIcon,{size:"14px",color:"--color-error-500"})||null,o&&A.createElement(sp.LockIcon,{size:"14px",color:"--color-success-500"})||null);return A.createElement(Uv,Wv(jv({className:"panel-try-it-nested"},f),{header:d}))}const Uv=(0,At.ZP)(Jt.Panel)`
214
+ `;var op=c(86220),Nv=Object.defineProperty,Rv=Object.defineProperties,Dv=Object.getOwnPropertyDescriptors,Df=Object.getOwnPropertySymbols,sp=Object.prototype.hasOwnProperty,lp=Object.prototype.propertyIsEnumerable,up=(e,r,i)=>r in e?Nv(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Bv=(e,r)=>{for(var i in r||(r={}))sp.call(r,i)&&up(e,i,r[i]);if(Df)for(var i of Df(r))lp.call(r,i)&&up(e,i,r[i]);return e},Vv=(e,r)=>Rv(e,Dv(r)),jv=(e,r)=>{var i={};for(var a in e)sp.call(e,a)&&r.indexOf(a)<0&&(i[a]=e[a]);if(e!=null&&Df)for(var a of Df(e))r.indexOf(a)<0&&lp.call(e,a)&&(i[a]=e[a]);return i};function ud(e){var r=e,{header:i,error:a,success:o}=r,f=jv(r,["header","error","success"]);const d=({toggle:v,expanded:h=!1})=>A.createElement(Jt.PanelHeader,{onClick:v,expanded:h,"data-cy":f["data-cy"]},A.createElement(ca.xz,null,A.createElement(Jt.PanelHeaderTitle,null,i),A.createElement(Jt.ShelfIcon,{direction:h?"down":"right"})),a&&A.createElement(op.CrossIcon,{size:"14px",color:"--color-error-500"})||null,o&&A.createElement(op.LockIcon,{size:"14px",color:"--color-success-500"})||null);return A.createElement(Wv,Vv(Bv({className:"panel-try-it-nested"},f),{header:d}))}const Wv=(0,At.ZP)(Jt.Panel)`
215
215
  ${Jt.PanelHeader} {
216
216
  border: 1px solid
217
217
  ${({error:e})=>e?"var(--color-error-300)":"var(--panel-try-it-nested-heading-border-color)"};
@@ -223,47 +223,47 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
223
223
  ${({error:e})=>e?"var(--color-error-300)":"var(--panel-try-it-nested-body-border-color)"};
224
224
  border-top: 0;
225
225
  }
226
- `;var _v=c(4296),zv=c(62701),Gv=c(18373);const $v=(0,At.ZP)(Ja.A3)`
226
+ `;var Hv=c(4296),Uv=c(62701),_v=c(18373);const zv=(0,At.ZP)(Ja.A3)`
227
227
  border-radius: var(--panel-border-radius);
228
228
  margin-bottom: 10px;
229
- `;var Bf=c(42112),fd=c(34716),Kv=c(43507),Yv=Object.defineProperty,Vf=Object.getOwnPropertySymbols,cp=Object.prototype.hasOwnProperty,dp=Object.prototype.propertyIsEnumerable,pp=(e,r,i)=>r in e?Yv(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Xv=(e,r)=>{for(var i in r||(r={}))cp.call(r,i)&&pp(e,i,r[i]);if(Vf)for(var i of Vf(r))dp.call(r,i)&&pp(e,i,r[i]);return e},hp=(e,r)=>{var i={};for(var a in e)cp.call(e,a)&&r.indexOf(a)<0&&(i[a]=e[a]);if(e!=null&&Vf)for(var a of Vf(e))r.indexOf(a)<0&&dp.call(e,a)&&(i[a]=e[a]);return i},Jv=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});const vp=(0,A.forwardRef)((e,r)=>{var i=hp(e,[]);const a=i,{schema:o,contentName:f,onChange:d,name:v}=a,h=hp(a,["schema","contentName","onChange","name"]),{render:g}=to(Xv({field:v},h)),b=E=>Jv(void 0,null,function*(){const j=yield ef(E.target.files,o);d(f,j)});return g(A.createElement("input",{"data-cy":"file-upload-input",type:"file",id:i.id,className:i.className,name:i.name,onChange:b,multiple:i.multiple,accept:i.accept,ref:r}))});vp.displayName="FileUpload";var cd=c(5489);function Qv({mediaType:e,onChange:r,formApi:i}){var a;const o=e.examples||{},{exampleKey:f}=(0,fd.C6)(e.operation,o),d=(a=o[f])==null?void 0:a.rawValue,v=qv(e);(0,A.useEffect)(()=>i&&v.forEach(g=>{var b,E;const j=d==null?void 0:d[g.name],I=(E=(b=g.example)!=null?b:j==null?void 0:j.example)!=null?E:j,W=typeof I=="object"?JSON.stringify(I):I;I!==void 0&&i.setValue("body."+g.name,`${W}`)}),[f]);const h=e.schema||{};return ds(h,e.name)?A.createElement(gp,null,A.createElement(Ye.NI,null,A.createElement(mp,{fullWidth:!0,id:`body.${e.name}`,name:`body.${e.name}`,accept:cs(e.name),schema:h,contentName:e.name,onChange:r}))):h.type!==$n.DefinitionTypes.OBJECT&&!v?(console.warn(`Invalid schema for request body and mime type: "${e.name}"`,h),null):A.createElement(gp,null,v.map(g=>{const b=g.schema||{contentMediaType:"",type:"",description:""},E=e.name===Bf.Tr.MULTIPART&&Zu(b),j=b.contentMediaType||"",I=E?A.createElement(mp,{fullWidth:!0,id:"body."+g.name,name:"body."+g.name,accept:cs(j),multiple:b.type==="array",schema:b,contentName:g.name,onChange:r}):A.createElement(In,{fullWidth:!0,id:"body."+g.name,field:"body."+g.name,placeholder:(0,dt.bG)(b.description)||g.name,panel:"try-it"});return A.createElement(Ye.NI,{key:g.name},A.createElement(Ye.lX,null,g.name,":"),I)}))}const Zv=(0,A.memo)(Qv);function qv(e){var r,i,a,o;const{activeOneOf:f}=(0,Kv.$l)((0,cd.N)(e.operation.pointer));return((i=(r=e.schema)==null?void 0:r.oneOf)!=null&&i.length?((a=e.schema)==null?void 0:a.oneOf[f].fields)||[]:((o=e.schema)==null?void 0:o.fields)||[]).filter(d=>!d.schema.readOnly)}const gp=At.ZP.div`
229
+ `;var Bf=c(42112),fd=c(34716),Gv=c(43507),$v=Object.defineProperty,Vf=Object.getOwnPropertySymbols,fp=Object.prototype.hasOwnProperty,cp=Object.prototype.propertyIsEnumerable,dp=(e,r,i)=>r in e?$v(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Kv=(e,r)=>{for(var i in r||(r={}))fp.call(r,i)&&dp(e,i,r[i]);if(Vf)for(var i of Vf(r))cp.call(r,i)&&dp(e,i,r[i]);return e},pp=(e,r)=>{var i={};for(var a in e)fp.call(e,a)&&r.indexOf(a)<0&&(i[a]=e[a]);if(e!=null&&Vf)for(var a of Vf(e))r.indexOf(a)<0&&cp.call(e,a)&&(i[a]=e[a]);return i},Yv=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});const hp=(0,A.forwardRef)((e,r)=>{var i=pp(e,[]);const a=i,{schema:o,contentName:f,onChange:d,name:v}=a,h=pp(a,["schema","contentName","onChange","name"]),{render:g}=to(Kv({field:v},h)),b=E=>Yv(void 0,null,function*(){const V=yield ef(E.target.files,o);d(f,V)});return g(A.createElement("input",{"data-cy":"file-upload-input",type:"file",id:i.id,className:i.className,name:i.name,onChange:b,multiple:i.multiple,accept:i.accept,ref:r}))});hp.displayName="FileUpload";var cd=c(5489);function Xv({mediaType:e,onChange:r,formApi:i}){var a;const o=e.examples||{},{exampleKey:f}=(0,fd.C6)(e.operation,o),d=(a=o[f])==null?void 0:a.rawValue,v=Qv(e);(0,A.useEffect)(()=>i&&v.forEach(g=>{var b,E;const V=d?.[g.name],I=(E=(b=g.example)!=null?b:V?.example)!=null?E:V,W=typeof I=="object"?JSON.stringify(I):I;I!==void 0&&i.setValue("body."+g.name,`${W}`)}),[f]);const h=e.schema||{};return ds(h,e.name)?A.createElement(vp,null,A.createElement(Ye.NI,null,A.createElement(gp,{fullWidth:!0,id:`body.${e.name}`,name:`body.${e.name}`,accept:cs(e.name),schema:h,contentName:e.name,onChange:r}))):h.type!==$n.DefinitionTypes.OBJECT&&!v?(console.warn(`Invalid schema for request body and mime type: "${e.name}"`,h),null):A.createElement(vp,null,v.map(g=>{const b=g.schema||{contentMediaType:"",type:"",description:""},E=e.name===Bf.Tr.MULTIPART&&Zu(b),V=b.contentMediaType||"",I=E?A.createElement(gp,{fullWidth:!0,id:"body."+g.name,name:"body."+g.name,accept:cs(V),multiple:b.type==="array",schema:b,contentName:g.name,onChange:r}):A.createElement(In,{fullWidth:!0,id:"body."+g.name,field:"body."+g.name,placeholder:(0,dt.bG)(b.description)||g.name,panel:"try-it"});return A.createElement(Ye.NI,{key:g.name},A.createElement(Ye.lX,null,g.name,":"),I)}))}const Jv=(0,A.memo)(Xv);function Qv(e){var r,i,a,o;const{activeOneOf:f}=(0,Gv.$l)((0,cd.N)(e.operation.pointer));return((i=(r=e.schema)==null?void 0:r.oneOf)!=null&&i.length?((a=e.schema)==null?void 0:a.oneOf[f].fields)||[]:((o=e.schema)==null?void 0:o.fields)||[]).filter(d=>!d.schema.readOnly)}const vp=At.ZP.div`
230
230
  > div {
231
231
  margin-top: 10px;
232
232
  }
233
- `,mp=(0,At.ZP)(vp)`
234
- ${ep("try-it")};
233
+ `,gp=(0,At.ZP)(hp)`
234
+ ${qd("try-it")};
235
235
  ${({inputType:e})=>e==="password"?"padding-right: 40px;":""};
236
236
  ${({fullWidth:e})=>e?"width: 100%;":""}
237
- `;var eg=c(99913);function jf(e,r){r===void 0&&(r=!1);var i=e.length,a=0,o="",f=0,d=16,v=0,h=0,g=0,b=0,E=0;function j(ce,Ce){for(var ge=0,ke=0;ge<ce||!Ce;){var be=e.charCodeAt(a);if(be>=48&&be<=57)ke=ke*16+be-48;else if(be>=65&&be<=70)ke=ke*16+be-65+10;else if(be>=97&&be<=102)ke=ke*16+be-97+10;else break;a++,ge++}return ge<ce&&(ke=-1),ke}function I(ce){a=ce,o="",f=0,d=16,E=0}function W(){var ce=a;if(e.charCodeAt(a)===48)a++;else for(a++;a<e.length&&ks(e.charCodeAt(a));)a++;if(a<e.length&&e.charCodeAt(a)===46)if(a++,a<e.length&&ks(e.charCodeAt(a)))for(a++;a<e.length&&ks(e.charCodeAt(a));)a++;else return E=3,e.substring(ce,a);var Ce=a;if(a<e.length&&(e.charCodeAt(a)===69||e.charCodeAt(a)===101))if(a++,(a<e.length&&e.charCodeAt(a)===43||e.charCodeAt(a)===45)&&a++,a<e.length&&ks(e.charCodeAt(a))){for(a++;a<e.length&&ks(e.charCodeAt(a));)a++;Ce=a}else E=3;return e.substring(ce,Ce)}function Y(){for(var ce="",Ce=a;;){if(a>=i){ce+=e.substring(Ce,a),E=2;break}var ge=e.charCodeAt(a);if(ge===34){ce+=e.substring(Ce,a),a++;break}if(ge===92){if(ce+=e.substring(Ce,a),a++,a>=i){E=2;break}var ke=e.charCodeAt(a++);switch(ke){case 34:ce+='"';break;case 92:ce+="\\";break;case 47:ce+="/";break;case 98:ce+="\b";break;case 102:ce+="\f";break;case 110:ce+=`
238
- `;break;case 114:ce+="\r";break;case 116:ce+=" ";break;case 117:var be=j(4,!0);be>=0?ce+=String.fromCharCode(be):E=4;break;default:E=5}Ce=a;continue}if(ge>=0&&ge<=31)if(Wl(ge)){ce+=e.substring(Ce,a),E=2;break}else E=6;a++}return ce}function _(){if(o="",E=0,f=a,h=v,b=g,a>=i)return f=i,d=17;var ce=e.charCodeAt(a);if(dd(ce)){do a++,o+=String.fromCharCode(ce),ce=e.charCodeAt(a);while(dd(ce));return d=15}if(Wl(ce))return a++,o+=String.fromCharCode(ce),ce===13&&e.charCodeAt(a)===10&&(a++,o+=`
239
- `),v++,g=a,d=14;switch(ce){case 123:return a++,d=1;case 125:return a++,d=2;case 91:return a++,d=3;case 93:return a++,d=4;case 58:return a++,d=6;case 44:return a++,d=5;case 34:return a++,o=Y(),d=10;case 47:var Ce=a-1;if(e.charCodeAt(a+1)===47){for(a+=2;a<i&&!Wl(e.charCodeAt(a));)a++;return o=e.substring(Ce,a),d=12}if(e.charCodeAt(a+1)===42){a+=2;for(var ge=i-1,ke=!1;a<ge;){var be=e.charCodeAt(a);if(be===42&&e.charCodeAt(a+1)===47){a+=2,ke=!0;break}a++,Wl(be)&&(be===13&&e.charCodeAt(a)===10&&a++,v++,g=a)}return ke||(a++,E=1),o=e.substring(Ce,a),d=13}return o+=String.fromCharCode(ce),a++,d=16;case 45:if(o+=String.fromCharCode(ce),a++,a===i||!ks(e.charCodeAt(a)))return d=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=W(),d=11;default:for(;a<i&&U(ce);)a++,ce=e.charCodeAt(a);if(f!==a){switch(o=e.substring(f,a),o){case"true":return d=8;case"false":return d=9;case"null":return d=7}return d=16}return o+=String.fromCharCode(ce),a++,d=16}}function U(ce){if(dd(ce)||Wl(ce))return!1;switch(ce){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function G(){var ce;do ce=_();while(ce>=12&&ce<=15);return ce}return{setPosition:I,getPosition:function(){return a},scan:r?G:_,getToken:function(){return d},getTokenValue:function(){return o},getTokenOffset:function(){return f},getTokenLength:function(){return a-f},getTokenStartLine:function(){return h},getTokenStartCharacter:function(){return f-b},getTokenError:function(){return E}}}function dd(e){return e===32||e===9||e===11||e===12||e===160||e===5760||e>=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function Wl(e){return e===10||e===13||e===8232||e===8233}function ks(e){return e>=48&&e<=57}function tg(e,r,i){var a,o,f,d,v;if(r){for(d=r.offset,v=d+r.length,f=d;f>0&&!yp(e,f-1);)f--;for(var h=v;h<e.length&&!yp(e,h);)h++;o=e.substring(f,h),a=rg(o,i)}else o=e,a=0,f=0,d=0,v=e.length;var g=ng(i,e),b=!1,E=0,j;i.insertSpaces?j=pd(" ",i.tabSize||4):j=" ";var I=jf(o,!1),W=!1;function Y(){return g+pd(j,a+E)}function _(){var Te=I.scan();for(b=!1;Te===15||Te===14;)b=b||Te===14,Te=I.scan();return W=Te===16||I.getTokenError()!==0,Te}var U=[];function G(Te,Me,Xe){!W&&Me<v&&Xe>d&&e.substring(Me,Xe)!==Te&&U.push({offset:Me,length:Xe-Me,content:Te})}var ce=_();if(ce!==17){var Ce=I.getTokenOffset()+f,ge=pd(j,a);G(ge,f,Ce)}for(;ce!==17;){for(var ke=I.getTokenOffset()+I.getTokenLength()+f,be=_(),me="";!b&&(be===12||be===13);){var ue=I.getTokenOffset()+f;G(" ",ke,ue),ke=I.getTokenOffset()+I.getTokenLength()+f,me=be===12?Y():"",be=_()}if(be===2)ce!==1&&(E--,me=Y());else if(be===4)ce!==3&&(E--,me=Y());else{switch(ce){case 3:case 1:E++,me=Y();break;case 5:case 12:me=Y();break;case 13:b?me=Y():me=" ";break;case 6:me=" ";break;case 10:if(be===6){me="";break}case 7:case 8:case 9:case 11:case 2:case 4:be===12||be===13?me=" ":be!==5&&be!==17&&(W=!0);break;case 16:W=!0;break}b&&(be===12||be===13)&&(me=Y())}var Oe=I.getTokenOffset()+f;G(me,ke,Oe),ce=be}return U}function pd(e,r){for(var i="",a=0;a<r;a++)i+=e;return i}function rg(e,r){for(var i=0,a=0,o=r.tabSize||4;i<e.length;){var f=e.charAt(i);if(f===" ")a++;else if(f===" ")a+=o;else break;i++}return Math.floor(a/o)}function ng(e,r){for(var i=0;i<r.length;i++){var a=r.charAt(i);if(a==="\r")return i+1<r.length&&r.charAt(i+1)===`
237
+ `;var Zv=c(99913);function jf(e,r){r===void 0&&(r=!1);var i=e.length,a=0,o="",f=0,d=16,v=0,h=0,g=0,b=0,E=0;function V(ce,Ce){for(var ge=0,ke=0;ge<ce||!Ce;){var be=e.charCodeAt(a);if(be>=48&&be<=57)ke=ke*16+be-48;else if(be>=65&&be<=70)ke=ke*16+be-65+10;else if(be>=97&&be<=102)ke=ke*16+be-97+10;else break;a++,ge++}return ge<ce&&(ke=-1),ke}function I(ce){a=ce,o="",f=0,d=16,E=0}function W(){var ce=a;if(e.charCodeAt(a)===48)a++;else for(a++;a<e.length&&ks(e.charCodeAt(a));)a++;if(a<e.length&&e.charCodeAt(a)===46)if(a++,a<e.length&&ks(e.charCodeAt(a)))for(a++;a<e.length&&ks(e.charCodeAt(a));)a++;else return E=3,e.substring(ce,a);var Ce=a;if(a<e.length&&(e.charCodeAt(a)===69||e.charCodeAt(a)===101))if(a++,(a<e.length&&e.charCodeAt(a)===43||e.charCodeAt(a)===45)&&a++,a<e.length&&ks(e.charCodeAt(a))){for(a++;a<e.length&&ks(e.charCodeAt(a));)a++;Ce=a}else E=3;return e.substring(ce,Ce)}function Y(){for(var ce="",Ce=a;;){if(a>=i){ce+=e.substring(Ce,a),E=2;break}var ge=e.charCodeAt(a);if(ge===34){ce+=e.substring(Ce,a),a++;break}if(ge===92){if(ce+=e.substring(Ce,a),a++,a>=i){E=2;break}var ke=e.charCodeAt(a++);switch(ke){case 34:ce+='"';break;case 92:ce+="\\";break;case 47:ce+="/";break;case 98:ce+="\b";break;case 102:ce+="\f";break;case 110:ce+=`
238
+ `;break;case 114:ce+="\r";break;case 116:ce+=" ";break;case 117:var be=V(4,!0);be>=0?ce+=String.fromCharCode(be):E=4;break;default:E=5}Ce=a;continue}if(ge>=0&&ge<=31)if(Wl(ge)){ce+=e.substring(Ce,a),E=2;break}else E=6;a++}return ce}function _(){if(o="",E=0,f=a,h=v,b=g,a>=i)return f=i,d=17;var ce=e.charCodeAt(a);if(dd(ce)){do a++,o+=String.fromCharCode(ce),ce=e.charCodeAt(a);while(dd(ce));return d=15}if(Wl(ce))return a++,o+=String.fromCharCode(ce),ce===13&&e.charCodeAt(a)===10&&(a++,o+=`
239
+ `),v++,g=a,d=14;switch(ce){case 123:return a++,d=1;case 125:return a++,d=2;case 91:return a++,d=3;case 93:return a++,d=4;case 58:return a++,d=6;case 44:return a++,d=5;case 34:return a++,o=Y(),d=10;case 47:var Ce=a-1;if(e.charCodeAt(a+1)===47){for(a+=2;a<i&&!Wl(e.charCodeAt(a));)a++;return o=e.substring(Ce,a),d=12}if(e.charCodeAt(a+1)===42){a+=2;for(var ge=i-1,ke=!1;a<ge;){var be=e.charCodeAt(a);if(be===42&&e.charCodeAt(a+1)===47){a+=2,ke=!0;break}a++,Wl(be)&&(be===13&&e.charCodeAt(a)===10&&a++,v++,g=a)}return ke||(a++,E=1),o=e.substring(Ce,a),d=13}return o+=String.fromCharCode(ce),a++,d=16;case 45:if(o+=String.fromCharCode(ce),a++,a===i||!ks(e.charCodeAt(a)))return d=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=W(),d=11;default:for(;a<i&&U(ce);)a++,ce=e.charCodeAt(a);if(f!==a){switch(o=e.substring(f,a),o){case"true":return d=8;case"false":return d=9;case"null":return d=7}return d=16}return o+=String.fromCharCode(ce),a++,d=16}}function U(ce){if(dd(ce)||Wl(ce))return!1;switch(ce){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function G(){var ce;do ce=_();while(ce>=12&&ce<=15);return ce}return{setPosition:I,getPosition:function(){return a},scan:r?G:_,getToken:function(){return d},getTokenValue:function(){return o},getTokenOffset:function(){return f},getTokenLength:function(){return a-f},getTokenStartLine:function(){return h},getTokenStartCharacter:function(){return f-b},getTokenError:function(){return E}}}function dd(e){return e===32||e===9||e===11||e===12||e===160||e===5760||e>=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function Wl(e){return e===10||e===13||e===8232||e===8233}function ks(e){return e>=48&&e<=57}function qv(e,r,i){var a,o,f,d,v;if(r){for(d=r.offset,v=d+r.length,f=d;f>0&&!mp(e,f-1);)f--;for(var h=v;h<e.length&&!mp(e,h);)h++;o=e.substring(f,h),a=eg(o,i)}else o=e,a=0,f=0,d=0,v=e.length;var g=tg(i,e),b=!1,E=0,V;i.insertSpaces?V=pd(" ",i.tabSize||4):V=" ";var I=jf(o,!1),W=!1;function Y(){return g+pd(V,a+E)}function _(){var Te=I.scan();for(b=!1;Te===15||Te===14;)b=b||Te===14,Te=I.scan();return W=Te===16||I.getTokenError()!==0,Te}var U=[];function G(Te,Me,Xe){!W&&Me<v&&Xe>d&&e.substring(Me,Xe)!==Te&&U.push({offset:Me,length:Xe-Me,content:Te})}var ce=_();if(ce!==17){var Ce=I.getTokenOffset()+f,ge=pd(V,a);G(ge,f,Ce)}for(;ce!==17;){for(var ke=I.getTokenOffset()+I.getTokenLength()+f,be=_(),me="";!b&&(be===12||be===13);){var ue=I.getTokenOffset()+f;G(" ",ke,ue),ke=I.getTokenOffset()+I.getTokenLength()+f,me=be===12?Y():"",be=_()}if(be===2)ce!==1&&(E--,me=Y());else if(be===4)ce!==3&&(E--,me=Y());else{switch(ce){case 3:case 1:E++,me=Y();break;case 5:case 12:me=Y();break;case 13:b?me=Y():me=" ";break;case 6:me=" ";break;case 10:if(be===6){me="";break}case 7:case 8:case 9:case 11:case 2:case 4:be===12||be===13?me=" ":be!==5&&be!==17&&(W=!0);break;case 16:W=!0;break}b&&(be===12||be===13)&&(me=Y())}var Oe=I.getTokenOffset()+f;G(me,ke,Oe),ce=be}return U}function pd(e,r){for(var i="",a=0;a<r;a++)i+=e;return i}function eg(e,r){for(var i=0,a=0,o=r.tabSize||4;i<e.length;){var f=e.charAt(i);if(f===" ")a++;else if(f===" ")a+=o;else break;i++}return Math.floor(a/o)}function tg(e,r){for(var i=0;i<r.length;i++){var a=r.charAt(i);if(a==="\r")return i+1<r.length&&r.charAt(i+1)===`
240
240
  `?`\r
241
241
  `:"\r";if(a===`
242
242
  `)return`
243
243
  `}return e&&e.eol||`
244
- `}function yp(e,r){return`\r
245
- `.indexOf(e.charAt(r))!==-1}var Hl;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Hl||(Hl={}));function ig(e,r){var i=[],a=new Object,o=void 0,f={value:{},offset:0,length:0,type:"object",parent:void 0},d=!1;function v(h,g,b,E){f.value=h,f.offset=g,f.length=b,f.type=E,f.colonOffset=void 0,o=f}try{Wf(e,{onObjectBegin:function(h,g){if(r<=h)throw a;o=void 0,d=r>h,i.push("")},onObjectProperty:function(h,g,b){if(r<g||(v(h,g,b,"property"),i[i.length-1]=h,r<=g+b))throw a},onObjectEnd:function(h,g){if(r<=h)throw a;o=void 0,i.pop()},onArrayBegin:function(h,g){if(r<=h)throw a;o=void 0,i.push(0)},onArrayEnd:function(h,g){if(r<=h)throw a;o=void 0,i.pop()},onLiteralValue:function(h,g,b){if(r<g||(v(h,g,b,Sp(h)),r<=g+b))throw a},onSeparator:function(h,g,b){if(r<=g)throw a;if(h===":"&&o&&o.type==="property")o.colonOffset=g,d=!1,o=void 0;else if(h===","){var E=i[i.length-1];typeof E=="number"?i[i.length-1]=E+1:(d=!0,i[i.length-1]=""),o=void 0}}})}catch(h){if(h!==a)throw h}return{path:i,previousNode:o,isAtPropertyKey:d,matches:function(h){for(var g=0,b=0;g<h.length&&b<i.length;b++)if(h[g]===i[b]||h[g]==="*")g++;else if(h[g]!=="**")return!1;return g===h.length}}}function ag(e,r,i){r===void 0&&(r=[]),i===void 0&&(i=Hl.DEFAULT);var a=null,o=[],f=[];function d(h){Array.isArray(o)?o.push(h):a!==null&&(o[a]=h)}var v={onObjectBegin:function(){var h={};d(h),f.push(o),o=h,a=null},onObjectProperty:function(h){a=h},onObjectEnd:function(){o=f.pop()},onArrayBegin:function(){var h=[];d(h),f.push(o),o=h,a=null},onArrayEnd:function(){o=f.pop()},onLiteralValue:d,onError:function(h,g,b){r.push({error:h,offset:g,length:b})}};return Wf(e,v,i),o[0]}function og(e,r,i){r===void 0&&(r=[]),i===void 0&&(i=Hl.DEFAULT);var a={type:"array",offset:-1,length:-1,children:[],parent:void 0};function o(h){a.type==="property"&&(a.length=h-a.offset,a=a.parent)}function f(h){return a.children.push(h),h}var d={onObjectBegin:function(h){a=f({type:"object",offset:h,length:-1,parent:a,children:[]})},onObjectProperty:function(h,g,b){a=f({type:"property",offset:g,length:-1,parent:a,children:[]}),a.children.push({type:"string",value:h,offset:g,length:b,parent:a})},onObjectEnd:function(h,g){o(h+g),a.length=h+g-a.offset,a=a.parent,o(h+g)},onArrayBegin:function(h,g){a=f({type:"array",offset:h,length:-1,parent:a,children:[]})},onArrayEnd:function(h,g){a.length=h+g-a.offset,a=a.parent,o(h+g)},onLiteralValue:function(h,g,b){f({type:Sp(h),offset:g,length:b,parent:a,value:h}),o(g+b)},onSeparator:function(h,g,b){a.type==="property"&&(h===":"?a.colonOffset=g:h===","&&o(g))},onError:function(h,g,b){r.push({error:h,offset:g,length:b})}};Wf(e,d,i);var v=a.children[0];return v&&delete v.parent,v}function sg(e,r){if(e){for(var i=e,a=0,o=r;a<o.length;a++){var f=o[a];if(typeof f=="string"){if(i.type!=="object"||!Array.isArray(i.children))return;for(var d=!1,v=0,h=i.children;v<h.length;v++){var g=h[v];if(Array.isArray(g.children)&&g.children[0].value===f){i=g.children[1],d=!0;break}}if(!d)return}else{var b=f;if(i.type!=="array"||b<0||!Array.isArray(i.children)||b>=i.children.length)return;i=i.children[b]}}return i}}function bp(e){if(!e.parent||!e.parent.children)return[];var r=bp(e.parent);if(e.parent.type==="property"){var i=e.parent.children[0].value;r.push(i)}else if(e.parent.type==="array"){var a=e.parent.children.indexOf(e);a!==-1&&r.push(a)}return r}function hd(e){switch(e.type){case"array":return e.children.map(hd);case"object":for(var r=Object.create(null),i=0,a=e.children;i<a.length;i++){var o=a[i],f=o.children[1];f&&(r[o.children[0].value]=hd(f))}return r;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function lg(e,r,i){return i===void 0&&(i=!1),r>=e.offset&&r<e.offset+e.length||i&&r===e.offset+e.length}function xp(e,r,i){if(i===void 0&&(i=!1),lg(e,r,i)){var a=e.children;if(Array.isArray(a))for(var o=0;o<a.length&&a[o].offset<=r;o++){var f=xp(a[o],r,i);if(f)return f}return e}}function Wf(e,r,i){i===void 0&&(i=Hl.DEFAULT);var a=jf(e,!1);function o(ue){return ue?function(){return ue(a.getTokenOffset(),a.getTokenLength(),a.getTokenStartLine(),a.getTokenStartCharacter())}:function(){return!0}}function f(ue){return ue?function(Oe){return ue(Oe,a.getTokenOffset(),a.getTokenLength(),a.getTokenStartLine(),a.getTokenStartCharacter())}:function(){return!0}}var d=o(r.onObjectBegin),v=f(r.onObjectProperty),h=o(r.onObjectEnd),g=o(r.onArrayBegin),b=o(r.onArrayEnd),E=f(r.onLiteralValue),j=f(r.onSeparator),I=o(r.onComment),W=f(r.onError),Y=i&&i.disallowComments,_=i&&i.allowTrailingComma;function U(){for(;;){var ue=a.scan();switch(a.getTokenError()){case 4:G(14);break;case 5:G(15);break;case 3:G(13);break;case 1:Y||G(11);break;case 2:G(12);break;case 6:G(16);break}switch(ue){case 12:case 13:Y?G(10):I();break;case 16:G(1);break;case 15:case 14:break;default:return ue}}}function G(ue,Oe,Te){if(Oe===void 0&&(Oe=[]),Te===void 0&&(Te=[]),W(ue),Oe.length+Te.length>0)for(var Me=a.getToken();Me!==17;){if(Oe.indexOf(Me)!==-1){U();break}else if(Te.indexOf(Me)!==-1)break;Me=U()}}function ce(ue){var Oe=a.getTokenValue();return ue?E(Oe):v(Oe),U(),!0}function Ce(){switch(a.getToken()){case 11:var ue=a.getTokenValue(),Oe=Number(ue);isNaN(Oe)&&(G(2),Oe=0),E(Oe);break;case 7:E(null);break;case 8:E(!0);break;case 9:E(!1);break;default:return!1}return U(),!0}function ge(){return a.getToken()!==10?(G(3,[],[2,5]),!1):(ce(!1),a.getToken()===6?(j(":"),U(),me()||G(4,[],[2,5])):G(5,[],[2,5]),!0)}function ke(){d(),U();for(var ue=!1;a.getToken()!==2&&a.getToken()!==17;){if(a.getToken()===5){if(ue||G(4,[],[]),j(","),U(),a.getToken()===2&&_)break}else ue&&G(6,[],[]);ge()||G(4,[],[2,5]),ue=!0}return h(),a.getToken()!==2?G(7,[2],[]):U(),!0}function be(){g(),U();for(var ue=!1;a.getToken()!==4&&a.getToken()!==17;){if(a.getToken()===5){if(ue||G(4,[],[]),j(","),U(),a.getToken()===4&&_)break}else ue&&G(6,[],[]);me()||G(4,[],[4,5]),ue=!0}return b(),a.getToken()!==4?G(8,[4],[]):U(),!0}function me(){switch(a.getToken()){case 3:return be();case 1:return ke();case 10:return ce(!0);default:return Ce()}}return U(),a.getToken()===17?i.allowEmptyContent?!0:(G(4,[],[]),!1):me()?(a.getToken()!==17&&G(9,[],[]),!0):(G(4,[],[]),!1)}function ug(e,r){var i=jf(e),a=[],o,f=0,d;do switch(d=i.getPosition(),o=i.scan(),o){case 12:case 13:case 17:f!==d&&a.push(e.substring(f,d)),r!==void 0&&a.push(i.getTokenValue().replace(/[^\r\n]/g,r)),f=i.getPosition();break}while(o!==17);return a.join("")}function Sp(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(e){if(Array.isArray(e))return"array"}else return"null";return"object"}default:return"null"}}function f0(e,r,i){return fg(e,r,void 0,i)}function fg(e,r,i,a){for(var o,f=r.slice(),d=[],v=parseTree(e,d),h=void 0,g=void 0;f.length>0&&(g=f.pop(),h=findNodeAtLocation(v,f),h===void 0&&i!==void 0);)typeof g=="string"?i=(o={},o[g]=i,o):i=[i];if(h)if(h.type==="object"&&typeof g=="string"&&Array.isArray(h.children)){var b=findNodeAtLocation(h,[g]);if(b!==void 0)if(i===void 0){if(!b.parent)throw new Error("Malformed AST");var E=h.children.indexOf(b.parent),j=void 0,I=b.parent.offset+b.parent.length;if(E>0){var W=h.children[E-1];j=W.offset+W.length}else if(j=h.offset+1,h.children.length>1){var Y=h.children[1];I=Y.offset}return Fo(e,{offset:j,length:I-j,content:""},a)}else return Fo(e,{offset:b.offset,length:b.length,content:JSON.stringify(i)},a);else{if(i===void 0)return[];var _=JSON.stringify(g)+": "+JSON.stringify(i),U=a.getInsertionIndex?a.getInsertionIndex(h.children.map(function(ue){return ue.children[0].value})):h.children.length,G=void 0;if(U>0){var W=h.children[U-1];G={offset:W.offset+W.length,length:0,content:","+_}}else h.children.length===0?G={offset:h.offset+1,length:0,content:_}:G={offset:h.offset+1,length:0,content:_+","};return Fo(e,G,a)}}else if(h.type==="array"&&typeof g=="number"&&Array.isArray(h.children)){var ce=g;if(ce===-1){var _=""+JSON.stringify(i),G=void 0;if(h.children.length===0)G={offset:h.offset+1,length:0,content:_};else{var W=h.children[h.children.length-1];G={offset:W.offset+W.length,length:0,content:","+_}}return Fo(e,G,a)}else if(i===void 0&&h.children.length>=0){var Ce=g,ge=h.children[Ce],G=void 0;if(h.children.length===1)G={offset:h.offset+1,length:h.length-2,content:""};else if(h.children.length-1===Ce){var W=h.children[Ce-1],ke=W.offset+W.length,be=h.offset+h.length;G={offset:ke,length:be-2-ke,content:""}}else G={offset:ge.offset,length:h.children[Ce+1].offset-ge.offset,content:""};return Fo(e,G,a)}else if(i!==void 0){var G=void 0,_=""+JSON.stringify(i);if(!a.isArrayInsertion&&h.children.length>g){var me=h.children[g];G={offset:me.offset,length:me.length,content:_}}else if(h.children.length===0||g===0)G={offset:h.offset+1,length:0,content:h.children.length===0?_:_+","};else{var U=g>h.children.length?h.children.length:g,W=h.children[U-1];G={offset:W.offset+W.length,length:0,content:","+_}}return Fo(e,G,a)}else throw new Error("Can not "+(i===void 0?"remove":a.isArrayInsertion?"insert":"modify")+" Array index "+ce+" as length is not sufficient")}else throw new Error("Can not add "+(typeof g!="number"?"index":"property")+" to parent of type "+h.type);else{if(i===void 0)throw new Error("Can not delete in empty document");return Fo(e,{offset:v?v.offset:0,length:v?v.length:0,content:JSON.stringify(i)},a)}}function Fo(e,r,i){if(!i.formattingOptions)return[r];var a=wp(e,r),o=r.offset,f=r.offset+r.content.length;if(r.length===0||r.content.length===0){for(;o>0&&!isEOL(a,o-1);)o--;for(;f<a.length&&!isEOL(a,f);)f++}for(var d=format(a,{offset:o,length:f-o},i.formattingOptions),v=d.length-1;v>=0;v--){var h=d[v];a=wp(a,h),o=Math.min(o,h.offset),f=Math.max(f,h.offset+h.length),f+=h.content.length-h.length}var g=e.length-(a.length-f)-o;return[{offset:o,length:g,content:a.substring(o,f)}]}function wp(e,r){return e.substring(0,r.offset)+r.content+e.substring(r.offset+r.length)}function c0(e,r){return`\r
246
- `.indexOf(e.charAt(r))!==-1}var Ps=jf,d0=ig,cg=ag,p0=og,h0=sg,dg=xp,pg=bp,hg=hd,v0=Wf,g0=ug;function m0(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}function vg(e,r,i){return tg(e,r,i)}function y0(e,r,i,a){return edit.setProperty(e,r,i,a)}function b0(e,r){for(var i=r.length-1;i>=0;i--)e=edit.applyEdit(e,r[i]);return e}function Ul(e,r){if(e===r)return!0;if(e==null||r===null||r===void 0||typeof e!=typeof r||typeof e!="object"||Array.isArray(e)!==Array.isArray(r))return!1;var i,a;if(Array.isArray(e)){if(e.length!==r.length)return!1;for(i=0;i<e.length;i++)if(!Ul(e[i],r[i]))return!1}else{var o=[];for(a in e)o.push(a);o.sort();var f=[];for(a in r)f.push(a);if(f.sort(),!Ul(o,f))return!1;for(i=0;i<o.length;i++)if(!Ul(e[o[i]],r[o[i]]))return!1}return!0}function Qn(e){return typeof e=="number"}function wa(e){return typeof e!="undefined"}function Gi(e){return typeof e=="boolean"}function gg(e){return typeof e=="string"}var Cp;(function(e){function r(i){return typeof i=="string"}e.is=r})(Cp||(Cp={}));var vd;(function(e){function r(i){return typeof i=="string"}e.is=r})(vd||(vd={}));var Ap;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(Ap||(Ap={}));var Hf;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(Hf||(Hf={}));var di;(function(e){function r(a,o){return a===Number.MAX_VALUE&&(a=Hf.MAX_VALUE),o===Number.MAX_VALUE&&(o=Hf.MAX_VALUE),{line:a,character:o}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Se.uinteger(o.line)&&Se.uinteger(o.character)}e.is=i})(di||(di={}));var Wt;(function(e){function r(a,o,f,d){if(Se.uinteger(a)&&Se.uinteger(o)&&Se.uinteger(f)&&Se.uinteger(d))return{start:di.create(a,o),end:di.create(f,d)};if(di.is(a)&&di.is(o))return{start:a,end:o};throw new Error("Range#create called with invalid arguments[".concat(a,", ").concat(o,", ").concat(f,", ").concat(d,"]"))}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&di.is(o.start)&&di.is(o.end)}e.is=i})(Wt||(Wt={}));var Fs;(function(e){function r(a,o){return{uri:a,range:o}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Wt.is(o.range)&&(Se.string(o.uri)||Se.undefined(o.uri))}e.is=i})(Fs||(Fs={}));var Op;(function(e){function r(a,o,f,d){return{targetUri:a,targetRange:o,targetSelectionRange:f,originSelectionRange:d}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Wt.is(o.targetRange)&&Se.string(o.targetUri)&&Wt.is(o.targetSelectionRange)&&(Wt.is(o.originSelectionRange)||Se.undefined(o.originSelectionRange))}e.is=i})(Op||(Op={}));var gd;(function(e){function r(a,o,f,d){return{red:a,green:o,blue:f,alpha:d}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Se.numberRange(o.red,0,1)&&Se.numberRange(o.green,0,1)&&Se.numberRange(o.blue,0,1)&&Se.numberRange(o.alpha,0,1)}e.is=i})(gd||(gd={}));var Ep;(function(e){function r(a,o){return{range:a,color:o}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Wt.is(o.range)&&gd.is(o.color)}e.is=i})(Ep||(Ep={}));var Tp;(function(e){function r(a,o,f){return{label:a,textEdit:o,additionalTextEdits:f}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Se.string(o.label)&&(Se.undefined(o.textEdit)||pi.is(o))&&(Se.undefined(o.additionalTextEdits)||Se.typedArray(o.additionalTextEdits,pi.is))}e.is=i})(Tp||(Tp={}));var _l;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(_l||(_l={}));var kp;(function(e){function r(a,o,f,d,v,h){var g={startLine:a,endLine:o};return Se.defined(f)&&(g.startCharacter=f),Se.defined(d)&&(g.endCharacter=d),Se.defined(v)&&(g.kind=v),Se.defined(h)&&(g.collapsedText=h),g}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Se.uinteger(o.startLine)&&Se.uinteger(o.startLine)&&(Se.undefined(o.startCharacter)||Se.uinteger(o.startCharacter))&&(Se.undefined(o.endCharacter)||Se.uinteger(o.endCharacter))&&(Se.undefined(o.kind)||Se.string(o.kind))}e.is=i})(kp||(kp={}));var md;(function(e){function r(a,o){return{location:a,message:o}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Fs.is(o.location)&&Se.string(o.message)}e.is=i})(md||(md={}));var Ct;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Ct||(Ct={}));var Pp;(function(e){e.Unnecessary=1,e.Deprecated=2})(Pp||(Pp={}));var Fp;(function(e){function r(i){var a=i;return Se.objectLiteral(a)&&Se.string(a.href)}e.is=r})(Fp||(Fp={}));var Ca;(function(e){function r(a,o,f,d,v,h){var g={range:a,message:o};return Se.defined(f)&&(g.severity=f),Se.defined(d)&&(g.code=d),Se.defined(v)&&(g.source=v),Se.defined(h)&&(g.relatedInformation=h),g}e.create=r;function i(a){var o,f=a;return Se.defined(f)&&Wt.is(f.range)&&Se.string(f.message)&&(Se.number(f.severity)||Se.undefined(f.severity))&&(Se.integer(f.code)||Se.string(f.code)||Se.undefined(f.code))&&(Se.undefined(f.codeDescription)||Se.string((o=f.codeDescription)===null||o===void 0?void 0:o.href))&&(Se.string(f.source)||Se.undefined(f.source))&&(Se.undefined(f.relatedInformation)||Se.typedArray(f.relatedInformation,md.is))}e.is=i})(Ca||(Ca={}));var Is;(function(e){function r(a,o){for(var f=[],d=2;d<arguments.length;d++)f[d-2]=arguments[d];var v={title:a,command:o};return Se.defined(f)&&f.length>0&&(v.arguments=f),v}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.string(o.title)&&Se.string(o.command)}e.is=i})(Is||(Is={}));var pi;(function(e){function r(f,d){return{range:f,newText:d}}e.replace=r;function i(f,d){return{range:{start:f,end:f},newText:d}}e.insert=i;function a(f){return{range:f,newText:""}}e.del=a;function o(f){var d=f;return Se.objectLiteral(d)&&Se.string(d.newText)&&Wt.is(d.range)}e.is=o})(pi||(pi={}));var Ls;(function(e){function r(a,o,f){var d={label:a};return o!==void 0&&(d.needsConfirmation=o),f!==void 0&&(d.description=f),d}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Se.string(o.label)&&(Se.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(Se.string(o.description)||o.description===void 0)}e.is=i})(Ls||(Ls={}));var dn;(function(e){function r(i){var a=i;return Se.string(a)}e.is=r})(dn||(dn={}));var ao;(function(e){function r(f,d,v){return{range:f,newText:d,annotationId:v}}e.replace=r;function i(f,d,v){return{range:{start:f,end:f},newText:d,annotationId:v}}e.insert=i;function a(f,d){return{range:f,newText:"",annotationId:d}}e.del=a;function o(f){var d=f;return pi.is(d)&&(Ls.is(d.annotationId)||dn.is(d.annotationId))}e.is=o})(ao||(ao={}));var Uf;(function(e){function r(a,o){return{textDocument:a,edits:o}}e.create=r;function i(a){var o=a;return Se.defined(o)&&zf.is(o.textDocument)&&Array.isArray(o.edits)}e.is=i})(Uf||(Uf={}));var zl;(function(e){function r(a,o,f){var d={kind:"create",uri:a};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(d.options=o),f!==void 0&&(d.annotationId=f),d}e.create=r;function i(a){var o=a;return o&&o.kind==="create"&&Se.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||Se.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||Se.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||dn.is(o.annotationId))}e.is=i})(zl||(zl={}));var Gl;(function(e){function r(a,o,f,d){var v={kind:"rename",oldUri:a,newUri:o};return f!==void 0&&(f.overwrite!==void 0||f.ignoreIfExists!==void 0)&&(v.options=f),d!==void 0&&(v.annotationId=d),v}e.create=r;function i(a){var o=a;return o&&o.kind==="rename"&&Se.string(o.oldUri)&&Se.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||Se.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||Se.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||dn.is(o.annotationId))}e.is=i})(Gl||(Gl={}));var $l;(function(e){function r(a,o,f){var d={kind:"delete",uri:a};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(d.options=o),f!==void 0&&(d.annotationId=f),d}e.create=r;function i(a){var o=a;return o&&o.kind==="delete"&&Se.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||Se.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||Se.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||dn.is(o.annotationId))}e.is=i})($l||($l={}));var yd;(function(e){function r(i){var a=i;return a&&(a.changes!==void 0||a.documentChanges!==void 0)&&(a.documentChanges===void 0||a.documentChanges.every(function(o){return Se.string(o.kind)?zl.is(o)||Gl.is(o)||$l.is(o):Uf.is(o)}))}e.is=r})(yd||(yd={}));var _f=function(){function e(r,i){this.edits=r,this.changeAnnotations=i}return e.prototype.insert=function(r,i,a){var o,f;if(a===void 0?o=pi.insert(r,i):dn.is(a)?(f=a,o=ao.insert(r,i,a)):(this.assertChangeAnnotations(this.changeAnnotations),f=this.changeAnnotations.manage(a),o=ao.insert(r,i,f)),this.edits.push(o),f!==void 0)return f},e.prototype.replace=function(r,i,a){var o,f;if(a===void 0?o=pi.replace(r,i):dn.is(a)?(f=a,o=ao.replace(r,i,a)):(this.assertChangeAnnotations(this.changeAnnotations),f=this.changeAnnotations.manage(a),o=ao.replace(r,i,f)),this.edits.push(o),f!==void 0)return f},e.prototype.delete=function(r,i){var a,o;if(i===void 0?a=pi.del(r):dn.is(i)?(o=i,a=ao.del(r,i)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(i),a=ao.del(r,o)),this.edits.push(a),o!==void 0)return o},e.prototype.add=function(r){this.edits.push(r)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(r){if(r===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),Ip=function(){function e(r){this._annotations=r===void 0?Object.create(null):r,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(r,i){var a;if(dn.is(r)?a=r:(a=this.nextId(),i=r),this._annotations[a]!==void 0)throw new Error("Id ".concat(a," is already in use."));if(i===void 0)throw new Error("No annotation provided for id ".concat(a));return this._annotations[a]=i,this._size++,a},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),x0=function(){function e(r){var i=this;this._textEditChanges=Object.create(null),r!==void 0?(this._workspaceEdit=r,r.documentChanges?(this._changeAnnotations=new Ip(r.changeAnnotations),r.changeAnnotations=this._changeAnnotations.all(),r.documentChanges.forEach(function(a){if(Uf.is(a)){var o=new _f(a.edits,i._changeAnnotations);i._textEditChanges[a.textDocument.uri]=o}})):r.changes&&Object.keys(r.changes).forEach(function(a){var o=new _f(r.changes[a]);i._textEditChanges[a]=o})):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(r){if(zf.is(r)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i={uri:r.uri,version:r.version},a=this._textEditChanges[i.uri];if(!a){var o=[],f={textDocument:i,edits:o};this._workspaceEdit.documentChanges.push(f),a=new _f(o,this._changeAnnotations),this._textEditChanges[i.uri]=a}return a}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var a=this._textEditChanges[r];if(!a){var o=[];this._workspaceEdit.changes[r]=o,a=new _f(o),this._textEditChanges[r]=a}return a}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ip,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(r,i,a){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var o;Ls.is(i)||dn.is(i)?o=i:a=i;var f,d;if(o===void 0?f=zl.create(r,a):(d=dn.is(o)?o:this._changeAnnotations.manage(o),f=zl.create(r,a,d)),this._workspaceEdit.documentChanges.push(f),d!==void 0)return d},e.prototype.renameFile=function(r,i,a,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var f;Ls.is(a)||dn.is(a)?f=a:o=a;var d,v;if(f===void 0?d=Gl.create(r,i,o):(v=dn.is(f)?f:this._changeAnnotations.manage(f),d=Gl.create(r,i,o,v)),this._workspaceEdit.documentChanges.push(d),v!==void 0)return v},e.prototype.deleteFile=function(r,i,a){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var o;Ls.is(i)||dn.is(i)?o=i:a=i;var f,d;if(o===void 0?f=$l.create(r,a):(d=dn.is(o)?o:this._changeAnnotations.manage(o),f=$l.create(r,a,d)),this._workspaceEdit.documentChanges.push(f),d!==void 0)return d},e}(),Lp;(function(e){function r(a){return{uri:a}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.string(o.uri)}e.is=i})(Lp||(Lp={}));var Mp;(function(e){function r(a,o){return{uri:a,version:o}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.string(o.uri)&&Se.integer(o.version)}e.is=i})(Mp||(Mp={}));var zf;(function(e){function r(a,o){return{uri:a,version:o}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.string(o.uri)&&(o.version===null||Se.integer(o.version))}e.is=i})(zf||(zf={}));var Np;(function(e){function r(a,o,f,d){return{uri:a,languageId:o,version:f,text:d}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.string(o.uri)&&Se.string(o.languageId)&&Se.integer(o.version)&&Se.string(o.text)}e.is=i})(Np||(Np={}));var Io;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function r(i){var a=i;return a===e.PlainText||a===e.Markdown}e.is=r})(Io||(Io={}));var Kl;(function(e){function r(i){var a=i;return Se.objectLiteral(i)&&Io.is(a.kind)&&Se.string(a.value)}e.is=r})(Kl||(Kl={}));var Zn;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Zn||(Zn={}));var Hr;(function(e){e.PlainText=1,e.Snippet=2})(Hr||(Hr={}));var Rp;(function(e){e.Deprecated=1})(Rp||(Rp={}));var Dp;(function(e){function r(a,o,f){return{newText:a,insert:o,replace:f}}e.create=r;function i(a){var o=a;return o&&Se.string(o.newText)&&Wt.is(o.insert)&&Wt.is(o.replace)}e.is=i})(Dp||(Dp={}));var Bp;(function(e){e.asIs=1,e.adjustIndentation=2})(Bp||(Bp={}));var Vp;(function(e){function r(i){var a=i;return a&&(Se.string(a.detail)||a.detail===void 0)&&(Se.string(a.description)||a.description===void 0)}e.is=r})(Vp||(Vp={}));var bd;(function(e){function r(i){return{label:i}}e.create=r})(bd||(bd={}));var jp;(function(e){function r(i,a){return{items:i||[],isIncomplete:!!a}}e.create=r})(jp||(jp={}));var Gf;(function(e){function r(a){return a.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=r;function i(a){var o=a;return Se.string(o)||Se.objectLiteral(o)&&Se.string(o.language)&&Se.string(o.value)}e.is=i})(Gf||(Gf={}));var Wp;(function(e){function r(i){var a=i;return!!a&&Se.objectLiteral(a)&&(Kl.is(a.contents)||Gf.is(a.contents)||Se.typedArray(a.contents,Gf.is))&&(i.range===void 0||Wt.is(i.range))}e.is=r})(Wp||(Wp={}));var Hp;(function(e){function r(i,a){return a?{label:i,documentation:a}:{label:i}}e.create=r})(Hp||(Hp={}));var Up;(function(e){function r(i,a){for(var o=[],f=2;f<arguments.length;f++)o[f-2]=arguments[f];var d={label:i};return Se.defined(a)&&(d.documentation=a),Se.defined(o)?d.parameters=o:d.parameters=[],d}e.create=r})(Up||(Up={}));var _p;(function(e){e.Text=1,e.Read=2,e.Write=3})(_p||(_p={}));var zp;(function(e){function r(i,a){var o={range:i};return Se.number(a)&&(o.kind=a),o}e.create=r})(zp||(zp={}));var $i;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})($i||($i={}));var Gp;(function(e){e.Deprecated=1})(Gp||(Gp={}));var $p;(function(e){function r(i,a,o,f,d){var v={name:i,kind:a,location:{uri:f,range:o}};return d&&(v.containerName=d),v}e.create=r})($p||($p={}));var Kp;(function(e){function r(i,a,o,f){return f!==void 0?{name:i,kind:a,location:{uri:o,range:f}}:{name:i,kind:a,location:{uri:o}}}e.create=r})(Kp||(Kp={}));var Yp;(function(e){function r(a,o,f,d,v,h){var g={name:a,detail:o,kind:f,range:d,selectionRange:v};return h!==void 0&&(g.children=h),g}e.create=r;function i(a){var o=a;return o&&Se.string(o.name)&&Se.number(o.kind)&&Wt.is(o.range)&&Wt.is(o.selectionRange)&&(o.detail===void 0||Se.string(o.detail))&&(o.deprecated===void 0||Se.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=i})(Yp||(Yp={}));var Xp;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Xp||(Xp={}));var $f;(function(e){e.Invoked=1,e.Automatic=2})($f||($f={}));var Jp;(function(e){function r(a,o,f){var d={diagnostics:a};return o!=null&&(d.only=o),f!=null&&(d.triggerKind=f),d}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.typedArray(o.diagnostics,Ca.is)&&(o.only===void 0||Se.typedArray(o.only,Se.string))&&(o.triggerKind===void 0||o.triggerKind===$f.Invoked||o.triggerKind===$f.Automatic)}e.is=i})(Jp||(Jp={}));var Qp;(function(e){function r(a,o,f){var d={title:a},v=!0;return typeof o=="string"?(v=!1,d.kind=o):Is.is(o)?d.command=o:d.edit=o,v&&f!==void 0&&(d.kind=f),d}e.create=r;function i(a){var o=a;return o&&Se.string(o.title)&&(o.diagnostics===void 0||Se.typedArray(o.diagnostics,Ca.is))&&(o.kind===void 0||Se.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Is.is(o.command))&&(o.isPreferred===void 0||Se.boolean(o.isPreferred))&&(o.edit===void 0||yd.is(o.edit))}e.is=i})(Qp||(Qp={}));var Zp;(function(e){function r(a,o){var f={range:a};return Se.defined(o)&&(f.data=o),f}e.create=r;function i(a){var o=a;return Se.defined(o)&&Wt.is(o.range)&&(Se.undefined(o.command)||Is.is(o.command))}e.is=i})(Zp||(Zp={}));var qp;(function(e){function r(a,o){return{tabSize:a,insertSpaces:o}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.uinteger(o.tabSize)&&Se.boolean(o.insertSpaces)}e.is=i})(qp||(qp={}));var eh;(function(e){function r(a,o,f){return{range:a,target:o,data:f}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Wt.is(o.range)&&(Se.undefined(o.target)||Se.string(o.target))}e.is=i})(eh||(eh={}));var Kf;(function(e){function r(a,o){return{range:a,parent:o}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Wt.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=i})(Kf||(Kf={}));var th;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(th||(th={}));var rh;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(rh||(rh={}));var nh;(function(e){function r(i){var a=i;return Se.objectLiteral(a)&&(a.resultId===void 0||typeof a.resultId=="string")&&Array.isArray(a.data)&&(a.data.length===0||typeof a.data[0]=="number")}e.is=r})(nh||(nh={}));var ih;(function(e){function r(a,o){return{range:a,text:o}}e.create=r;function i(a){var o=a;return o!=null&&Wt.is(o.range)&&Se.string(o.text)}e.is=i})(ih||(ih={}));var ah;(function(e){function r(a,o,f){return{range:a,variableName:o,caseSensitiveLookup:f}}e.create=r;function i(a){var o=a;return o!=null&&Wt.is(o.range)&&Se.boolean(o.caseSensitiveLookup)&&(Se.string(o.variableName)||o.variableName===void 0)}e.is=i})(ah||(ah={}));var oh;(function(e){function r(a,o){return{range:a,expression:o}}e.create=r;function i(a){var o=a;return o!=null&&Wt.is(o.range)&&(Se.string(o.expression)||o.expression===void 0)}e.is=i})(oh||(oh={}));var sh;(function(e){function r(a,o){return{frameId:a,stoppedLocation:o}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Wt.is(a.stoppedLocation)}e.is=i})(sh||(sh={}));var xd;(function(e){e.Type=1,e.Parameter=2;function r(i){return i===1||i===2}e.is=r})(xd||(xd={}));var Sd;(function(e){function r(a){return{value:a}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&(o.tooltip===void 0||Se.string(o.tooltip)||Kl.is(o.tooltip))&&(o.location===void 0||Fs.is(o.location))&&(o.command===void 0||Is.is(o.command))}e.is=i})(Sd||(Sd={}));var lh;(function(e){function r(a,o,f){var d={position:a,label:o};return f!==void 0&&(d.kind=f),d}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&di.is(o.position)&&(Se.string(o.label)||Se.typedArray(o.label,Sd.is))&&(o.kind===void 0||xd.is(o.kind))&&o.textEdits===void 0||Se.typedArray(o.textEdits,pi.is)&&(o.tooltip===void 0||Se.string(o.tooltip)||Kl.is(o.tooltip))&&(o.paddingLeft===void 0||Se.boolean(o.paddingLeft))&&(o.paddingRight===void 0||Se.boolean(o.paddingRight))}e.is=i})(lh||(lh={}));var uh;(function(e){function r(i){var a=i;return Se.objectLiteral(a)&&vd.is(a.uri)&&Se.string(a.name)}e.is=r})(uh||(uh={}));var S0=null,fh;(function(e){function r(f,d,v,h){return new mg(f,d,v,h)}e.create=r;function i(f){var d=f;return!!(Se.defined(d)&&Se.string(d.uri)&&(Se.undefined(d.languageId)||Se.string(d.languageId))&&Se.uinteger(d.lineCount)&&Se.func(d.getText)&&Se.func(d.positionAt)&&Se.func(d.offsetAt))}e.is=i;function a(f,d){for(var v=f.getText(),h=o(d,function(W,Y){var _=W.range.start.line-Y.range.start.line;return _===0?W.range.start.character-Y.range.start.character:_}),g=v.length,b=h.length-1;b>=0;b--){var E=h[b],j=f.offsetAt(E.range.start),I=f.offsetAt(E.range.end);if(I<=g)v=v.substring(0,j)+E.newText+v.substring(I,v.length);else throw new Error("Overlapping edit");g=j}return v}e.applyEdits=a;function o(f,d){if(f.length<=1)return f;var v=f.length/2|0,h=f.slice(0,v),g=f.slice(v);o(h,d),o(g,d);for(var b=0,E=0,j=0;b<h.length&&E<g.length;){var I=d(h[b],g[E]);I<=0?f[j++]=h[b++]:f[j++]=g[E++]}for(;b<h.length;)f[j++]=h[b++];for(;E<g.length;)f[j++]=g[E++];return f}})(fh||(fh={}));var mg=function(){function e(r,i,a,o){this._uri=r,this._languageId=i,this._version=a,this._content=o,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(r){if(r){var i=this.offsetAt(r.start),a=this.offsetAt(r.end);return this._content.substring(i,a)}return this._content},e.prototype.update=function(r,i){this._content=r.text,this._version=i,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var r=[],i=this._content,a=!0,o=0;o<i.length;o++){a&&(r.push(o),a=!1);var f=i.charAt(o);a=f==="\r"||f===`
244
+ `}function mp(e,r){return`\r
245
+ `.indexOf(e.charAt(r))!==-1}var Hl;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Hl||(Hl={}));function rg(e,r){var i=[],a=new Object,o=void 0,f={value:{},offset:0,length:0,type:"object",parent:void 0},d=!1;function v(h,g,b,E){f.value=h,f.offset=g,f.length=b,f.type=E,f.colonOffset=void 0,o=f}try{Wf(e,{onObjectBegin:function(h,g){if(r<=h)throw a;o=void 0,d=r>h,i.push("")},onObjectProperty:function(h,g,b){if(r<g||(v(h,g,b,"property"),i[i.length-1]=h,r<=g+b))throw a},onObjectEnd:function(h,g){if(r<=h)throw a;o=void 0,i.pop()},onArrayBegin:function(h,g){if(r<=h)throw a;o=void 0,i.push(0)},onArrayEnd:function(h,g){if(r<=h)throw a;o=void 0,i.pop()},onLiteralValue:function(h,g,b){if(r<g||(v(h,g,b,xp(h)),r<=g+b))throw a},onSeparator:function(h,g,b){if(r<=g)throw a;if(h===":"&&o&&o.type==="property")o.colonOffset=g,d=!1,o=void 0;else if(h===","){var E=i[i.length-1];typeof E=="number"?i[i.length-1]=E+1:(d=!0,i[i.length-1]=""),o=void 0}}})}catch(h){if(h!==a)throw h}return{path:i,previousNode:o,isAtPropertyKey:d,matches:function(h){for(var g=0,b=0;g<h.length&&b<i.length;b++)if(h[g]===i[b]||h[g]==="*")g++;else if(h[g]!=="**")return!1;return g===h.length}}}function ng(e,r,i){r===void 0&&(r=[]),i===void 0&&(i=Hl.DEFAULT);var a=null,o=[],f=[];function d(h){Array.isArray(o)?o.push(h):a!==null&&(o[a]=h)}var v={onObjectBegin:function(){var h={};d(h),f.push(o),o=h,a=null},onObjectProperty:function(h){a=h},onObjectEnd:function(){o=f.pop()},onArrayBegin:function(){var h=[];d(h),f.push(o),o=h,a=null},onArrayEnd:function(){o=f.pop()},onLiteralValue:d,onError:function(h,g,b){r.push({error:h,offset:g,length:b})}};return Wf(e,v,i),o[0]}function ig(e,r,i){r===void 0&&(r=[]),i===void 0&&(i=Hl.DEFAULT);var a={type:"array",offset:-1,length:-1,children:[],parent:void 0};function o(h){a.type==="property"&&(a.length=h-a.offset,a=a.parent)}function f(h){return a.children.push(h),h}var d={onObjectBegin:function(h){a=f({type:"object",offset:h,length:-1,parent:a,children:[]})},onObjectProperty:function(h,g,b){a=f({type:"property",offset:g,length:-1,parent:a,children:[]}),a.children.push({type:"string",value:h,offset:g,length:b,parent:a})},onObjectEnd:function(h,g){o(h+g),a.length=h+g-a.offset,a=a.parent,o(h+g)},onArrayBegin:function(h,g){a=f({type:"array",offset:h,length:-1,parent:a,children:[]})},onArrayEnd:function(h,g){a.length=h+g-a.offset,a=a.parent,o(h+g)},onLiteralValue:function(h,g,b){f({type:xp(h),offset:g,length:b,parent:a,value:h}),o(g+b)},onSeparator:function(h,g,b){a.type==="property"&&(h===":"?a.colonOffset=g:h===","&&o(g))},onError:function(h,g,b){r.push({error:h,offset:g,length:b})}};Wf(e,d,i);var v=a.children[0];return v&&delete v.parent,v}function ag(e,r){if(e){for(var i=e,a=0,o=r;a<o.length;a++){var f=o[a];if(typeof f=="string"){if(i.type!=="object"||!Array.isArray(i.children))return;for(var d=!1,v=0,h=i.children;v<h.length;v++){var g=h[v];if(Array.isArray(g.children)&&g.children[0].value===f){i=g.children[1],d=!0;break}}if(!d)return}else{var b=f;if(i.type!=="array"||b<0||!Array.isArray(i.children)||b>=i.children.length)return;i=i.children[b]}}return i}}function yp(e){if(!e.parent||!e.parent.children)return[];var r=yp(e.parent);if(e.parent.type==="property"){var i=e.parent.children[0].value;r.push(i)}else if(e.parent.type==="array"){var a=e.parent.children.indexOf(e);a!==-1&&r.push(a)}return r}function hd(e){switch(e.type){case"array":return e.children.map(hd);case"object":for(var r=Object.create(null),i=0,a=e.children;i<a.length;i++){var o=a[i],f=o.children[1];f&&(r[o.children[0].value]=hd(f))}return r;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function og(e,r,i){return i===void 0&&(i=!1),r>=e.offset&&r<e.offset+e.length||i&&r===e.offset+e.length}function bp(e,r,i){if(i===void 0&&(i=!1),og(e,r,i)){var a=e.children;if(Array.isArray(a))for(var o=0;o<a.length&&a[o].offset<=r;o++){var f=bp(a[o],r,i);if(f)return f}return e}}function Wf(e,r,i){i===void 0&&(i=Hl.DEFAULT);var a=jf(e,!1);function o(ue){return ue?function(){return ue(a.getTokenOffset(),a.getTokenLength(),a.getTokenStartLine(),a.getTokenStartCharacter())}:function(){return!0}}function f(ue){return ue?function(Oe){return ue(Oe,a.getTokenOffset(),a.getTokenLength(),a.getTokenStartLine(),a.getTokenStartCharacter())}:function(){return!0}}var d=o(r.onObjectBegin),v=f(r.onObjectProperty),h=o(r.onObjectEnd),g=o(r.onArrayBegin),b=o(r.onArrayEnd),E=f(r.onLiteralValue),V=f(r.onSeparator),I=o(r.onComment),W=f(r.onError),Y=i&&i.disallowComments,_=i&&i.allowTrailingComma;function U(){for(;;){var ue=a.scan();switch(a.getTokenError()){case 4:G(14);break;case 5:G(15);break;case 3:G(13);break;case 1:Y||G(11);break;case 2:G(12);break;case 6:G(16);break}switch(ue){case 12:case 13:Y?G(10):I();break;case 16:G(1);break;case 15:case 14:break;default:return ue}}}function G(ue,Oe,Te){if(Oe===void 0&&(Oe=[]),Te===void 0&&(Te=[]),W(ue),Oe.length+Te.length>0)for(var Me=a.getToken();Me!==17;){if(Oe.indexOf(Me)!==-1){U();break}else if(Te.indexOf(Me)!==-1)break;Me=U()}}function ce(ue){var Oe=a.getTokenValue();return ue?E(Oe):v(Oe),U(),!0}function Ce(){switch(a.getToken()){case 11:var ue=a.getTokenValue(),Oe=Number(ue);isNaN(Oe)&&(G(2),Oe=0),E(Oe);break;case 7:E(null);break;case 8:E(!0);break;case 9:E(!1);break;default:return!1}return U(),!0}function ge(){return a.getToken()!==10?(G(3,[],[2,5]),!1):(ce(!1),a.getToken()===6?(V(":"),U(),me()||G(4,[],[2,5])):G(5,[],[2,5]),!0)}function ke(){d(),U();for(var ue=!1;a.getToken()!==2&&a.getToken()!==17;){if(a.getToken()===5){if(ue||G(4,[],[]),V(","),U(),a.getToken()===2&&_)break}else ue&&G(6,[],[]);ge()||G(4,[],[2,5]),ue=!0}return h(),a.getToken()!==2?G(7,[2],[]):U(),!0}function be(){g(),U();for(var ue=!1;a.getToken()!==4&&a.getToken()!==17;){if(a.getToken()===5){if(ue||G(4,[],[]),V(","),U(),a.getToken()===4&&_)break}else ue&&G(6,[],[]);me()||G(4,[],[4,5]),ue=!0}return b(),a.getToken()!==4?G(8,[4],[]):U(),!0}function me(){switch(a.getToken()){case 3:return be();case 1:return ke();case 10:return ce(!0);default:return Ce()}}return U(),a.getToken()===17?i.allowEmptyContent?!0:(G(4,[],[]),!1):me()?(a.getToken()!==17&&G(9,[],[]),!0):(G(4,[],[]),!1)}function sg(e,r){var i=jf(e),a=[],o,f=0,d;do switch(d=i.getPosition(),o=i.scan(),o){case 12:case 13:case 17:f!==d&&a.push(e.substring(f,d)),r!==void 0&&a.push(i.getTokenValue().replace(/[^\r\n]/g,r)),f=i.getPosition();break}while(o!==17);return a.join("")}function xp(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(e){if(Array.isArray(e))return"array"}else return"null";return"object"}default:return"null"}}function o0(e,r,i){return lg(e,r,void 0,i)}function lg(e,r,i,a){for(var o,f=r.slice(),d=[],v=parseTree(e,d),h=void 0,g=void 0;f.length>0&&(g=f.pop(),h=findNodeAtLocation(v,f),h===void 0&&i!==void 0);)typeof g=="string"?i=(o={},o[g]=i,o):i=[i];if(h)if(h.type==="object"&&typeof g=="string"&&Array.isArray(h.children)){var b=findNodeAtLocation(h,[g]);if(b!==void 0)if(i===void 0){if(!b.parent)throw new Error("Malformed AST");var E=h.children.indexOf(b.parent),V=void 0,I=b.parent.offset+b.parent.length;if(E>0){var W=h.children[E-1];V=W.offset+W.length}else if(V=h.offset+1,h.children.length>1){var Y=h.children[1];I=Y.offset}return Fo(e,{offset:V,length:I-V,content:""},a)}else return Fo(e,{offset:b.offset,length:b.length,content:JSON.stringify(i)},a);else{if(i===void 0)return[];var _=JSON.stringify(g)+": "+JSON.stringify(i),U=a.getInsertionIndex?a.getInsertionIndex(h.children.map(function(ue){return ue.children[0].value})):h.children.length,G=void 0;if(U>0){var W=h.children[U-1];G={offset:W.offset+W.length,length:0,content:","+_}}else h.children.length===0?G={offset:h.offset+1,length:0,content:_}:G={offset:h.offset+1,length:0,content:_+","};return Fo(e,G,a)}}else if(h.type==="array"&&typeof g=="number"&&Array.isArray(h.children)){var ce=g;if(ce===-1){var _=""+JSON.stringify(i),G=void 0;if(h.children.length===0)G={offset:h.offset+1,length:0,content:_};else{var W=h.children[h.children.length-1];G={offset:W.offset+W.length,length:0,content:","+_}}return Fo(e,G,a)}else if(i===void 0&&h.children.length>=0){var Ce=g,ge=h.children[Ce],G=void 0;if(h.children.length===1)G={offset:h.offset+1,length:h.length-2,content:""};else if(h.children.length-1===Ce){var W=h.children[Ce-1],ke=W.offset+W.length,be=h.offset+h.length;G={offset:ke,length:be-2-ke,content:""}}else G={offset:ge.offset,length:h.children[Ce+1].offset-ge.offset,content:""};return Fo(e,G,a)}else if(i!==void 0){var G=void 0,_=""+JSON.stringify(i);if(!a.isArrayInsertion&&h.children.length>g){var me=h.children[g];G={offset:me.offset,length:me.length,content:_}}else if(h.children.length===0||g===0)G={offset:h.offset+1,length:0,content:h.children.length===0?_:_+","};else{var U=g>h.children.length?h.children.length:g,W=h.children[U-1];G={offset:W.offset+W.length,length:0,content:","+_}}return Fo(e,G,a)}else throw new Error("Can not "+(i===void 0?"remove":a.isArrayInsertion?"insert":"modify")+" Array index "+ce+" as length is not sufficient")}else throw new Error("Can not add "+(typeof g!="number"?"index":"property")+" to parent of type "+h.type);else{if(i===void 0)throw new Error("Can not delete in empty document");return Fo(e,{offset:v?v.offset:0,length:v?v.length:0,content:JSON.stringify(i)},a)}}function Fo(e,r,i){if(!i.formattingOptions)return[r];var a=Sp(e,r),o=r.offset,f=r.offset+r.content.length;if(r.length===0||r.content.length===0){for(;o>0&&!isEOL(a,o-1);)o--;for(;f<a.length&&!isEOL(a,f);)f++}for(var d=format(a,{offset:o,length:f-o},i.formattingOptions),v=d.length-1;v>=0;v--){var h=d[v];a=Sp(a,h),o=Math.min(o,h.offset),f=Math.max(f,h.offset+h.length),f+=h.content.length-h.length}var g=e.length-(a.length-f)-o;return[{offset:o,length:g,content:a.substring(o,f)}]}function Sp(e,r){return e.substring(0,r.offset)+r.content+e.substring(r.offset+r.length)}function s0(e,r){return`\r
246
+ `.indexOf(e.charAt(r))!==-1}var Ps=jf,l0=rg,ug=ng,u0=ig,f0=ag,fg=bp,cg=yp,dg=hd,c0=Wf,d0=sg;function p0(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}function pg(e,r,i){return qv(e,r,i)}function h0(e,r,i,a){return edit.setProperty(e,r,i,a)}function v0(e,r){for(var i=r.length-1;i>=0;i--)e=edit.applyEdit(e,r[i]);return e}function Ul(e,r){if(e===r)return!0;if(e==null||r===null||r===void 0||typeof e!=typeof r||typeof e!="object"||Array.isArray(e)!==Array.isArray(r))return!1;var i,a;if(Array.isArray(e)){if(e.length!==r.length)return!1;for(i=0;i<e.length;i++)if(!Ul(e[i],r[i]))return!1}else{var o=[];for(a in e)o.push(a);o.sort();var f=[];for(a in r)f.push(a);if(f.sort(),!Ul(o,f))return!1;for(i=0;i<o.length;i++)if(!Ul(e[o[i]],r[o[i]]))return!1}return!0}function Qn(e){return typeof e=="number"}function wa(e){return typeof e<"u"}function Gi(e){return typeof e=="boolean"}function hg(e){return typeof e=="string"}var wp;(function(e){function r(i){return typeof i=="string"}e.is=r})(wp||(wp={}));var vd;(function(e){function r(i){return typeof i=="string"}e.is=r})(vd||(vd={}));var Cp;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(Cp||(Cp={}));var Hf;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(Hf||(Hf={}));var di;(function(e){function r(a,o){return a===Number.MAX_VALUE&&(a=Hf.MAX_VALUE),o===Number.MAX_VALUE&&(o=Hf.MAX_VALUE),{line:a,character:o}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Se.uinteger(o.line)&&Se.uinteger(o.character)}e.is=i})(di||(di={}));var Wt;(function(e){function r(a,o,f,d){if(Se.uinteger(a)&&Se.uinteger(o)&&Se.uinteger(f)&&Se.uinteger(d))return{start:di.create(a,o),end:di.create(f,d)};if(di.is(a)&&di.is(o))return{start:a,end:o};throw new Error("Range#create called with invalid arguments[".concat(a,", ").concat(o,", ").concat(f,", ").concat(d,"]"))}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&di.is(o.start)&&di.is(o.end)}e.is=i})(Wt||(Wt={}));var Fs;(function(e){function r(a,o){return{uri:a,range:o}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Wt.is(o.range)&&(Se.string(o.uri)||Se.undefined(o.uri))}e.is=i})(Fs||(Fs={}));var Ap;(function(e){function r(a,o,f,d){return{targetUri:a,targetRange:o,targetSelectionRange:f,originSelectionRange:d}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Wt.is(o.targetRange)&&Se.string(o.targetUri)&&Wt.is(o.targetSelectionRange)&&(Wt.is(o.originSelectionRange)||Se.undefined(o.originSelectionRange))}e.is=i})(Ap||(Ap={}));var gd;(function(e){function r(a,o,f,d){return{red:a,green:o,blue:f,alpha:d}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Se.numberRange(o.red,0,1)&&Se.numberRange(o.green,0,1)&&Se.numberRange(o.blue,0,1)&&Se.numberRange(o.alpha,0,1)}e.is=i})(gd||(gd={}));var Op;(function(e){function r(a,o){return{range:a,color:o}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Wt.is(o.range)&&gd.is(o.color)}e.is=i})(Op||(Op={}));var Ep;(function(e){function r(a,o,f){return{label:a,textEdit:o,additionalTextEdits:f}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Se.string(o.label)&&(Se.undefined(o.textEdit)||pi.is(o))&&(Se.undefined(o.additionalTextEdits)||Se.typedArray(o.additionalTextEdits,pi.is))}e.is=i})(Ep||(Ep={}));var _l;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(_l||(_l={}));var Tp;(function(e){function r(a,o,f,d,v,h){var g={startLine:a,endLine:o};return Se.defined(f)&&(g.startCharacter=f),Se.defined(d)&&(g.endCharacter=d),Se.defined(v)&&(g.kind=v),Se.defined(h)&&(g.collapsedText=h),g}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Se.uinteger(o.startLine)&&Se.uinteger(o.startLine)&&(Se.undefined(o.startCharacter)||Se.uinteger(o.startCharacter))&&(Se.undefined(o.endCharacter)||Se.uinteger(o.endCharacter))&&(Se.undefined(o.kind)||Se.string(o.kind))}e.is=i})(Tp||(Tp={}));var md;(function(e){function r(a,o){return{location:a,message:o}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Fs.is(o.location)&&Se.string(o.message)}e.is=i})(md||(md={}));var Ct;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Ct||(Ct={}));var kp;(function(e){e.Unnecessary=1,e.Deprecated=2})(kp||(kp={}));var Pp;(function(e){function r(i){var a=i;return Se.objectLiteral(a)&&Se.string(a.href)}e.is=r})(Pp||(Pp={}));var Ca;(function(e){function r(a,o,f,d,v,h){var g={range:a,message:o};return Se.defined(f)&&(g.severity=f),Se.defined(d)&&(g.code=d),Se.defined(v)&&(g.source=v),Se.defined(h)&&(g.relatedInformation=h),g}e.create=r;function i(a){var o,f=a;return Se.defined(f)&&Wt.is(f.range)&&Se.string(f.message)&&(Se.number(f.severity)||Se.undefined(f.severity))&&(Se.integer(f.code)||Se.string(f.code)||Se.undefined(f.code))&&(Se.undefined(f.codeDescription)||Se.string((o=f.codeDescription)===null||o===void 0?void 0:o.href))&&(Se.string(f.source)||Se.undefined(f.source))&&(Se.undefined(f.relatedInformation)||Se.typedArray(f.relatedInformation,md.is))}e.is=i})(Ca||(Ca={}));var Is;(function(e){function r(a,o){for(var f=[],d=2;d<arguments.length;d++)f[d-2]=arguments[d];var v={title:a,command:o};return Se.defined(f)&&f.length>0&&(v.arguments=f),v}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.string(o.title)&&Se.string(o.command)}e.is=i})(Is||(Is={}));var pi;(function(e){function r(f,d){return{range:f,newText:d}}e.replace=r;function i(f,d){return{range:{start:f,end:f},newText:d}}e.insert=i;function a(f){return{range:f,newText:""}}e.del=a;function o(f){var d=f;return Se.objectLiteral(d)&&Se.string(d.newText)&&Wt.is(d.range)}e.is=o})(pi||(pi={}));var Ls;(function(e){function r(a,o,f){var d={label:a};return o!==void 0&&(d.needsConfirmation=o),f!==void 0&&(d.description=f),d}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Se.string(o.label)&&(Se.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(Se.string(o.description)||o.description===void 0)}e.is=i})(Ls||(Ls={}));var dn;(function(e){function r(i){var a=i;return Se.string(a)}e.is=r})(dn||(dn={}));var ao;(function(e){function r(f,d,v){return{range:f,newText:d,annotationId:v}}e.replace=r;function i(f,d,v){return{range:{start:f,end:f},newText:d,annotationId:v}}e.insert=i;function a(f,d){return{range:f,newText:"",annotationId:d}}e.del=a;function o(f){var d=f;return pi.is(d)&&(Ls.is(d.annotationId)||dn.is(d.annotationId))}e.is=o})(ao||(ao={}));var Uf;(function(e){function r(a,o){return{textDocument:a,edits:o}}e.create=r;function i(a){var o=a;return Se.defined(o)&&zf.is(o.textDocument)&&Array.isArray(o.edits)}e.is=i})(Uf||(Uf={}));var zl;(function(e){function r(a,o,f){var d={kind:"create",uri:a};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(d.options=o),f!==void 0&&(d.annotationId=f),d}e.create=r;function i(a){var o=a;return o&&o.kind==="create"&&Se.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||Se.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||Se.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||dn.is(o.annotationId))}e.is=i})(zl||(zl={}));var Gl;(function(e){function r(a,o,f,d){var v={kind:"rename",oldUri:a,newUri:o};return f!==void 0&&(f.overwrite!==void 0||f.ignoreIfExists!==void 0)&&(v.options=f),d!==void 0&&(v.annotationId=d),v}e.create=r;function i(a){var o=a;return o&&o.kind==="rename"&&Se.string(o.oldUri)&&Se.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||Se.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||Se.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||dn.is(o.annotationId))}e.is=i})(Gl||(Gl={}));var $l;(function(e){function r(a,o,f){var d={kind:"delete",uri:a};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(d.options=o),f!==void 0&&(d.annotationId=f),d}e.create=r;function i(a){var o=a;return o&&o.kind==="delete"&&Se.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||Se.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||Se.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||dn.is(o.annotationId))}e.is=i})($l||($l={}));var yd;(function(e){function r(i){var a=i;return a&&(a.changes!==void 0||a.documentChanges!==void 0)&&(a.documentChanges===void 0||a.documentChanges.every(function(o){return Se.string(o.kind)?zl.is(o)||Gl.is(o)||$l.is(o):Uf.is(o)}))}e.is=r})(yd||(yd={}));var _f=function(){function e(r,i){this.edits=r,this.changeAnnotations=i}return e.prototype.insert=function(r,i,a){var o,f;if(a===void 0?o=pi.insert(r,i):dn.is(a)?(f=a,o=ao.insert(r,i,a)):(this.assertChangeAnnotations(this.changeAnnotations),f=this.changeAnnotations.manage(a),o=ao.insert(r,i,f)),this.edits.push(o),f!==void 0)return f},e.prototype.replace=function(r,i,a){var o,f;if(a===void 0?o=pi.replace(r,i):dn.is(a)?(f=a,o=ao.replace(r,i,a)):(this.assertChangeAnnotations(this.changeAnnotations),f=this.changeAnnotations.manage(a),o=ao.replace(r,i,f)),this.edits.push(o),f!==void 0)return f},e.prototype.delete=function(r,i){var a,o;if(i===void 0?a=pi.del(r):dn.is(i)?(o=i,a=ao.del(r,i)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(i),a=ao.del(r,o)),this.edits.push(a),o!==void 0)return o},e.prototype.add=function(r){this.edits.push(r)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(r){if(r===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),Fp=function(){function e(r){this._annotations=r===void 0?Object.create(null):r,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(r,i){var a;if(dn.is(r)?a=r:(a=this.nextId(),i=r),this._annotations[a]!==void 0)throw new Error("Id ".concat(a," is already in use."));if(i===void 0)throw new Error("No annotation provided for id ".concat(a));return this._annotations[a]=i,this._size++,a},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),g0=function(){function e(r){var i=this;this._textEditChanges=Object.create(null),r!==void 0?(this._workspaceEdit=r,r.documentChanges?(this._changeAnnotations=new Fp(r.changeAnnotations),r.changeAnnotations=this._changeAnnotations.all(),r.documentChanges.forEach(function(a){if(Uf.is(a)){var o=new _f(a.edits,i._changeAnnotations);i._textEditChanges[a.textDocument.uri]=o}})):r.changes&&Object.keys(r.changes).forEach(function(a){var o=new _f(r.changes[a]);i._textEditChanges[a]=o})):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(r){if(zf.is(r)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i={uri:r.uri,version:r.version},a=this._textEditChanges[i.uri];if(!a){var o=[],f={textDocument:i,edits:o};this._workspaceEdit.documentChanges.push(f),a=new _f(o,this._changeAnnotations),this._textEditChanges[i.uri]=a}return a}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var a=this._textEditChanges[r];if(!a){var o=[];this._workspaceEdit.changes[r]=o,a=new _f(o),this._textEditChanges[r]=a}return a}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Fp,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(r,i,a){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var o;Ls.is(i)||dn.is(i)?o=i:a=i;var f,d;if(o===void 0?f=zl.create(r,a):(d=dn.is(o)?o:this._changeAnnotations.manage(o),f=zl.create(r,a,d)),this._workspaceEdit.documentChanges.push(f),d!==void 0)return d},e.prototype.renameFile=function(r,i,a,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var f;Ls.is(a)||dn.is(a)?f=a:o=a;var d,v;if(f===void 0?d=Gl.create(r,i,o):(v=dn.is(f)?f:this._changeAnnotations.manage(f),d=Gl.create(r,i,o,v)),this._workspaceEdit.documentChanges.push(d),v!==void 0)return v},e.prototype.deleteFile=function(r,i,a){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var o;Ls.is(i)||dn.is(i)?o=i:a=i;var f,d;if(o===void 0?f=$l.create(r,a):(d=dn.is(o)?o:this._changeAnnotations.manage(o),f=$l.create(r,a,d)),this._workspaceEdit.documentChanges.push(f),d!==void 0)return d},e}(),Ip;(function(e){function r(a){return{uri:a}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.string(o.uri)}e.is=i})(Ip||(Ip={}));var Lp;(function(e){function r(a,o){return{uri:a,version:o}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.string(o.uri)&&Se.integer(o.version)}e.is=i})(Lp||(Lp={}));var zf;(function(e){function r(a,o){return{uri:a,version:o}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.string(o.uri)&&(o.version===null||Se.integer(o.version))}e.is=i})(zf||(zf={}));var Mp;(function(e){function r(a,o,f,d){return{uri:a,languageId:o,version:f,text:d}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.string(o.uri)&&Se.string(o.languageId)&&Se.integer(o.version)&&Se.string(o.text)}e.is=i})(Mp||(Mp={}));var Io;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function r(i){var a=i;return a===e.PlainText||a===e.Markdown}e.is=r})(Io||(Io={}));var Kl;(function(e){function r(i){var a=i;return Se.objectLiteral(i)&&Io.is(a.kind)&&Se.string(a.value)}e.is=r})(Kl||(Kl={}));var Zn;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Zn||(Zn={}));var Hr;(function(e){e.PlainText=1,e.Snippet=2})(Hr||(Hr={}));var Np;(function(e){e.Deprecated=1})(Np||(Np={}));var Rp;(function(e){function r(a,o,f){return{newText:a,insert:o,replace:f}}e.create=r;function i(a){var o=a;return o&&Se.string(o.newText)&&Wt.is(o.insert)&&Wt.is(o.replace)}e.is=i})(Rp||(Rp={}));var Dp;(function(e){e.asIs=1,e.adjustIndentation=2})(Dp||(Dp={}));var Bp;(function(e){function r(i){var a=i;return a&&(Se.string(a.detail)||a.detail===void 0)&&(Se.string(a.description)||a.description===void 0)}e.is=r})(Bp||(Bp={}));var bd;(function(e){function r(i){return{label:i}}e.create=r})(bd||(bd={}));var Vp;(function(e){function r(i,a){return{items:i||[],isIncomplete:!!a}}e.create=r})(Vp||(Vp={}));var Gf;(function(e){function r(a){return a.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=r;function i(a){var o=a;return Se.string(o)||Se.objectLiteral(o)&&Se.string(o.language)&&Se.string(o.value)}e.is=i})(Gf||(Gf={}));var jp;(function(e){function r(i){var a=i;return!!a&&Se.objectLiteral(a)&&(Kl.is(a.contents)||Gf.is(a.contents)||Se.typedArray(a.contents,Gf.is))&&(i.range===void 0||Wt.is(i.range))}e.is=r})(jp||(jp={}));var Wp;(function(e){function r(i,a){return a?{label:i,documentation:a}:{label:i}}e.create=r})(Wp||(Wp={}));var Hp;(function(e){function r(i,a){for(var o=[],f=2;f<arguments.length;f++)o[f-2]=arguments[f];var d={label:i};return Se.defined(a)&&(d.documentation=a),Se.defined(o)?d.parameters=o:d.parameters=[],d}e.create=r})(Hp||(Hp={}));var Up;(function(e){e.Text=1,e.Read=2,e.Write=3})(Up||(Up={}));var _p;(function(e){function r(i,a){var o={range:i};return Se.number(a)&&(o.kind=a),o}e.create=r})(_p||(_p={}));var $i;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})($i||($i={}));var zp;(function(e){e.Deprecated=1})(zp||(zp={}));var Gp;(function(e){function r(i,a,o,f,d){var v={name:i,kind:a,location:{uri:f,range:o}};return d&&(v.containerName=d),v}e.create=r})(Gp||(Gp={}));var $p;(function(e){function r(i,a,o,f){return f!==void 0?{name:i,kind:a,location:{uri:o,range:f}}:{name:i,kind:a,location:{uri:o}}}e.create=r})($p||($p={}));var Kp;(function(e){function r(a,o,f,d,v,h){var g={name:a,detail:o,kind:f,range:d,selectionRange:v};return h!==void 0&&(g.children=h),g}e.create=r;function i(a){var o=a;return o&&Se.string(o.name)&&Se.number(o.kind)&&Wt.is(o.range)&&Wt.is(o.selectionRange)&&(o.detail===void 0||Se.string(o.detail))&&(o.deprecated===void 0||Se.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=i})(Kp||(Kp={}));var Yp;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Yp||(Yp={}));var $f;(function(e){e.Invoked=1,e.Automatic=2})($f||($f={}));var Xp;(function(e){function r(a,o,f){var d={diagnostics:a};return o!=null&&(d.only=o),f!=null&&(d.triggerKind=f),d}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.typedArray(o.diagnostics,Ca.is)&&(o.only===void 0||Se.typedArray(o.only,Se.string))&&(o.triggerKind===void 0||o.triggerKind===$f.Invoked||o.triggerKind===$f.Automatic)}e.is=i})(Xp||(Xp={}));var Jp;(function(e){function r(a,o,f){var d={title:a},v=!0;return typeof o=="string"?(v=!1,d.kind=o):Is.is(o)?d.command=o:d.edit=o,v&&f!==void 0&&(d.kind=f),d}e.create=r;function i(a){var o=a;return o&&Se.string(o.title)&&(o.diagnostics===void 0||Se.typedArray(o.diagnostics,Ca.is))&&(o.kind===void 0||Se.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Is.is(o.command))&&(o.isPreferred===void 0||Se.boolean(o.isPreferred))&&(o.edit===void 0||yd.is(o.edit))}e.is=i})(Jp||(Jp={}));var Qp;(function(e){function r(a,o){var f={range:a};return Se.defined(o)&&(f.data=o),f}e.create=r;function i(a){var o=a;return Se.defined(o)&&Wt.is(o.range)&&(Se.undefined(o.command)||Is.is(o.command))}e.is=i})(Qp||(Qp={}));var Zp;(function(e){function r(a,o){return{tabSize:a,insertSpaces:o}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.uinteger(o.tabSize)&&Se.boolean(o.insertSpaces)}e.is=i})(Zp||(Zp={}));var qp;(function(e){function r(a,o,f){return{range:a,target:o,data:f}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Wt.is(o.range)&&(Se.undefined(o.target)||Se.string(o.target))}e.is=i})(qp||(qp={}));var Kf;(function(e){function r(a,o){return{range:a,parent:o}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Wt.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=i})(Kf||(Kf={}));var eh;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(eh||(eh={}));var th;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(th||(th={}));var rh;(function(e){function r(i){var a=i;return Se.objectLiteral(a)&&(a.resultId===void 0||typeof a.resultId=="string")&&Array.isArray(a.data)&&(a.data.length===0||typeof a.data[0]=="number")}e.is=r})(rh||(rh={}));var nh;(function(e){function r(a,o){return{range:a,text:o}}e.create=r;function i(a){var o=a;return o!=null&&Wt.is(o.range)&&Se.string(o.text)}e.is=i})(nh||(nh={}));var ih;(function(e){function r(a,o,f){return{range:a,variableName:o,caseSensitiveLookup:f}}e.create=r;function i(a){var o=a;return o!=null&&Wt.is(o.range)&&Se.boolean(o.caseSensitiveLookup)&&(Se.string(o.variableName)||o.variableName===void 0)}e.is=i})(ih||(ih={}));var ah;(function(e){function r(a,o){return{range:a,expression:o}}e.create=r;function i(a){var o=a;return o!=null&&Wt.is(o.range)&&(Se.string(o.expression)||o.expression===void 0)}e.is=i})(ah||(ah={}));var oh;(function(e){function r(a,o){return{frameId:a,stoppedLocation:o}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Wt.is(a.stoppedLocation)}e.is=i})(oh||(oh={}));var xd;(function(e){e.Type=1,e.Parameter=2;function r(i){return i===1||i===2}e.is=r})(xd||(xd={}));var Sd;(function(e){function r(a){return{value:a}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&(o.tooltip===void 0||Se.string(o.tooltip)||Kl.is(o.tooltip))&&(o.location===void 0||Fs.is(o.location))&&(o.command===void 0||Is.is(o.command))}e.is=i})(Sd||(Sd={}));var sh;(function(e){function r(a,o,f){var d={position:a,label:o};return f!==void 0&&(d.kind=f),d}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&di.is(o.position)&&(Se.string(o.label)||Se.typedArray(o.label,Sd.is))&&(o.kind===void 0||xd.is(o.kind))&&o.textEdits===void 0||Se.typedArray(o.textEdits,pi.is)&&(o.tooltip===void 0||Se.string(o.tooltip)||Kl.is(o.tooltip))&&(o.paddingLeft===void 0||Se.boolean(o.paddingLeft))&&(o.paddingRight===void 0||Se.boolean(o.paddingRight))}e.is=i})(sh||(sh={}));var lh;(function(e){function r(i){var a=i;return Se.objectLiteral(a)&&vd.is(a.uri)&&Se.string(a.name)}e.is=r})(lh||(lh={}));var m0=null,uh;(function(e){function r(f,d,v,h){return new vg(f,d,v,h)}e.create=r;function i(f){var d=f;return!!(Se.defined(d)&&Se.string(d.uri)&&(Se.undefined(d.languageId)||Se.string(d.languageId))&&Se.uinteger(d.lineCount)&&Se.func(d.getText)&&Se.func(d.positionAt)&&Se.func(d.offsetAt))}e.is=i;function a(f,d){for(var v=f.getText(),h=o(d,function(W,Y){var _=W.range.start.line-Y.range.start.line;return _===0?W.range.start.character-Y.range.start.character:_}),g=v.length,b=h.length-1;b>=0;b--){var E=h[b],V=f.offsetAt(E.range.start),I=f.offsetAt(E.range.end);if(I<=g)v=v.substring(0,V)+E.newText+v.substring(I,v.length);else throw new Error("Overlapping edit");g=V}return v}e.applyEdits=a;function o(f,d){if(f.length<=1)return f;var v=f.length/2|0,h=f.slice(0,v),g=f.slice(v);o(h,d),o(g,d);for(var b=0,E=0,V=0;b<h.length&&E<g.length;){var I=d(h[b],g[E]);I<=0?f[V++]=h[b++]:f[V++]=g[E++]}for(;b<h.length;)f[V++]=h[b++];for(;E<g.length;)f[V++]=g[E++];return f}})(uh||(uh={}));var vg=function(){function e(r,i,a,o){this._uri=r,this._languageId=i,this._version=a,this._content=o,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(r){if(r){var i=this.offsetAt(r.start),a=this.offsetAt(r.end);return this._content.substring(i,a)}return this._content},e.prototype.update=function(r,i){this._content=r.text,this._version=i,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var r=[],i=this._content,a=!0,o=0;o<i.length;o++){a&&(r.push(o),a=!1);var f=i.charAt(o);a=f==="\r"||f===`
247
247
  `,f==="\r"&&o+1<i.length&&i.charAt(o+1)===`
248
- `&&o++}a&&i.length>0&&r.push(i.length),this._lineOffsets=r}return this._lineOffsets},e.prototype.positionAt=function(r){r=Math.max(Math.min(r,this._content.length),0);var i=this.getLineOffsets(),a=0,o=i.length;if(o===0)return di.create(0,r);for(;a<o;){var f=Math.floor((a+o)/2);i[f]>r?o=f:a=f+1}var d=a-1;return di.create(d,r-i[d])},e.prototype.offsetAt=function(r){var i=this.getLineOffsets();if(r.line>=i.length)return this._content.length;if(r.line<0)return 0;var a=i[r.line],o=r.line+1<i.length?i[r.line+1]:this._content.length;return Math.max(Math.min(a+r.character,o),a)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}(),Se;(function(e){var r=Object.prototype.toString;function i(I){return typeof I!="undefined"}e.defined=i;function a(I){return typeof I=="undefined"}e.undefined=a;function o(I){return I===!0||I===!1}e.boolean=o;function f(I){return r.call(I)==="[object String]"}e.string=f;function d(I){return r.call(I)==="[object Number]"}e.number=d;function v(I,W,Y){return r.call(I)==="[object Number]"&&W<=I&&I<=Y}e.numberRange=v;function h(I){return r.call(I)==="[object Number]"&&-2147483648<=I&&I<=2147483647}e.integer=h;function g(I){return r.call(I)==="[object Number]"&&0<=I&&I<=2147483647}e.uinteger=g;function b(I){return r.call(I)==="[object Function]"}e.func=b;function E(I){return I!==null&&typeof I=="object"}e.objectLiteral=E;function j(I,W){return Array.isArray(I)&&I.every(W)}e.typedArray=j})(Se||(Se={}));var yg=function(e,r,i){if(i||arguments.length===2)for(var a=0,o=r.length,f;a<o;a++)(f||!(a in r))&&(f||(f=Array.prototype.slice.call(r,0,a)),f[a]=r[a]);return e.concat(f||Array.prototype.slice.call(r))},ch=function(){function e(r,i,a,o){this._uri=r,this._languageId=i,this._version=a,this._content=o,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(r){if(r){var i=this.offsetAt(r.start),a=this.offsetAt(r.end);return this._content.substring(i,a)}return this._content},e.prototype.update=function(r,i){for(var a=0,o=r;a<o.length;a++){var f=o[a];if(e.isIncremental(f)){var d=ph(f.range),v=this.offsetAt(d.start),h=this.offsetAt(d.end);this._content=this._content.substring(0,v)+f.text+this._content.substring(h,this._content.length);var g=Math.max(d.start.line,0),b=Math.max(d.end.line,0),E=this._lineOffsets,j=dh(f.text,!1,v);if(b-g===j.length)for(var I=0,W=j.length;I<W;I++)E[I+g+1]=j[I];else j.length<1e4?E.splice.apply(E,yg([g+1,b-g],j,!1)):this._lineOffsets=E=E.slice(0,g+1).concat(j,E.slice(b+1));var Y=f.text.length-(h-v);if(Y!==0)for(var I=g+1+j.length,W=E.length;I<W;I++)E[I]=E[I]+Y}else if(e.isFull(f))this._content=f.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=i},e.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=dh(this._content,!0)),this._lineOffsets},e.prototype.positionAt=function(r){r=Math.max(Math.min(r,this._content.length),0);var i=this.getLineOffsets(),a=0,o=i.length;if(o===0)return{line:0,character:r};for(;a<o;){var f=Math.floor((a+o)/2);i[f]>r?o=f:a=f+1}var d=a-1;return{line:d,character:r-i[d]}},e.prototype.offsetAt=function(r){var i=this.getLineOffsets();if(r.line>=i.length)return this._content.length;if(r.line<0)return 0;var a=i[r.line],o=r.line+1<i.length?i[r.line+1]:this._content.length;return Math.max(Math.min(a+r.character,o),a)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e.isIncremental=function(r){var i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")},e.isFull=function(r){var i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0},e}(),Yf;(function(e){function r(o,f,d,v){return new ch(o,f,d,v)}e.create=r;function i(o,f,d){if(o instanceof ch)return o.update(f,d),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=i;function a(o,f){for(var d=o.getText(),v=wd(f.map(bg),function(W,Y){var _=W.range.start.line-Y.range.start.line;return _===0?W.range.start.character-Y.range.start.character:_}),h=0,g=[],b=0,E=v;b<E.length;b++){var j=E[b],I=o.offsetAt(j.range.start);if(I<h)throw new Error("Overlapping edit");I>h&&g.push(d.substring(h,I)),j.newText.length&&g.push(j.newText),h=o.offsetAt(j.range.end)}return g.push(d.substr(h)),g.join("")}e.applyEdits=a})(Yf||(Yf={}));function wd(e,r){if(e.length<=1)return e;var i=e.length/2|0,a=e.slice(0,i),o=e.slice(i);wd(a,r),wd(o,r);for(var f=0,d=0,v=0;f<a.length&&d<o.length;){var h=r(a[f],o[d]);h<=0?e[v++]=a[f++]:e[v++]=o[d++]}for(;f<a.length;)e[v++]=a[f++];for(;d<o.length;)e[v++]=o[d++];return e}function dh(e,r,i){i===void 0&&(i=0);for(var a=r?[i]:[],o=0;o<e.length;o++){var f=e.charCodeAt(o);(f===13||f===10)&&(f===13&&o+1<e.length&&e.charCodeAt(o+1)===10&&o++,a.push(i+o+1))}return a}function ph(e){var r=e.start,i=e.end;return r.line>i.line||r.line===i.line&&r.character>i.character?{start:i,end:r}:e}function bg(e){var r=ph(e.range);return r!==e.range?{newText:e.newText,range:r}:e}var Bt;(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.SchemaResolveError=768]="SchemaResolveError"})(Bt||(Bt={}));var hh;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Io.Markdown,Io.PlainText],commitCharactersSupport:!0}}}}})(hh||(hh={}));var Lo=function(){var e=function(r,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var f in o)o.hasOwnProperty(f)&&(a[f]=o[f])},e(r,i)};return function(r,i){e(r,i);function a(){this.constructor=r}r.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}}(),xg={"color-hex":{errorMessage:"Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.",pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:"String is not a RFC3339 date-time.",pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:"String is not a RFC3339 date.",pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:"String is not a RFC3339 time.",pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:"String is not an e-mail address.",pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},Mo=function(){function e(r,i,a){this.offset=i,this.length=a,this.parent=r}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e}(),Sg=function(e){Lo(r,e);function r(i,a){var o=e.call(this,i,a)||this;return o.type="null",o.value=null,o}return r}(Mo),vh=function(e){Lo(r,e);function r(i,a,o){var f=e.call(this,i,o)||this;return f.type="boolean",f.value=a,f}return r}(Mo),wg=function(e){Lo(r,e);function r(i,a){var o=e.call(this,i,a)||this;return o.type="array",o.items=[],o}return Object.defineProperty(r.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),r}(Mo),Cg=function(e){Lo(r,e);function r(i,a){var o=e.call(this,i,a)||this;return o.type="number",o.isInteger=!0,o.value=Number.NaN,o}return r}(Mo),gh=function(e){Lo(r,e);function r(i,a,o){var f=e.call(this,i,a,o)||this;return f.type="string",f.value="",f}return r}(Mo),Ag=function(e){Lo(r,e);function r(i,a){var o=e.call(this,i,a)||this;return o.type="property",o.colonOffset=-1,o}return Object.defineProperty(r.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),r}(Mo),Og=function(e){Lo(r,e);function r(i,a){var o=e.call(this,i,a)||this;return o.type="object",o.properties=[],o}return Object.defineProperty(r.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),r}(Mo);function Ln(e){return Gi(e)?e?{}:{not:{}}:e}var mh;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(mh||(mh={}));var Eg=function(){function e(r,i){r===void 0&&(r=-1),i===void 0&&(i=null),this.focusOffset=r,this.exclude=i,this.schemas=[]}return e.prototype.add=function(r){this.schemas.push(r)},e.prototype.merge=function(r){var i;(i=this.schemas).push.apply(i,r.schemas)},e.prototype.include=function(r){return(this.focusOffset===-1||yh(r,this.focusOffset))&&r!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),Cd=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.add=function(r){},e.prototype.merge=function(r){},e.prototype.include=function(r){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),Mn=function(){function e(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=null}return e.prototype.hasProblems=function(){return!!this.problems.length},e.prototype.mergeAll=function(r){for(var i=0,a=r;i<a.length;i++){var o=a[i];this.merge(o)}},e.prototype.merge=function(r){this.problems=this.problems.concat(r.problems)},e.prototype.mergeEnumValues=function(r){if(!this.enumValueMatch&&!r.enumValueMatch&&this.enumValues&&r.enumValues){this.enumValues=this.enumValues.concat(r.enumValues);for(var i=0,a=this.problems;i<a.length;i++){var o=a[i];o.code===Bt.EnumValueMismatch&&(o.message="Value is not accepted. Valid values: "+this.enumValues.map(function(f){return JSON.stringify(f)}).join(", ")+".")}}},e.prototype.mergePropertyMatch=function(r){this.merge(r),this.propertiesMatches++,(r.enumValueMatch||!r.hasProblems()&&r.propertiesMatches)&&this.propertiesValueMatches++,r.enumValueMatch&&r.enumValues&&r.enumValues.length===1&&this.primaryValueMatches++},e.prototype.compare=function(r){var i=this.hasProblems();return i!==r.hasProblems()?i?-1:1:this.enumValueMatch!==r.enumValueMatch?r.enumValueMatch?-1:1:this.primaryValueMatches!==r.primaryValueMatches?this.primaryValueMatches-r.primaryValueMatches:this.propertiesValueMatches!==r.propertiesValueMatches?this.propertiesValueMatches-r.propertiesValueMatches:this.propertiesMatches-r.propertiesMatches},e}();function Tg(e,r){return r===void 0&&(r=[]),new bh(e,r,[])}function oo(e){return hg(e)}function Ad(e){return pg(e)}function yh(e,r,i){return i===void 0&&(i=!1),r>=e.offset&&r<e.offset+e.length||i&&r===e.offset+e.length}var bh=function(){function e(r,i,a){i===void 0&&(i=[]),a===void 0&&(a=[]),this.root=r,this.syntaxErrors=i,this.comments=a}return e.prototype.getNodeFromOffset=function(r,i){if(i===void 0&&(i=!1),this.root)return dg(this.root,r,i)},e.prototype.visit=function(r){if(this.root){var i=function(a){var o=r(a),f=a.children;if(Array.isArray(f))for(var d=0;d<f.length&&o;d++)o=i(f[d]);return o};i(this.root)}},e.prototype.validate=function(r,i){if(this.root&&i){var a=new Mn;return rn(this.root,i,a,Cd.instance),a.problems.map(function(o){var f=Wt.create(r.positionAt(o.location.offset),r.positionAt(o.location.offset+o.location.length));return Ca.create(f,o.message,o.severity,o.code)})}return null},e.prototype.getMatchingSchemas=function(r,i,a){i===void 0&&(i=-1),a===void 0&&(a=null);var o=new Eg(i,a);return this.root&&r&&rn(this.root,r,new Mn,o),o.schemas},e}();function rn(e,r,i,a){if(!e||!a.include(e))return;switch(e.type){case"object":h(e,r,i,a);break;case"array":v(e,r,i,a);break;case"string":d(e,r,i,a);break;case"number":f(e,r,i,a);break;case"property":return rn(e.valueNode,r,i,a)}o(),a.add({node:e,schema:r});function o(){function g(Me){return e.type===Me||Me==="integer"&&e.type==="number"&&e.isInteger||r.nullable&&e.value===null}if(Array.isArray(r.type)?r.type.some(g)||i.problems.push({location:{offset:e.offset,length:e.length},severity:Ct.Warning,message:r.errorMessage||"Incorrect type. Expected one of "+r.type.join(", ")+"."}):r.type&&(g(r.type)||i.problems.push({location:{offset:e.offset,length:e.length},severity:Ct.Warning,message:r.errorMessage||'Incorrect type. Expected "'+r.type+'".'})),Array.isArray(r.allOf))for(var b=0,E=r.allOf;b<E.length;b++){var j=E[b];rn(e,Ln(j),i,a)}var I=Ln(r.not);if(I){var W=new Mn,Y=a.newSub();rn(e,I,W,Y),W.hasProblems()||i.problems.push({location:{offset:e.offset,length:e.length},severity:Ct.Warning,message:"Matches a schema that is not allowed."});for(var _=0,U=Y.schemas;_<U.length;_++){var G=U[_];G.inverted=!G.inverted,a.add(G)}}var ce=function(Me,Xe){for(var yt=[],at=null,fr=0,Er=Me;fr<Er.length;fr++){var cr=Er[fr],Tr=Ln(cr),nr=new Mn,kt=a.newSub();if(rn(e,Tr,nr,kt),nr.hasProblems()||yt.push(Tr),!at)at={schema:Tr,validationResult:nr,matchingSchemas:kt};else if(!Xe&&!nr.hasProblems()&&!at.validationResult.hasProblems())at.matchingSchemas.merge(kt),at.validationResult.propertiesMatches+=nr.propertiesMatches,at.validationResult.propertiesValueMatches+=nr.propertiesValueMatches;else{var Yt=nr.compare(at.validationResult);Yt>0?at={schema:Tr,validationResult:nr,matchingSchemas:kt}:Yt===0&&(at.matchingSchemas.merge(kt),at.validationResult.mergeEnumValues(nr))}}return yt.length>1&&Xe&&i.problems.push({location:{offset:e.offset,length:1},severity:Ct.Warning,message:"Matches multiple schemas when only one must validate."}),at!==null&&(i.merge(at.validationResult),i.propertiesMatches+=at.validationResult.propertiesMatches,i.propertiesValueMatches+=at.validationResult.propertiesValueMatches,a.merge(at.matchingSchemas)),yt.length};Array.isArray(r.anyOf)&&ce(r.anyOf,!1),Array.isArray(r.oneOf)&&ce(r.oneOf,!0);var Ce=function(Me){var Xe=new Mn,yt=a.newSub();rn(e,Ln(Me),Xe,yt),i.merge(Xe),i.propertiesMatches+=Xe.propertiesMatches,i.propertiesValueMatches+=Xe.propertiesValueMatches,a.merge(yt)},ge=function(Me,Xe,yt){var at=Ln(Me),fr=new Mn,Er=a.newSub();rn(e,at,fr,Er),a.merge(Er),fr.hasProblems()?yt&&Ce(yt):Xe&&Ce(Xe)},ke=Ln(r.if);if(ke&&ge(ke,Ln(r.then),Ln(r.else)),Array.isArray(r.enum)){for(var be=oo(e),me=!1,ue=0,Oe=r.enum;ue<Oe.length;ue++){var Te=Oe[ue];if(Ul(be,Te)){me=!0;break}}i.enumValues=r.enum,i.enumValueMatch=me,me||i.problems.push({location:{offset:e.offset,length:e.length},severity:Ct.Warning,code:Bt.EnumValueMismatch,message:r.errorMessage||"Value is not accepted. Valid values: "+r.enum.map(function(Me){return JSON.stringify(Me)}).join(", ")+"."})}if(wa(r.const)){var be=oo(e);Ul(be,r.const)?i.enumValueMatch=!0:(i.problems.push({location:{offset:e.offset,length:e.length},severity:Ct.Warning,code:Bt.EnumValueMismatch,message:r.errorMessage||"Value must be "+JSON.stringify(r.const)+"."}),i.enumValueMatch=!1),i.enumValues=[r.const]}r.deprecationMessage&&e.parent&&i.problems.push({location:{offset:e.parent.offset,length:e.parent.length},severity:Ct.Warning,message:r.deprecationMessage})}function f(g,b,E,j){var I=g.value;Qn(b.multipleOf)&&I%b.multipleOf!==0&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Value is not divisible by "+b.multipleOf+"."});function W(Ce,ge){if(Qn(ge))return ge;if(Gi(ge)&&ge)return Ce}function Y(Ce,ge){if(!Gi(ge)||!ge)return Ce}var _=W(b.minimum,b.exclusiveMinimum);Qn(_)&&I<=_&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Value is below the exclusive minimum of "+_+"."});var U=W(b.maximum,b.exclusiveMaximum);Qn(U)&&I>=U&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Value is above the exclusive maximum of "+U+"."});var G=Y(b.minimum,b.exclusiveMinimum);Qn(G)&&I<G&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Value is below the minimum of "+G+"."});var ce=Y(b.maximum,b.exclusiveMaximum);Qn(ce)&&I>ce&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Value is above the maximum of "+ce+"."})}function d(g,b,E,j){if(Qn(b.minLength)&&g.value.length<b.minLength&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"String is shorter than the minimum length of "+b.minLength+"."}),Qn(b.maxLength)&&g.value.length>b.maxLength&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"String is longer than the maximum length of "+b.maxLength+"."}),gg(b.pattern)){var I=new RegExp(b.pattern);I.test(g.value)||E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:b.patternErrorMessage||b.errorMessage||'String does not match the pattern of "'+b.pattern+'".'})}if(b.format)switch(b.format){case"uri":case"uri-reference":{var W=void 0;if(!g.value)W="URI expected.";else{var Y=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(g.value);Y?!Y[2]&&b.format==="uri"&&(W="URI with a scheme is expected."):W="URI is expected."}W&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:b.patternErrorMessage||b.errorMessage||"String is not a URI: "+W})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var _=xg[b.format];(!g.value||!_.pattern.exec(g.value))&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:b.patternErrorMessage||b.errorMessage||_.errorMessage});break;default:}}function v(g,b,E,j){if(Array.isArray(b.items)){for(var I=b.items,W=0;W<I.length;W++){var Y=I[W],_=Ln(Y),U=new Mn,G=g.items[W];G?(rn(G,_,U,j),E.mergePropertyMatch(U)):g.items.length>=I.length&&E.propertiesValueMatches++}if(g.items.length>I.length)if(typeof b.additionalItems=="object")for(var ce=I.length;ce<g.items.length;ce++){var U=new Mn;rn(g.items[ce],b.additionalItems,U,j),E.mergePropertyMatch(U)}else b.additionalItems===!1&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Array has too many items according to schema. Expected "+I.length+" or fewer."})}else{var Ce=Ln(b.items);if(Ce)for(var ge=0,ke=g.items;ge<ke.length;ge++){var G=ke[ge],U=new Mn;rn(G,Ce,U,j),E.mergePropertyMatch(U)}}var be=Ln(b.contains);if(be){var me=g.items.some(function(Te){var Me=new Mn;return rn(Te,be,Me,Cd.instance),!Me.hasProblems()});me||E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:b.errorMessage||"Array does not contain required item."})}if(Qn(b.minItems)&&g.items.length<b.minItems&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Array has too few items. Expected "+b.minItems+" or more."}),Qn(b.maxItems)&&g.items.length>b.maxItems&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Array has too many items. Expected "+b.maxItems+" or fewer."}),b.uniqueItems===!0){var ue=oo(g),Oe=ue.some(function(Te,Me){return Me!==ue.lastIndexOf(Te)});Oe&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Array has duplicate items."})}}function h(g,b,E,j){for(var I=Object.create(null),W=[],Y=0,_=g.properties;Y<_.length;Y++){var U=_[Y],G=U.keyNode.value;I[G]=U.valueNode,W.push(G)}if(Array.isArray(b.required))for(var ce=0,Ce=b.required;ce<Ce.length;ce++){var ge=Ce[ce];if(!I[ge]){var ke=g.parent&&g.parent.type==="property"&&g.parent.keyNode,be=ke?{offset:ke.offset,length:ke.length}:{offset:g.offset,length:1};E.problems.push({location:be,severity:Ct.Warning,message:'Missing property "'+ge+'".'})}}var me=function(Nn){for(var Aa=W.indexOf(Nn);Aa>=0;)W.splice(Aa,1),Aa=W.indexOf(Nn)};if(b.properties)for(var ue=0,Oe=Object.keys(b.properties);ue<Oe.length;ue++){var ge=Oe[ue];me(ge);var Te=b.properties[ge],Me=I[ge];if(Me)if(Gi(Te))if(Te)E.propertiesMatches++,E.propertiesValueMatches++;else{var U=Me.parent;E.problems.push({location:{offset:U.keyNode.offset,length:U.keyNode.length},severity:Ct.Warning,message:b.errorMessage||"Property "+ge+" is not allowed."})}else{var Xe=new Mn;rn(Me,Te,Xe,j),E.mergePropertyMatch(Xe)}}if(b.patternProperties)for(var yt=0,at=Object.keys(b.patternProperties);yt<at.length;yt++)for(var fr=at[yt],Er=new RegExp(fr),cr=0,Tr=W.slice(0);cr<Tr.length;cr++){var ge=Tr[cr];if(Er.test(ge)){me(ge);var Me=I[ge];if(Me){var Te=b.patternProperties[fr];if(Gi(Te))if(Te)E.propertiesMatches++,E.propertiesValueMatches++;else{var U=Me.parent;E.problems.push({location:{offset:U.keyNode.offset,length:U.keyNode.length},severity:Ct.Warning,message:b.errorMessage||"Property "+ge+" is not allowed."})}else{var Xe=new Mn;rn(Me,Te,Xe,j),E.mergePropertyMatch(Xe)}}}}if(typeof b.additionalProperties=="object")for(var nr=0,kt=W;nr<kt.length;nr++){var ge=kt[nr],Me=I[ge];if(Me){var Xe=new Mn;rn(Me,b.additionalProperties,Xe,j),E.mergePropertyMatch(Xe)}}else if(b.additionalProperties===!1&&W.length>0)for(var Yt=0,Ht=W;Yt<Ht.length;Yt++){var ge=Ht[Yt],Me=I[ge];if(Me){var U=Me.parent;E.problems.push({location:{offset:U.keyNode.offset,length:U.keyNode.length},severity:Ct.Warning,message:b.errorMessage||"Property "+ge+" is not allowed."})}}if(Qn(b.maxProperties)&&g.properties.length>b.maxProperties&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Object has more properties than limit of "+b.maxProperties+"."}),Qn(b.minProperties)&&g.properties.length<b.minProperties&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Object has fewer properties than the required number of "+b.minProperties}),b.dependencies)for(var _e=0,qe=Object.keys(b.dependencies);_e<qe.length;_e++){var G=qe[_e],Tt=I[G];if(Tt){var Vt=b.dependencies[G];if(Array.isArray(Vt))for(var Ot=0,pn=Vt;Ot<pn.length;Ot++){var Ki=pn[Ot];I[Ki]?E.propertiesValueMatches++:E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Object is missing property "+Ki+" required by property {$key}."})}else{var Te=Ln(Vt);if(Te){var Xe=new Mn;rn(g,Te,Xe,j),E.mergePropertyMatch(Xe)}}}}var qn=Ln(b.propertyNames);if(qn)for(var Kr=0,uo=g.properties;Kr<uo.length;Kr++){var No=uo[Kr],G=No.keyNode;G&&rn(G,qn,E,Cd.instance)}}}function kg(e,r){var i=[],a=-1,o=e.getText(),f=Ps(o,!1),d=r&&r.collectComments?[]:void 0;function v(){for(;;){var ke=f.scan();switch(E(),ke){case 12:case 13:Array.isArray(d)&&d.push(Wt.create(e.positionAt(f.getTokenOffset()),e.positionAt(f.getTokenOffset()+f.getTokenLength())));break;case 15:case 14:break;default:return ke}}}function h(ke){return f.getToken()===ke?(v(),!0):!1}function g(ke,be,me,ue,Oe){if(Oe===void 0&&(Oe=Ct.Error),i.length===0||me!==a){var Te=Wt.create(e.positionAt(me),e.positionAt(ue));i.push(Ca.create(Te,ke,Oe,be,e.languageId)),a=me}}function b(ke,be,me,ue,Oe){me===void 0&&(me=null),ue===void 0&&(ue=[]),Oe===void 0&&(Oe=[]);var Te=f.getTokenOffset(),Me=f.getTokenOffset()+f.getTokenLength();if(Te===Me&&Te>0){for(Te--;Te>0&&/\s/.test(o.charAt(Te));)Te--;Me=Te+1}if(g(ke,be,Te,Me),me&&j(me,!1),ue.length+Oe.length>0)for(var Xe=f.getToken();Xe!==17;){if(ue.indexOf(Xe)!==-1){v();break}else if(Oe.indexOf(Xe)!==-1)break;Xe=v()}return me}function E(){switch(f.getTokenError()){case 4:return b("Invalid unicode sequence in string.",Bt.InvalidUnicode),!0;case 5:return b("Invalid escape character in string.",Bt.InvalidEscapeCharacter),!0;case 3:return b("Unexpected end of number.",Bt.UnexpectedEndOfNumber),!0;case 1:return b("Unexpected end of comment.",Bt.UnexpectedEndOfComment),!0;case 2:return b("Unexpected end of string.",Bt.UnexpectedEndOfString),!0;case 6:return b("Invalid characters in string. Control characters must be escaped.",Bt.InvalidCharacter),!0}return!1}function j(ke,be){return ke.length=f.getTokenOffset()+f.getTokenLength()-ke.offset,be&&v(),ke}function I(ke){if(f.getToken()!==3)return null;var be=new wg(ke,f.getTokenOffset());v();for(var me=0,ue=!1;f.getToken()!==4&&f.getToken()!==17;){if(f.getToken()===5){ue||b("Value expected",Bt.ValueExpected);var Oe=f.getTokenOffset();if(v(),f.getToken()===4){ue&&g("Trailing comma",Bt.TrailingComma,Oe,Oe+1);continue}}else ue&&b("Expected comma",Bt.CommaExpected);var Te=ce(be,me++);Te?be.items.push(Te):b("Value expected",Bt.ValueExpected,null,[],[4,5]),ue=!0}return f.getToken()!==4?b("Expected comma or closing bracket",Bt.CommaOrCloseBacketExpected,be):j(be,!0)}function W(ke,be){var me=new Ag(ke,f.getTokenOffset()),ue=_(me);if(!ue)if(f.getToken()===16){b("Property keys must be doublequoted",Bt.Undefined);var Oe=new gh(me,f.getTokenOffset(),f.getTokenLength());Oe.value=f.getTokenValue(),ue=Oe,v()}else return null;me.keyNode=ue;var Te=be[ue.value];if(Te?(g("Duplicate object key",Bt.DuplicateKey,me.keyNode.offset,me.keyNode.offset+me.keyNode.length,Ct.Warning),typeof Te=="object"&&g("DuplicateKeyWarning",Bt.DuplicateKey,Te.keyNode.offset,Te.keyNode.offset+Te.keyNode.length,Ct.Warning),be[ue.value]=!0):be[ue.value]=me,f.getToken()===6)me.colonOffset=f.getTokenOffset(),v();else if(b("Colon expected",Bt.ColonExpected),f.getToken()===10&&e.positionAt(ue.offset+ue.length).line<e.positionAt(f.getTokenOffset()).line)return me.length=ue.length,me;var Me=ce(me,ue.value);return Me?(me.valueNode=Me,me.length=Me.offset+Me.length-me.offset,me):b("Value expected",Bt.ValueExpected,me,[],[2,5])}function Y(ke){if(f.getToken()!==1)return null;var be=new Og(ke,f.getTokenOffset()),me=Object.create(null);v();for(var ue=!1;f.getToken()!==2&&f.getToken()!==17;){if(f.getToken()===5){ue||b("Property expected",Bt.PropertyExpected);var Oe=f.getTokenOffset();if(v(),f.getToken()===2){ue&&g("Trailing comma",Bt.TrailingComma,Oe,Oe+1);continue}}else ue&&b("Expected comma",Bt.CommaExpected);var Te=W(be,me);Te?be.properties.push(Te):b("Property expected",Bt.PropertyExpected,null,[],[2,5]),ue=!0}return f.getToken()!==2?b("Expected comma or closing brace",Bt.CommaOrCloseBraceExpected,be):j(be,!0)}function _(ke){if(f.getToken()!==10)return null;var be=new gh(ke,f.getTokenOffset());return be.value=f.getTokenValue(),j(be,!0)}function U(ke){if(f.getToken()!==11)return null;var be=new Cg(ke,f.getTokenOffset());if(f.getTokenError()===0){var me=f.getTokenValue();try{var ue=JSON.parse(me);if(!Qn(ue))return b("Invalid number format.",Bt.Undefined,be);be.value=ue}catch(Oe){return b("Invalid number format.",Bt.Undefined,be)}be.isInteger=me.indexOf(".")===-1}return j(be,!0)}function G(ke){var be;switch(f.getToken()){case 7:return j(new Sg(ke,f.getTokenOffset()),!0);case 8:return j(new vh(ke,!0,f.getTokenOffset()),!0);case 9:return j(new vh(ke,!1,f.getTokenOffset()),!0);default:return null}}function ce(ke,be){return I(ke)||Y(ke)||_(ke)||U(ke)||G(ke)}var Ce=null,ge=v();return ge!==17&&(Ce=ce(null,null),Ce?f.getToken()!==17&&b("End of file expected.",Bt.Undefined):b("Expected a JSON object, array or literal.",Bt.Undefined)),new bh(Ce,i,d)}function Od(e,r,i){if(e!==null&&typeof e=="object"){var a=r+" ";if(Array.isArray(e)){if(e.length===0)return"[]";for(var o=`[
248
+ `&&o++}a&&i.length>0&&r.push(i.length),this._lineOffsets=r}return this._lineOffsets},e.prototype.positionAt=function(r){r=Math.max(Math.min(r,this._content.length),0);var i=this.getLineOffsets(),a=0,o=i.length;if(o===0)return di.create(0,r);for(;a<o;){var f=Math.floor((a+o)/2);i[f]>r?o=f:a=f+1}var d=a-1;return di.create(d,r-i[d])},e.prototype.offsetAt=function(r){var i=this.getLineOffsets();if(r.line>=i.length)return this._content.length;if(r.line<0)return 0;var a=i[r.line],o=r.line+1<i.length?i[r.line+1]:this._content.length;return Math.max(Math.min(a+r.character,o),a)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}(),Se;(function(e){var r=Object.prototype.toString;function i(I){return typeof I<"u"}e.defined=i;function a(I){return typeof I>"u"}e.undefined=a;function o(I){return I===!0||I===!1}e.boolean=o;function f(I){return r.call(I)==="[object String]"}e.string=f;function d(I){return r.call(I)==="[object Number]"}e.number=d;function v(I,W,Y){return r.call(I)==="[object Number]"&&W<=I&&I<=Y}e.numberRange=v;function h(I){return r.call(I)==="[object Number]"&&-2147483648<=I&&I<=2147483647}e.integer=h;function g(I){return r.call(I)==="[object Number]"&&0<=I&&I<=2147483647}e.uinteger=g;function b(I){return r.call(I)==="[object Function]"}e.func=b;function E(I){return I!==null&&typeof I=="object"}e.objectLiteral=E;function V(I,W){return Array.isArray(I)&&I.every(W)}e.typedArray=V})(Se||(Se={}));var gg=function(e,r,i){if(i||arguments.length===2)for(var a=0,o=r.length,f;a<o;a++)(f||!(a in r))&&(f||(f=Array.prototype.slice.call(r,0,a)),f[a]=r[a]);return e.concat(f||Array.prototype.slice.call(r))},fh=function(){function e(r,i,a,o){this._uri=r,this._languageId=i,this._version=a,this._content=o,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(r){if(r){var i=this.offsetAt(r.start),a=this.offsetAt(r.end);return this._content.substring(i,a)}return this._content},e.prototype.update=function(r,i){for(var a=0,o=r;a<o.length;a++){var f=o[a];if(e.isIncremental(f)){var d=dh(f.range),v=this.offsetAt(d.start),h=this.offsetAt(d.end);this._content=this._content.substring(0,v)+f.text+this._content.substring(h,this._content.length);var g=Math.max(d.start.line,0),b=Math.max(d.end.line,0),E=this._lineOffsets,V=ch(f.text,!1,v);if(b-g===V.length)for(var I=0,W=V.length;I<W;I++)E[I+g+1]=V[I];else V.length<1e4?E.splice.apply(E,gg([g+1,b-g],V,!1)):this._lineOffsets=E=E.slice(0,g+1).concat(V,E.slice(b+1));var Y=f.text.length-(h-v);if(Y!==0)for(var I=g+1+V.length,W=E.length;I<W;I++)E[I]=E[I]+Y}else if(e.isFull(f))this._content=f.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=i},e.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=ch(this._content,!0)),this._lineOffsets},e.prototype.positionAt=function(r){r=Math.max(Math.min(r,this._content.length),0);var i=this.getLineOffsets(),a=0,o=i.length;if(o===0)return{line:0,character:r};for(;a<o;){var f=Math.floor((a+o)/2);i[f]>r?o=f:a=f+1}var d=a-1;return{line:d,character:r-i[d]}},e.prototype.offsetAt=function(r){var i=this.getLineOffsets();if(r.line>=i.length)return this._content.length;if(r.line<0)return 0;var a=i[r.line],o=r.line+1<i.length?i[r.line+1]:this._content.length;return Math.max(Math.min(a+r.character,o),a)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e.isIncremental=function(r){var i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")},e.isFull=function(r){var i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0},e}(),Yf;(function(e){function r(o,f,d,v){return new fh(o,f,d,v)}e.create=r;function i(o,f,d){if(o instanceof fh)return o.update(f,d),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=i;function a(o,f){for(var d=o.getText(),v=wd(f.map(mg),function(W,Y){var _=W.range.start.line-Y.range.start.line;return _===0?W.range.start.character-Y.range.start.character:_}),h=0,g=[],b=0,E=v;b<E.length;b++){var V=E[b],I=o.offsetAt(V.range.start);if(I<h)throw new Error("Overlapping edit");I>h&&g.push(d.substring(h,I)),V.newText.length&&g.push(V.newText),h=o.offsetAt(V.range.end)}return g.push(d.substr(h)),g.join("")}e.applyEdits=a})(Yf||(Yf={}));function wd(e,r){if(e.length<=1)return e;var i=e.length/2|0,a=e.slice(0,i),o=e.slice(i);wd(a,r),wd(o,r);for(var f=0,d=0,v=0;f<a.length&&d<o.length;){var h=r(a[f],o[d]);h<=0?e[v++]=a[f++]:e[v++]=o[d++]}for(;f<a.length;)e[v++]=a[f++];for(;d<o.length;)e[v++]=o[d++];return e}function ch(e,r,i){i===void 0&&(i=0);for(var a=r?[i]:[],o=0;o<e.length;o++){var f=e.charCodeAt(o);(f===13||f===10)&&(f===13&&o+1<e.length&&e.charCodeAt(o+1)===10&&o++,a.push(i+o+1))}return a}function dh(e){var r=e.start,i=e.end;return r.line>i.line||r.line===i.line&&r.character>i.character?{start:i,end:r}:e}function mg(e){var r=dh(e.range);return r!==e.range?{newText:e.newText,range:r}:e}var Bt;(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.SchemaResolveError=768]="SchemaResolveError"})(Bt||(Bt={}));var ph;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Io.Markdown,Io.PlainText],commitCharactersSupport:!0}}}}})(ph||(ph={}));var Lo=function(){var e=function(r,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var f in o)o.hasOwnProperty(f)&&(a[f]=o[f])},e(r,i)};return function(r,i){e(r,i);function a(){this.constructor=r}r.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}}(),yg={"color-hex":{errorMessage:"Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.",pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:"String is not a RFC3339 date-time.",pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:"String is not a RFC3339 date.",pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:"String is not a RFC3339 time.",pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:"String is not an e-mail address.",pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},Mo=function(){function e(r,i,a){this.offset=i,this.length=a,this.parent=r}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e}(),bg=function(e){Lo(r,e);function r(i,a){var o=e.call(this,i,a)||this;return o.type="null",o.value=null,o}return r}(Mo),hh=function(e){Lo(r,e);function r(i,a,o){var f=e.call(this,i,o)||this;return f.type="boolean",f.value=a,f}return r}(Mo),xg=function(e){Lo(r,e);function r(i,a){var o=e.call(this,i,a)||this;return o.type="array",o.items=[],o}return Object.defineProperty(r.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),r}(Mo),Sg=function(e){Lo(r,e);function r(i,a){var o=e.call(this,i,a)||this;return o.type="number",o.isInteger=!0,o.value=Number.NaN,o}return r}(Mo),vh=function(e){Lo(r,e);function r(i,a,o){var f=e.call(this,i,a,o)||this;return f.type="string",f.value="",f}return r}(Mo),wg=function(e){Lo(r,e);function r(i,a){var o=e.call(this,i,a)||this;return o.type="property",o.colonOffset=-1,o}return Object.defineProperty(r.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),r}(Mo),Cg=function(e){Lo(r,e);function r(i,a){var o=e.call(this,i,a)||this;return o.type="object",o.properties=[],o}return Object.defineProperty(r.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),r}(Mo);function Ln(e){return Gi(e)?e?{}:{not:{}}:e}var gh;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(gh||(gh={}));var Ag=function(){function e(r,i){r===void 0&&(r=-1),i===void 0&&(i=null),this.focusOffset=r,this.exclude=i,this.schemas=[]}return e.prototype.add=function(r){this.schemas.push(r)},e.prototype.merge=function(r){var i;(i=this.schemas).push.apply(i,r.schemas)},e.prototype.include=function(r){return(this.focusOffset===-1||mh(r,this.focusOffset))&&r!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),Cd=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.add=function(r){},e.prototype.merge=function(r){},e.prototype.include=function(r){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),Mn=function(){function e(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=null}return e.prototype.hasProblems=function(){return!!this.problems.length},e.prototype.mergeAll=function(r){for(var i=0,a=r;i<a.length;i++){var o=a[i];this.merge(o)}},e.prototype.merge=function(r){this.problems=this.problems.concat(r.problems)},e.prototype.mergeEnumValues=function(r){if(!this.enumValueMatch&&!r.enumValueMatch&&this.enumValues&&r.enumValues){this.enumValues=this.enumValues.concat(r.enumValues);for(var i=0,a=this.problems;i<a.length;i++){var o=a[i];o.code===Bt.EnumValueMismatch&&(o.message="Value is not accepted. Valid values: "+this.enumValues.map(function(f){return JSON.stringify(f)}).join(", ")+".")}}},e.prototype.mergePropertyMatch=function(r){this.merge(r),this.propertiesMatches++,(r.enumValueMatch||!r.hasProblems()&&r.propertiesMatches)&&this.propertiesValueMatches++,r.enumValueMatch&&r.enumValues&&r.enumValues.length===1&&this.primaryValueMatches++},e.prototype.compare=function(r){var i=this.hasProblems();return i!==r.hasProblems()?i?-1:1:this.enumValueMatch!==r.enumValueMatch?r.enumValueMatch?-1:1:this.primaryValueMatches!==r.primaryValueMatches?this.primaryValueMatches-r.primaryValueMatches:this.propertiesValueMatches!==r.propertiesValueMatches?this.propertiesValueMatches-r.propertiesValueMatches:this.propertiesMatches-r.propertiesMatches},e}();function Og(e,r){return r===void 0&&(r=[]),new yh(e,r,[])}function oo(e){return dg(e)}function Ad(e){return cg(e)}function mh(e,r,i){return i===void 0&&(i=!1),r>=e.offset&&r<e.offset+e.length||i&&r===e.offset+e.length}var yh=function(){function e(r,i,a){i===void 0&&(i=[]),a===void 0&&(a=[]),this.root=r,this.syntaxErrors=i,this.comments=a}return e.prototype.getNodeFromOffset=function(r,i){if(i===void 0&&(i=!1),this.root)return fg(this.root,r,i)},e.prototype.visit=function(r){if(this.root){var i=function(a){var o=r(a),f=a.children;if(Array.isArray(f))for(var d=0;d<f.length&&o;d++)o=i(f[d]);return o};i(this.root)}},e.prototype.validate=function(r,i){if(this.root&&i){var a=new Mn;return rn(this.root,i,a,Cd.instance),a.problems.map(function(o){var f=Wt.create(r.positionAt(o.location.offset),r.positionAt(o.location.offset+o.location.length));return Ca.create(f,o.message,o.severity,o.code)})}return null},e.prototype.getMatchingSchemas=function(r,i,a){i===void 0&&(i=-1),a===void 0&&(a=null);var o=new Ag(i,a);return this.root&&r&&rn(this.root,r,new Mn,o),o.schemas},e}();function rn(e,r,i,a){if(!e||!a.include(e))return;switch(e.type){case"object":h(e,r,i,a);break;case"array":v(e,r,i,a);break;case"string":d(e,r,i,a);break;case"number":f(e,r,i,a);break;case"property":return rn(e.valueNode,r,i,a)}o(),a.add({node:e,schema:r});function o(){function g(Me){return e.type===Me||Me==="integer"&&e.type==="number"&&e.isInteger||r.nullable&&e.value===null}if(Array.isArray(r.type)?r.type.some(g)||i.problems.push({location:{offset:e.offset,length:e.length},severity:Ct.Warning,message:r.errorMessage||"Incorrect type. Expected one of "+r.type.join(", ")+"."}):r.type&&(g(r.type)||i.problems.push({location:{offset:e.offset,length:e.length},severity:Ct.Warning,message:r.errorMessage||'Incorrect type. Expected "'+r.type+'".'})),Array.isArray(r.allOf))for(var b=0,E=r.allOf;b<E.length;b++){var V=E[b];rn(e,Ln(V),i,a)}var I=Ln(r.not);if(I){var W=new Mn,Y=a.newSub();rn(e,I,W,Y),W.hasProblems()||i.problems.push({location:{offset:e.offset,length:e.length},severity:Ct.Warning,message:"Matches a schema that is not allowed."});for(var _=0,U=Y.schemas;_<U.length;_++){var G=U[_];G.inverted=!G.inverted,a.add(G)}}var ce=function(Me,Xe){for(var yt=[],at=null,fr=0,Er=Me;fr<Er.length;fr++){var cr=Er[fr],Tr=Ln(cr),nr=new Mn,kt=a.newSub();if(rn(e,Tr,nr,kt),nr.hasProblems()||yt.push(Tr),!at)at={schema:Tr,validationResult:nr,matchingSchemas:kt};else if(!Xe&&!nr.hasProblems()&&!at.validationResult.hasProblems())at.matchingSchemas.merge(kt),at.validationResult.propertiesMatches+=nr.propertiesMatches,at.validationResult.propertiesValueMatches+=nr.propertiesValueMatches;else{var Yt=nr.compare(at.validationResult);Yt>0?at={schema:Tr,validationResult:nr,matchingSchemas:kt}:Yt===0&&(at.matchingSchemas.merge(kt),at.validationResult.mergeEnumValues(nr))}}return yt.length>1&&Xe&&i.problems.push({location:{offset:e.offset,length:1},severity:Ct.Warning,message:"Matches multiple schemas when only one must validate."}),at!==null&&(i.merge(at.validationResult),i.propertiesMatches+=at.validationResult.propertiesMatches,i.propertiesValueMatches+=at.validationResult.propertiesValueMatches,a.merge(at.matchingSchemas)),yt.length};Array.isArray(r.anyOf)&&ce(r.anyOf,!1),Array.isArray(r.oneOf)&&ce(r.oneOf,!0);var Ce=function(Me){var Xe=new Mn,yt=a.newSub();rn(e,Ln(Me),Xe,yt),i.merge(Xe),i.propertiesMatches+=Xe.propertiesMatches,i.propertiesValueMatches+=Xe.propertiesValueMatches,a.merge(yt)},ge=function(Me,Xe,yt){var at=Ln(Me),fr=new Mn,Er=a.newSub();rn(e,at,fr,Er),a.merge(Er),fr.hasProblems()?yt&&Ce(yt):Xe&&Ce(Xe)},ke=Ln(r.if);if(ke&&ge(ke,Ln(r.then),Ln(r.else)),Array.isArray(r.enum)){for(var be=oo(e),me=!1,ue=0,Oe=r.enum;ue<Oe.length;ue++){var Te=Oe[ue];if(Ul(be,Te)){me=!0;break}}i.enumValues=r.enum,i.enumValueMatch=me,me||i.problems.push({location:{offset:e.offset,length:e.length},severity:Ct.Warning,code:Bt.EnumValueMismatch,message:r.errorMessage||"Value is not accepted. Valid values: "+r.enum.map(function(Me){return JSON.stringify(Me)}).join(", ")+"."})}if(wa(r.const)){var be=oo(e);Ul(be,r.const)?i.enumValueMatch=!0:(i.problems.push({location:{offset:e.offset,length:e.length},severity:Ct.Warning,code:Bt.EnumValueMismatch,message:r.errorMessage||"Value must be "+JSON.stringify(r.const)+"."}),i.enumValueMatch=!1),i.enumValues=[r.const]}r.deprecationMessage&&e.parent&&i.problems.push({location:{offset:e.parent.offset,length:e.parent.length},severity:Ct.Warning,message:r.deprecationMessage})}function f(g,b,E,V){var I=g.value;Qn(b.multipleOf)&&I%b.multipleOf!==0&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Value is not divisible by "+b.multipleOf+"."});function W(Ce,ge){if(Qn(ge))return ge;if(Gi(ge)&&ge)return Ce}function Y(Ce,ge){if(!Gi(ge)||!ge)return Ce}var _=W(b.minimum,b.exclusiveMinimum);Qn(_)&&I<=_&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Value is below the exclusive minimum of "+_+"."});var U=W(b.maximum,b.exclusiveMaximum);Qn(U)&&I>=U&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Value is above the exclusive maximum of "+U+"."});var G=Y(b.minimum,b.exclusiveMinimum);Qn(G)&&I<G&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Value is below the minimum of "+G+"."});var ce=Y(b.maximum,b.exclusiveMaximum);Qn(ce)&&I>ce&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Value is above the maximum of "+ce+"."})}function d(g,b,E,V){if(Qn(b.minLength)&&g.value.length<b.minLength&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"String is shorter than the minimum length of "+b.minLength+"."}),Qn(b.maxLength)&&g.value.length>b.maxLength&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"String is longer than the maximum length of "+b.maxLength+"."}),hg(b.pattern)){var I=new RegExp(b.pattern);I.test(g.value)||E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:b.patternErrorMessage||b.errorMessage||'String does not match the pattern of "'+b.pattern+'".'})}if(b.format)switch(b.format){case"uri":case"uri-reference":{var W=void 0;if(!g.value)W="URI expected.";else{var Y=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(g.value);Y?!Y[2]&&b.format==="uri"&&(W="URI with a scheme is expected."):W="URI is expected."}W&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:b.patternErrorMessage||b.errorMessage||"String is not a URI: "+W})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var _=yg[b.format];(!g.value||!_.pattern.exec(g.value))&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:b.patternErrorMessage||b.errorMessage||_.errorMessage});break;default:}}function v(g,b,E,V){if(Array.isArray(b.items)){for(var I=b.items,W=0;W<I.length;W++){var Y=I[W],_=Ln(Y),U=new Mn,G=g.items[W];G?(rn(G,_,U,V),E.mergePropertyMatch(U)):g.items.length>=I.length&&E.propertiesValueMatches++}if(g.items.length>I.length)if(typeof b.additionalItems=="object")for(var ce=I.length;ce<g.items.length;ce++){var U=new Mn;rn(g.items[ce],b.additionalItems,U,V),E.mergePropertyMatch(U)}else b.additionalItems===!1&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Array has too many items according to schema. Expected "+I.length+" or fewer."})}else{var Ce=Ln(b.items);if(Ce)for(var ge=0,ke=g.items;ge<ke.length;ge++){var G=ke[ge],U=new Mn;rn(G,Ce,U,V),E.mergePropertyMatch(U)}}var be=Ln(b.contains);if(be){var me=g.items.some(function(Te){var Me=new Mn;return rn(Te,be,Me,Cd.instance),!Me.hasProblems()});me||E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:b.errorMessage||"Array does not contain required item."})}if(Qn(b.minItems)&&g.items.length<b.minItems&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Array has too few items. Expected "+b.minItems+" or more."}),Qn(b.maxItems)&&g.items.length>b.maxItems&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Array has too many items. Expected "+b.maxItems+" or fewer."}),b.uniqueItems===!0){var ue=oo(g),Oe=ue.some(function(Te,Me){return Me!==ue.lastIndexOf(Te)});Oe&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Array has duplicate items."})}}function h(g,b,E,V){for(var I=Object.create(null),W=[],Y=0,_=g.properties;Y<_.length;Y++){var U=_[Y],G=U.keyNode.value;I[G]=U.valueNode,W.push(G)}if(Array.isArray(b.required))for(var ce=0,Ce=b.required;ce<Ce.length;ce++){var ge=Ce[ce];if(!I[ge]){var ke=g.parent&&g.parent.type==="property"&&g.parent.keyNode,be=ke?{offset:ke.offset,length:ke.length}:{offset:g.offset,length:1};E.problems.push({location:be,severity:Ct.Warning,message:'Missing property "'+ge+'".'})}}var me=function(Nn){for(var Aa=W.indexOf(Nn);Aa>=0;)W.splice(Aa,1),Aa=W.indexOf(Nn)};if(b.properties)for(var ue=0,Oe=Object.keys(b.properties);ue<Oe.length;ue++){var ge=Oe[ue];me(ge);var Te=b.properties[ge],Me=I[ge];if(Me)if(Gi(Te))if(Te)E.propertiesMatches++,E.propertiesValueMatches++;else{var U=Me.parent;E.problems.push({location:{offset:U.keyNode.offset,length:U.keyNode.length},severity:Ct.Warning,message:b.errorMessage||"Property "+ge+" is not allowed."})}else{var Xe=new Mn;rn(Me,Te,Xe,V),E.mergePropertyMatch(Xe)}}if(b.patternProperties)for(var yt=0,at=Object.keys(b.patternProperties);yt<at.length;yt++)for(var fr=at[yt],Er=new RegExp(fr),cr=0,Tr=W.slice(0);cr<Tr.length;cr++){var ge=Tr[cr];if(Er.test(ge)){me(ge);var Me=I[ge];if(Me){var Te=b.patternProperties[fr];if(Gi(Te))if(Te)E.propertiesMatches++,E.propertiesValueMatches++;else{var U=Me.parent;E.problems.push({location:{offset:U.keyNode.offset,length:U.keyNode.length},severity:Ct.Warning,message:b.errorMessage||"Property "+ge+" is not allowed."})}else{var Xe=new Mn;rn(Me,Te,Xe,V),E.mergePropertyMatch(Xe)}}}}if(typeof b.additionalProperties=="object")for(var nr=0,kt=W;nr<kt.length;nr++){var ge=kt[nr],Me=I[ge];if(Me){var Xe=new Mn;rn(Me,b.additionalProperties,Xe,V),E.mergePropertyMatch(Xe)}}else if(b.additionalProperties===!1&&W.length>0)for(var Yt=0,Ht=W;Yt<Ht.length;Yt++){var ge=Ht[Yt],Me=I[ge];if(Me){var U=Me.parent;E.problems.push({location:{offset:U.keyNode.offset,length:U.keyNode.length},severity:Ct.Warning,message:b.errorMessage||"Property "+ge+" is not allowed."})}}if(Qn(b.maxProperties)&&g.properties.length>b.maxProperties&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Object has more properties than limit of "+b.maxProperties+"."}),Qn(b.minProperties)&&g.properties.length<b.minProperties&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Object has fewer properties than the required number of "+b.minProperties}),b.dependencies)for(var _e=0,qe=Object.keys(b.dependencies);_e<qe.length;_e++){var G=qe[_e],Tt=I[G];if(Tt){var Vt=b.dependencies[G];if(Array.isArray(Vt))for(var Ot=0,pn=Vt;Ot<pn.length;Ot++){var Ki=pn[Ot];I[Ki]?E.propertiesValueMatches++:E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Object is missing property "+Ki+" required by property {$key}."})}else{var Te=Ln(Vt);if(Te){var Xe=new Mn;rn(g,Te,Xe,V),E.mergePropertyMatch(Xe)}}}}var qn=Ln(b.propertyNames);if(qn)for(var Kr=0,uo=g.properties;Kr<uo.length;Kr++){var No=uo[Kr],G=No.keyNode;G&&rn(G,qn,E,Cd.instance)}}}function Eg(e,r){var i=[],a=-1,o=e.getText(),f=Ps(o,!1),d=r&&r.collectComments?[]:void 0;function v(){for(;;){var ke=f.scan();switch(E(),ke){case 12:case 13:Array.isArray(d)&&d.push(Wt.create(e.positionAt(f.getTokenOffset()),e.positionAt(f.getTokenOffset()+f.getTokenLength())));break;case 15:case 14:break;default:return ke}}}function h(ke){return f.getToken()===ke?(v(),!0):!1}function g(ke,be,me,ue,Oe){if(Oe===void 0&&(Oe=Ct.Error),i.length===0||me!==a){var Te=Wt.create(e.positionAt(me),e.positionAt(ue));i.push(Ca.create(Te,ke,Oe,be,e.languageId)),a=me}}function b(ke,be,me,ue,Oe){me===void 0&&(me=null),ue===void 0&&(ue=[]),Oe===void 0&&(Oe=[]);var Te=f.getTokenOffset(),Me=f.getTokenOffset()+f.getTokenLength();if(Te===Me&&Te>0){for(Te--;Te>0&&/\s/.test(o.charAt(Te));)Te--;Me=Te+1}if(g(ke,be,Te,Me),me&&V(me,!1),ue.length+Oe.length>0)for(var Xe=f.getToken();Xe!==17;){if(ue.indexOf(Xe)!==-1){v();break}else if(Oe.indexOf(Xe)!==-1)break;Xe=v()}return me}function E(){switch(f.getTokenError()){case 4:return b("Invalid unicode sequence in string.",Bt.InvalidUnicode),!0;case 5:return b("Invalid escape character in string.",Bt.InvalidEscapeCharacter),!0;case 3:return b("Unexpected end of number.",Bt.UnexpectedEndOfNumber),!0;case 1:return b("Unexpected end of comment.",Bt.UnexpectedEndOfComment),!0;case 2:return b("Unexpected end of string.",Bt.UnexpectedEndOfString),!0;case 6:return b("Invalid characters in string. Control characters must be escaped.",Bt.InvalidCharacter),!0}return!1}function V(ke,be){return ke.length=f.getTokenOffset()+f.getTokenLength()-ke.offset,be&&v(),ke}function I(ke){if(f.getToken()!==3)return null;var be=new xg(ke,f.getTokenOffset());v();for(var me=0,ue=!1;f.getToken()!==4&&f.getToken()!==17;){if(f.getToken()===5){ue||b("Value expected",Bt.ValueExpected);var Oe=f.getTokenOffset();if(v(),f.getToken()===4){ue&&g("Trailing comma",Bt.TrailingComma,Oe,Oe+1);continue}}else ue&&b("Expected comma",Bt.CommaExpected);var Te=ce(be,me++);Te?be.items.push(Te):b("Value expected",Bt.ValueExpected,null,[],[4,5]),ue=!0}return f.getToken()!==4?b("Expected comma or closing bracket",Bt.CommaOrCloseBacketExpected,be):V(be,!0)}function W(ke,be){var me=new wg(ke,f.getTokenOffset()),ue=_(me);if(!ue)if(f.getToken()===16){b("Property keys must be doublequoted",Bt.Undefined);var Oe=new vh(me,f.getTokenOffset(),f.getTokenLength());Oe.value=f.getTokenValue(),ue=Oe,v()}else return null;me.keyNode=ue;var Te=be[ue.value];if(Te?(g("Duplicate object key",Bt.DuplicateKey,me.keyNode.offset,me.keyNode.offset+me.keyNode.length,Ct.Warning),typeof Te=="object"&&g("DuplicateKeyWarning",Bt.DuplicateKey,Te.keyNode.offset,Te.keyNode.offset+Te.keyNode.length,Ct.Warning),be[ue.value]=!0):be[ue.value]=me,f.getToken()===6)me.colonOffset=f.getTokenOffset(),v();else if(b("Colon expected",Bt.ColonExpected),f.getToken()===10&&e.positionAt(ue.offset+ue.length).line<e.positionAt(f.getTokenOffset()).line)return me.length=ue.length,me;var Me=ce(me,ue.value);return Me?(me.valueNode=Me,me.length=Me.offset+Me.length-me.offset,me):b("Value expected",Bt.ValueExpected,me,[],[2,5])}function Y(ke){if(f.getToken()!==1)return null;var be=new Cg(ke,f.getTokenOffset()),me=Object.create(null);v();for(var ue=!1;f.getToken()!==2&&f.getToken()!==17;){if(f.getToken()===5){ue||b("Property expected",Bt.PropertyExpected);var Oe=f.getTokenOffset();if(v(),f.getToken()===2){ue&&g("Trailing comma",Bt.TrailingComma,Oe,Oe+1);continue}}else ue&&b("Expected comma",Bt.CommaExpected);var Te=W(be,me);Te?be.properties.push(Te):b("Property expected",Bt.PropertyExpected,null,[],[2,5]),ue=!0}return f.getToken()!==2?b("Expected comma or closing brace",Bt.CommaOrCloseBraceExpected,be):V(be,!0)}function _(ke){if(f.getToken()!==10)return null;var be=new vh(ke,f.getTokenOffset());return be.value=f.getTokenValue(),V(be,!0)}function U(ke){if(f.getToken()!==11)return null;var be=new Sg(ke,f.getTokenOffset());if(f.getTokenError()===0){var me=f.getTokenValue();try{var ue=JSON.parse(me);if(!Qn(ue))return b("Invalid number format.",Bt.Undefined,be);be.value=ue}catch{return b("Invalid number format.",Bt.Undefined,be)}be.isInteger=me.indexOf(".")===-1}return V(be,!0)}function G(ke){var be;switch(f.getToken()){case 7:return V(new bg(ke,f.getTokenOffset()),!0);case 8:return V(new hh(ke,!0,f.getTokenOffset()),!0);case 9:return V(new hh(ke,!1,f.getTokenOffset()),!0);default:return null}}function ce(ke,be){return I(ke)||Y(ke)||_(ke)||U(ke)||G(ke)}var Ce=null,ge=v();return ge!==17&&(Ce=ce(null,null),Ce?f.getToken()!==17&&b("End of file expected.",Bt.Undefined):b("Expected a JSON object, array or literal.",Bt.Undefined)),new yh(Ce,i,d)}function Od(e,r,i){if(e!==null&&typeof e=="object"){var a=r+" ";if(Array.isArray(e)){if(e.length===0)return"[]";for(var o=`[
249
249
  `,f=0;f<e.length;f++)o+=a+Od(e[f],a,i),f<e.length-1&&(o+=","),o+=`
250
250
  `;return o+=r+"]",o}else{var d=Object.keys(e);if(d.length===0)return"{}";for(var o=`{
251
251
  `,f=0;f<d.length;f++){var v=d[f];o+=a+JSON.stringify(v)+": "+Od(e[v],a,i),f<d.length-1&&(o+=","),o+=`
252
- `}return o+=r+"}",o}}return i(e)}function Pg(e,r){if(e.length<r.length)return!1;for(var i=0;i<r.length;i++)if(e[i]!==r[i])return!1;return!0}function Ed(e,r){var i=e.length-r.length;return i>0?e.lastIndexOf(r)===i:i===0?e===r:!1}function Fg(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function w0(e,r){for(var i="";r>0;)(r&1)===1&&(i+=e),e+=e,r=r>>>1;return i}var Ig=[",","}","]"],Lg=[":"],Mg=function(){function e(r,i,a,o){i===void 0&&(i=[]),a===void 0&&(a=Promise),o===void 0&&(o={}),this.schemaService=r,this.contributions=i,this.promiseConstructor=a,this.clientCapabilities=o,this.templateVarIdCounter=0}return e.prototype.doResolve=function(r){for(var i=this.contributions.length-1;i>=0;i--)if(this.contributions[i].resolveCompletion){var a=this.contributions[i].resolveCompletion(r);if(a)return a}return this.promiseConstructor.resolve(r)},e.prototype.doComplete=function(r,i,a){var o=this,f={items:[],isIncomplete:!1},d=r.getText(),v=r.offsetAt(i),h=a.getNodeFromOffset(v,!0);if(this.isInComment(r,h?h.offset:0,v))return Promise.resolve(f);if(h&&v===h.offset+h.length&&v>0){var g=d[v-1];(h.type==="object"&&g==="}"||h.type==="array"&&g==="]")&&(h=h.parent)}var b=this.getCurrentWord(r,v),E=null;if(h&&(h.type==="string"||h.type==="number"||h.type==="boolean"||h.type==="null"))E=Wt.create(r.positionAt(h.offset),r.positionAt(h.offset+h.length));else{var j=v-b.length;j>0&&d[j-1]==='"'&&j--,E=Wt.create(r.positionAt(j),i)}var I=this.doesSupportsCommitCharacters(),W={},Y={add:function(_){var U=W[_.label];U?U.documentation||(U.documentation=_.documentation):(W[_.label]=_,E&&(_.textEdit=pi.replace(E,_.insertText)),I&&(_.commitCharacters=_.kind===Zn.Property?Lg:Ig),f.items.push(_))},setAsIncomplete:function(){f.isIncomplete=!0},error:function(_){console.error(_)},log:function(_){console.log(_)},getNumberOfProposals:function(){return f.items.length}};return this.schemaService.getSchemaForResource(r.uri,a).then(function(_){var U=[],G=!0,ce="",Ce=null;if(h&&h.type==="string"){var ge=h.parent;ge&&ge.type==="property"&&ge.keyNode===h&&(G=!ge.valueNode,Ce=ge,ce=d.substr(h.offset+1,h.length-2),ge&&(h=ge.parent))}if(h&&h.type==="object"){if(h.offset===v)return f;var ke=h.properties;ke.forEach(function(Oe){(!Ce||Ce!==Oe)&&(W[Oe.keyNode.value]=bd.create("__"))});var be="";G&&(be=o.evaluateSeparatorAfter(r,r.offsetAt(E.end))),_?o.getPropertyCompletions(_,a,h,G,be,Y):o.getSchemaLessPropertyCompletions(a,h,ce,Y);var me=Ad(h);o.contributions.forEach(function(Oe){var Te=Oe.collectPropertyCompletions(r.uri,me,b,G,be==="",Y);Te&&U.push(Te)}),!_&&b.length>0&&d.charAt(v-b.length-1)!=='"'&&(Y.add({kind:Zn.Property,label:o.getLabelForValue(b),insertText:o.getInsertTextForProperty(b,null,!1,be),insertTextFormat:Hr.Snippet,documentation:""}),Y.setAsIncomplete())}var ue={};return _?o.getValueCompletions(_,a,h,v,r,Y,ue):o.getSchemaLessValueCompletions(a,h,v,r,Y),o.contributions.length>0&&o.getContributedValueCompletions(a,h,v,r,Y,U),o.promiseConstructor.all(U).then(function(){if(Y.getNumberOfProposals()===0){var Oe=v;h&&(h.type==="string"||h.type==="number"||h.type==="boolean"||h.type==="null")&&(Oe=h.offset+h.length);var Te=o.evaluateSeparatorAfter(r,Oe);o.addFillerValueCompletions(ue,Te,Y)}return f})})},e.prototype.getPropertyCompletions=function(r,i,a,o,f,d){var v=this,h=i.getMatchingSchemas(r.schema,a.offset);h.forEach(function(g){if(g.node===a&&!g.inverted){var b=g.schema.properties;b&&Object.keys(b).forEach(function(E){var j=b[E],I=!1;if(typeof j=="object"&&j.allOf)for(var W=0,Y=j.allOf;W<Y.length;W++){var _=Y[W];if(_.readOnly){I=!0;break}}if(typeof j=="object"&&!j.deprecationMessage&&!j.doNotSuggest&&!I){var U={kind:Zn.Property,label:v.sanitizeLabel(E),insertText:v.getInsertTextForProperty(E,j,o,f),insertTextFormat:Hr.Snippet,filterText:v.getFilterTextForValue(E),documentation:v.fromMarkup(j.markdownDescription)||j.description||""};Ed(U.insertText,"$1"+f)&&(U.command={title:"Suggest",command:"editor.action.triggerSuggest"}),d.add(U)}})}})},e.prototype.getSchemaLessPropertyCompletions=function(r,i,a,o){var f=this,d=function(h){h.properties.forEach(function(g){var b=g.keyNode.value;o.add({kind:Zn.Property,label:f.sanitizeLabel(b),insertText:f.getInsertTextForValue(b,""),insertTextFormat:Hr.Snippet,filterText:f.getFilterTextForValue(b),documentation:""})})};if(i.parent)if(i.parent.type==="property"){var v=i.parent.keyNode.value;r.visit(function(h){return h.type==="property"&&h!==i.parent&&h.keyNode.value===v&&h.valueNode&&h.valueNode.type==="object"&&d(h.valueNode),!0})}else i.parent.type==="array"&&i.parent.items.forEach(function(h){h.type==="object"&&h!==i&&d(h)});else i.type==="object"&&o.add({kind:Zn.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",null,!0,""),insertTextFormat:Hr.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(r,i,a,o,f){var d=this,v=a;if(i&&(i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(v=i.offset+i.length,i=i.parent),!i){f.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:Hr.Snippet,documentation:""}),f.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:Hr.Snippet,documentation:""});return}var h=this.evaluateSeparatorAfter(o,v),g=function(I){yh(I.parent,a,!0)||f.add({kind:d.getSuggestionKind(I.type),label:d.getLabelTextForMatchingNode(I,o),insertText:d.getInsertTextForMatchingNode(I,o,h),insertTextFormat:Hr.Snippet,documentation:""}),I.type==="boolean"&&d.addBooleanValueCompletion(!I.value,h,f)};if(i.type==="property"&&a>i.colonOffset){var b=i.valueNode;if(b&&(a>b.offset+b.length||b.type==="object"||b.type==="array"))return;var E=i.keyNode.value;r.visit(function(I){return I.type==="property"&&I.keyNode.value===E&&I.valueNode&&g(I.valueNode),!0}),E==="$schema"&&i.parent&&!i.parent.parent&&this.addDollarSchemaCompletions(h,f)}if(i.type==="array")if(i.parent&&i.parent.type==="property"){var j=i.parent.keyNode.value;r.visit(function(I){return I.type==="property"&&I.keyNode.value===j&&I.valueNode&&I.valueNode.type==="array"&&I.valueNode.items.forEach(g),!0})}else i.items.forEach(g)},e.prototype.getValueCompletions=function(r,i,a,o,f,d,v){var h=this,g=o,b=null,E=null;if(a&&(a.type==="string"||a.type==="number"||a.type==="boolean"||a.type==="null")&&(g=a.offset+a.length,E=a,a=a.parent),!a){this.addSchemaValueCompletions(r.schema,"",d,v);return}if(a.type==="property"&&o>a.colonOffset){var j=a.valueNode;if(j&&o>j.offset+j.length)return;b=a.keyNode.value,a=a.parent}if(a&&(b!==null||a.type==="array")){var I=this.evaluateSeparatorAfter(f,g),W=i.getMatchingSchemas(r.schema,a.offset,E);W.forEach(function(Y){if(Y.node===a&&!Y.inverted&&Y.schema){if(a.type==="array"&&Y.schema.items)if(Array.isArray(Y.schema.items)){var _=h.findItemAtOffset(a,f,o);_<Y.schema.items.length&&h.addSchemaValueCompletions(Y.schema.items[_],I,d,v)}else h.addSchemaValueCompletions(Y.schema.items,I,d,v);if(Y.schema.properties){var U=Y.schema.properties[b];U&&h.addSchemaValueCompletions(U,I,d,v)}}}),b==="$schema"&&!a.parent&&this.addDollarSchemaCompletions(I,d),v.boolean&&(this.addBooleanValueCompletion(!0,I,d),this.addBooleanValueCompletion(!1,I,d)),v.null&&this.addNullValueCompletion(I,d)}},e.prototype.getContributedValueCompletions=function(r,i,a,o,f,d){if(!i)this.contributions.forEach(function(b){var E=b.collectDefaultCompletions(o.uri,f);E&&d.push(E)});else if((i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(i=i.parent),i.type==="property"&&a>i.colonOffset){var v=i.keyNode.value,h=i.valueNode;if(!h||a<=h.offset+h.length){var g=Ad(i.parent);this.contributions.forEach(function(b){var E=b.collectValueCompletions(o.uri,g,v,f);E&&d.push(E)})}}},e.prototype.addSchemaValueCompletions=function(r,i,a,o){var f=this;typeof r=="object"&&(this.addEnumValueCompletions(r,i,a),this.addDefaultValueCompletions(r,i,a),this.collectTypes(r,o),Array.isArray(r.allOf)&&r.allOf.forEach(function(d){return f.addSchemaValueCompletions(d,i,a,o)}),Array.isArray(r.anyOf)&&r.anyOf.forEach(function(d){return f.addSchemaValueCompletions(d,i,a,o)}),Array.isArray(r.oneOf)&&r.oneOf.forEach(function(d){return f.addSchemaValueCompletions(d,i,a,o)}))},e.prototype.addDefaultValueCompletions=function(r,i,a,o){var f=this;o===void 0&&(o=0);var d=!1;if(wa(r.default)){for(var v=r.type,h=r.default,g=o;g>0;g--)h=[h],v="array";a.add({kind:this.getSuggestionKind(v),label:this.getLabelForValue(h),insertText:this.getInsertTextForValue(h,i),insertTextFormat:Hr.Snippet}),d=!0}Array.isArray(r.examples)&&r.examples.forEach(function(b){for(var E=r.type,j=b,I=o;I>0;I--)j=[j],E="array";a.add({kind:f.getSuggestionKind(E),label:f.getLabelForValue(j),insertText:f.getInsertTextForValue(j,i),insertTextFormat:Hr.Snippet}),d=!0}),Array.isArray(r.defaultSnippets)&&r.defaultSnippets.forEach(function(b){var E=r.type,j=b.body,I=b.label,W,Y;if(wa(j)){for(var _=r.type,U=o;U>0;U--)j=[j],_="array";W=f.getInsertTextForSnippetValue(j,i),Y=f.getFilterTextForSnippetValue(j),I=I||f.getLabelForSnippetValue(j)}else if(typeof b.bodyText=="string"){for(var G="",ce="",Ce="",U=o;U>0;U--)G=G+Ce+`[
252
+ `}return o+=r+"}",o}}return i(e)}function Tg(e,r){if(e.length<r.length)return!1;for(var i=0;i<r.length;i++)if(e[i]!==r[i])return!1;return!0}function Ed(e,r){var i=e.length-r.length;return i>0?e.lastIndexOf(r)===i:i===0?e===r:!1}function kg(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function y0(e,r){for(var i="";r>0;)(r&1)===1&&(i+=e),e+=e,r=r>>>1;return i}var Pg=[",","}","]"],Fg=[":"],Ig=function(){function e(r,i,a,o){i===void 0&&(i=[]),a===void 0&&(a=Promise),o===void 0&&(o={}),this.schemaService=r,this.contributions=i,this.promiseConstructor=a,this.clientCapabilities=o,this.templateVarIdCounter=0}return e.prototype.doResolve=function(r){for(var i=this.contributions.length-1;i>=0;i--)if(this.contributions[i].resolveCompletion){var a=this.contributions[i].resolveCompletion(r);if(a)return a}return this.promiseConstructor.resolve(r)},e.prototype.doComplete=function(r,i,a){var o=this,f={items:[],isIncomplete:!1},d=r.getText(),v=r.offsetAt(i),h=a.getNodeFromOffset(v,!0);if(this.isInComment(r,h?h.offset:0,v))return Promise.resolve(f);if(h&&v===h.offset+h.length&&v>0){var g=d[v-1];(h.type==="object"&&g==="}"||h.type==="array"&&g==="]")&&(h=h.parent)}var b=this.getCurrentWord(r,v),E=null;if(h&&(h.type==="string"||h.type==="number"||h.type==="boolean"||h.type==="null"))E=Wt.create(r.positionAt(h.offset),r.positionAt(h.offset+h.length));else{var V=v-b.length;V>0&&d[V-1]==='"'&&V--,E=Wt.create(r.positionAt(V),i)}var I=this.doesSupportsCommitCharacters(),W={},Y={add:function(_){var U=W[_.label];U?U.documentation||(U.documentation=_.documentation):(W[_.label]=_,E&&(_.textEdit=pi.replace(E,_.insertText)),I&&(_.commitCharacters=_.kind===Zn.Property?Fg:Pg),f.items.push(_))},setAsIncomplete:function(){f.isIncomplete=!0},error:function(_){console.error(_)},log:function(_){console.log(_)},getNumberOfProposals:function(){return f.items.length}};return this.schemaService.getSchemaForResource(r.uri,a).then(function(_){var U=[],G=!0,ce="",Ce=null;if(h&&h.type==="string"){var ge=h.parent;ge&&ge.type==="property"&&ge.keyNode===h&&(G=!ge.valueNode,Ce=ge,ce=d.substr(h.offset+1,h.length-2),ge&&(h=ge.parent))}if(h&&h.type==="object"){if(h.offset===v)return f;var ke=h.properties;ke.forEach(function(Oe){(!Ce||Ce!==Oe)&&(W[Oe.keyNode.value]=bd.create("__"))});var be="";G&&(be=o.evaluateSeparatorAfter(r,r.offsetAt(E.end))),_?o.getPropertyCompletions(_,a,h,G,be,Y):o.getSchemaLessPropertyCompletions(a,h,ce,Y);var me=Ad(h);o.contributions.forEach(function(Oe){var Te=Oe.collectPropertyCompletions(r.uri,me,b,G,be==="",Y);Te&&U.push(Te)}),!_&&b.length>0&&d.charAt(v-b.length-1)!=='"'&&(Y.add({kind:Zn.Property,label:o.getLabelForValue(b),insertText:o.getInsertTextForProperty(b,null,!1,be),insertTextFormat:Hr.Snippet,documentation:""}),Y.setAsIncomplete())}var ue={};return _?o.getValueCompletions(_,a,h,v,r,Y,ue):o.getSchemaLessValueCompletions(a,h,v,r,Y),o.contributions.length>0&&o.getContributedValueCompletions(a,h,v,r,Y,U),o.promiseConstructor.all(U).then(function(){if(Y.getNumberOfProposals()===0){var Oe=v;h&&(h.type==="string"||h.type==="number"||h.type==="boolean"||h.type==="null")&&(Oe=h.offset+h.length);var Te=o.evaluateSeparatorAfter(r,Oe);o.addFillerValueCompletions(ue,Te,Y)}return f})})},e.prototype.getPropertyCompletions=function(r,i,a,o,f,d){var v=this,h=i.getMatchingSchemas(r.schema,a.offset);h.forEach(function(g){if(g.node===a&&!g.inverted){var b=g.schema.properties;b&&Object.keys(b).forEach(function(E){var V=b[E],I=!1;if(typeof V=="object"&&V.allOf)for(var W=0,Y=V.allOf;W<Y.length;W++){var _=Y[W];if(_.readOnly){I=!0;break}}if(typeof V=="object"&&!V.deprecationMessage&&!V.doNotSuggest&&!I){var U={kind:Zn.Property,label:v.sanitizeLabel(E),insertText:v.getInsertTextForProperty(E,V,o,f),insertTextFormat:Hr.Snippet,filterText:v.getFilterTextForValue(E),documentation:v.fromMarkup(V.markdownDescription)||V.description||""};Ed(U.insertText,"$1"+f)&&(U.command={title:"Suggest",command:"editor.action.triggerSuggest"}),d.add(U)}})}})},e.prototype.getSchemaLessPropertyCompletions=function(r,i,a,o){var f=this,d=function(h){h.properties.forEach(function(g){var b=g.keyNode.value;o.add({kind:Zn.Property,label:f.sanitizeLabel(b),insertText:f.getInsertTextForValue(b,""),insertTextFormat:Hr.Snippet,filterText:f.getFilterTextForValue(b),documentation:""})})};if(i.parent)if(i.parent.type==="property"){var v=i.parent.keyNode.value;r.visit(function(h){return h.type==="property"&&h!==i.parent&&h.keyNode.value===v&&h.valueNode&&h.valueNode.type==="object"&&d(h.valueNode),!0})}else i.parent.type==="array"&&i.parent.items.forEach(function(h){h.type==="object"&&h!==i&&d(h)});else i.type==="object"&&o.add({kind:Zn.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",null,!0,""),insertTextFormat:Hr.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(r,i,a,o,f){var d=this,v=a;if(i&&(i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(v=i.offset+i.length,i=i.parent),!i){f.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:Hr.Snippet,documentation:""}),f.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:Hr.Snippet,documentation:""});return}var h=this.evaluateSeparatorAfter(o,v),g=function(I){mh(I.parent,a,!0)||f.add({kind:d.getSuggestionKind(I.type),label:d.getLabelTextForMatchingNode(I,o),insertText:d.getInsertTextForMatchingNode(I,o,h),insertTextFormat:Hr.Snippet,documentation:""}),I.type==="boolean"&&d.addBooleanValueCompletion(!I.value,h,f)};if(i.type==="property"&&a>i.colonOffset){var b=i.valueNode;if(b&&(a>b.offset+b.length||b.type==="object"||b.type==="array"))return;var E=i.keyNode.value;r.visit(function(I){return I.type==="property"&&I.keyNode.value===E&&I.valueNode&&g(I.valueNode),!0}),E==="$schema"&&i.parent&&!i.parent.parent&&this.addDollarSchemaCompletions(h,f)}if(i.type==="array")if(i.parent&&i.parent.type==="property"){var V=i.parent.keyNode.value;r.visit(function(I){return I.type==="property"&&I.keyNode.value===V&&I.valueNode&&I.valueNode.type==="array"&&I.valueNode.items.forEach(g),!0})}else i.items.forEach(g)},e.prototype.getValueCompletions=function(r,i,a,o,f,d,v){var h=this,g=o,b=null,E=null;if(a&&(a.type==="string"||a.type==="number"||a.type==="boolean"||a.type==="null")&&(g=a.offset+a.length,E=a,a=a.parent),!a){this.addSchemaValueCompletions(r.schema,"",d,v);return}if(a.type==="property"&&o>a.colonOffset){var V=a.valueNode;if(V&&o>V.offset+V.length)return;b=a.keyNode.value,a=a.parent}if(a&&(b!==null||a.type==="array")){var I=this.evaluateSeparatorAfter(f,g),W=i.getMatchingSchemas(r.schema,a.offset,E);W.forEach(function(Y){if(Y.node===a&&!Y.inverted&&Y.schema){if(a.type==="array"&&Y.schema.items)if(Array.isArray(Y.schema.items)){var _=h.findItemAtOffset(a,f,o);_<Y.schema.items.length&&h.addSchemaValueCompletions(Y.schema.items[_],I,d,v)}else h.addSchemaValueCompletions(Y.schema.items,I,d,v);if(Y.schema.properties){var U=Y.schema.properties[b];U&&h.addSchemaValueCompletions(U,I,d,v)}}}),b==="$schema"&&!a.parent&&this.addDollarSchemaCompletions(I,d),v.boolean&&(this.addBooleanValueCompletion(!0,I,d),this.addBooleanValueCompletion(!1,I,d)),v.null&&this.addNullValueCompletion(I,d)}},e.prototype.getContributedValueCompletions=function(r,i,a,o,f,d){if(!i)this.contributions.forEach(function(b){var E=b.collectDefaultCompletions(o.uri,f);E&&d.push(E)});else if((i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(i=i.parent),i.type==="property"&&a>i.colonOffset){var v=i.keyNode.value,h=i.valueNode;if(!h||a<=h.offset+h.length){var g=Ad(i.parent);this.contributions.forEach(function(b){var E=b.collectValueCompletions(o.uri,g,v,f);E&&d.push(E)})}}},e.prototype.addSchemaValueCompletions=function(r,i,a,o){var f=this;typeof r=="object"&&(this.addEnumValueCompletions(r,i,a),this.addDefaultValueCompletions(r,i,a),this.collectTypes(r,o),Array.isArray(r.allOf)&&r.allOf.forEach(function(d){return f.addSchemaValueCompletions(d,i,a,o)}),Array.isArray(r.anyOf)&&r.anyOf.forEach(function(d){return f.addSchemaValueCompletions(d,i,a,o)}),Array.isArray(r.oneOf)&&r.oneOf.forEach(function(d){return f.addSchemaValueCompletions(d,i,a,o)}))},e.prototype.addDefaultValueCompletions=function(r,i,a,o){var f=this;o===void 0&&(o=0);var d=!1;if(wa(r.default)){for(var v=r.type,h=r.default,g=o;g>0;g--)h=[h],v="array";a.add({kind:this.getSuggestionKind(v),label:this.getLabelForValue(h),insertText:this.getInsertTextForValue(h,i),insertTextFormat:Hr.Snippet}),d=!0}Array.isArray(r.examples)&&r.examples.forEach(function(b){for(var E=r.type,V=b,I=o;I>0;I--)V=[V],E="array";a.add({kind:f.getSuggestionKind(E),label:f.getLabelForValue(V),insertText:f.getInsertTextForValue(V,i),insertTextFormat:Hr.Snippet}),d=!0}),Array.isArray(r.defaultSnippets)&&r.defaultSnippets.forEach(function(b){var E=r.type,V=b.body,I=b.label,W,Y;if(wa(V)){for(var _=r.type,U=o;U>0;U--)V=[V],_="array";W=f.getInsertTextForSnippetValue(V,i),Y=f.getFilterTextForSnippetValue(V),I=I||f.getLabelForSnippetValue(V)}else if(typeof b.bodyText=="string"){for(var G="",ce="",Ce="",U=o;U>0;U--)G=G+Ce+`[
253
253
  `,ce=ce+`
254
254
  `+Ce+"]",Ce+=" ",E="array";W=G+Ce+b.bodyText.split(`
255
255
  `).join(`
256
256
  `+Ce)+ce+i,I=I||f.sanitizeLabel(W),Y=W.replace(/[\n]/g,"")}a.add({kind:f.getSuggestionKind(E),label:I,documentation:f.fromMarkup(b.markdownDescription)||b.description,insertText:W,insertTextFormat:Hr.Snippet,filterText:Y}),d=!0}),!d&&typeof r.items=="object"&&!Array.isArray(r.items)&&this.addDefaultValueCompletions(r.items,i,a,o+1)},e.prototype.addEnumValueCompletions=function(r,i,a){if(wa(r.const)&&a.add({kind:this.getSuggestionKind(r.type),label:this.getLabelForValue(r.const),insertText:this.getInsertTextForValue(r.const,i),insertTextFormat:Hr.Snippet,documentation:this.fromMarkup(r.markdownDescription)||r.description}),Array.isArray(r.enum))for(var o=0,f=r.enum.length;o<f;o++){var d=r.enum[o],v=this.fromMarkup(r.markdownDescription)||r.description;r.markdownEnumDescriptions&&o<r.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?v=this.fromMarkup(r.markdownEnumDescriptions[o]):r.enumDescriptions&&o<r.enumDescriptions.length&&(v=r.enumDescriptions[o]),a.add({kind:this.getSuggestionKind(r.type),label:this.getLabelForValue(d),insertText:this.getInsertTextForValue(d,i),insertTextFormat:Hr.Snippet,documentation:v})}},e.prototype.collectTypes=function(r,i){if(!(Array.isArray(r.enum)||wa(r.const))){var a=r.type;Array.isArray(a)?a.forEach(function(o){return i[o]=!0}):i[a]=!0}},e.prototype.addFillerValueCompletions=function(r,i,a){r.object&&a.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},i),insertTextFormat:Hr.Snippet,detail:"New object",documentation:""}),r.array&&a.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],i),insertTextFormat:Hr.Snippet,detail:"New array",documentation:""})},e.prototype.addBooleanValueCompletion=function(r,i,a){a.add({kind:this.getSuggestionKind("boolean"),label:r?"true":"false",insertText:this.getInsertTextForValue(r,i),insertTextFormat:Hr.Snippet,documentation:""})},e.prototype.addNullValueCompletion=function(r,i){i.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+r,insertTextFormat:Hr.Snippet,documentation:""})},e.prototype.addDollarSchemaCompletions=function(r,i){var a=this,o=this.schemaService.getRegisteredSchemaIds(function(f){return f==="http"||f==="https"});o.forEach(function(f){return i.add({kind:Zn.Module,label:a.getLabelForValue(f),filterText:a.getFilterTextForValue(f),insertText:a.getInsertTextForValue(f,r),insertTextFormat:Hr.Snippet,documentation:""})})},e.prototype.sanitizeLabel=function(r){return r=r.replace(/[\n]/g,"\u21B5"),r.length>57&&(r=r.substr(0,57).trim()+"..."),r},e.prototype.getLabelForValue=function(r){return this.sanitizeLabel(JSON.stringify(r))},e.prototype.getFilterTextForValue=function(r){return JSON.stringify(r)},e.prototype.getFilterTextForSnippetValue=function(r){return JSON.stringify(r).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getLabelForSnippetValue=function(r){var i=JSON.stringify(r);return i=i.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1"),this.sanitizeLabel(i)},e.prototype.getInsertTextForPlainText=function(r){return r.replace(/[\\\$\}]/g,"\\$&")},e.prototype.getInsertTextForValue=function(r,i){var a=JSON.stringify(r,null," ");return a==="{}"?"{$1}"+i:a==="[]"?"[$1]"+i:this.getInsertTextForPlainText(a+i)},e.prototype.getInsertTextForSnippetValue=function(r,i){var a=function(o){return typeof o=="string"&&o[0]==="^"?o.substr(1):JSON.stringify(o)};return Od(r,"",a)+i},e.prototype.getInsertTextForGuessedValue=function(r,i){switch(typeof r){case"object":return r===null?"${1:null}"+i:this.getInsertTextForValue(r,i);case"string":var a=JSON.stringify(r);return a=a.substr(1,a.length-2),a=this.getInsertTextForPlainText(a),'"${1:'+a+'}"'+i;case"number":case"boolean":return"${1:"+JSON.stringify(r)+"}"+i}return this.getInsertTextForValue(r,i)},e.prototype.getSuggestionKind=function(r){if(Array.isArray(r)){var i=r;r=i.length>0?i[0]:null}if(!r)return Zn.Value;switch(r){case"string":return Zn.Value;case"object":return Zn.Module;case"property":return Zn.Property;default:return Zn.Value}},e.prototype.getLabelTextForMatchingNode=function(r,i){switch(r.type){case"array":return"[]";case"object":return"{}";default:var a=i.getText().substr(r.offset,r.length);return a}},e.prototype.getInsertTextForMatchingNode=function(r,i,a){switch(r.type){case"array":return this.getInsertTextForValue([],a);case"object":return this.getInsertTextForValue({},a);default:var o=i.getText().substr(r.offset,r.length)+a;return this.getInsertTextForPlainText(o)}},e.prototype.getInsertTextForProperty=function(r,i,a,o){var f=this.getInsertTextForValue(r,"");if(!a)return f;var d=f+": ",v,h=0;if(i){if(Array.isArray(i.defaultSnippets)){if(i.defaultSnippets.length===1){var g=i.defaultSnippets[0].body;wa(g)&&(v=this.getInsertTextForSnippetValue(g,""))}h+=i.defaultSnippets.length}if(i.enum&&(!v&&i.enum.length===1&&(v=this.getInsertTextForGuessedValue(i.enum[0],"")),h+=i.enum.length),wa(i.default)&&(v||(v=this.getInsertTextForGuessedValue(i.default,"")),h++),h===0){var b=Array.isArray(i.type)?i.type[0]:i.type;switch(b||(i.properties?b="object":i.items&&(b="array")),b){case"boolean":v="$1";break;case"string":v='"$1"';break;case"object":v="{$1}";break;case"array":v="[$1]";break;case"number":case"integer":v="${1:0}";break;case"null":v="${1:null}";break;default:return f}}}return(!v||h>1)&&(v="$1"),d+v+o},e.prototype.getCurrentWord=function(r,i){for(var a=i-1,o=r.getText();a>=0&&`
257
- \r\v":{[,]}`.indexOf(o.charAt(a))===-1;)a--;return o.substring(a+1,i)},e.prototype.evaluateSeparatorAfter=function(r,i){var a=Ps(r.getText(),!0);a.setPosition(i);var o=a.scan();switch(o){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(r,i,a){for(var o=Ps(i.getText(),!0),f=r.items,d=f.length-1;d>=0;d--){var v=f[d];if(a>v.offset+v.length){o.setPosition(v.offset+v.length);var h=o.scan();return h===5&&a>=o.getTokenOffset()+o.getTokenLength()?d+1:d}else if(a>=v.offset)return d}return 0},e.prototype.isInComment=function(r,i,a){var o=Ps(r.getText(),!1);o.setPosition(i);for(var f=o.scan();f!==17&&o.getTokenOffset()+o.getTokenLength()<a;)f=o.scan();return(f===12||f===13)&&o.getTokenOffset()<=a},e.prototype.fromMarkup=function(r){if(r&&this.doesSupportMarkdown())return{kind:Io.Markdown,value:r}},e.prototype.doesSupportMarkdown=function(){if(!wa(this.supportsMarkdown)){var r=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=r&&r.completionItem&&Array.isArray(r.completionItem.documentationFormat)&&r.completionItem.documentationFormat.indexOf(Io.Markdown)!==-1}return this.supportsMarkdown},e.prototype.doesSupportsCommitCharacters=function(){if(!wa(this.supportsCommitCharacters)){var r=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=r&&r.completionItem&&!!r.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},e}(),Ng=function(){function e(r,i,a){i===void 0&&(i=[]),this.schemaService=r,this.contributions=i,this.promise=a||Promise}return e.prototype.doHover=function(r,i,a){var o=r.offsetAt(i),f=a.getNodeFromOffset(o);if(!f||(f.type==="object"||f.type==="array")&&o>f.offset+1&&o<f.offset+f.length-1)return this.promise.resolve(null);var d=f;if(f.type==="string"){var v=f.parent;if(v&&v.type==="property"&&v.keyNode===f&&(f=v.valueNode,!f))return this.promise.resolve(null)}for(var h=Wt.create(r.positionAt(d.offset),r.positionAt(d.offset+d.length)),g=function(W){var Y={contents:W,range:h};return Y},b=Ad(f),E=this.contributions.length-1;E>=0;E--){var j=this.contributions[E],I=j.getInfoContribution(r.uri,b);if(I)return I.then(function(W){return g(W)})}return this.schemaService.getSchemaForResource(r.uri,a).then(function(W){if(W){var Y=a.getMatchingSchemas(W.schema,f.offset),_=null,U=null,G=null,ce=null;Y.every(function(ge){if(ge.node===f&&!ge.inverted&&ge.schema&&(_=_||ge.schema.title,U=U||ge.schema.markdownDescription||Td(ge.schema.description),ge.schema.enum)){var ke=ge.schema.enum.indexOf(oo(f));ge.schema.markdownEnumDescriptions?G=ge.schema.markdownEnumDescriptions[ke]:ge.schema.enumDescriptions&&(G=Td(ge.schema.enumDescriptions[ke])),G&&(ce=ge.schema.enum[ke],typeof ce!="string"&&(ce=JSON.stringify(ce)))}return!0});var Ce="";return _&&(Ce=Td(_)),U&&(Ce.length>0&&(Ce+=`
257
+ \r\v":{[,]}`.indexOf(o.charAt(a))===-1;)a--;return o.substring(a+1,i)},e.prototype.evaluateSeparatorAfter=function(r,i){var a=Ps(r.getText(),!0);a.setPosition(i);var o=a.scan();switch(o){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(r,i,a){for(var o=Ps(i.getText(),!0),f=r.items,d=f.length-1;d>=0;d--){var v=f[d];if(a>v.offset+v.length){o.setPosition(v.offset+v.length);var h=o.scan();return h===5&&a>=o.getTokenOffset()+o.getTokenLength()?d+1:d}else if(a>=v.offset)return d}return 0},e.prototype.isInComment=function(r,i,a){var o=Ps(r.getText(),!1);o.setPosition(i);for(var f=o.scan();f!==17&&o.getTokenOffset()+o.getTokenLength()<a;)f=o.scan();return(f===12||f===13)&&o.getTokenOffset()<=a},e.prototype.fromMarkup=function(r){if(r&&this.doesSupportMarkdown())return{kind:Io.Markdown,value:r}},e.prototype.doesSupportMarkdown=function(){if(!wa(this.supportsMarkdown)){var r=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=r&&r.completionItem&&Array.isArray(r.completionItem.documentationFormat)&&r.completionItem.documentationFormat.indexOf(Io.Markdown)!==-1}return this.supportsMarkdown},e.prototype.doesSupportsCommitCharacters=function(){if(!wa(this.supportsCommitCharacters)){var r=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=r&&r.completionItem&&!!r.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},e}(),Lg=function(){function e(r,i,a){i===void 0&&(i=[]),this.schemaService=r,this.contributions=i,this.promise=a||Promise}return e.prototype.doHover=function(r,i,a){var o=r.offsetAt(i),f=a.getNodeFromOffset(o);if(!f||(f.type==="object"||f.type==="array")&&o>f.offset+1&&o<f.offset+f.length-1)return this.promise.resolve(null);var d=f;if(f.type==="string"){var v=f.parent;if(v&&v.type==="property"&&v.keyNode===f&&(f=v.valueNode,!f))return this.promise.resolve(null)}for(var h=Wt.create(r.positionAt(d.offset),r.positionAt(d.offset+d.length)),g=function(W){var Y={contents:W,range:h};return Y},b=Ad(f),E=this.contributions.length-1;E>=0;E--){var V=this.contributions[E],I=V.getInfoContribution(r.uri,b);if(I)return I.then(function(W){return g(W)})}return this.schemaService.getSchemaForResource(r.uri,a).then(function(W){if(W){var Y=a.getMatchingSchemas(W.schema,f.offset),_=null,U=null,G=null,ce=null;Y.every(function(ge){if(ge.node===f&&!ge.inverted&&ge.schema&&(_=_||ge.schema.title,U=U||ge.schema.markdownDescription||Td(ge.schema.description),ge.schema.enum)){var ke=ge.schema.enum.indexOf(oo(f));ge.schema.markdownEnumDescriptions?G=ge.schema.markdownEnumDescriptions[ke]:ge.schema.enumDescriptions&&(G=Td(ge.schema.enumDescriptions[ke])),G&&(ce=ge.schema.enum[ke],typeof ce!="string"&&(ce=JSON.stringify(ce)))}return!0});var Ce="";return _&&(Ce=Td(_)),U&&(Ce.length>0&&(Ce+=`
258
258
 
259
259
  `),Ce+=U),G&&(Ce.length>0&&(Ce+=`
260
260
 
261
- `),Ce+="`"+Rg(ce)+"`: "+G),g([Ce])}return null})},e}();function Td(e){if(e){var r=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
261
+ `),Ce+="`"+Mg(ce)+"`: "+G),g([Ce])}return null})},e}();function Td(e){if(e){var r=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
262
262
 
263
- $3`);return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Rg(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var Dg=function(){var e=function(r,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var f in o)o.hasOwnProperty(f)&&(a[f]=o[f])},e(r,i)};return function(r,i){e(r,i);function a(){this.constructor=r}r.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}}(),Ar,Yl;if(typeof process=="object")Yl=!1;else if(typeof navigator=="object"){var Bg=navigator.userAgent;Yl=Bg.indexOf("Windows")>=0}function C0(e){return 55296<=e&&e<=56319}function A0(e){return 56320<=e&&e<=57343}function O0(e){return e>=97&&e<=102}function Vg(e){return e>=97&&e<=122}function jg(e){return e>=65&&e<=90}function E0(e){return Vg(e)||jg(e)}var Wg=/^\w[\w\d+.-]*$/,Hg=/^\//,Ug=/^\/\//;function _g(e,r){if(!e.scheme&&r)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!Wg.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!Hg.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Ug.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function zg(e,r){return!e&&!r?"file":e}function Gg(e,r){switch(e){case"https":case"http":case"file":r?r[0]!==Pi&&(r=Pi+r):r=Pi;break}return r}var qt="",Pi="/",$g=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,kd=function(){function e(r,i,a,o,f,d){d===void 0&&(d=!1),typeof r=="object"?(this.scheme=r.scheme||qt,this.authority=r.authority||qt,this.path=r.path||qt,this.query=r.query||qt,this.fragment=r.fragment||qt):(this.scheme=zg(r,d),this.authority=i||qt,this.path=Gg(this.scheme,a||qt),this.query=o||qt,this.fragment=f||qt,_g(this,d))}return e.isUri=function(r){return r instanceof e?!0:r?typeof r.authority=="string"&&typeof r.fragment=="string"&&typeof r.path=="string"&&typeof r.query=="string"&&typeof r.scheme=="string"&&typeof r.fsPath=="function"&&typeof r.with=="function"&&typeof r.toString=="function":!1},Object.defineProperty(e.prototype,"fsPath",{get:function(){return Ch(this,!1)},enumerable:!0,configurable:!0}),e.prototype.with=function(r){if(!r)return this;var i=r.scheme,a=r.authority,o=r.path,f=r.query,d=r.fragment;return i===void 0?i=this.scheme:i===null&&(i=qt),a===void 0?a=this.authority:a===null&&(a=qt),o===void 0?o=this.path:o===null&&(o=qt),f===void 0?f=this.query:f===null&&(f=qt),d===void 0?d=this.fragment:d===null&&(d=qt),i===this.scheme&&a===this.authority&&o===this.path&&f===this.query&&d===this.fragment?this:new Ms(i,a,o,f,d)},e.parse=function(r,i){i===void 0&&(i=!1);var a=$g.exec(r);return a?new Ms(a[2]||qt,Xf(a[4]||qt),Xf(a[5]||qt),Xf(a[7]||qt),Xf(a[9]||qt),i):new Ms(qt,qt,qt,qt,qt)},e.file=function(r){var i=qt;if(Yl&&(r=r.replace(/\\/g,Pi)),r[0]===Pi&&r[1]===Pi){var a=r.indexOf(Pi,2);a===-1?(i=r.substring(2),r=Pi):(i=r.substring(2,a),r=r.substring(a)||Pi)}return new Ms("file",i,r,qt,qt)},e.from=function(r){return new Ms(r.scheme,r.authority,r.path,r.query,r.fragment)},e.prototype.toString=function(r){return r===void 0&&(r=!1),Pd(this,r)},e.prototype.toJSON=function(){return this},e.revive=function(r){if(r){if(r instanceof e)return r;var i=new Ms(r);return i._formatted=r.external,i._fsPath=r._sep===xh?r.fsPath:null,i}else return r},e}(),xh=Yl?1:void 0,Ms=function(e){Dg(r,e);function r(){var i=e!==null&&e.apply(this,arguments)||this;return i._formatted=null,i._fsPath=null,i}return Object.defineProperty(r.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=Ch(this,!1)),this._fsPath},enumerable:!0,configurable:!0}),r.prototype.toString=function(i){return i===void 0&&(i=!1),i?Pd(this,!0):(this._formatted||(this._formatted=Pd(this,!1)),this._formatted)},r.prototype.toJSON=function(){var i={$mid:1};return this._fsPath&&(i.fsPath=this._fsPath,i._sep=xh),this._formatted&&(i.external=this._formatted),this.path&&(i.path=this.path),this.scheme&&(i.scheme=this.scheme),this.authority&&(i.authority=this.authority),this.query&&(i.query=this.query),this.fragment&&(i.fragment=this.fragment),i},r}(kd),Sh=(Ar={},Ar[58]="%3A",Ar[47]="%2F",Ar[63]="%3F",Ar[35]="%23",Ar[91]="%5B",Ar[93]="%5D",Ar[64]="%40",Ar[33]="%21",Ar[36]="%24",Ar[38]="%26",Ar[39]="%27",Ar[40]="%28",Ar[41]="%29",Ar[42]="%2A",Ar[43]="%2B",Ar[44]="%2C",Ar[59]="%3B",Ar[61]="%3D",Ar[32]="%20",Ar);function wh(e,r){for(var i=void 0,a=-1,o=0;o<e.length;o++){var f=e.charCodeAt(o);if(f>=97&&f<=122||f>=65&&f<=90||f>=48&&f<=57||f===45||f===46||f===95||f===126||r&&f===47)a!==-1&&(i+=encodeURIComponent(e.substring(a,o)),a=-1),i!==void 0&&(i+=e.charAt(o));else{i===void 0&&(i=e.substr(0,o));var d=Sh[f];d!==void 0?(a!==-1&&(i+=encodeURIComponent(e.substring(a,o)),a=-1),i+=d):a===-1&&(a=o)}}return a!==-1&&(i+=encodeURIComponent(e.substring(a))),i!==void 0?i:e}function Kg(e){for(var r=void 0,i=0;i<e.length;i++){var a=e.charCodeAt(i);a===35||a===63?(r===void 0&&(r=e.substr(0,i)),r+=Sh[a]):r!==void 0&&(r+=e[i])}return r!==void 0?r:e}function Ch(e,r){var i;return e.authority&&e.path.length>1&&e.scheme==="file"?i="//"+e.authority+e.path:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?r?i=e.path.substr(1):i=e.path[1].toLowerCase()+e.path.substr(2):i=e.path,Yl&&(i=i.replace(/\//g,"\\")),i}function Pd(e,r){var i=r?Kg:wh,a="",o=e.scheme,f=e.authority,d=e.path,v=e.query,h=e.fragment;if(o&&(a+=o,a+=":"),(f||o==="file")&&(a+=Pi,a+=Pi),f){var g=f.indexOf("@");if(g!==-1){var b=f.substr(0,g);f=f.substr(g+1),g=b.indexOf(":"),g===-1?a+=i(b,!1):(a+=i(b.substr(0,g),!1),a+=":",a+=i(b.substr(g+1),!1)),a+="@"}f=f.toLowerCase(),g=f.indexOf(":"),g===-1?a+=i(f,!1):(a+=i(f.substr(0,g),!1),a+=f.substr(g))}if(d){if(d.length>=3&&d.charCodeAt(0)===47&&d.charCodeAt(2)===58){var E=d.charCodeAt(1);E>=65&&E<=90&&(d="/"+String.fromCharCode(E+32)+":"+d.substr(3))}else if(d.length>=2&&d.charCodeAt(1)===58){var E=d.charCodeAt(0);E>=65&&E<=90&&(d=String.fromCharCode(E+32)+":"+d.substr(2))}a+=i(d,!0)}return v&&(a+="?",a+=i(v,!1)),h&&(a+="#",a+=r?h:wh(h,!1)),a}function Ah(e){try{return decodeURIComponent(e)}catch(r){return e.length>3?e.substr(0,3)+Ah(e.substr(3)):e}}var Oh=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Xf(e){return e.match(Oh)?e.replace(Oh,function(r){return Ah(r)}):e}var Yg=function(){function e(r){try{this.patternRegExp=new RegExp(Fg(r)+"$")}catch(i){this.patternRegExp=null}this.schemas=[]}return e.prototype.addSchema=function(r){this.schemas.push(r)},e.prototype.matchesPattern=function(r){return this.patternRegExp&&this.patternRegExp.test(r)},e.prototype.getSchemas=function(){return this.schemas},e}(),Xg=function(){function e(r,i,a){this.service=r,this.url=i,this.dependencies={},a&&(this.unresolvedSchema=this.service.promise.resolve(new Ns(a)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var r=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(i){return r.service.resolveSchemaContent(i,r.url,r.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},e}(),Ns=function(){function e(r,i){i===void 0&&(i=[]),this.schema=r,this.errors=i}return e}(),Eh=function(){function e(r,i){i===void 0&&(i=[]),this.schema=r,this.errors=i}return e.prototype.getSection=function(r){return Ln(this.getSectionRecursive(r,this.schema))},e.prototype.getSectionRecursive=function(r,i){if(!i||typeof i=="boolean"||r.length===0)return i;var a=r.shift();if(i.properties&&typeof i.properties[a])return this.getSectionRecursive(r,i.properties[a]);if(i.patternProperties)for(var o=0,f=Object.keys(i.patternProperties);o<f.length;o++){var d=f[o],v=new RegExp(d);if(v.test(a))return this.getSectionRecursive(r,i.patternProperties[d])}else{if(typeof i.additionalProperties=="object")return this.getSectionRecursive(r,i.additionalProperties);if(a.match("[0-9]+")){if(Array.isArray(i.items)){var h=parseInt(a,10);if(!isNaN(h)&&i.items[h])return this.getSectionRecursive(r,i.items[h])}else if(i.items)return this.getSectionRecursive(r,i.items)}}return null},e}(),Jg=function(){function e(r,i,a){this.contextService=i,this.requestService=r,this.promiseConstructor=a||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations={},this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(r){return Object.keys(this.registeredSchemasIds).filter(function(i){var a=kd.parse(i).scheme;return a!=="schemaservice"&&(!r||r(a))})},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(r){var i=this,a=!1;r=this.normalizeId(r);for(var o=[r],f=Object.keys(this.schemasById).map(function(g){return i.schemasById[g]});o.length;)for(var d=o.pop(),v=0;v<f.length;v++){var h=f[v];h&&(h.url===d||h.dependencies[d])&&(h.url!==d&&o.push(h.url),h.clearSchema(),f[v]=void 0,a=!0)}return a},e.prototype.normalizeId=function(r){try{return kd.parse(r).toString()}catch(i){return r}},e.prototype.setSchemaContributions=function(r){if(r.schemas){var i=r.schemas;for(var a in i){var o=this.normalizeId(a);this.contributionSchemas[o]=this.addSchemaHandle(o,i[a])}}if(r.schemaAssociations){var f=r.schemaAssociations;for(var d in f){var v=f[d];this.contributionAssociations[d]=v;for(var h=this.getOrAddFilePatternAssociation(d),g=0,b=v;g<b.length;g++){var E=b[g],a=this.normalizeId(E);h.addSchema(a)}}}},e.prototype.addSchemaHandle=function(r,i){var a=new Xg(this,r,i);return this.schemasById[r]=a,a},e.prototype.getOrAddSchemaHandle=function(r,i){return this.schemasById[r]||this.addSchemaHandle(r,i)},e.prototype.getOrAddFilePatternAssociation=function(r){var i=this.filePatternAssociationById[r];return i||(i=new Yg(r),this.filePatternAssociationById[r]=i,this.filePatternAssociations.push(i)),i},e.prototype.registerExternalSchema=function(r,i,a){i===void 0&&(i=null);var o=this.normalizeId(r);if(this.registeredSchemasIds[o]=!0,i)for(var f=0,d=i;f<d.length;f++){var v=d[f];this.getOrAddFilePatternAssociation(v).addSchema(o)}return a?this.addSchemaHandle(o,a):this.getOrAddSchemaHandle(o)},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={};for(var r in this.contributionSchemas)this.schemasById[r]=this.contributionSchemas[r],this.registeredSchemasIds[r]=!0;for(var i in this.contributionAssociations)for(var a=this.getOrAddFilePatternAssociation(i),o=0,f=this.contributionAssociations[i];o<f.length;o++){var d=f[o],r=this.normalizeId(d);a.addSchema(r)}},e.prototype.getResolvedSchema=function(r){var i=this.normalizeId(r),a=this.schemasById[i];return a?a.getResolvedSchema():this.promise.resolve(null)},e.prototype.loadSchema=function(r){if(!this.requestService){var i="Unable to load schema from '"+Jf(r)+"'. No schema request service available";return this.promise.resolve(new Ns({},[i]))}return this.requestService(r).then(function(a){if(!a){var o="Unable to load schema from '"+Jf(r)+"': No content.";return new Ns({},[o])}var f={},d=[];f=cg(a,d);var v=d.length?["Unable to parse content from '"+Jf(r)+"': Parse error at offset "+d[0].offset]:[];return new Ns(f,v)},function(a){var o="Unable to load schema from '"+Jf(r)+"': "+a.toString();return new Ns({},[o])})},e.prototype.resolveSchemaContent=function(r,i,a){var o=this,f=r.errors.slice(0),d=r.schema;if(d.$schema){var v=this.normalizeId(d.$schema);if(v==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Eh({},["Draft-03 schemas are not supported."]));v==="https://json-schema.org/draft/2019-09/schema"&&r.errors.push("Draft 2019-09 schemas are not yet fully supported.")}var h=this.contextService,g=function(I,W){if(!W)return I;var Y=I;return W[0]==="/"&&(W=W.substr(1)),W.split("/").some(function(_){return Y=Y[_],!Y}),Y},b=function(I,W,Y,_){var U=g(W,_);if(U)for(var G in U)U.hasOwnProperty(G)&&!I.hasOwnProperty(G)&&(I[G]=U[G]);else f.push("$ref '"+_+"' in '"+Y+"' can not be resolved.")},E=function(I,W,Y,_,U){h&&!/^\w+:\/\/.*/.test(W)&&(W=h.resolveRelativePath(W,_)),W=o.normalizeId(W);var G=o.getOrAddSchemaHandle(W);return G.getUnresolvedSchema().then(function(ce){if(U[W]=!0,ce.errors.length){var Ce=Y?W+"#"+Y:W;f.push("Problems loading reference '"+Ce+"': "+ce.errors[0]+".")}return b(I,ce.schema,W,Y),j(I,ce.schema,W,G.dependencies)})},j=function(I,W,Y,_){if(!I||typeof I!="object")return Promise.resolve(null);for(var U=[I],G=[],ce=[],Ce=function(){for(var ue=[],Oe=0;Oe<arguments.length;Oe++)ue[Oe]=arguments[Oe];for(var Te=0,Me=ue;Te<Me.length;Te++){var Xe=Me[Te];typeof Xe=="object"&&U.push(Xe)}},ge=function(){for(var ue=[],Oe=0;Oe<arguments.length;Oe++)ue[Oe]=arguments[Oe];for(var Te=0,Me=ue;Te<Me.length;Te++){var Xe=Me[Te];if(typeof Xe=="object")for(var yt in Xe){var at=Xe[yt];typeof at=="object"&&U.push(at)}}},ke=function(){for(var ue=[],Oe=0;Oe<arguments.length;Oe++)ue[Oe]=arguments[Oe];for(var Te=0,Me=ue;Te<Me.length;Te++){var Xe=Me[Te];if(Array.isArray(Xe))for(var yt=0,at=Xe;yt<at.length;yt++){var fr=at[yt];typeof fr=="object"&&U.push(fr)}}},be=function(ue){for(var Oe=[];ue.$ref;){var Te=ue.$ref,Me=Te.split("#",2);if(delete ue.$ref,Me[0].length>0){ce.push(E(ue,Me[0],Me[1],Y,_));return}else Oe.indexOf(Te)===-1&&(b(ue,W,Y,Me[1]),Oe.push(Te))}Ce(ue.items,ue.additionalProperties,ue.not,ue.contains,ue.propertyNames,ue.if,ue.then,ue.else),ge(ue.definitions,ue.properties,ue.patternProperties,ue.dependencies),ke(ue.anyOf,ue.allOf,ue.oneOf,ue.items)};U.length;){var me=U.pop();G.indexOf(me)>=0||(G.push(me),be(me))}return o.promise.all(ce)};return j(d,d,i,a).then(function(I){return new Eh(d,f)})},e.prototype.getSchemaForResource=function(r,i){if(i&&i.root&&i.root.type==="object"){var a=i.root.properties.filter(function(W){return W.keyNode.value==="$schema"&&W.valueNode&&W.valueNode.type==="string"});if(a.length>0){var o=oo(a[0].valueNode);if(o&&Pg(o,".")&&this.contextService&&(o=this.contextService.resolveRelativePath(o,r)),o){var f=this.normalizeId(o);return this.getOrAddSchemaHandle(f).getResolvedSchema()}}}for(var d=Object.create(null),v=[],h=0,g=this.filePatternAssociations;h<g.length;h++){var b=g[h];if(b.matchesPattern(r))for(var E=0,j=b.getSchemas();E<j.length;E++){var I=j[E];d[I]||(v.push(I),d[I]=!0)}}return v.length>0?this.createCombinedSchema(r,v).getResolvedSchema():this.promise.resolve(null)},e.prototype.createCombinedSchema=function(r,i){if(i.length===1)return this.getOrAddSchemaHandle(i[0]);var a="schemaservice://combinedSchema/"+encodeURIComponent(r),o={allOf:i.map(function(f){return{$ref:f}})};return this.addSchemaHandle(a,o)},e}();function Jf(e){try{}catch(r){}return e}var Qg=function(){function e(r,i){this.jsonSchemaService=r,this.promise=i,this.validationEnabled=!0}return e.prototype.configure=function(r){r&&(this.validationEnabled=r.validate,this.commentSeverity=r.allowComments?void 0:Ct.Error)},e.prototype.doValidation=function(r,i,a,o){var f=this;if(!this.validationEnabled)return this.promise.resolve([]);var d=[],v={},h=function(E){var j=E.range.start.line+" "+E.range.start.character+" "+E.message;v[j]||(v[j]=!0,d.push(E))},g=function(E){var j=a?Ph(a.trailingCommas):Ct.Error,I=a?Ph(a.comments):f.commentSeverity;if(E){if(E.errors.length&&i.root){var W=i.root,Y=W.type==="object"?W.properties[0]:null;if(Y&&Y.keyNode.value==="$schema"){var _=Y.valueNode||Y,U=Wt.create(r.positionAt(_.offset),r.positionAt(_.offset+_.length));h(Ca.create(U,E.errors[0],Ct.Warning,Bt.SchemaResolveError))}else{var U=Wt.create(r.positionAt(W.offset),r.positionAt(W.offset+1));h(Ca.create(U,E.errors[0],Ct.Warning,Bt.SchemaResolveError))}}else{var G=i.validate(r,E.schema);G&&G.forEach(h)}Th(E.schema)&&(I=void 0),kh(E.schema)&&(j=void 0)}for(var ce=0,Ce=i.syntaxErrors;ce<Ce.length;ce++){var ge=Ce[ce];if(ge.code===Bt.TrailingComma){if(typeof j!="number")continue;ge.severity=j}h(ge)}if(typeof I=="number"){var ke="Comments are not permitted in JSON.";i.comments.forEach(function(be){h(Ca.create(be,ke,I,Bt.CommentNotPermitted))})}return d};if(o){var b=o.id||"schemaservice://untitled/"+Zg++;return this.jsonSchemaService.resolveSchemaContent(new Ns(o),b,{}).then(function(E){return g(E)})}return this.jsonSchemaService.getSchemaForResource(r.uri,i).then(function(E){return g(E)})},e}(),Zg=0;function Th(e){if(e&&typeof e=="object"){if(Gi(e.allowComments))return e.allowComments;if(e.allOf)for(var r=0,i=e.allOf;r<i.length;r++){var a=i[r],o=Th(a);if(Gi(o))return o}}}function kh(e){if(e&&typeof e=="object"){if(Gi(e.allowTrailingCommas))return e.allowTrailingCommas;if(Gi(e.allowsTrailingCommas))return e.allowsTrailingCommas;if(e.allOf)for(var r=0,i=e.allOf;r<i.length;r++){var a=i[r],o=kh(a);if(Gi(o))return o}}}function Ph(e){switch(e){case"error":return Ct.Error;case"warning":return Ct.Warning;case"ignore":return}}var Fh=48,qg=57,em=65,Qf=97,tm=102;function Or(e){return e<Fh?0:e<=qg?e-Fh:(e<Qf&&(e+=Qf-em),e>=Qf&&e<=tm?e-Qf+10:0)}function rm(e){if(e[0]!=="#")return null;switch(e.length){case 4:return{red:Or(e.charCodeAt(1))*17/255,green:Or(e.charCodeAt(2))*17/255,blue:Or(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Or(e.charCodeAt(1))*17/255,green:Or(e.charCodeAt(2))*17/255,blue:Or(e.charCodeAt(3))*17/255,alpha:Or(e.charCodeAt(4))*17/255};case 7:return{red:(Or(e.charCodeAt(1))*16+Or(e.charCodeAt(2)))/255,green:(Or(e.charCodeAt(3))*16+Or(e.charCodeAt(4)))/255,blue:(Or(e.charCodeAt(5))*16+Or(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Or(e.charCodeAt(1))*16+Or(e.charCodeAt(2)))/255,green:(Or(e.charCodeAt(3))*16+Or(e.charCodeAt(4)))/255,blue:(Or(e.charCodeAt(5))*16+Or(e.charCodeAt(6)))/255,alpha:(Or(e.charCodeAt(7))*16+Or(e.charCodeAt(8)))/255}}return null}function T0(e,r,i,a){return a===void 0&&(a=1),{red:e/255,green:r/255,blue:i/255,alpha:a}}var nm=function(){function e(r){this.schemaService=r}return e.prototype.findDocumentSymbols=function(r,i,a){var o=this;a===void 0&&(a={resultLimit:Number.MAX_VALUE});var f=i.root;if(!f)return null;var d=a.resultLimit,v=r.uri;if((v==="vscode://defaultsettings/keybindings.json"||Ed(v.toLowerCase(),"/user/keybindings.json"))&&f.type==="array"){for(var h=[],g=0,b=f.items;g<b.length;g++){var E=b[g];if(E.type==="object")for(var j=0,I=E.properties;j<I.length;j++){var W=I[j];if(W.keyNode.value==="key"&&W.valueNode){var Y=Fs.create(r.uri,so(r,E));if(h.push({name:oo(W.valueNode),kind:$i.Function,location:Y}),d--,d<=0)return a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(v),h}}}return h}var _=function(G,ce,Ce){return d>=0&&(ce.type==="array"?ce.items.forEach(function(ge){return _(G,ge,Ce)}):ce.type==="object"&&ce.properties.forEach(function(ge){if(d>=0){var ke=ge.valueNode;if(ke){d--;var be=Fs.create(r.uri,so(r,ge)),me=Ce?Ce+"."+ge.keyNode.value:ge.keyNode.value;G.push({name:o.getKeyLabel(ge),kind:o.getSymbolKind(ke.type),location:be,containerName:Ce}),_(G,ke,me)}}})),G},U=_([],f,void 0);return d<0&&(U.pop(),a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(v)),U},e.prototype.findDocumentSymbols2=function(r,i,a){var o=this;a===void 0&&(a={resultLimit:Number.MAX_VALUE});var f=i.root;if(!f)return null;var d=a.resultLimit,v=r.uri;if((v==="vscode://defaultsettings/keybindings.json"||Ed(v.toLowerCase(),"/user/keybindings.json"))&&f.type==="array"){for(var h=[],g=0,b=f.items;g<b.length;g++){var E=b[g];if(E.type==="object")for(var j=0,I=E.properties;j<I.length;j++){var W=I[j];if(W.keyNode.value==="key"&&W.valueNode){var Y=so(r,E),_=so(r,W.keyNode);if(h.push({name:oo(W.valueNode),kind:$i.Function,range:Y,selectionRange:_}),d--,d<=0)return a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(v),h}}}return h}var U=function(ce,Ce){return d>=0&&(Ce.type==="array"?Ce.items.forEach(function(ge,ke){if(ge&&d>=0){d--;var be=so(r,ge),me=be,ue=String(ke),Oe=U([],ge);ce.push({name:ue,kind:o.getSymbolKind(ge.type),range:be,selectionRange:me,children:Oe})}}):Ce.type==="object"&&Ce.properties.forEach(function(ge){var ke=ge.valueNode;if(ke&&d>=0){d--;var be=so(r,ge),me=so(r,ge.keyNode),ue=U([],ke);ce.push({name:o.getKeyLabel(ge),kind:o.getSymbolKind(ke.type),range:be,selectionRange:me,children:ue})}})),ce},G=U([],f);return d<0&&(G.pop(),a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(v)),G},e.prototype.getSymbolKind=function(r){switch(r){case"object":return $i.Module;case"string":return $i.String;case"number":return $i.Number;case"array":return $i.Array;case"boolean":return $i.Boolean;default:return $i.Variable}},e.prototype.getKeyLabel=function(r){var i=r.keyNode.value;return i&&(i=i.replace(/[\n]/g,"\u21B5")),i&&i.trim()?i:'"'+i+'"'},e.prototype.findDocumentColors=function(r,i,a){return this.schemaService.getSchemaForResource(r.uri,i).then(function(o){var f=[];if(o)for(var d=a&&typeof a.resultLimit=="number"?a.resultLimit:Number.MAX_VALUE,v=i.getMatchingSchemas(o.schema),h={},g=0,b=v;g<b.length;g++){var E=b[g];if(!E.inverted&&E.schema&&(E.schema.format==="color"||E.schema.format==="color-hex")&&E.node&&E.node.type==="string"){var j=String(E.node.offset);if(!h[j]){var I=rm(oo(E.node));if(I){var W=so(r,E.node);f.push({color:I,range:W})}if(h[j]=!0,d--,d<=0)return a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(r.uri),f}}}return f})},e.prototype.getColorPresentations=function(r,i,a,o){var f=[],d=Math.round(a.red*255),v=Math.round(a.green*255),h=Math.round(a.blue*255);function g(E){var j=E.toString(16);return j.length!==2?"0"+j:j}var b;return a.alpha===1?b="#"+g(d)+g(v)+g(h):b="#"+g(d)+g(v)+g(h)+g(Math.round(a.alpha*255)),f.push({label:b,textEdit:pi.replace(o,JSON.stringify(b))}),f},e}();function so(e,r){return Wt.create(e.positionAt(r.offset),e.positionAt(r.offset+r.length))}var im={schemaAssociations:{},schemas:{}};function am(e,r){var i=[],a=[],o=[],f=-1,d=Ps(e.getText(),!1),v=d.scan();function h(Oe){i.push(Oe),a.push(o.length)}for(;v!==17;){switch(v){case 1:case 3:{var g=e.positionAt(d.getTokenOffset()).line,b={startLine:g,endLine:g,kind:v===1?"object":"array"};o.push(b);break}case 2:case 4:{var E=v===2?"object":"array";if(o.length>0&&o[o.length-1].kind===E){var b=o.pop(),j=e.positionAt(d.getTokenOffset()).line;b&&j>b.startLine+1&&f!==b.startLine&&(b.endLine=j-1,h(b),f=b.startLine)}break}case 13:{var g=e.positionAt(d.getTokenOffset()).line,I=e.positionAt(d.getTokenOffset()+d.getTokenLength()).line;d.getTokenError()===1&&g+1<e.lineCount?d.setPosition(e.offsetAt(di.create(g+1,0))):g<I&&(h({startLine:g,endLine:I,kind:_l.Comment}),f=g);break}case 12:{var W=e.getText().substr(d.getTokenOffset(),d.getTokenLength()),Y=W.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(Y){var j=e.positionAt(d.getTokenOffset()).line;if(Y[1]){var b={startLine:j,endLine:j,kind:_l.Region};o.push(b)}else{for(var _=o.length-1;_>=0&&o[_].kind!==_l.Region;)_--;if(_>=0){var b=o[_];o.length=_,j>b.startLine&&f!==b.startLine&&(b.endLine=j,h(b),f=b.startLine)}}}break}}v=d.scan()}var U=r&&r.rangeLimit;if(typeof U!="number"||i.length<=U)return i;r&&r.onRangeLimitExceeded&&r.onRangeLimitExceeded(e.uri);for(var G=[],ce=0,Ce=a;ce<Ce.length;ce++){var ge=Ce[ce];ge<30&&(G[ge]=(G[ge]||0)+1)}for(var ke=0,be=0,_=0;_<G.length;_++){var me=G[_];if(me){if(me+ke>U){be=_;break}ke+=me}}for(var ue=[],_=0;_<i.length;_++){var ge=a[_];typeof ge=="number"&&(ge<be||ge===be&&ke++<U)&&ue.push(i[_])}return ue}function om(e,r,i){function a(v){for(var h=e.offsetAt(v),g=i.getNodeFromOffset(h,!0),b=[];g;){switch(g.type){case"string":case"object":case"array":var E=g.offset+1,j=g.offset+g.length-1;E<j&&h>=E&&h<=j&&b.push(o(E,j)),b.push(o(g.offset,g.offset+g.length));break;case"number":case"boolean":case"null":case"property":b.push(o(g.offset,g.offset+g.length));break}if(g.type==="property"||g.parent&&g.parent.type==="array"){var I=d(g.offset+g.length,5);I!==-1&&b.push(o(g.offset,I))}g=g.parent}for(var W=void 0,Y=b.length-1;Y>=0;Y--)W=Kf.create(b[Y],W);return W||(W=Kf.create(Wt.create(v,v))),W}function o(v,h){return Wt.create(e.positionAt(v),e.positionAt(h))}var f=Ps(e.getText(),!0);function d(v,h){f.setPosition(v);var g=f.scan();return g===h?f.getTokenOffset()+f.getTokenLength():-1}return r.map(a)}function sm(e){var r=e.promiseConstructor||Promise,i=new Jg(e.schemaRequestService,e.workspaceContext,r);i.setSchemaContributions(im);var a=new Mg(i,e.contributions,r,e.clientCapabilities),o=new Ng(i,e.contributions,r),f=new nm(i),d=new Qg(i,r);return{configure:function(v){i.clearExternalSchemas(),v.schemas&&v.schemas.forEach(function(h){i.registerExternalSchema(h.uri,h.fileMatch,h.schema)}),d.configure(v)},resetSchema:function(v){return i.onResourceChange(v)},doValidation:d.doValidation.bind(d),parseJSONDocument:function(v){return kg(v,{collectComments:!0})},newJSONDocument:function(v,h){return Tg(v,h)},doComplete:a.doComplete.bind(a),findDocumentSymbols:f.findDocumentSymbols.bind(f),findDocumentSymbols2:f.findDocumentSymbols2.bind(f),findColorSymbols:function(v,h){return f.findDocumentColors(v,h).then(function(g){return g.map(function(b){return b.range})})},findDocumentColors:f.findDocumentColors.bind(f),getColorPresentations:f.getColorPresentations.bind(f),doHover:o.doHover.bind(o),getFoldingRanges:am,getSelectionRanges:om,format:function(v,h,g){var b=void 0;if(h){var E=v.offsetAt(h.start),j=v.offsetAt(h.end)-E;b={offset:E,length:j}}var I={tabSize:g?g.tabSize:4,insertSpaces:g?g.insertSpaces:!0,eol:`
264
- `};return vg(v.getText(),b,I).map(function(W){return pi.replace(Wt.create(v.positionAt(W.offset),v.positionAt(W.offset+W.length)),W.content)})}}}var Ih=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});let lo=null;dt.Qg&&(lo=c(46944),c(13156),c(82518),c(33201),c(77436),c(29641),c(71628),c(6766),c(49812),c(17664),c(83539));const Rs=sm({});lo&&(lo.registerHelper("lint","json",function(e,r){return Ih(this,null,function*(){const{schema:i,setError:a}=r;Rs.configure({validate:!0,schemas:[{uri:"stub://"+r.id,fileMatch:["*"],schema:i}]});const o=Yf.create(r.id+".json","json",0,e),f=Rs.parseJSONDocument(o),d=yield Rs.doValidation(o,f);return d.length?a&&a(d[0].message):a&&a(void 0),d.map(v=>({from:lo.Pos(v.range.start.line,v.range.start.character),to:lo.Pos(v.range.end.line,v.range.end.character),message:v.message}))})}),lo.registerHelper("hint","json",(e,r)=>Ih(void 0,null,function*(){const i=r.schema;if(!i)return;Rs.configure({validate:!0,schemas:[{uri:"stub://"+r.id,fileMatch:["*"],schema:i}]});const a=e.getDoc().getCursor(),o=e.getTokenAt(a),f=Yf.create(r.id+".json","json",0,e.getValue()),d=Rs.parseJSONDocument(f),v=yield Rs.doComplete(f,{line:a.line,character:a.ch},d),h=b=>{let E="";for(;b--;)E+=" ";return E};let g=v?v.items.map(b=>({text:b.insertText,displayText:b.label,filter:b.filterText||b.label,from:{line:b.textEdit.range.start.line,ch:b.textEdit.range.start.character},to:{line:b.textEdit.range.end.line,ch:b.textEdit.range.end.character},hint:(E,j,I)=>{const W="_$__REDOC_CURSOR_HERE";let Y=I.text.replace(/(\$1|\${1:[^}]+})/,W)||"";if(Y=Y.replace(/(\$\d+|\${[^}]+})/g,"")||"",E.setSelection(I.from,I.to),Y.indexOf(`
263
+ $3`);return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Mg(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var Ng=function(){var e=function(r,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var f in o)o.hasOwnProperty(f)&&(a[f]=o[f])},e(r,i)};return function(r,i){e(r,i);function a(){this.constructor=r}r.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}}(),Ar,Yl;if(typeof process=="object")Yl=!1;else if(typeof navigator=="object"){var Rg=navigator.userAgent;Yl=Rg.indexOf("Windows")>=0}function b0(e){return 55296<=e&&e<=56319}function x0(e){return 56320<=e&&e<=57343}function S0(e){return e>=97&&e<=102}function Dg(e){return e>=97&&e<=122}function Bg(e){return e>=65&&e<=90}function w0(e){return Dg(e)||Bg(e)}var Vg=/^\w[\w\d+.-]*$/,jg=/^\//,Wg=/^\/\//;function Hg(e,r){if(!e.scheme&&r)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!Vg.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!jg.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Wg.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Ug(e,r){return!e&&!r?"file":e}function _g(e,r){switch(e){case"https":case"http":case"file":r?r[0]!==Pi&&(r=Pi+r):r=Pi;break}return r}var qt="",Pi="/",zg=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,kd=function(){function e(r,i,a,o,f,d){d===void 0&&(d=!1),typeof r=="object"?(this.scheme=r.scheme||qt,this.authority=r.authority||qt,this.path=r.path||qt,this.query=r.query||qt,this.fragment=r.fragment||qt):(this.scheme=Ug(r,d),this.authority=i||qt,this.path=_g(this.scheme,a||qt),this.query=o||qt,this.fragment=f||qt,Hg(this,d))}return e.isUri=function(r){return r instanceof e?!0:r?typeof r.authority=="string"&&typeof r.fragment=="string"&&typeof r.path=="string"&&typeof r.query=="string"&&typeof r.scheme=="string"&&typeof r.fsPath=="function"&&typeof r.with=="function"&&typeof r.toString=="function":!1},Object.defineProperty(e.prototype,"fsPath",{get:function(){return wh(this,!1)},enumerable:!0,configurable:!0}),e.prototype.with=function(r){if(!r)return this;var i=r.scheme,a=r.authority,o=r.path,f=r.query,d=r.fragment;return i===void 0?i=this.scheme:i===null&&(i=qt),a===void 0?a=this.authority:a===null&&(a=qt),o===void 0?o=this.path:o===null&&(o=qt),f===void 0?f=this.query:f===null&&(f=qt),d===void 0?d=this.fragment:d===null&&(d=qt),i===this.scheme&&a===this.authority&&o===this.path&&f===this.query&&d===this.fragment?this:new Ms(i,a,o,f,d)},e.parse=function(r,i){i===void 0&&(i=!1);var a=zg.exec(r);return a?new Ms(a[2]||qt,Xf(a[4]||qt),Xf(a[5]||qt),Xf(a[7]||qt),Xf(a[9]||qt),i):new Ms(qt,qt,qt,qt,qt)},e.file=function(r){var i=qt;if(Yl&&(r=r.replace(/\\/g,Pi)),r[0]===Pi&&r[1]===Pi){var a=r.indexOf(Pi,2);a===-1?(i=r.substring(2),r=Pi):(i=r.substring(2,a),r=r.substring(a)||Pi)}return new Ms("file",i,r,qt,qt)},e.from=function(r){return new Ms(r.scheme,r.authority,r.path,r.query,r.fragment)},e.prototype.toString=function(r){return r===void 0&&(r=!1),Pd(this,r)},e.prototype.toJSON=function(){return this},e.revive=function(r){if(r){if(r instanceof e)return r;var i=new Ms(r);return i._formatted=r.external,i._fsPath=r._sep===bh?r.fsPath:null,i}else return r},e}(),bh=Yl?1:void 0,Ms=function(e){Ng(r,e);function r(){var i=e!==null&&e.apply(this,arguments)||this;return i._formatted=null,i._fsPath=null,i}return Object.defineProperty(r.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=wh(this,!1)),this._fsPath},enumerable:!0,configurable:!0}),r.prototype.toString=function(i){return i===void 0&&(i=!1),i?Pd(this,!0):(this._formatted||(this._formatted=Pd(this,!1)),this._formatted)},r.prototype.toJSON=function(){var i={$mid:1};return this._fsPath&&(i.fsPath=this._fsPath,i._sep=bh),this._formatted&&(i.external=this._formatted),this.path&&(i.path=this.path),this.scheme&&(i.scheme=this.scheme),this.authority&&(i.authority=this.authority),this.query&&(i.query=this.query),this.fragment&&(i.fragment=this.fragment),i},r}(kd),xh=(Ar={},Ar[58]="%3A",Ar[47]="%2F",Ar[63]="%3F",Ar[35]="%23",Ar[91]="%5B",Ar[93]="%5D",Ar[64]="%40",Ar[33]="%21",Ar[36]="%24",Ar[38]="%26",Ar[39]="%27",Ar[40]="%28",Ar[41]="%29",Ar[42]="%2A",Ar[43]="%2B",Ar[44]="%2C",Ar[59]="%3B",Ar[61]="%3D",Ar[32]="%20",Ar);function Sh(e,r){for(var i=void 0,a=-1,o=0;o<e.length;o++){var f=e.charCodeAt(o);if(f>=97&&f<=122||f>=65&&f<=90||f>=48&&f<=57||f===45||f===46||f===95||f===126||r&&f===47)a!==-1&&(i+=encodeURIComponent(e.substring(a,o)),a=-1),i!==void 0&&(i+=e.charAt(o));else{i===void 0&&(i=e.substr(0,o));var d=xh[f];d!==void 0?(a!==-1&&(i+=encodeURIComponent(e.substring(a,o)),a=-1),i+=d):a===-1&&(a=o)}}return a!==-1&&(i+=encodeURIComponent(e.substring(a))),i!==void 0?i:e}function Gg(e){for(var r=void 0,i=0;i<e.length;i++){var a=e.charCodeAt(i);a===35||a===63?(r===void 0&&(r=e.substr(0,i)),r+=xh[a]):r!==void 0&&(r+=e[i])}return r!==void 0?r:e}function wh(e,r){var i;return e.authority&&e.path.length>1&&e.scheme==="file"?i="//"+e.authority+e.path:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?r?i=e.path.substr(1):i=e.path[1].toLowerCase()+e.path.substr(2):i=e.path,Yl&&(i=i.replace(/\//g,"\\")),i}function Pd(e,r){var i=r?Gg:Sh,a="",o=e.scheme,f=e.authority,d=e.path,v=e.query,h=e.fragment;if(o&&(a+=o,a+=":"),(f||o==="file")&&(a+=Pi,a+=Pi),f){var g=f.indexOf("@");if(g!==-1){var b=f.substr(0,g);f=f.substr(g+1),g=b.indexOf(":"),g===-1?a+=i(b,!1):(a+=i(b.substr(0,g),!1),a+=":",a+=i(b.substr(g+1),!1)),a+="@"}f=f.toLowerCase(),g=f.indexOf(":"),g===-1?a+=i(f,!1):(a+=i(f.substr(0,g),!1),a+=f.substr(g))}if(d){if(d.length>=3&&d.charCodeAt(0)===47&&d.charCodeAt(2)===58){var E=d.charCodeAt(1);E>=65&&E<=90&&(d="/"+String.fromCharCode(E+32)+":"+d.substr(3))}else if(d.length>=2&&d.charCodeAt(1)===58){var E=d.charCodeAt(0);E>=65&&E<=90&&(d=String.fromCharCode(E+32)+":"+d.substr(2))}a+=i(d,!0)}return v&&(a+="?",a+=i(v,!1)),h&&(a+="#",a+=r?h:Sh(h,!1)),a}function Ch(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+Ch(e.substr(3)):e}}var Ah=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Xf(e){return e.match(Ah)?e.replace(Ah,function(r){return Ch(r)}):e}var $g=function(){function e(r){try{this.patternRegExp=new RegExp(kg(r)+"$")}catch{this.patternRegExp=null}this.schemas=[]}return e.prototype.addSchema=function(r){this.schemas.push(r)},e.prototype.matchesPattern=function(r){return this.patternRegExp&&this.patternRegExp.test(r)},e.prototype.getSchemas=function(){return this.schemas},e}(),Kg=function(){function e(r,i,a){this.service=r,this.url=i,this.dependencies={},a&&(this.unresolvedSchema=this.service.promise.resolve(new Ns(a)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var r=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(i){return r.service.resolveSchemaContent(i,r.url,r.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},e}(),Ns=function(){function e(r,i){i===void 0&&(i=[]),this.schema=r,this.errors=i}return e}(),Oh=function(){function e(r,i){i===void 0&&(i=[]),this.schema=r,this.errors=i}return e.prototype.getSection=function(r){return Ln(this.getSectionRecursive(r,this.schema))},e.prototype.getSectionRecursive=function(r,i){if(!i||typeof i=="boolean"||r.length===0)return i;var a=r.shift();if(i.properties&&typeof i.properties[a])return this.getSectionRecursive(r,i.properties[a]);if(i.patternProperties)for(var o=0,f=Object.keys(i.patternProperties);o<f.length;o++){var d=f[o],v=new RegExp(d);if(v.test(a))return this.getSectionRecursive(r,i.patternProperties[d])}else{if(typeof i.additionalProperties=="object")return this.getSectionRecursive(r,i.additionalProperties);if(a.match("[0-9]+")){if(Array.isArray(i.items)){var h=parseInt(a,10);if(!isNaN(h)&&i.items[h])return this.getSectionRecursive(r,i.items[h])}else if(i.items)return this.getSectionRecursive(r,i.items)}}return null},e}(),Yg=function(){function e(r,i,a){this.contextService=i,this.requestService=r,this.promiseConstructor=a||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations={},this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(r){return Object.keys(this.registeredSchemasIds).filter(function(i){var a=kd.parse(i).scheme;return a!=="schemaservice"&&(!r||r(a))})},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(r){var i=this,a=!1;r=this.normalizeId(r);for(var o=[r],f=Object.keys(this.schemasById).map(function(g){return i.schemasById[g]});o.length;)for(var d=o.pop(),v=0;v<f.length;v++){var h=f[v];h&&(h.url===d||h.dependencies[d])&&(h.url!==d&&o.push(h.url),h.clearSchema(),f[v]=void 0,a=!0)}return a},e.prototype.normalizeId=function(r){try{return kd.parse(r).toString()}catch{return r}},e.prototype.setSchemaContributions=function(r){if(r.schemas){var i=r.schemas;for(var a in i){var o=this.normalizeId(a);this.contributionSchemas[o]=this.addSchemaHandle(o,i[a])}}if(r.schemaAssociations){var f=r.schemaAssociations;for(var d in f){var v=f[d];this.contributionAssociations[d]=v;for(var h=this.getOrAddFilePatternAssociation(d),g=0,b=v;g<b.length;g++){var E=b[g],a=this.normalizeId(E);h.addSchema(a)}}}},e.prototype.addSchemaHandle=function(r,i){var a=new Kg(this,r,i);return this.schemasById[r]=a,a},e.prototype.getOrAddSchemaHandle=function(r,i){return this.schemasById[r]||this.addSchemaHandle(r,i)},e.prototype.getOrAddFilePatternAssociation=function(r){var i=this.filePatternAssociationById[r];return i||(i=new $g(r),this.filePatternAssociationById[r]=i,this.filePatternAssociations.push(i)),i},e.prototype.registerExternalSchema=function(r,i,a){i===void 0&&(i=null);var o=this.normalizeId(r);if(this.registeredSchemasIds[o]=!0,i)for(var f=0,d=i;f<d.length;f++){var v=d[f];this.getOrAddFilePatternAssociation(v).addSchema(o)}return a?this.addSchemaHandle(o,a):this.getOrAddSchemaHandle(o)},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={};for(var r in this.contributionSchemas)this.schemasById[r]=this.contributionSchemas[r],this.registeredSchemasIds[r]=!0;for(var i in this.contributionAssociations)for(var a=this.getOrAddFilePatternAssociation(i),o=0,f=this.contributionAssociations[i];o<f.length;o++){var d=f[o],r=this.normalizeId(d);a.addSchema(r)}},e.prototype.getResolvedSchema=function(r){var i=this.normalizeId(r),a=this.schemasById[i];return a?a.getResolvedSchema():this.promise.resolve(null)},e.prototype.loadSchema=function(r){if(!this.requestService){var i="Unable to load schema from '"+Jf(r)+"'. No schema request service available";return this.promise.resolve(new Ns({},[i]))}return this.requestService(r).then(function(a){if(!a){var o="Unable to load schema from '"+Jf(r)+"': No content.";return new Ns({},[o])}var f={},d=[];f=ug(a,d);var v=d.length?["Unable to parse content from '"+Jf(r)+"': Parse error at offset "+d[0].offset]:[];return new Ns(f,v)},function(a){var o="Unable to load schema from '"+Jf(r)+"': "+a.toString();return new Ns({},[o])})},e.prototype.resolveSchemaContent=function(r,i,a){var o=this,f=r.errors.slice(0),d=r.schema;if(d.$schema){var v=this.normalizeId(d.$schema);if(v==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Oh({},["Draft-03 schemas are not supported."]));v==="https://json-schema.org/draft/2019-09/schema"&&r.errors.push("Draft 2019-09 schemas are not yet fully supported.")}var h=this.contextService,g=function(I,W){if(!W)return I;var Y=I;return W[0]==="/"&&(W=W.substr(1)),W.split("/").some(function(_){return Y=Y[_],!Y}),Y},b=function(I,W,Y,_){var U=g(W,_);if(U)for(var G in U)U.hasOwnProperty(G)&&!I.hasOwnProperty(G)&&(I[G]=U[G]);else f.push("$ref '"+_+"' in '"+Y+"' can not be resolved.")},E=function(I,W,Y,_,U){h&&!/^\w+:\/\/.*/.test(W)&&(W=h.resolveRelativePath(W,_)),W=o.normalizeId(W);var G=o.getOrAddSchemaHandle(W);return G.getUnresolvedSchema().then(function(ce){if(U[W]=!0,ce.errors.length){var Ce=Y?W+"#"+Y:W;f.push("Problems loading reference '"+Ce+"': "+ce.errors[0]+".")}return b(I,ce.schema,W,Y),V(I,ce.schema,W,G.dependencies)})},V=function(I,W,Y,_){if(!I||typeof I!="object")return Promise.resolve(null);for(var U=[I],G=[],ce=[],Ce=function(){for(var ue=[],Oe=0;Oe<arguments.length;Oe++)ue[Oe]=arguments[Oe];for(var Te=0,Me=ue;Te<Me.length;Te++){var Xe=Me[Te];typeof Xe=="object"&&U.push(Xe)}},ge=function(){for(var ue=[],Oe=0;Oe<arguments.length;Oe++)ue[Oe]=arguments[Oe];for(var Te=0,Me=ue;Te<Me.length;Te++){var Xe=Me[Te];if(typeof Xe=="object")for(var yt in Xe){var at=Xe[yt];typeof at=="object"&&U.push(at)}}},ke=function(){for(var ue=[],Oe=0;Oe<arguments.length;Oe++)ue[Oe]=arguments[Oe];for(var Te=0,Me=ue;Te<Me.length;Te++){var Xe=Me[Te];if(Array.isArray(Xe))for(var yt=0,at=Xe;yt<at.length;yt++){var fr=at[yt];typeof fr=="object"&&U.push(fr)}}},be=function(ue){for(var Oe=[];ue.$ref;){var Te=ue.$ref,Me=Te.split("#",2);if(delete ue.$ref,Me[0].length>0){ce.push(E(ue,Me[0],Me[1],Y,_));return}else Oe.indexOf(Te)===-1&&(b(ue,W,Y,Me[1]),Oe.push(Te))}Ce(ue.items,ue.additionalProperties,ue.not,ue.contains,ue.propertyNames,ue.if,ue.then,ue.else),ge(ue.definitions,ue.properties,ue.patternProperties,ue.dependencies),ke(ue.anyOf,ue.allOf,ue.oneOf,ue.items)};U.length;){var me=U.pop();G.indexOf(me)>=0||(G.push(me),be(me))}return o.promise.all(ce)};return V(d,d,i,a).then(function(I){return new Oh(d,f)})},e.prototype.getSchemaForResource=function(r,i){if(i&&i.root&&i.root.type==="object"){var a=i.root.properties.filter(function(W){return W.keyNode.value==="$schema"&&W.valueNode&&W.valueNode.type==="string"});if(a.length>0){var o=oo(a[0].valueNode);if(o&&Tg(o,".")&&this.contextService&&(o=this.contextService.resolveRelativePath(o,r)),o){var f=this.normalizeId(o);return this.getOrAddSchemaHandle(f).getResolvedSchema()}}}for(var d=Object.create(null),v=[],h=0,g=this.filePatternAssociations;h<g.length;h++){var b=g[h];if(b.matchesPattern(r))for(var E=0,V=b.getSchemas();E<V.length;E++){var I=V[E];d[I]||(v.push(I),d[I]=!0)}}return v.length>0?this.createCombinedSchema(r,v).getResolvedSchema():this.promise.resolve(null)},e.prototype.createCombinedSchema=function(r,i){if(i.length===1)return this.getOrAddSchemaHandle(i[0]);var a="schemaservice://combinedSchema/"+encodeURIComponent(r),o={allOf:i.map(function(f){return{$ref:f}})};return this.addSchemaHandle(a,o)},e}();function Jf(e){try{}catch{}return e}var Xg=function(){function e(r,i){this.jsonSchemaService=r,this.promise=i,this.validationEnabled=!0}return e.prototype.configure=function(r){r&&(this.validationEnabled=r.validate,this.commentSeverity=r.allowComments?void 0:Ct.Error)},e.prototype.doValidation=function(r,i,a,o){var f=this;if(!this.validationEnabled)return this.promise.resolve([]);var d=[],v={},h=function(E){var V=E.range.start.line+" "+E.range.start.character+" "+E.message;v[V]||(v[V]=!0,d.push(E))},g=function(E){var V=a?kh(a.trailingCommas):Ct.Error,I=a?kh(a.comments):f.commentSeverity;if(E){if(E.errors.length&&i.root){var W=i.root,Y=W.type==="object"?W.properties[0]:null;if(Y&&Y.keyNode.value==="$schema"){var _=Y.valueNode||Y,U=Wt.create(r.positionAt(_.offset),r.positionAt(_.offset+_.length));h(Ca.create(U,E.errors[0],Ct.Warning,Bt.SchemaResolveError))}else{var U=Wt.create(r.positionAt(W.offset),r.positionAt(W.offset+1));h(Ca.create(U,E.errors[0],Ct.Warning,Bt.SchemaResolveError))}}else{var G=i.validate(r,E.schema);G&&G.forEach(h)}Eh(E.schema)&&(I=void 0),Th(E.schema)&&(V=void 0)}for(var ce=0,Ce=i.syntaxErrors;ce<Ce.length;ce++){var ge=Ce[ce];if(ge.code===Bt.TrailingComma){if(typeof V!="number")continue;ge.severity=V}h(ge)}if(typeof I=="number"){var ke="Comments are not permitted in JSON.";i.comments.forEach(function(be){h(Ca.create(be,ke,I,Bt.CommentNotPermitted))})}return d};if(o){var b=o.id||"schemaservice://untitled/"+Jg++;return this.jsonSchemaService.resolveSchemaContent(new Ns(o),b,{}).then(function(E){return g(E)})}return this.jsonSchemaService.getSchemaForResource(r.uri,i).then(function(E){return g(E)})},e}(),Jg=0;function Eh(e){if(e&&typeof e=="object"){if(Gi(e.allowComments))return e.allowComments;if(e.allOf)for(var r=0,i=e.allOf;r<i.length;r++){var a=i[r],o=Eh(a);if(Gi(o))return o}}}function Th(e){if(e&&typeof e=="object"){if(Gi(e.allowTrailingCommas))return e.allowTrailingCommas;if(Gi(e.allowsTrailingCommas))return e.allowsTrailingCommas;if(e.allOf)for(var r=0,i=e.allOf;r<i.length;r++){var a=i[r],o=Th(a);if(Gi(o))return o}}}function kh(e){switch(e){case"error":return Ct.Error;case"warning":return Ct.Warning;case"ignore":return}}var Ph=48,Qg=57,Zg=65,Qf=97,qg=102;function Or(e){return e<Ph?0:e<=Qg?e-Ph:(e<Qf&&(e+=Qf-Zg),e>=Qf&&e<=qg?e-Qf+10:0)}function em(e){if(e[0]!=="#")return null;switch(e.length){case 4:return{red:Or(e.charCodeAt(1))*17/255,green:Or(e.charCodeAt(2))*17/255,blue:Or(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Or(e.charCodeAt(1))*17/255,green:Or(e.charCodeAt(2))*17/255,blue:Or(e.charCodeAt(3))*17/255,alpha:Or(e.charCodeAt(4))*17/255};case 7:return{red:(Or(e.charCodeAt(1))*16+Or(e.charCodeAt(2)))/255,green:(Or(e.charCodeAt(3))*16+Or(e.charCodeAt(4)))/255,blue:(Or(e.charCodeAt(5))*16+Or(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Or(e.charCodeAt(1))*16+Or(e.charCodeAt(2)))/255,green:(Or(e.charCodeAt(3))*16+Or(e.charCodeAt(4)))/255,blue:(Or(e.charCodeAt(5))*16+Or(e.charCodeAt(6)))/255,alpha:(Or(e.charCodeAt(7))*16+Or(e.charCodeAt(8)))/255}}return null}function C0(e,r,i,a){return a===void 0&&(a=1),{red:e/255,green:r/255,blue:i/255,alpha:a}}var tm=function(){function e(r){this.schemaService=r}return e.prototype.findDocumentSymbols=function(r,i,a){var o=this;a===void 0&&(a={resultLimit:Number.MAX_VALUE});var f=i.root;if(!f)return null;var d=a.resultLimit,v=r.uri;if((v==="vscode://defaultsettings/keybindings.json"||Ed(v.toLowerCase(),"/user/keybindings.json"))&&f.type==="array"){for(var h=[],g=0,b=f.items;g<b.length;g++){var E=b[g];if(E.type==="object")for(var V=0,I=E.properties;V<I.length;V++){var W=I[V];if(W.keyNode.value==="key"&&W.valueNode){var Y=Fs.create(r.uri,so(r,E));if(h.push({name:oo(W.valueNode),kind:$i.Function,location:Y}),d--,d<=0)return a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(v),h}}}return h}var _=function(G,ce,Ce){return d>=0&&(ce.type==="array"?ce.items.forEach(function(ge){return _(G,ge,Ce)}):ce.type==="object"&&ce.properties.forEach(function(ge){if(d>=0){var ke=ge.valueNode;if(ke){d--;var be=Fs.create(r.uri,so(r,ge)),me=Ce?Ce+"."+ge.keyNode.value:ge.keyNode.value;G.push({name:o.getKeyLabel(ge),kind:o.getSymbolKind(ke.type),location:be,containerName:Ce}),_(G,ke,me)}}})),G},U=_([],f,void 0);return d<0&&(U.pop(),a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(v)),U},e.prototype.findDocumentSymbols2=function(r,i,a){var o=this;a===void 0&&(a={resultLimit:Number.MAX_VALUE});var f=i.root;if(!f)return null;var d=a.resultLimit,v=r.uri;if((v==="vscode://defaultsettings/keybindings.json"||Ed(v.toLowerCase(),"/user/keybindings.json"))&&f.type==="array"){for(var h=[],g=0,b=f.items;g<b.length;g++){var E=b[g];if(E.type==="object")for(var V=0,I=E.properties;V<I.length;V++){var W=I[V];if(W.keyNode.value==="key"&&W.valueNode){var Y=so(r,E),_=so(r,W.keyNode);if(h.push({name:oo(W.valueNode),kind:$i.Function,range:Y,selectionRange:_}),d--,d<=0)return a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(v),h}}}return h}var U=function(ce,Ce){return d>=0&&(Ce.type==="array"?Ce.items.forEach(function(ge,ke){if(ge&&d>=0){d--;var be=so(r,ge),me=be,ue=String(ke),Oe=U([],ge);ce.push({name:ue,kind:o.getSymbolKind(ge.type),range:be,selectionRange:me,children:Oe})}}):Ce.type==="object"&&Ce.properties.forEach(function(ge){var ke=ge.valueNode;if(ke&&d>=0){d--;var be=so(r,ge),me=so(r,ge.keyNode),ue=U([],ke);ce.push({name:o.getKeyLabel(ge),kind:o.getSymbolKind(ke.type),range:be,selectionRange:me,children:ue})}})),ce},G=U([],f);return d<0&&(G.pop(),a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(v)),G},e.prototype.getSymbolKind=function(r){switch(r){case"object":return $i.Module;case"string":return $i.String;case"number":return $i.Number;case"array":return $i.Array;case"boolean":return $i.Boolean;default:return $i.Variable}},e.prototype.getKeyLabel=function(r){var i=r.keyNode.value;return i&&(i=i.replace(/[\n]/g,"\u21B5")),i&&i.trim()?i:'"'+i+'"'},e.prototype.findDocumentColors=function(r,i,a){return this.schemaService.getSchemaForResource(r.uri,i).then(function(o){var f=[];if(o)for(var d=a&&typeof a.resultLimit=="number"?a.resultLimit:Number.MAX_VALUE,v=i.getMatchingSchemas(o.schema),h={},g=0,b=v;g<b.length;g++){var E=b[g];if(!E.inverted&&E.schema&&(E.schema.format==="color"||E.schema.format==="color-hex")&&E.node&&E.node.type==="string"){var V=String(E.node.offset);if(!h[V]){var I=em(oo(E.node));if(I){var W=so(r,E.node);f.push({color:I,range:W})}if(h[V]=!0,d--,d<=0)return a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(r.uri),f}}}return f})},e.prototype.getColorPresentations=function(r,i,a,o){var f=[],d=Math.round(a.red*255),v=Math.round(a.green*255),h=Math.round(a.blue*255);function g(E){var V=E.toString(16);return V.length!==2?"0"+V:V}var b;return a.alpha===1?b="#"+g(d)+g(v)+g(h):b="#"+g(d)+g(v)+g(h)+g(Math.round(a.alpha*255)),f.push({label:b,textEdit:pi.replace(o,JSON.stringify(b))}),f},e}();function so(e,r){return Wt.create(e.positionAt(r.offset),e.positionAt(r.offset+r.length))}var rm={schemaAssociations:{},schemas:{}};function nm(e,r){var i=[],a=[],o=[],f=-1,d=Ps(e.getText(),!1),v=d.scan();function h(Oe){i.push(Oe),a.push(o.length)}for(;v!==17;){switch(v){case 1:case 3:{var g=e.positionAt(d.getTokenOffset()).line,b={startLine:g,endLine:g,kind:v===1?"object":"array"};o.push(b);break}case 2:case 4:{var E=v===2?"object":"array";if(o.length>0&&o[o.length-1].kind===E){var b=o.pop(),V=e.positionAt(d.getTokenOffset()).line;b&&V>b.startLine+1&&f!==b.startLine&&(b.endLine=V-1,h(b),f=b.startLine)}break}case 13:{var g=e.positionAt(d.getTokenOffset()).line,I=e.positionAt(d.getTokenOffset()+d.getTokenLength()).line;d.getTokenError()===1&&g+1<e.lineCount?d.setPosition(e.offsetAt(di.create(g+1,0))):g<I&&(h({startLine:g,endLine:I,kind:_l.Comment}),f=g);break}case 12:{var W=e.getText().substr(d.getTokenOffset(),d.getTokenLength()),Y=W.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(Y){var V=e.positionAt(d.getTokenOffset()).line;if(Y[1]){var b={startLine:V,endLine:V,kind:_l.Region};o.push(b)}else{for(var _=o.length-1;_>=0&&o[_].kind!==_l.Region;)_--;if(_>=0){var b=o[_];o.length=_,V>b.startLine&&f!==b.startLine&&(b.endLine=V,h(b),f=b.startLine)}}}break}}v=d.scan()}var U=r&&r.rangeLimit;if(typeof U!="number"||i.length<=U)return i;r&&r.onRangeLimitExceeded&&r.onRangeLimitExceeded(e.uri);for(var G=[],ce=0,Ce=a;ce<Ce.length;ce++){var ge=Ce[ce];ge<30&&(G[ge]=(G[ge]||0)+1)}for(var ke=0,be=0,_=0;_<G.length;_++){var me=G[_];if(me){if(me+ke>U){be=_;break}ke+=me}}for(var ue=[],_=0;_<i.length;_++){var ge=a[_];typeof ge=="number"&&(ge<be||ge===be&&ke++<U)&&ue.push(i[_])}return ue}function im(e,r,i){function a(v){for(var h=e.offsetAt(v),g=i.getNodeFromOffset(h,!0),b=[];g;){switch(g.type){case"string":case"object":case"array":var E=g.offset+1,V=g.offset+g.length-1;E<V&&h>=E&&h<=V&&b.push(o(E,V)),b.push(o(g.offset,g.offset+g.length));break;case"number":case"boolean":case"null":case"property":b.push(o(g.offset,g.offset+g.length));break}if(g.type==="property"||g.parent&&g.parent.type==="array"){var I=d(g.offset+g.length,5);I!==-1&&b.push(o(g.offset,I))}g=g.parent}for(var W=void 0,Y=b.length-1;Y>=0;Y--)W=Kf.create(b[Y],W);return W||(W=Kf.create(Wt.create(v,v))),W}function o(v,h){return Wt.create(e.positionAt(v),e.positionAt(h))}var f=Ps(e.getText(),!0);function d(v,h){f.setPosition(v);var g=f.scan();return g===h?f.getTokenOffset()+f.getTokenLength():-1}return r.map(a)}function am(e){var r=e.promiseConstructor||Promise,i=new Yg(e.schemaRequestService,e.workspaceContext,r);i.setSchemaContributions(rm);var a=new Ig(i,e.contributions,r,e.clientCapabilities),o=new Lg(i,e.contributions,r),f=new tm(i),d=new Xg(i,r);return{configure:function(v){i.clearExternalSchemas(),v.schemas&&v.schemas.forEach(function(h){i.registerExternalSchema(h.uri,h.fileMatch,h.schema)}),d.configure(v)},resetSchema:function(v){return i.onResourceChange(v)},doValidation:d.doValidation.bind(d),parseJSONDocument:function(v){return Eg(v,{collectComments:!0})},newJSONDocument:function(v,h){return Og(v,h)},doComplete:a.doComplete.bind(a),findDocumentSymbols:f.findDocumentSymbols.bind(f),findDocumentSymbols2:f.findDocumentSymbols2.bind(f),findColorSymbols:function(v,h){return f.findDocumentColors(v,h).then(function(g){return g.map(function(b){return b.range})})},findDocumentColors:f.findDocumentColors.bind(f),getColorPresentations:f.getColorPresentations.bind(f),doHover:o.doHover.bind(o),getFoldingRanges:nm,getSelectionRanges:im,format:function(v,h,g){var b=void 0;if(h){var E=v.offsetAt(h.start),V=v.offsetAt(h.end)-E;b={offset:E,length:V}}var I={tabSize:g?g.tabSize:4,insertSpaces:g?g.insertSpaces:!0,eol:`
264
+ `};return pg(v.getText(),b,I).map(function(W){return pi.replace(Wt.create(v.positionAt(W.offset),v.positionAt(W.offset+W.length)),W.content)})}}}var Fh=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});let lo=null;dt.Qg&&(lo=c(46944),c(13156),c(82518),c(33201),c(77436),c(29641),c(71628),c(6766),c(49812),c(17664),c(83539));const Rs=am({});lo&&(lo.registerHelper("lint","json",function(e,r){return Fh(this,null,function*(){const{schema:i,setError:a}=r;Rs.configure({validate:!0,schemas:[{uri:"stub://"+r.id,fileMatch:["*"],schema:i}]});const o=Yf.create(r.id+".json","json",0,e),f=Rs.parseJSONDocument(o),d=yield Rs.doValidation(o,f);return d.length?a&&a(d[0].message):a&&a(void 0),d.map(v=>({from:lo.Pos(v.range.start.line,v.range.start.character),to:lo.Pos(v.range.end.line,v.range.end.character),message:v.message}))})}),lo.registerHelper("hint","json",(e,r)=>Fh(void 0,null,function*(){const i=r.schema;if(!i)return;Rs.configure({validate:!0,schemas:[{uri:"stub://"+r.id,fileMatch:["*"],schema:i}]});const a=e.getDoc().getCursor(),o=e.getTokenAt(a),f=Yf.create(r.id+".json","json",0,e.getValue()),d=Rs.parseJSONDocument(f),v=yield Rs.doComplete(f,{line:a.line,character:a.ch},d),h=b=>{let E="";for(;b--;)E+=" ";return E};let g=v?v.items.map(b=>({text:b.insertText,displayText:b.label,filter:b.filterText||b.label,from:{line:b.textEdit.range.start.line,ch:b.textEdit.range.start.character},to:{line:b.textEdit.range.end.line,ch:b.textEdit.range.end.character},hint:(E,V,I)=>{const W="_$__REDOC_CURSOR_HERE";let Y=I.text.replace(/(\$1|\${1:[^}]+})/,W)||"";if(Y=Y.replace(/(\$\d+|\${[^}]+})/g,"")||"",E.setSelection(I.from,I.to),Y.indexOf(`
265
265
  `)>-1){const U=E.getLine(E.getCursor().line).search(/(\S|$)/);Y=Y.replace(/\n/g,`
266
- `+h(U))}E.replaceSelection(Y);const _=E.getSearchCursor(W,I.from);_.findNext()&&(E.setCursor(_.from()),_.replace(""))}})):[];return/(property|string)/.test(o.type||"")&&(g=g.filter(b=>b.filter.replace(/(^"|"$)/g,"").startsWith(o.string.replace(/(^"|"$)/g,"")))),{from:lo.Pos(a.line,o.start),to:lo.Pos(a.line,a.ch),list:g}})));const lm=(0,At.vJ)`
266
+ `+h(U))}E.replaceSelection(Y);const _=E.getSearchCursor(W,I.from);_.findNext()&&(E.setCursor(_.from()),_.replace(""))}})):[];return/(property|string)/.test(o.type||"")&&(g=g.filter(b=>b.filter.replace(/(^"|"$)/g,"").startsWith(o.string.replace(/(^"|"$)/g,"")))),{from:lo.Pos(a.line,o.start),to:lo.Pos(a.line,a.ch),list:g}})));const om=(0,At.vJ)`
267
267
  .cm-s-material.CodeMirror {
268
268
  background-color: var(--panel-samples-controls-background-color)!important;
269
269
  color: var(--text-color-inverse)!important;
@@ -311,7 +311,7 @@ $3`);return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Rg(e){return e.i
311
311
  flex: 1;
312
312
  border-radius: var(--panel-border-radius);
313
313
  }
314
- `,um=ci(({fieldState:e,fieldApi:r,onChange:i,onBlur:a,forwardedRef:o,id:f,mode:d,schema:v})=>{let h;const g=(_,U)=>{/^[a-zA-Z0-9_":]$/.test(U.key)&&h.execCommand("autocomplete")},b=_=>{h=_,h.on("keyup",g)},E=()=>{h.refresh()},j=()=>h.showHint({completeSingle:!0});(0,Jt.useMount)(()=>{setTimeout(()=>{h.refresh()},0),document.addEventListener("click",E)}),(0,Jt.useUnmount)(()=>{document.removeEventListener("click",E)});const{value:I}=e,{setValue:W,setTouched:Y}=r;return A.createElement(A.Fragment,null,A.createElement(lm,null),A.createElement(eg.fk,{editorDidMount:b,value:I||"",ref:o,onBeforeChange:(_,U,G)=>{W(G),i&&i(G)},onBlur:_=>{Y(!1),a&&a(_)},options:{mode:d||Bf.Tr.JSON,theme:"material",matchBrackets:!0,autoCloseBrackets:!0,tabSize:2,foldGutter:!0,extraKeys:{"Cmd-Space":j,"Ctrl-Space":j},hintOptions:{id:f,completeSingle:!1,schema:v}}}))});var Fd=c(91582);function fm({mediaType:e,mediaContent:r,properties:i,id:a,resolvedBody:o,formApi:f,getActiveSample:d,validate:v}){const h=(0,Fd.yN)(r),g=e.examples||{},b=Object.keys(g),E=e.schema,j=ds(E||{},e.name)||e.name===Bf.Tr.MULTIPART||e.name===Bf.Tr.URL_ENCODED,{exampleKey:I}=(0,fd.C6)(e.operation,g),W=(0,dt.YQ)((0,xt.P6)(a,e.name,I,g))||(0,xt.oY)(g[I],i),Y=(0,A.useCallback)((G="",ce="",Ce=[])=>ge=>{(0,dt.WW)((0,xt.P6)(a,G,ce,Ce),ge)},[a]),_=(0,A.useCallback)(G=>{h&&h(G),f.setValue("body",d(G))},[f,d,h]),U=(0,A.useCallback)((G,ce)=>{f.setValue(`body.${G}`,ce)},[f]);return A.createElement(A.Fragment,null,b.length&&b.length!==1&&A.createElement(fd.b_,{examples:g,onChange:_,exampleKey:I,panel:"try-it"})||null,j?A.createElement(Zv,{mediaType:e,formApi:f,onChange:U}):A.createElement(um,{id:"body"+a,field:"body",initialValue:W,schema:((o==null?void 0:o.content[e.name])||{}).schema,mode:e.name,validate:v,onChange:Y(e.name,I,g)}))}const cm=(0,A.memo)(fm);var dm=c(52383),pm=Object.defineProperty,hm=Object.defineProperties,vm=Object.getOwnPropertyDescriptors,Lh=Object.getOwnPropertySymbols,gm=Object.prototype.hasOwnProperty,mm=Object.prototype.propertyIsEnumerable,Mh=(e,r,i)=>r in e?pm(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,ym=(e,r)=>{for(var i in r||(r={}))gm.call(r,i)&&Mh(e,i,r[i]);if(Lh)for(var i of Lh(r))mm.call(r,i)&&Mh(e,i,r[i]);return e},bm=(e,r)=>hm(e,vm(r));function xm({body:{content:e},formApi:r,resolvedBody:i,properties:a,id:o,validate:f,pointer:d}){const v=(0,ui.useRecoilValue)(dm.UF),{examples:h,name:g}=e&&(0,$n.getActiveMediaType)(e,v)||{},b=(0,A.useCallback)(I=>{if(!e||!e.hasSample||!(h!=null&&h[I]))return"";const W=g&&(0,dt.YQ)((0,xt.P6)(o,g,I,h)),Y=W?JSON.parse(W):h==null?void 0:h[I];return(0,xt.oY)(Y,a)},[g,h,o,e,a]),{activeExampleName:E}=(0,ui.useRecoilValue)((0,cd.N)(d));(0,A.useEffect)(()=>{if(g){const I=(0,xt.P6)(o,g,E,h);r.setValue("body",(0,dt.YQ)(I)||b(E||""))}else r.setValue("body",JSON.stringify(a||{},null,2))},[h,E,g,r,b,o,a]);const j=I=>A.createElement(_v.C,bm(ym({},I),{variant:"dark",fullWidth:!0,Label:$v,Dropdown:Gv.Lt}));return A.createElement(A.Fragment,null,A.createElement(zv.d,{content:e,renderDropdown:j},I=>A.createElement(cm,{mediaType:I,mediaContent:e,resolvedBody:i,id:o,properties:a,getActiveSample:b,formApi:r,validate:f})))}const Sm=(0,A.memo)(xm),wm=ci(({initValue:e,paramEnum:r,fieldApi:i})=>{const[a,o]=(0,A.useState)(),f=r.map((h,g)=>({idx:g,value:h})),d=h=>{i.setValue(h.value),o(h.value)};(0,Jt.useMount)(()=>{if(e)if(Array.isArray(e)){const h=e.length?e[0]:"";o(h),i.setValue(h)}else o(e),i.setValue(e)});const v=()=>{i.setValue(""),o("")};return A.createElement(mn.VD,{clearable:!0,fullWidth:!0,variant:"dark",value:a,options:f,handleClear:v,onChange:d})}),Cm=({name:e,param:r,place:i,renderParameter:a})=>{var o,f,d,v,h;const[g,b]=A.useState([]),E=()=>{b([...g,g.length?g[g.length-1]+1:0])},j=W=>{b(g.filter(Y=>Y!==W))},I=(o=r.schema.items)!=null&&o.fields?(f=r.schema.items)==null?void 0:f.fields:[{schema:((d=r.schema.items)==null?void 0:d.schema)||r.schema.items,name:"",required:r.required,description:(v=r.schema.items)==null?void 0:v.description,externalDocs:(h=r.schema.items)==null?void 0:h.externalDocs,deprecated:!1,toggle:()=>null,expanded:!1}];return A.createElement(A.Fragment,null,A.createElement(Nh,null,A.createElement(Ye.lX,{required:r.required},e,"(",g.length," items)"),A.createElement("span",{onClick:E},"Add item +")),g==null?void 0:g.map((W,Y)=>A.createElement(Nh,{key:W},I.map(_=>a(_,i,`${e}.[${W}]`,`[${Y}]${_.name&&"."+_.name}`,A.createElement(Am,{onClick:()=>j(W)},"Delete"))))))},Nh=At.ZP.div`
314
+ `,sm=ci(({fieldState:e,fieldApi:r,onChange:i,onBlur:a,forwardedRef:o,id:f,mode:d,schema:v})=>{let h;const g=(_,U)=>{/^[a-zA-Z0-9_":]$/.test(U.key)&&h.execCommand("autocomplete")},b=_=>{h=_,h.on("keyup",g)},E=()=>{h.refresh()},V=()=>h.showHint({completeSingle:!0});(0,Jt.useMount)(()=>{setTimeout(()=>{h.refresh()},0),document.addEventListener("click",E)}),(0,Jt.useUnmount)(()=>{document.removeEventListener("click",E)});const{value:I}=e,{setValue:W,setTouched:Y}=r;return A.createElement(A.Fragment,null,A.createElement(om,null),A.createElement(Zv.fk,{editorDidMount:b,value:I||"",ref:o,onBeforeChange:(_,U,G)=>{W(G),i&&i(G)},onBlur:_=>{Y(!1),a&&a(_)},options:{mode:d||Bf.Tr.JSON,theme:"material",matchBrackets:!0,autoCloseBrackets:!0,tabSize:2,foldGutter:!0,extraKeys:{"Cmd-Space":V,"Ctrl-Space":V},hintOptions:{id:f,completeSingle:!1,schema:v}}}))});var Fd=c(91582);function lm({mediaType:e,mediaContent:r,properties:i,id:a,resolvedBody:o,formApi:f,getActiveSample:d,validate:v}){const h=(0,Fd.yN)(r),g=e.examples||{},b=Object.keys(g),E=e.schema,V=ds(E||{},e.name)||e.name===Bf.Tr.MULTIPART||e.name===Bf.Tr.URL_ENCODED,{exampleKey:I}=(0,fd.C6)(e.operation,g),W=(0,dt.YQ)((0,xt.P6)(a,e.name,I,g))||(0,xt.oY)(g[I],i),Y=(0,A.useCallback)((G="",ce="",Ce=[])=>ge=>{(0,dt.WW)((0,xt.P6)(a,G,ce,Ce),ge)},[a]),_=(0,A.useCallback)(G=>{h&&h(G),f.setValue("body",d(G))},[f,d,h]),U=(0,A.useCallback)((G,ce)=>{f.setValue(`body.${G}`,ce)},[f]);return A.createElement(A.Fragment,null,b.length&&b.length!==1&&A.createElement(fd.b_,{examples:g,onChange:_,exampleKey:I,panel:"try-it"})||null,V?A.createElement(Jv,{mediaType:e,formApi:f,onChange:U}):A.createElement(sm,{id:"body"+a,field:"body",initialValue:W,schema:(o?.content[e.name]||{}).schema,mode:e.name,validate:v,onChange:Y(e.name,I,g)}))}const um=(0,A.memo)(lm);var fm=c(52383),cm=Object.defineProperty,dm=Object.defineProperties,pm=Object.getOwnPropertyDescriptors,Ih=Object.getOwnPropertySymbols,hm=Object.prototype.hasOwnProperty,vm=Object.prototype.propertyIsEnumerable,Lh=(e,r,i)=>r in e?cm(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,gm=(e,r)=>{for(var i in r||(r={}))hm.call(r,i)&&Lh(e,i,r[i]);if(Ih)for(var i of Ih(r))vm.call(r,i)&&Lh(e,i,r[i]);return e},mm=(e,r)=>dm(e,pm(r));function ym({body:{content:e},formApi:r,resolvedBody:i,properties:a,id:o,validate:f,pointer:d}){const v=(0,ui.useRecoilValue)(fm.UF),{examples:h,name:g}=e&&(0,$n.getActiveMediaType)(e,v)||{},b=(0,A.useCallback)(I=>{if(!e||!e.hasSample||!h?.[I])return"";const W=g&&(0,dt.YQ)((0,xt.P6)(o,g,I,h)),Y=W?JSON.parse(W):h?.[I];return(0,xt.oY)(Y,a)},[g,h,o,e,a]),{activeExampleName:E}=(0,ui.useRecoilValue)((0,cd.N)(d));(0,A.useEffect)(()=>{if(g){const I=(0,xt.P6)(o,g,E,h);r.setValue("body",(0,dt.YQ)(I)||b(E||""))}else r.setValue("body",JSON.stringify(a||{},null,2))},[h,E,g,r,b,o,a]);const V=I=>A.createElement(Hv.C,mm(gm({},I),{variant:"dark",fullWidth:!0,Label:zv,Dropdown:_v.Lt}));return A.createElement(A.Fragment,null,A.createElement(Uv.d,{content:e,renderDropdown:V},I=>A.createElement(um,{mediaType:I,mediaContent:e,resolvedBody:i,id:o,properties:a,getActiveSample:b,formApi:r,validate:f})))}const bm=(0,A.memo)(ym),xm=ci(({initValue:e,paramEnum:r,fieldApi:i})=>{const[a,o]=(0,A.useState)(),f=r.map((h,g)=>({idx:g,value:h})),d=h=>{i.setValue(h.value),o(h.value)};(0,Jt.useMount)(()=>{if(e)if(Array.isArray(e)){const h=e.length?e[0]:"";o(h),i.setValue(h)}else o(e),i.setValue(e)});const v=()=>{i.setValue(""),o("")};return A.createElement(mn.VD,{clearable:!0,fullWidth:!0,variant:"dark",value:a,options:f,handleClear:v,onChange:d})}),Sm=({name:e,param:r,place:i,renderParameter:a})=>{var o,f,d,v,h;const[g,b]=A.useState([]),E=()=>{b([...g,g.length?g[g.length-1]+1:0])},V=W=>{b(g.filter(Y=>Y!==W))},I=(o=r.schema.items)!=null&&o.fields?(f=r.schema.items)==null?void 0:f.fields:[{schema:((d=r.schema.items)==null?void 0:d.schema)||r.schema.items,name:"",required:r.required,description:(v=r.schema.items)==null?void 0:v.description,externalDocs:(h=r.schema.items)==null?void 0:h.externalDocs,deprecated:!1,toggle:()=>null,expanded:!1}];return A.createElement(A.Fragment,null,A.createElement(Mh,null,A.createElement(Ye.lX,{required:r.required},e,"(",g.length," items)"),A.createElement("span",{onClick:E},"Add item +")),g?.map((W,Y)=>A.createElement(Mh,{key:W},I.map(_=>a(_,i,`${e}.[${W}]`,`[${Y}]${_.name&&"."+_.name}`,A.createElement(wm,{onClick:()=>V(W)},"Delete"))))))},Mh=At.ZP.div`
315
315
  display: flex;
316
316
  width: 100%;
317
317
  align-items: center;
@@ -332,14 +332,14 @@ $3`);return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Rg(e){return e.i
332
332
  color: #fff;
333
333
  }
334
334
  }
335
- `,Am=At.ZP.span`
335
+ `,wm=At.ZP.span`
336
336
  background: transparent;
337
337
  border: none;
338
338
  cursor: pointer;
339
339
  position: relative;
340
340
  margin-left: 5px;
341
341
  display: inline-block;
342
- `;var Xl=(e=>(e.ARRAY="array",e.OBJECT="object",e))(Xl||{});function Om({schema:e,example:r}){return`(${e.type})`+(r?` ${r}`:"")}function Em(e){const r={};return e.forEach(i=>{i.in&&(r[i.in]||(r[i.in]=[]),r[i.in].push(i))}),r}function Tm({schema:e,required:r}){return i=>{if(r&&!i)return"Field is required";if(r&&e.type===Xl.ARRAY&&Array.isArray(i)){if(i.length>(e.rawSchema&&e.rawSchema.maxItems||1/0))return`Too many items selected, maximum ${e.rawSchema.maxItems}`;if(i.length<(e.rawSchema&&e.rawSchema.minItems||0)){const a=e.rawSchema.minItems;return`You should select at least ${a===1?`${a} item`:`${a} items`}`}}}}function km(e){if(e.type===Xl.ARRAY){const r=e.default||e.example;if(!r&&typeof e.rawSchema.items!="boolean"&&Array.isArray(e.rawSchema.items)){if(e.rawSchema.items[0].default)return[e.rawSchema.items[0].default];if(e.rawSchema.items[0].example)return[e.rawSchema.items[0].example]}if(!r&&typeof e.rawSchema.items!="boolean"&&!Array.isArray(e.rawSchema.items)&&(0,dt.Kn)(e.rawSchema.items)){if(e.rawSchema.items.default)return[e.rawSchema.items.default];if(e.rawSchema.items.example)return[e.rawSchema.items.example]}return r||[]}else return(Number.isInteger(e.default)?e.default.toString():e.default)||e.example}function Pm({oneOfType:e}){return e}const Fm=["path","query","cookie","header"];function Im({id:e,param:r,values:i}){const a=(0,A.useMemo)(()=>Tm(r),[r]),o=Array.isArray(r.schema.enum)&&r.schema.enum.length?r.schema.enum:void 0,f=km(r.schema),d=e.split(".").map(v=>(0,dt.dw)(v));return o?A.createElement(Ye.NI,null,A.createElement(wm,{initValue:f,paramEnum:o,field:e})):A.createElement(In,{fullWidth:!0,"data-cy":"parameter-input",id:e,field:e,placeholder:Om(r),validate:a,initialValue:f||(0,dt.U2)(i,d),validateOnBlur:!0,validateOnChange:!0})}function Lm({values:e,operation:r}){const i=(0,A.useMemo)(()=>Em(r.parameters||[]),[r]),a=(f,d,v,h,g)=>{var b;const E=v?(0,dt.s1)(v,f.name):f.name,j=Pm(f.schema),I=v?[d,v]:[f.in],W=(0,dt.s1)(...I,(0,dt.A8)(f.name));return j&&console.warn(`Unsupported parameter definition: "${j}"`),(Array.isArray(f.schema.type)?f.schema.type:[f.schema.type]).includes(Xl.ARRAY)?A.createElement(Cm,{key:W,name:E,param:f,place:d,renderParameter:a}):f.schema.type===Xl.OBJECT?(b=f.schema.fields)==null?void 0:b.map(_=>a(_,d,E)):A.createElement(Ye.NI,{key:W},A.createElement(Ye.lX,{required:f.required},h||E,": ",g),j?A.createElement(Ye.GE,null,"Unsupported field schema definition"):A.createElement(Im,{id:W,param:f,values:e}))},o=f=>{const d=i[f];return!d||!d.length?null:A.createElement(A.Fragment,{key:f},A.createElement(Ye.NI,null,A.createElement(Ye.iG,null," # ",f," parameters "),A.createElement("span",null,"\xA0")),d.map(v=>a(v,f)))};return A.createElement(Ye.iA,null,Fm.map(o))}var Mm=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});function Nm(e){return Mm(this,null,function*(){return(yield fetch(e)).json()})}const Rm=At.ZP.div`
342
+ `;var Xl=(e=>(e.ARRAY="array",e.OBJECT="object",e))(Xl||{});function Cm({schema:e,example:r}){return`(${e.type})`+(r?` ${r}`:"")}function Am(e){const r={};return e.forEach(i=>{i.in&&(r[i.in]||(r[i.in]=[]),r[i.in].push(i))}),r}function Om({schema:e,required:r}){return i=>{if(r&&!i)return"Field is required";if(r&&e.type===Xl.ARRAY&&Array.isArray(i)){if(i.length>(e.rawSchema&&e.rawSchema.maxItems||1/0))return`Too many items selected, maximum ${e.rawSchema.maxItems}`;if(i.length<(e.rawSchema&&e.rawSchema.minItems||0)){const a=e.rawSchema.minItems;return`You should select at least ${a===1?`${a} item`:`${a} items`}`}}}}function Em(e){if(e.type===Xl.ARRAY){const r=e.default||e.example;if(!r&&typeof e.rawSchema.items!="boolean"&&Array.isArray(e.rawSchema.items)){if(e.rawSchema.items[0].default)return[e.rawSchema.items[0].default];if(e.rawSchema.items[0].example)return[e.rawSchema.items[0].example]}if(!r&&typeof e.rawSchema.items!="boolean"&&!Array.isArray(e.rawSchema.items)&&(0,dt.Kn)(e.rawSchema.items)){if(e.rawSchema.items.default)return[e.rawSchema.items.default];if(e.rawSchema.items.example)return[e.rawSchema.items.example]}return r||[]}else return(Number.isInteger(e.default)?e.default.toString():e.default)||e.example}function Tm({oneOfType:e}){return e}const km=["path","query","cookie","header"];function Pm({id:e,param:r,values:i}){const a=(0,A.useMemo)(()=>Om(r),[r]),o=Array.isArray(r.schema.enum)&&r.schema.enum.length?r.schema.enum:void 0,f=Em(r.schema),d=e.split(".").map(v=>(0,dt.dw)(v));return o?A.createElement(Ye.NI,null,A.createElement(xm,{initValue:f,paramEnum:o,field:e})):A.createElement(In,{fullWidth:!0,"data-cy":"parameter-input",id:e,field:e,placeholder:Cm(r),validate:a,initialValue:f||(0,dt.U2)(i,d),validateOnBlur:!0,validateOnChange:!0})}function Fm({values:e,operation:r}){const i=(0,A.useMemo)(()=>Am(r.parameters||[]),[r]),a=(f,d,v,h,g)=>{var b;const E=v?(0,dt.s1)(v,f.name):f.name,V=Tm(f.schema),I=v?[d,v]:[f.in],W=(0,dt.s1)(...I,(0,dt.A8)(f.name));return V&&console.warn(`Unsupported parameter definition: "${V}"`),(Array.isArray(f.schema.type)?f.schema.type:[f.schema.type]).includes(Xl.ARRAY)?A.createElement(Sm,{key:W,name:E,param:f,place:d,renderParameter:a}):f.schema.type===Xl.OBJECT?(b=f.schema.fields)==null?void 0:b.map(_=>a(_,d,E)):A.createElement(Ye.NI,{key:W},A.createElement(Ye.lX,{required:f.required},h||E,": ",g),V?A.createElement(Ye.GE,null,"Unsupported field schema definition"):A.createElement(Pm,{id:W,param:f,values:e}))},o=f=>{const d=i[f];return!d||!d.length?null:A.createElement(A.Fragment,{key:f},A.createElement(Ye.NI,null,A.createElement(Ye.iG,null," # ",f," parameters "),A.createElement("span",null,"\xA0")),d.map(v=>a(v,f)))};return A.createElement(Ye.iA,null,km.map(o))}var Im=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});function Lm(e){return Im(this,null,function*(){return(yield fetch(e)).json()})}const Mm=At.ZP.div`
343
343
  position: relative;
344
344
  height: 4px;
345
345
  display: block;
@@ -441,19 +441,19 @@ $3`);return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Rg(e){return e.i
441
441
  right: -8%;
442
442
  }
443
443
  }
444
- `,Rh=()=>A.createElement(Rm,null,A.createElement("div",{className:"indeterminate"})),Dm=At.ZP.div`
444
+ `,Nh=()=>A.createElement(Mm,null,A.createElement("div",{className:"indeterminate"})),Nm=At.ZP.div`
445
445
  font-family: var(--font-family-monospaced);
446
446
  margin-top: 10px;
447
447
  line-height: 1;
448
448
  padding-left: 10px;
449
449
  border-left: 1px solid gray;
450
- `,Bm=At.ZP.div`
450
+ `,Rm=At.ZP.div`
451
451
  margin-bottom: 15px;
452
- `,Vm=At.ZP.div`
452
+ `,Dm=At.ZP.div`
453
453
  padding: 8px 0 20px;
454
- `,jm=At.ZP.div`
454
+ `,Bm=At.ZP.div`
455
455
  padding: 4px 0;
456
- `;var Wm=Object.defineProperty,Hm=Object.defineProperties,Um=Object.getOwnPropertyDescriptors,Dh=Object.getOwnPropertySymbols,_m=Object.prototype.hasOwnProperty,zm=Object.prototype.propertyIsEnumerable,Bh=(e,r,i)=>r in e?Wm(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Gm=(e,r)=>{for(var i in r||(r={}))_m.call(r,i)&&Bh(e,i,r[i]);if(Dh)for(var i of Dh(r))zm.call(r,i)&&Bh(e,i,r[i]);return e},$m=(e,r)=>Hm(e,Um(r));const Km=At.ZP.input`
456
+ `;var Vm=Object.defineProperty,jm=Object.defineProperties,Wm=Object.getOwnPropertyDescriptors,Rh=Object.getOwnPropertySymbols,Hm=Object.prototype.hasOwnProperty,Um=Object.prototype.propertyIsEnumerable,Dh=(e,r,i)=>r in e?Vm(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,_m=(e,r)=>{for(var i in r||(r={}))Hm.call(r,i)&&Dh(e,i,r[i]);if(Rh)for(var i of Rh(r))Um.call(r,i)&&Dh(e,i,r[i]);return e},zm=(e,r)=>jm(e,Wm(r));const Gm=At.ZP.input`
457
457
  cursor: pointer;
458
458
  margin-left: 0;
459
459
  margin-right: 5px;
@@ -462,7 +462,7 @@ $3`);return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Rg(e){return e.i
462
462
  align-self: baseline;
463
463
  margin-top: 0;
464
464
  margin-bottom: 0;
465
- `,Ym=At.ZP.label`
465
+ `,$m=At.ZP.label`
466
466
  display: inline-block;
467
467
  cursor: pointer;
468
468
  vertical-align: middle;
@@ -472,7 +472,7 @@ $3`);return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Rg(e){return e.i
472
472
 
473
473
  overflow-wrap: break-word;
474
474
  line-height: 20px;
475
- `,Xm=At.ZP.div`
475
+ `,Km=At.ZP.div`
476
476
  width: ${({fullWidth:e})=>e?"100%":"50%"};
477
477
  display: inline-flex;
478
478
  align-items: center;
@@ -486,13 +486,13 @@ $3`);return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Rg(e){return e.i
486
486
  margin-top: 5px;
487
487
  }
488
488
  `}
489
- `;function Jm(e,r){const{fullWidth:i,id:a,label:o,nowrap:f}=e;return A.createElement(Xm,{fullWidth:i,nowrap:f},A.createElement(Km,$m(Gm({},e),{type:"checkbox",ref:r})),A.createElement(Ym,{htmlFor:a},o))}const Vh=(0,A.forwardRef)(Jm),Qm=11,Zm=ci(({items:e,fieldApi:r,validateOnChange:i,maxDisplayedItems:a,showControls:o,trimItemsLength:f})=>{const[d,v]=(0,A.useState)(!0),h=_=>{const U=_.target.value,G=_.target.checked;r.setTouched(!0);const ce=r.getValue()||[];let Ce;if(G)Ce=[...ce,U];else{const ge=ce.indexOf(U);Ce=[...ce.slice(0,ge),...ce.slice(ge+1)]}r.setValue(Ce)},g=_=>r.getValue().includes(_),b=()=>{v(_=>!_)},E=()=>{r.setValue(e)},j=()=>{r.setValue([])},I=r.getError(),W=a||Qm,Y=f&&d?e.slice(0,W):e;return A.createElement("div",null,o?A.createElement(Jt.CodeBlockControls,{controls:{select:{onClick:E,label:"Select all",tooltipText:"Select all checkboxes"},deselect:{onClick:j,label:"Deselect all",tooltipText:"Deselect all checkboxes"}}}):null,A.createElement(qm,null,Y.map(_=>A.createElement(Vh,{fullWidth:!0,id:_,value:_,checked:g(_),label:_,key:_,onChange:U=>{h(U),i&&r.validate()}})),e.length>W&&f?A.createElement(ey,{onClick:()=>{b()}},d?"Show all":"Collapse"):null),I?A.createElement(Ye.Xq,null,I):"")}),qm=At.ZP.div`
489
+ `;function Ym(e,r){const{fullWidth:i,id:a,label:o,nowrap:f}=e;return A.createElement(Km,{fullWidth:i,nowrap:f},A.createElement(Gm,zm(_m({},e),{type:"checkbox",ref:r})),A.createElement($m,{htmlFor:a},o))}const Bh=(0,A.forwardRef)(Ym),Xm=11,Jm=ci(({items:e,fieldApi:r,validateOnChange:i,maxDisplayedItems:a,showControls:o,trimItemsLength:f})=>{const[d,v]=(0,A.useState)(!0),h=_=>{const U=_.target.value,G=_.target.checked;r.setTouched(!0);const ce=r.getValue()||[];let Ce;if(G)Ce=[...ce,U];else{const ge=ce.indexOf(U);Ce=[...ce.slice(0,ge),...ce.slice(ge+1)]}r.setValue(Ce)},g=_=>r.getValue().includes(_),b=()=>{v(_=>!_)},E=()=>{r.setValue(e)},V=()=>{r.setValue([])},I=r.getError(),W=a||Xm,Y=f&&d?e.slice(0,W):e;return A.createElement("div",null,o?A.createElement(Jt.CodeBlockControls,{controls:{select:{onClick:E,label:"Select all",tooltipText:"Select all checkboxes"},deselect:{onClick:V,label:"Deselect all",tooltipText:"Deselect all checkboxes"}}}):null,A.createElement(Qm,null,Y.map(_=>A.createElement(Bh,{fullWidth:!0,id:_,value:_,checked:g(_),label:_,key:_,onChange:U=>{h(U),i&&r.validate()}})),e.length>W&&f?A.createElement(Zm,{onClick:()=>{b()}},d?"Show all":"Collapse"):null),I?A.createElement(Ye.Xq,null,I):"")}),Qm=At.ZP.div`
490
490
  padding: 10px;
491
491
  background-color: var(--panel-samples-input-background-color);
492
492
  border-radius: 0 0 var(--border-radius) var(--border-radius);
493
- `,ey=(0,At.ZP)(Jt.CodeBlockControlButton)`
493
+ `,Zm=(0,At.ZP)(Jt.CodeBlockControlButton)`
494
494
  float: right;
495
- `;function jh(e){const{scopes:r,id:i}=e;let a=[];try{a=JSON.parse((0,dt.YQ)(`auth.${i}.scopes`))}catch(o){}return!r||!r.length?A.createElement(A.Fragment,null):A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Scopes: "),A.createElement(Zm,{field:`auth.${i}.scopes`,initialValue:a,items:r,showControls:!0,trimItemsLength:!0}))}const ty=({token:e,loading:r,error:i})=>r?A.createElement(Ye.GE,null,"Please, finish your authorization flow or cancel authorization."):i?A.createElement(Dm,null,A.createElement(Ye.Xq,null,i)):e!=null&&e.access_token?null:A.createElement(Ye.GE,null," No Access Token. Please, Authorize. ");var ry=Object.defineProperty,ny=Object.defineProperties,iy=Object.getOwnPropertyDescriptors,Wh=Object.getOwnPropertySymbols,ay=Object.prototype.hasOwnProperty,oy=Object.prototype.propertyIsEnumerable,Hh=(e,r,i)=>r in e?ry(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Zf=(e,r)=>{for(var i in r||(r={}))ay.call(r,i)&&Hh(e,i,r[i]);if(Wh)for(var i of Wh(r))oy.call(r,i)&&Hh(e,i,r[i]);return e},Id=(e,r)=>ny(e,iy(r)),sy=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});function ly(e){if(!e)return"Field is required"}const qf=({usePkce:e,form:r,id:i,formApi:a,flow:o,tokenUrl:f,authCorsProxyUrl:d,tokenEndpointAuthMethod:v,server:h,scopes:g,authorizationUrl:b,defaultValues:E,clientId:j})=>{var I,W,Y,_;const{oAuth2RedirectURI:U,routingBasePath:G}=(0,ui.useRecoilValue)(Hi.lk),[ce,Ce]=(0,A.useState)(null),[ge,ke]=(0,A.useState)(!1),[be,me]=(0,A.useState)(!1),[ue,Oe]=(0,A.useState)(void 0),[Te,Me]=(0,A.useState)(void 0),[Xe,yt]=(0,A.useState)(void 0),at=((W=(I=r.values)==null?void 0:I.auth)==null?void 0:W[i])||{},fr=((_=(Y=r.errors)==null?void 0:Y.auth)==null?void 0:_[i])||{},Er=ue!==void 0&&Te!==Xe?{label:"sync",onClick:()=>{ue&&Me(Xe)}}:void 0;(0,A.useEffect)(()=>{if(e){const Vt=(0,Fn.CY)(43);Jd(Vt).then(Ot=>{Oe(Vt),Me(Ot),yt(Ot)})}},[e]);const cr=Vt=>{if(!Vt||(a.validate(),!(0,Fn.Qr)(fr)))return;ke(!0),Ce(null);const Ot=d?d+(0,xt.jg)(Vt):Vt,pn=d&&f?d+(0,xt.jg)(f):f,Ki=a.getValue(`auth.${i}.scopes`),qn={authorizationUrl:Ot.startsWith("http")?Ot:h+Ot,clientId:at.client_id,scopes:Ki,redirectUri:U,routingBasePath:G,successCallback:Kr=>{a.setValue(`auth.${i}.token`,Kr),ke(!1),Ce(null)},errorCallback:Kr=>{ke(!1),Ce((Kr==null?void 0:Kr.message)||"Failed to retrieve the access token")}};if(o==="implicit"&&ki.authorizeImplicit(qn),!(0,xt.xl)(v)){console.log(`Unsupported token endpoint auth method: ${v}`);return}o==="authorizationCode"&&ki.authorizeAuthorizationCode(Zf(Id(Zf({},qn),{tokenUrl:pn!=null&&pn.startsWith("http")?pn:h+pn,clientSecret:at.client_secret,extraHeaders:(0,xt.Or)({authMethod:v,clientId:at.client_id,clientSecret:at.client_secret})}),e&&{codeVerifier:ue,codeChallenge:Te}))},Tr=()=>{kt(),Ce(null)},nr=()=>{ke(!1),Ce(null),ki.clearRedirectData(o)},kt=()=>{a.setValue(`auth.${i}.token`,"")},Yt=()=>{me(Vt=>!Vt)},Ht=Vt=>sy(void 0,[Vt],function*({target:{value:Ot}}){const pn=yield Jd(Ot);Oe(Ot),yt(pn)});if(!b)return A.createElement(Ye.Xq,null,"No flow info");let _e=(0,dt.YQ)(`auth.${i}.token`)||JSON.stringify(E==null?void 0:E.token);_e=_e?JSON.parse(_e):"";const qe=(0,dt.Al)(i,"client_id"),Tt={field:`auth.${i}.client_id`,fullWidth:!0,initialValue:(0,dt.YQ)(`auth.${i}.client_id`)||j||(E==null?void 0:E.client_id),initValue:(0,dt.YQ)(`auth.${i}.client_id`)||j||(E==null?void 0:E.client_id),placeholder:"Your OAuth2 app Client ID",validate:ly,validateOnBlur:!0,validateOnChange:!0};return A.createElement("div",null,A.createElement(Ye.n5,null,A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Client ID: "),qe?A.createElement(jl,Id(Zf({},Tt),{options:qe})):A.createElement(In,Id(Zf({},Tt),{"data-cy":"client-id-input",panel:"try-it"}))),o==="authorizationCode"&&A.createElement(A.Fragment,null,(!(e!=null&&e.hideClientSecretInput)||!e)&&A.createElement(Ye.NI,null,A.createElement(Ye.lX,null,"Client Secret:"),A.createElement(In,{type:"password",fullWidth:!0,field:`auth.${i}.client_secret`,initialValue:(0,dt.YQ)(`auth.${i}.client_secret`)||(E==null?void 0:E.client_secret),validateOnBlur:!0,validateOnChange:!0,panel:"try-it","data-cy":"client-secret-input"})),e&&!e.disableManualConfiguration&&A.createElement(Vm,null,A.createElement(Vh,{id:"pkce-opitons-toggle",label:"Configure PKCE manually",checked:be,onChange:Yt,"data-cy":"pkce-options-toggle"}),be&&A.createElement(jm,null,A.createElement(Ye.NI,null,A.createElement(Ye.lX,null,"Code Verifier"),A.createElement(Vl,{fullWidth:!0,value:ue,onChange:Ht,panel:"try-it","data-cy":"code-verifier-input"})),A.createElement(Ye.NI,null,A.createElement(Ye.lX,null,"Code Challenge"),A.createElement(Vl,{fullWidth:!0,value:Te,onChange:({target:{value:Vt}})=>{Me(Vt)},inputActionButton:Er,panel:"try-it","data-cy":"code-challenge-input"}))))),A.createElement(In,{fullWidth:!0,field:`auth.${i}.token`,type:"hidden",initialValue:_e,panel:"try-it"}),A.createElement(jh,{id:i,scopes:g}),at.token&&at.token.access_token?A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Access Token: "),A.createElement(Vl,{disabled:!0,type:"password",fullWidth:!0,value:at.token.access_token,panel:"try-it"})):null),A.createElement(Bm,null,at.token&&at.token.access_token?A.createElement(Jt.Button,{fullWidth:!0,onClick:Tr},"Log out"):ge?A.createElement(A.Fragment,null,A.createElement(Jt.Button,{fullWidth:!0,onClick:nr},"Cancel"),A.createElement(Rh,null)):A.createElement(Jt.Button,{fullWidth:!0,color:"secondary",disabled:!(0,Fn.Qr)(fr),onClick:()=>{cr(b)}},"Authorize")),ge||ce||!at.token||!at.token.access_token&&A.createElement(ty,{loading:ge,error:ce,token:at.token}))};var uy=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});function fy(e){var r,i;const{scheme:a,defaultValues:o}=e,[f,d]=(0,A.useState)({}),[v,h]=(0,A.useState)(),[g,b]=(0,A.useState)(!1);(0,A.useEffect)(()=>{E(a.openIdConnectUrl)},[a.openIdConnectUrl]);const E=j=>uy(this,null,function*(){b(!0),h("");try{const I=yield Nm(j);d(I)}catch(I){h(I.message)}b(!1)});return g?A.createElement(cy,null):v?A.createElement(Uh,{message:v}):A.createElement("div",null,A.createElement("div",null,(r=f==null?void 0:f.response_types_supported)!=null&&r.includes("token")?A.createElement(A.Fragment,null,A.createElement(mn.S6,null,"OAuth2 Implicit Flow"),A.createElement(qf,{key:e.id,authorizationUrl:f.authorization_endpoint,authCorsProxyUrl:e.authCorsProxyUrl,scopes:f.scopes_supported,server:e.server,id:e.id,form:e.form,formApi:e.formApi,clientId:e.clientId,flow:"implicit",defaultValues:o})):(i=f==null?void 0:f.response_types_supported)!=null&&i.includes("code")?A.createElement(A.Fragment,null,A.createElement(mn.S6,null,"OAuth2 Authorization Flow"),A.createElement(qf,{key:e.id,authorizationUrl:f.authorization_endpoint,tokenUrl:f.token_endpoint,authCorsProxyUrl:e.authCorsProxyUrl,scopes:f.scopes_supported,server:e.server,id:e.id,form:e.form,formApi:e.formApi,clientId:e.clientId,tokenEndpointAuthMethod:f==null?void 0:f.token_endpoint_auth_methods_supported,flow:"authorizationCode",defaultValues:o})):A.createElement("div",null,"Unsupported flow")))}function cy(){return A.createElement("div",null,A.createElement("div",null,A.createElement("div",null,"Fetching OpenID Connect metadata..."),A.createElement(Rh,null)))}function Uh({message:e}){return A.createElement("div",null,A.createElement("div",null,A.createElement(Ye.Xq,null,e)))}var dy=Object.defineProperty,py=Object.defineProperties,hy=Object.getOwnPropertyDescriptors,_h=Object.getOwnPropertySymbols,vy=Object.prototype.hasOwnProperty,gy=Object.prototype.propertyIsEnumerable,zh=(e,r,i)=>r in e?dy(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Gh=(e,r)=>{for(var i in r||(r={}))vy.call(r,i)&&zh(e,i,r[i]);if(_h)for(var i of _h(r))gy.call(r,i)&&zh(e,i,r[i]);return e},$h=(e,r)=>py(e,hy(r)),my=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});function yy(e){if(!e)return"Token is required"}const by=({form:e,id:r,formApi:i,server:a,flow:o,authCorsProxyUrl:f,defaultValues:d,clientId:v})=>{var h,g,b,E;const[j,I]=(0,A.useState)(""),[W,Y]=(0,A.useState)(!1),[_,U]=(0,A.useState)(!0),G=((g=(h=e==null?void 0:e.values)==null?void 0:h.auth)==null?void 0:g[r])||{},ce=((E=(b=e.errors)==null?void 0:b.auth)==null?void 0:E[r])||{},Ce=()=>{i.setValue(`auth.${r}.token`,""),(0,dt.WW)(`auth.${r}.token`,"")},ge=()=>{U(Te=>!Te)},ke=()=>my(void 0,null,function*(){if(W)return;const Te=f&&o.tokenUrl?f+(0,xt.jg)(o.tokenUrl):o.tokenUrl;if(ce.client_id||ce.client_secret){console.log("Provide client_id and client_secret");return}const Me=G.client_id,Xe=G.client_secret;if(!Me||!Xe){console.log("Provide client_id and client_secret");return}Y(!0);const yt=o["x-tokenEndpointAuthMethod"];if(!(0,xt.xl)(yt)){console.log(`Unsupported token endpoint auth method: ${yt}`);return}yield ki.authorizeClientCredentials({tokenUrl:Te.startsWith("http")?Te:a+Te,clientId:Me,clientSecret:Xe,scopes:G.scopes,extraHeaders:(0,xt.Or)({authMethod:yt,clientId:Me,clientSecret:Xe}),successCallback:at=>{i.setValue(`auth.${r}.token`,at),Y(!1)},errorCallback:at=>{Ce(),I(at.message),Y(!1)}})}),be=Object.keys(o.scopes);let me=(0,dt.YQ)(`auth.${r}.token`)||JSON.stringify(d==null?void 0:d.token);me=me?JSON.parse(me):"";const ue=(0,dt.Al)(r,"client_id"),Oe={field:`auth.${r}.client_id`,fullWidth:!0,initialValue:(0,dt.YQ)(`auth.${r}.client_id`)||v||(d==null?void 0:d.client_id),initValue:(0,dt.YQ)(`auth.${r}.client_id`)||v||(d==null?void 0:d.client_id),placeholder:"Your OAuth2 app Client ID"};return A.createElement(A.Fragment,null,A.createElement(Ye.n5,null,A.createElement(Ye.NI,null,A.createElement(Ye.lX,null,"Client ID:"),ue?A.createElement(jl,$h(Gh({},Oe),{options:ue})):A.createElement(In,$h(Gh({},Oe),{type:"password",panel:"try-it"}))),A.createElement(Ye.NI,null,A.createElement(Ye.lX,null,"Client Secret:"),A.createElement(In,{type:"password",fullWidth:!0,field:`auth.${r}.client_secret`,initialValue:(0,dt.YQ)(`auth.${r}.client_secret`)||(d==null?void 0:d.client_secret),panel:"try-it"})),A.createElement(In,{fullWidth:!0,field:`auth.${r}.token`,type:"hidden",initialValue:me,validate:yy}),A.createElement(jh,{id:r,scopes:be})),A.createElement(Jt.Button,{color:"primary",onClick:ke,blinking:W},W?"Loading...":"Request Token"),A.createElement(Ye.ph,null," Access Token "),j?A.createElement(Ye.Xq,{style:{marginBottom:"1em"}},"Failed to request token: ",A.createElement("pre",null,j)," "):G.token&&G.token.access_token?A.createElement(Ye.TR,null,A.createElement(Ye.WA,{length:G.token.access_token.length,masked:_},G.token.access_token),A.createElement(Ye.lf,{onClick:ge},_?"Show":"Hide"," "),A.createElement(Ye.h,{onClick:Ce}," Clear ")):A.createElement(Ye.Xq,{style:{marginBottom:"1em"}},"No token"))};var xy=Object.defineProperty,Sy=Object.defineProperties,wy=Object.getOwnPropertyDescriptors,Kh=Object.getOwnPropertySymbols,Cy=Object.prototype.hasOwnProperty,Ay=Object.prototype.propertyIsEnumerable,Yh=(e,r,i)=>r in e?xy(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Ds=(e,r)=>{for(var i in r||(r={}))Cy.call(r,i)&&Yh(e,i,r[i]);if(Kh)for(var i of Kh(r))Ay.call(r,i)&&Yh(e,i,r[i]);return e},Bs=(e,r)=>Sy(e,wy(r));const Oy=({securityDefaults:e,operation:r,activeServer:i,authCorsProxyUrl:a,form:o,formApi:f})=>{var d,v;const[h,g]=(0,A.useState)(0),{parser:b}=(0,ui.useRecoilValue)(Hi.cS);(0,A.useEffect)(()=>{const U=r.security.map(Ce=>Ce.schemes.map(ge=>ge.id).join(" and ")),G=(0,dt.YQ)("securityRequirementName"),ce=U.findIndex(Ce=>Ce===G);g(ce<0?0:ce)},[r]);const E=U=>{g(U.idx),(0,dt.WW)("securityRequirementName",U.value)},j=r.security,W=j.map(U=>U.schemes.map(G=>G.id).join(" and ")).filter(Boolean).map((U,G)=>({value:U,idx:G}));if(W.length===0)return A.createElement(Uh,{message:"Cannot find security schema in the definition"});const Y=j[h],_=(0,dt.A8)(Y.schemes[0].id);return A.createElement(A.Fragment,null,A.createElement(Ye.n5,null,W.length>1&&A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Security scheme: "),A.createElement(mn.VD,{variant:"dark",fullWidth:!0,options:W,value:W[h].value,onChange:E}))||null,A.createElement(Jt.TryItSecurityApps,{apiId:(v=(d=b==null?void 0:b.definition.info)==null?void 0:d["x-metadata"])==null?void 0:v.apiId,value:f.getValue(`auth.${_}`),onChange:U=>{f.setValue(`auth.${_}`,U)}}),j[h].schemes.map(U=>{var G,ce,Ce,ge,ke,be,me;const ue=(0,dt.A8)(U.id);if(U.type==="apiKey"){const Oe=(0,dt.Al)(ue,""),Te={field:`auth.${ue}`,fullWidth:!0,initialValue:(0,xt.NG)(U)||(0,dt.YQ)(`auth.${ue}`)||(e==null?void 0:e[ue]),initValue:(0,xt.NG)(U)||(0,dt.YQ)(`auth.${ue}`)||(e==null?void 0:e[ue]),validate:xt.np,validateOnBlur:!0,validateOnChange:!0};return A.createElement(Ye.NI,{key:ue},A.createElement(Ye.lX,null," ",U.name,": "),Oe?A.createElement(jl,Bs(Ds({},Te),{options:Oe})):A.createElement(In,Bs(Ds({},Te),{type:"password",panel:"try-it","data-cy":"apiKey-auth-password"})))}else if(U.type==="http"){if(U.scheme==="basic"){const Oe=(0,dt.Al)(ue,"username"),Te={field:`auth.${ue}.username`,fullWidth:!0,initialValue:(0,dt.YQ)(`auth.${ue}.username`)||((G=e==null?void 0:e[ue])==null?void 0:G.username),initValue:(0,dt.YQ)(`auth.${ue}.username`)||((ce=e==null?void 0:e[ue])==null?void 0:ce.username),validate:xt.np,validateOnBlur:!0,validateOnChange:!0};return A.createElement(A.Fragment,{key:ue},A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," ",(0,Bl.l)("tryItAuthBasicUsername"),": "),Oe?A.createElement(jl,Bs(Ds({},Te),{options:Oe})):A.createElement(In,Bs(Ds({},Te),{panel:"try-it"}))),A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," ",(0,Bl.l)("tryItAuthBasicPassword"),": "),A.createElement(In,{type:"password","data-cy":"http-auth-password",fullWidth:!0,field:`auth.${ue}.password`,initialValue:(0,dt.YQ)(`auth.${ue}.password`)||((Ce=e==null?void 0:e[ue])==null?void 0:Ce.password)||"",validateOnBlur:!0,validateOnChange:!0,panel:"try-it"})))}else if(U.scheme==="bearer"){const Oe=(0,dt.Al)(ue,""),Te={field:`auth.${ue}`,fullWidth:!0,initialValue:(0,dt.YQ)(`auth.${ue}`)||(e==null?void 0:e[ue]),initValue:(0,dt.YQ)(`auth.${ue}`)||(e==null?void 0:e[ue]),validate:xt.np,validateOnBlur:!0,validateOnChange:!0};return A.createElement(A.Fragment,{key:ue},A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Bearer Token: "),Oe?A.createElement(jl,Bs(Ds({},Te),{options:Oe})):A.createElement(In,Bs(Ds({},Te),{type:"password",placeholder:"(without 'Bearer')",panel:"try-it"}))))}}else{if(U.type==="oauth2"&&U.flows&&U.flows.clientCredentials)return A.createElement(by,{key:ue,flow:U.flows.clientCredentials,server:i,authCorsProxyUrl:a,id:ue,form:o,formApi:f,clientId:U.flows.clientCredentials["x-defaultClientId"]||U["x-defaultClientId"],defaultValues:e==null?void 0:e[ue]});if(U.type==="oauth2"&&U.flows&&U.flows.implicit)return A.createElement(qf,{key:ue,authorizationUrl:U.flows.implicit.authorizationUrl,authCorsProxyUrl:a,scopes:Object.keys(((ke=(ge=U==null?void 0:U.flows)==null?void 0:ge.implicit)==null?void 0:ke.scopes)||{}),server:i,id:ue,form:o,formApi:f,clientId:U.flows.implicit["x-defaultClientId"]||U["x-defaultClientId"],flow:"implicit",defaultValues:e==null?void 0:e[ue]});if(U.type==="oauth2"&&U.flows&&U.flows.authorizationCode)return A.createElement(qf,{key:ue,authorizationUrl:U.flows.authorizationCode.authorizationUrl,tokenUrl:U.flows.authorizationCode.tokenUrl,authCorsProxyUrl:a,scopes:Object.keys(((be=U.flows.authorizationCode)==null?void 0:be.scopes)||{}),server:i,id:ue,form:o,formApi:f,clientId:U.flows.authorizationCode["x-defaultClientId"]||U["x-defaultClientId"],flow:"authorizationCode",tokenEndpointAuthMethod:U.flows.authorizationCode["x-tokenEndpointAuthMethod"],usePkce:U.flows.authorizationCode["x-usePkce"],defaultValues:e==null?void 0:e[ue]});if(U.type==="oauth2"){let Oe=(0,dt.YQ)(`auth.${ue}.token`)||JSON.stringify((me=e==null?void 0:e[ue])==null?void 0:me.token);return Oe=Oe?JSON.parse(Oe):{},A.createElement(A.Fragment,{key:ue},A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Access Token Type: "),A.createElement(In,{fullWidth:!0,field:`auth.${ue}.token.token_type`,initialValue:Oe.token_type||"Bearer",panel:"try-it"})),A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Access Token: "),A.createElement(In,{type:"password",fullWidth:!0,field:`auth.${ue}.token.access_token`,validate:xt.np,initialValue:Oe.access_token,validateOnBlur:!0,validateOnChange:!0,panel:"try-it"})))}else if(U.type==="openIdConnect")return A.createElement(fy,{key:ue,server:i,authCorsProxyUrl:a,id:ue,form:o,formApi:f,scheme:U,clientId:U["x-defaultClientId"],defaultValues:e==null?void 0:e[ue]})}})),A.createElement("small",null,A.createElement("strong",null,"Note"),": Your credentials will be saved until the end of the browser session"))};var Ey=c(55919),Ty=Object.defineProperty,Xh=Object.getOwnPropertySymbols,ky=Object.prototype.hasOwnProperty,Py=Object.prototype.propertyIsEnumerable,Jh=(e,r,i)=>r in e?Ty(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Fy=(e,r)=>{for(var i in r||(r={}))ky.call(r,i)&&Jh(e,i,r[i]);if(Xh)for(var i of Xh(r))Py.call(r,i)&&Jh(e,i,r[i]);return e};function Iy({operation:e,properties:r,securityDefaults:i,form:a,resolvedRawSpec:o,server:f,formApi:d,setFormApi:v,handleChange:h,handleServerChange:g}){const b=a.errors||{},E=b.path||b.cookie||b.header||b.query,{hooks:j,authCorsProxyUrl:I}=(0,ui.useRecoilValue)(Hi.lk),W=o&&dt.IB.get(o,e.pointer);let Y=a.values&&a.values.auth&&Object.keys(a.values.auth)[0];(!Y||!a.values.auth[Y])&&(Y=void 0),Y&&(a.values.auth[Y].token!==void 0||a.values.auth[Y].client_id!==void 0||a.values.auth[Y].client_secret!==void 0)&&(!a.values.auth[Y].token||!a.values.auth[Y].token.access_token)&&(Y=void 0),Y&&a.values.auth[Y].username!=null&&(!a.values.auth[Y].username||!a.values.auth[Y].password)&&(Y=void 0);const _=e.parameters||[];return!o&&A.createElement(A.Fragment,null,"Loading...")||A.createElement($t,{onChange:h,getApi:v,style:{flex:1,display:"flex",flexDirection:"column",margin:0}},A.createElement(Nv,{operation:e,onChange:g}),A.createElement(ca.UQ,{initialActiveIdx:e.security.length&&Y?1:0},e.security.length&&d&&A.createElement(ud,{header:(0,Bl.l)("tryItAuth"),"data-cy":"security-trigger",error:!Y&&!!b.auth,success:!!Y,renderChildrenHidden:!0},Jt.OpenApiTryItSecurityPanel||j!=null&&j.ReplaceTryItSecurityPanel?A.createElement(Ly,{field:"auth",validate:xt.np},U=>A.createElement(Ey.Q,{Hook:Jt.OpenApiTryItSecurityPanel||(j==null?void 0:j.ReplaceTryItSecurityPanel),props:{server:f,operation:e,onChange:U,OAuth2:ki}})):A.createElement(Oy,{formApi:d,form:a,operation:e,activeServer:f.url,authCorsProxyUrl:I,securityDefaults:i}))||null,e.requestBody&&d&&A.createElement(ud,{header:(0,Bl.l)("tryItBody"),"data-cy":"body-trigger",error:!!b.body,renderChildrenHidden:!0},A.createElement(Sm,{validate:My,formApi:d,body:e.requestBody,pointer:e.pointer,id:e.id,resolvedBody:W==null?void 0:W.requestBody,properties:r}))||null,_.length&&A.createElement(ud,{header:(0,Bl.l)("tryItParameters"),"data-cy":"parameters-trigger",error:E,renderChildrenHidden:!0},A.createElement(Lm,{operation:e,values:a.values,errors:a.errors||{}}))||null))}function Ly(e){const{fieldApi:r,render:i,userProps:a}=to(Fy({},e)),{setValue:o}=r,{children:f}=a;return i(A.createElement(A.Fragment,null,f(o)))}function My(){}const Ny=(0,A.memo)(Iy);function Ry({shaking:e,className:r,children:i,rootElement:a}){const[o]=(0,Fd.Bs)(a),f=(0,ui.useRecoilValue)(Hi.lk);return A.createElement(mn.q2,{scrollYOffset:f.scrollYOffset,shaking:e,className:r,"data-cy":"console",fullWidth:o==null?void 0:o.width},i)}const Dy=(0,A.memo)(Ry);var By=Object.defineProperty,Vy=Object.defineProperties,jy=Object.getOwnPropertyDescriptors,ec=Object.getOwnPropertySymbols,Qh=Object.prototype.hasOwnProperty,Zh=Object.prototype.propertyIsEnumerable,qh=(e,r,i)=>r in e?By(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Lr=(e,r)=>{for(var i in r||(r={}))Qh.call(r,i)&&qh(e,i,r[i]);if(ec)for(var i of ec(r))Zh.call(r,i)&&qh(e,i,r[i]);return e},wn=(e,r)=>Vy(e,jy(r)),ev=(e,r)=>{var i={};for(var a in e)Qh.call(e,a)&&r.indexOf(a)<0&&(i[a]=e[a]);if(e!=null&&ec)for(var a of ec(e))r.indexOf(a)<0&&Zh.call(e,a)&&(i[a]=e[a]);return i},tv=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});function rv(e){return e.startsWith("//")?"https:"+e:e}function Wy({operation:e,onResponse:r,className:i,rootElement:a,properties:o,securityDefaults:f,onClose:d}){let v=(0,A.useRef)();const[h,g]=(0,ui.useRecoilState)((0,cd.N)(e.pointer)),[b,E]=(0,A.useState)(h.activeServer||e.activeServer),[j,I]=(0,A.useState)(0),[W,Y]=(0,A.useState)(!1),[_,U]=(0,A.useState)(!1),[G,ce]=(0,A.useState)({values:{path:(0,xt.ZS)(e.parameters,"path"),cookie:(0,xt.ZS)(e.parameters,"cookie"),header:(0,xt.ZS)(e.parameters,"header"),query:(0,xt.ZS)(e.parameters,"query")}}),[Ce,ge]=(0,A.useState)(),[ke,be]=(0,A.useState)(),[me,ue]=(0,A.useState)(),[Oe,Te]=(0,A.useState)(),Me=(0,Fd.D9)(e),{parser:Xe,options:yt}=(0,ui.useRecoilValue)(Hi.cS),at=(0,A.useCallback)((kt,Yt=kt.getState())=>{var Ht=Yt,{values:_e}=Ht,qe=ev(Ht,["values"]);v.current=kt,setTimeout(()=>{ce(wn(Lr({},qe),{values:wn(Lr({},_e),{query:(0,xt.FU)(_e.query||{})})}))},0)},[]),fr=(0,A.useCallback)(kt=>{var Yt=kt,{values:Ht}=Yt,_e=ev(Yt,["values"]);const qe=wn(Lr({},_e),{values:wn(Lr({},Ht),{query:(0,xt.FU)(Ht.query||{})})});g(Tt=>wn(Lr({},Tt),{requestValues:JSON.parse(JSON.stringify(Ht))})),ce(qe),(0,xt.Hc)(qe)},[g]),Er=(0,A.useCallback)(kt=>{I(kt)},[]),cr=(0,A.useCallback)(kt=>{E(kt),g(Yt=>wn(Lr({},Yt),{activeServer:kt}))},[g]),Tr=(0,A.useCallback)(()=>tv(this,null,function*(){var kt,Yt,Ht,_e,qe,Tt,Vt,Ot,pn,Ki,qn,Kr,uo,No,Nn,Aa,tc;const{values:Fi,invalid:Vs}=((kt=v==null?void 0:v.current)==null?void 0:kt.getState())||G||{};if((Yt=v.current)==null||Yt.submitForm(),Vs){U(!0),setTimeout(()=>U(!1),1e3),(_e=(Ht=yt.events)==null?void 0:Ht.tryItSent)==null||_e.call(Ht,{eventType:Sr.nQ.TryItSent,resource:"Redocly_OperationTryIt",action:"ValidationFailed",operationId:e.operationId,operationPath:e.path,operationHttpVerb:e.httpVerb,operationSummary:e.description});return}const{servers:Yi,requestBody:Oa}=e,Ld=Oa&&Oa.content&&((qe=(0,$n.getActiveMediaType)(Oa.content))==null?void 0:qe.name)||"";let Xi=Fi.body;if(/json/.test(Ld))try{Xi=JSON.parse(Xi)}catch(Mt){console.error(Mt)}Y(!0);const Yr=Ce,js=(e.httpVerb||"").toLowerCase();if(!Yi)throw console.error("Servers are not specified in your OpenAPI file. You can't use Try It Out console without specifying servers. If you use OpenAPI 2, make sure you configured host and basepath"),new Error("Servers are not specified");const Jl=Yi.find(Mt=>b.url.endsWith(Mt.url.endsWith("/")?Mt.url.substring(0,Mt.url.length-1):Mt.url)),Md=Date.now();let ei,Ea=Fi.auth;if(Fi.auth){const Mt=Object.keys(Fi.auth)[0],ti=(0,zc.dw)(Mt);ei=wn(Lr({},Yr),{components:wn(Lr({},Yr==null?void 0:Yr.components),{securitySchemes:wn(Lr({},(Tt=Yr==null?void 0:Yr.components)==null?void 0:Tt.securitySchemes),{[ti]:wn(Lr({},(Ot=(Vt=Yr==null?void 0:Yr.components)==null?void 0:Vt.securitySchemes)==null?void 0:Ot[ti]),{type:((qn=(Ki=(pn=Yr==null?void 0:Yr.components)==null?void 0:pn.securitySchemes)==null?void 0:Ki[ti])==null?void 0:qn.type)==="openIdConnect"?"oauth2":((uo=(Kr=Yr==null?void 0:Yr.components)==null?void 0:Kr.securitySchemes)==null?void 0:uo[ti]).type})})})}),Ea=wn(Lr({},Ea),{[ti]:Ea[Mt]})}else ei=Lr({},Yr);ei.servers=Yi;const Ro=yt.corsProxyUrl;Ro&&Yi.length&&(ei.servers=Yi.map(Mt=>wn(Lr({},Mt),{url:Ro+rv(Mt.url)})),ei.paths=wn(Lr({},ei.paths),{[e.path]:wn(Lr({},ei.paths[e.path]),{[js]:wn(Lr({},ei.paths[e.path][js]),{servers:void 0}),servers:void 0})}));const Ql=(Oa==null?void 0:Oa.content)&&((No=(0,$n.getActiveMediaType)(Oa.content))==null?void 0:No.name)||null;if(Ql&&Xi&&pa(Ql)){const Mt=Object.values(Xi);Xi=Mt.length>1?Mt:Mt[0]}const Zl={server:Ro?Ro+rv(Jl.url):Jl.url,serverVariables:(0,xt.mj)(Jl),spec:ei,pathName:e.path,method:e.httpVerb,parameters:Lr(Lr(Lr(Lr({},Fi.path),Fi.query),Fi.header),Fi.cookie),securities:{authorized:Ea},requestBody:Xi,requestContentType:Ql,responseContentType:((Nn=Fi.header)==null?void 0:Nn.Accept)||null,requestInterceptor:(0,xt.Tz)(yt,e,Ea==null?void 0:Ea.Authorization)};try{const Mt=yield Wc(Zl),ti=Mt==null?void 0:Mt.data;ti instanceof Blob&&(pa(ti.type)&&(Mt.fileInfo={rawData:ti,fileName:(0,xt.AM)(Mt.headers)}),Mt.data=yield ti.text()),r==null||r({request:Zl,response:Mt}),Te(Mt),ue(void 0)}catch(Mt){Mt&&Mt.response&&Mt.response.data instanceof Blob&&(Mt.response.data=yield Mt.response.data.text(),r==null||r({request:Zl,response:Mt.response})),Te(void 0),ue(Mt)}finally{Y(!1),I(1),be(Date.now()-Md),(tc=(Aa=yt.events)==null?void 0:Aa.tryItSent)==null||tc.call(Aa,{eventType:Sr.nQ.TryItSent,resource:"Redocly_OperationTryIt",action:"Sent",operationId:e.operationId,operationPath:e.path,operationHttpVerb:e.httpVerb,operationSummary:e.description})}}),[b.url,G,r,e,yt,Ce]);(0,Jt.useMount)(()=>tv(this,null,function*(){var kt;const Yt=yield _c(e,Xe.definition);ge(Yt),(kt=v.current)==null||kt.setValues({})})),(0,A.useEffect)(()=>{Me&&Me!==e&&(Te(void 0),ue(void 0),I(0))},[e,Me]);const nr=!!(Oe||me);return A.createElement(Dy,{shaking:_,className:i,rootElement:a},A.createElement(ca.Hc,null,A.createElement(Ao,{active:j,hasResponse:nr,onChange:Er}),d&&A.createElement(mn.PZ,{onClick:d}," \u2715 ")),A.createElement(mn.RE,{hidden:j!==0,"data-cy":"console-request-body"},A.createElement(Ny,{operation:e,properties:o,securityDefaults:f,form:G,resolvedRawSpec:Ce,server:b,formApi:v.current,setFormApi:at,handleChange:fr,handleServerChange:cr})),A.createElement(mn.RE,{hidden:j!==1,"data-cy":"console-response-body"},A.createElement(af,{response:Oe,error:me,time:ke})),A.createElement(lf,{hasResponse:nr,params:G.values,operation:e,loading:W,execute:Tr}))}const Hy=(0,A.memo)(Wy)},85208:(S,N,c)=>{var m=c(34440),O=c(84108),k=c(61085),L=c(77706),R=c(8636);function V(X){var te=-1,re=X==null?0:X.length;for(this.clear();++te<re;){var he=X[te];this.set(he[0],he[1])}}V.prototype.clear=m,V.prototype.delete=O,V.prototype.get=k,V.prototype.has=L,V.prototype.set=R,S.exports=V},81998:(S,N,c)=>{var m=c(90266),O=c(42875),k=c(45828),L=c(24115),R=c(67690);function V(X){var te=-1,re=X==null?0:X.length;for(this.clear();++te<re;){var he=X[te];this.set(he[0],he[1])}}V.prototype.clear=m,V.prototype.delete=O,V.prototype.get=k,V.prototype.has=L,V.prototype.set=R,S.exports=V},72887:(S,N,c)=>{var m=c(65234),O=c(84100),k=m(O,"Map");S.exports=k},95678:(S,N,c)=>{var m=c(39016),O=c(62363),k=c(64348),L=c(53062),R=c(30262);function V(X){var te=-1,re=X==null?0:X.length;for(this.clear();++te<re;){var he=X[te];this.set(he[0],he[1])}}V.prototype.clear=m,V.prototype.delete=O,V.prototype.get=k,V.prototype.has=L,V.prototype.set=R,S.exports=V},70861:(S,N,c)=>{var m=c(84100),O=m.Symbol;S.exports=O},29233:S=>{function N(c,m){for(var O=-1,k=c==null?0:c.length,L=Array(k);++O<k;)L[O]=m(c[O],O,c);return L}S.exports=N},18498:(S,N,c)=>{var m=c(58260);function O(k,L){for(var R=k.length;R--;)if(m(k[R][0],L))return R;return-1}S.exports=O},40548:(S,N,c)=>{var m=c(24007),O=c(86040);function k(L,R){R=m(R,L);for(var V=0,X=R.length;L!=null&&V<X;)L=L[O(R[V++])];return V&&V==X?L:void 0}S.exports=k},69823:(S,N,c)=>{var m=c(70861),O=c(91339),k=c(25151),L="[object Null]",R="[object Undefined]",V=m?m.toStringTag:void 0;function X(te){return te==null?te===void 0?R:L:V&&V in Object(te)?O(te):k(te)}S.exports=X},99817:(S,N,c)=>{var m=c(45563),O=c(28597),k=c(93702),L=c(55784),R=/[\\^$.*+?()[\]{}|]/g,V=/^\[object .+?Constructor\]$/,X=Function.prototype,te=Object.prototype,re=X.toString,he=te.hasOwnProperty,oe=RegExp("^"+re.call(he).replace(R,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fe(J){if(!k(J)||O(J))return!1;var F=m(J)?oe:V;return F.test(L(J))}S.exports=fe},86245:(S,N,c)=>{var m=c(70861),O=c(29233),k=c(55589),L=c(52624),R=1/0,V=m?m.prototype:void 0,X=V?V.toString:void 0;function te(re){if(typeof re=="string")return re;if(k(re))return O(re,te)+"";if(L(re))return X?X.call(re):"";var he=re+"";return he=="0"&&1/re==-R?"-0":he}S.exports=te},24007:(S,N,c)=>{var m=c(55589),O=c(5130),k=c(44041),L=c(99835);function R(V,X){return m(V)?V:O(V,X)?[V]:k(L(V))}S.exports=R},1622:(S,N,c)=>{var m=c(84100),O=m["__core-js_shared__"];S.exports=O},20302:(S,N,c)=>{var m=typeof c.g=="object"&&c.g&&c.g.Object===Object&&c.g;S.exports=m},77570:(S,N,c)=>{var m=c(58949);function O(k,L){var R=k.__data__;return m(L)?R[typeof L=="string"?"string":"hash"]:R.map}S.exports=O},65234:(S,N,c)=>{var m=c(99817),O=c(67736);function k(L,R){var V=O(L,R);return m(V)?V:void 0}S.exports=k},91339:(S,N,c)=>{var m=c(70861),O=Object.prototype,k=O.hasOwnProperty,L=O.toString,R=m?m.toStringTag:void 0;function V(X){var te=k.call(X,R),re=X[R];try{X[R]=void 0;var he=!0}catch(fe){}var oe=L.call(X);return he&&(te?X[R]=re:delete X[R]),oe}S.exports=V},67736:S=>{function N(c,m){return c==null?void 0:c[m]}S.exports=N},34440:(S,N,c)=>{var m=c(24545);function O(){this.__data__=m?m(null):{},this.size=0}S.exports=O},84108:S=>{function N(c){var m=this.has(c)&&delete this.__data__[c];return this.size-=m?1:0,m}S.exports=N},61085:(S,N,c)=>{var m=c(24545),O="__lodash_hash_undefined__",k=Object.prototype,L=k.hasOwnProperty;function R(V){var X=this.__data__;if(m){var te=X[V];return te===O?void 0:te}return L.call(X,V)?X[V]:void 0}S.exports=R},77706:(S,N,c)=>{var m=c(24545),O=Object.prototype,k=O.hasOwnProperty;function L(R){var V=this.__data__;return m?V[R]!==void 0:k.call(V,R)}S.exports=L},8636:(S,N,c)=>{var m=c(24545),O="__lodash_hash_undefined__";function k(L,R){var V=this.__data__;return this.size+=this.has(L)?0:1,V[L]=m&&R===void 0?O:R,this}S.exports=k},5130:(S,N,c)=>{var m=c(55589),O=c(52624),k=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,L=/^\w*$/;function R(V,X){if(m(V))return!1;var te=typeof V;return te=="number"||te=="symbol"||te=="boolean"||V==null||O(V)?!0:L.test(V)||!k.test(V)||X!=null&&V in Object(X)}S.exports=R},58949:S=>{function N(c){var m=typeof c;return m=="string"||m=="number"||m=="symbol"||m=="boolean"?c!=="__proto__":c===null}S.exports=N},28597:(S,N,c)=>{var m=c(1622),O=function(){var L=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||"");return L?"Symbol(src)_1."+L:""}();function k(L){return!!O&&O in L}S.exports=k},90266:S=>{function N(){this.__data__=[],this.size=0}S.exports=N},42875:(S,N,c)=>{var m=c(18498),O=Array.prototype,k=O.splice;function L(R){var V=this.__data__,X=m(V,R);if(X<0)return!1;var te=V.length-1;return X==te?V.pop():k.call(V,X,1),--this.size,!0}S.exports=L},45828:(S,N,c)=>{var m=c(18498);function O(k){var L=this.__data__,R=m(L,k);return R<0?void 0:L[R][1]}S.exports=O},24115:(S,N,c)=>{var m=c(18498);function O(k){return m(this.__data__,k)>-1}S.exports=O},67690:(S,N,c)=>{var m=c(18498);function O(k,L){var R=this.__data__,V=m(R,k);return V<0?(++this.size,R.push([k,L])):R[V][1]=L,this}S.exports=O},39016:(S,N,c)=>{var m=c(85208),O=c(81998),k=c(72887);function L(){this.size=0,this.__data__={hash:new m,map:new(k||O),string:new m}}S.exports=L},62363:(S,N,c)=>{var m=c(77570);function O(k){var L=m(this,k).delete(k);return this.size-=L?1:0,L}S.exports=O},64348:(S,N,c)=>{var m=c(77570);function O(k){return m(this,k).get(k)}S.exports=O},53062:(S,N,c)=>{var m=c(77570);function O(k){return m(this,k).has(k)}S.exports=O},30262:(S,N,c)=>{var m=c(77570);function O(k,L){var R=m(this,k),V=R.size;return R.set(k,L),this.size+=R.size==V?0:1,this}S.exports=O},32924:(S,N,c)=>{var m=c(67997),O=500;function k(L){var R=m(L,function(X){return V.size===O&&V.clear(),X}),V=R.cache;return R}S.exports=k},24545:(S,N,c)=>{var m=c(65234),O=m(Object,"create");S.exports=O},25151:S=>{var N=Object.prototype,c=N.toString;function m(O){return c.call(O)}S.exports=m},84100:(S,N,c)=>{var m=c(20302),O=typeof self=="object"&&self&&self.Object===Object&&self,k=m||O||Function("return this")();S.exports=k},44041:(S,N,c)=>{var m=c(32924),O=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,k=/\\(\\)?/g,L=m(function(R){var V=[];return R.charCodeAt(0)===46&&V.push(""),R.replace(O,function(X,te,re,he){V.push(re?he.replace(k,"$1"):te||X)}),V});S.exports=L},86040:(S,N,c)=>{var m=c(52624),O=1/0;function k(L){if(typeof L=="string"||m(L))return L;var R=L+"";return R=="0"&&1/L==-O?"-0":R}S.exports=k},55784:S=>{var N=Function.prototype,c=N.toString;function m(O){if(O!=null){try{return c.call(O)}catch(k){}try{return O+""}catch(k){}}return""}S.exports=m},58260:S=>{function N(c,m){return c===m||c!==c&&m!==m}S.exports=N},13546:(S,N,c)=>{var m=c(40548);function O(k,L,R){var V=k==null?void 0:m(k,L);return V===void 0?R:V}S.exports=O},55589:S=>{var N=Array.isArray;S.exports=N},45563:(S,N,c)=>{var m=c(69823),O=c(93702),k="[object AsyncFunction]",L="[object Function]",R="[object GeneratorFunction]",V="[object Proxy]";function X(te){if(!O(te))return!1;var re=m(te);return re==L||re==R||re==k||re==V}S.exports=X},93702:S=>{function N(c){var m=typeof c;return c!=null&&(m=="object"||m=="function")}S.exports=N},50440:S=>{function N(c){return c!=null&&typeof c=="object"}S.exports=N},52624:(S,N,c)=>{var m=c(69823),O=c(50440),k="[object Symbol]";function L(R){return typeof R=="symbol"||O(R)&&m(R)==k}S.exports=L},67997:(S,N,c)=>{var m=c(95678),O="Expected a function";function k(L,R){if(typeof L!="function"||R!=null&&typeof R!="function")throw new TypeError(O);var V=function(){var X=arguments,te=R?R.apply(this,X):X[0],re=V.cache;if(re.has(te))return re.get(te);var he=L.apply(this,X);return V.cache=re.set(te,he)||re,he};return V.cache=new(k.Cache||m),V}k.Cache=m,S.exports=k},99835:(S,N,c)=>{var m=c(86245);function O(k){return k==null?"":m(k)}S.exports=O},14927:(S,N,c)=>{var m=typeof Map=="function"&&Map.prototype,O=Object.getOwnPropertyDescriptor&&m?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,k=m&&O&&typeof O.get=="function"?O.get:null,L=m&&Map.prototype.forEach,R=typeof Set=="function"&&Set.prototype,V=Object.getOwnPropertyDescriptor&&R?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,X=R&&V&&typeof V.get=="function"?V.get:null,te=R&&Set.prototype.forEach,re=typeof WeakMap=="function"&&WeakMap.prototype,he=re?WeakMap.prototype.has:null,oe=typeof WeakSet=="function"&&WeakSet.prototype,fe=oe?WeakSet.prototype.has:null,J=typeof WeakRef=="function"&&WeakRef.prototype,F=J?WeakRef.prototype.deref:null,ee=Boolean.prototype.valueOf,D=Object.prototype.toString,w=Function.prototype.toString,M=String.prototype.match,B=String.prototype.slice,Z=String.prototype.replace,ae=String.prototype.toUpperCase,H=String.prototype.toLowerCase,le=RegExp.prototype.test,z=Array.prototype.concat,q=Array.prototype.join,pe=Array.prototype.slice,xe=Math.floor,Q=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ye=Object.getOwnPropertySymbols,ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,je=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ze=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===je||"symbol")?Symbol.toStringTag:null,Ue=Object.prototype.propertyIsEnumerable,vt=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(se){return se.__proto__}:null);function pt(se,we){if(se===1/0||se===-1/0||se!==se||se&&se>-1e3&&se<1e3||le.call(/e/,we))return we;var Ve=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof se=="number"){var nt=se<0?-xe(-se):xe(se);if(nt!==se){var ht=String(nt),ct=B.call(we,ht.length+1);return Z.call(ht,Ve,"$&_")+"."+Z.call(Z.call(ct,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Z.call(we,Ve,"$&_")}var ut=c(65710),er=ut.custom,gt=tr(er)?er:null;S.exports=function se(we,Ve,nt,ht){var ct=Ve||{};if(et(ct,"quoteStyle")&&ct.quoteStyle!=="single"&&ct.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(et(ct,"maxStringLength")&&(typeof ct.maxStringLength=="number"?ct.maxStringLength<0&&ct.maxStringLength!==1/0:ct.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Qt=et(ct,"customInspect")?ct.customInspect:!0;if(typeof Qt!="boolean"&&Qt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(et(ct,"indent")&&ct.indent!==null&&ct.indent!==" "&&!(parseInt(ct.indent,10)===ct.indent&&ct.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(et(ct,"numericSeparator")&&typeof ct.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Gr=ct.numericSeparator;if(typeof we=="undefined")return"undefined";if(we===null)return"null";if(typeof we=="boolean")return we?"true":"false";if(typeof we=="string")return jn(we,ct);if(typeof we=="number"){if(we===0)return 1/0/we>0?"0":"-0";var Ft=String(we);return Gr?pt(we,Ft):Ft}if(typeof we=="bigint"){var dr=String(we)+"n";return Gr?pt(we,dr):dr}var vi=typeof ct.depth=="undefined"?5:ct.depth;if(typeof nt=="undefined"&&(nt=0),nt>=vi&&vi>0&&typeof we=="object")return He(we)?"[Array]":"[Object]";var Nr=ft(ct,nt);if(typeof ht=="undefined")ht=[];else if(_r(ht,we)>=0)return"[Circular]";function Rr(Qr,pr,ai){if(pr&&(ht=pe.call(ht),ht.push(pr)),ai){var An={depth:ct.depth};return et(ct,"quoteStyle")&&(An.quoteStyle=ct.quoteStyle),se(Qr,An,nt+1,ht)}return se(Qr,ct,nt+1,ht)}if(typeof we=="function"&&!Be(we)){var gi=jt(we),$r=mt(we,Rr);return"[Function"+(gi?": "+gi:" (anonymous)")+"]"+($r.length>0?" { "+q.call($r,", ")+" }":"")}if(tr(we)){var ni=je?Z.call(String(we),/^(Symbol\(.*\))_[^)]*$/,"$1"):ie.call(we);return typeof we=="object"&&!je?Mr(ni):ni}if(ri(we)){for(var ii="<"+H.call(String(we.nodeName)),Dr=we.attributes||[],mi=0;mi<Dr.length;mi++)ii+=" "+Dr[mi].name+"="+Rt(st(Dr[mi].value),"double",ct);return ii+=">",we.childNodes&&we.childNodes.length&&(ii+="..."),ii+="</"+H.call(String(we.nodeName))+">",ii}if(He(we)){if(we.length===0)return"[]";var Wn=mt(we,Rr);return Nr&&!St(Wn)?"["+tt(Wn,Nr)+"]":"[ "+q.call(Wn,", ")+" ]"}if(lt(we)){var Ii=mt(we,Rr);return!("cause"in Error.prototype)&&"cause"in we&&!Ue.call(we,"cause")?"{ ["+String(we)+"] "+q.call(z.call("[cause]: "+Rr(we.cause),Ii),", ")+" }":Ii.length===0?"["+String(we)+"]":"{ ["+String(we)+"] "+q.call(Ii,", ")+" }"}if(typeof we=="object"&&Qt){if(gt&&typeof we[gt]=="function"&&ut)return ut(we,{depth:vi-nt});if(Qt!=="symbol"&&typeof we.inspect=="function")return we.inspect()}if(zt(we)){var Ta=[];return L&&L.call(we,function(Qr,pr){Ta.push(Rr(pr,we,!0)+" => "+Rr(Qr,we))}),Gt("Map",k.call(we),Ta,Nr)}if(nn(we)){var hn=[];return te&&te.call(we,function(Qr){hn.push(Rr(Qr,we))}),Gt("Set",X.call(we),hn,Nr)}if(Bn(we))return zr("WeakMap");if(Cn(we))return zr("WeakSet");if(Vn(we))return zr("WeakRef");if(rt(we))return Mr(Rr(Number(we)));if(or(we))return Mr(Rr(Q.call(we)));if(Pt(we))return Mr(ee.call(we));if(_t(we))return Mr(Rr(String(we)));if(!Re(we)&&!Be(we)){var Jr=mt(we,Rr),vn=vt?vt(we)===Object.prototype:we instanceof Object||we.constructor===Object,on=we instanceof Object?"":"null prototype",sn=!vn&&ze&&Object(we)===we&&ze in we?B.call(Et(we),8,-1):on?"Object":"",fo=vn||typeof we.constructor!="function"?"":we.constructor.name?we.constructor.name+" ":"",Hn=fo+(sn||on?"["+q.call(z.call([],sn||[],on||[]),": ")+"] ":"");return Jr.length===0?Hn+"{}":Nr?Hn+"{"+tt(Jr,Nr)+"}":Hn+"{ "+q.call(Jr,", ")+" }"}return String(we)};function Rt(se,we,Ve){var nt=(Ve.quoteStyle||we)==="double"?'"':"'";return nt+se+nt}function st(se){return Z.call(String(se),/"/g,"&quot;")}function He(se){return Et(se)==="[object Array]"&&(!ze||!(typeof se=="object"&&ze in se))}function Re(se){return Et(se)==="[object Date]"&&(!ze||!(typeof se=="object"&&ze in se))}function Be(se){return Et(se)==="[object RegExp]"&&(!ze||!(typeof se=="object"&&ze in se))}function lt(se){return Et(se)==="[object Error]"&&(!ze||!(typeof se=="object"&&ze in se))}function _t(se){return Et(se)==="[object String]"&&(!ze||!(typeof se=="object"&&ze in se))}function rt(se){return Et(se)==="[object Number]"&&(!ze||!(typeof se=="object"&&ze in se))}function Pt(se){return Et(se)==="[object Boolean]"&&(!ze||!(typeof se=="object"&&ze in se))}function tr(se){if(je)return se&&typeof se=="object"&&se instanceof Symbol;if(typeof se=="symbol")return!0;if(!se||typeof se!="object"||!ie)return!1;try{return ie.call(se),!0}catch(we){}return!1}function or(se){if(!se||typeof se!="object"||!Q)return!1;try{return Q.call(se),!0}catch(we){}return!1}var kr=Object.prototype.hasOwnProperty||function(se){return se in this};function et(se,we){return kr.call(se,we)}function Et(se){return D.call(se)}function jt(se){if(se.name)return se.name;var we=M.call(w.call(se),/^function\s*([\w$]+)/);return we?we[1]:null}function _r(se,we){if(se.indexOf)return se.indexOf(we);for(var Ve=0,nt=se.length;Ve<nt;Ve++)if(se[Ve]===we)return Ve;return-1}function zt(se){if(!k||!se||typeof se!="object")return!1;try{k.call(se);try{X.call(se)}catch(we){return!0}return se instanceof Map}catch(we){}return!1}function Bn(se){if(!he||!se||typeof se!="object")return!1;try{he.call(se,he);try{fe.call(se,fe)}catch(we){return!0}return se instanceof WeakMap}catch(we){}return!1}function Vn(se){if(!F||!se||typeof se!="object")return!1;try{return F.call(se),!0}catch(we){}return!1}function nn(se){if(!X||!se||typeof se!="object")return!1;try{X.call(se);try{k.call(se)}catch(we){return!0}return se instanceof Set}catch(we){}return!1}function Cn(se){if(!fe||!se||typeof se!="object")return!1;try{fe.call(se,fe);try{he.call(se,he)}catch(we){return!0}return se instanceof WeakSet}catch(we){}return!1}function ri(se){return!se||typeof se!="object"?!1:typeof HTMLElement!="undefined"&&se instanceof HTMLElement?!0:typeof se.nodeName=="string"&&typeof se.getAttribute=="function"}function jn(se,we){if(se.length>we.maxStringLength){var Ve=se.length-we.maxStringLength,nt="... "+Ve+" more character"+(Ve>1?"s":"");return jn(B.call(se,0,we.maxStringLength),we)+nt}var ht=Z.call(Z.call(se,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,an);return Rt(ht,"single",we)}function an(se){var we=se.charCodeAt(0),Ve={8:"b",9:"t",10:"n",12:"f",13:"r"}[we];return Ve?"\\"+Ve:"\\x"+(we<16?"0":"")+ae.call(we.toString(16))}function Mr(se){return"Object("+se+")"}function zr(se){return se+" { ? }"}function Gt(se,we,Ve,nt){var ht=nt?tt(Ve,nt):q.call(Ve,", ");return se+" ("+we+") {"+ht+"}"}function St(se){for(var we=0;we<se.length;we++)if(_r(se[we],`
495
+ `;function Vh(e){const{scopes:r,id:i}=e;let a=[];try{a=JSON.parse((0,dt.YQ)(`auth.${i}.scopes`))}catch{}return!r||!r.length?A.createElement(A.Fragment,null):A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Scopes: "),A.createElement(Jm,{field:`auth.${i}.scopes`,initialValue:a,items:r,showControls:!0,trimItemsLength:!0}))}const qm=({token:e,loading:r,error:i})=>r?A.createElement(Ye.GE,null,"Please, finish your authorization flow or cancel authorization."):i?A.createElement(Nm,null,A.createElement(Ye.Xq,null,i)):e?.access_token?null:A.createElement(Ye.GE,null," No Access Token. Please, Authorize. ");var ey=Object.defineProperty,ty=Object.defineProperties,ry=Object.getOwnPropertyDescriptors,jh=Object.getOwnPropertySymbols,ny=Object.prototype.hasOwnProperty,iy=Object.prototype.propertyIsEnumerable,Wh=(e,r,i)=>r in e?ey(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Zf=(e,r)=>{for(var i in r||(r={}))ny.call(r,i)&&Wh(e,i,r[i]);if(jh)for(var i of jh(r))iy.call(r,i)&&Wh(e,i,r[i]);return e},Id=(e,r)=>ty(e,ry(r)),ay=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});function oy(e){if(!e)return"Field is required"}const qf=({usePkce:e,form:r,id:i,formApi:a,flow:o,tokenUrl:f,authCorsProxyUrl:d,tokenEndpointAuthMethod:v,server:h,scopes:g,authorizationUrl:b,defaultValues:E,clientId:V})=>{var I,W,Y,_;const{oAuth2RedirectURI:U,routingBasePath:G}=(0,ui.useRecoilValue)(Hi.lk),[ce,Ce]=(0,A.useState)(null),[ge,ke]=(0,A.useState)(!1),[be,me]=(0,A.useState)(!1),[ue,Oe]=(0,A.useState)(void 0),[Te,Me]=(0,A.useState)(void 0),[Xe,yt]=(0,A.useState)(void 0),at=((W=(I=r.values)==null?void 0:I.auth)==null?void 0:W[i])||{},fr=((_=(Y=r.errors)==null?void 0:Y.auth)==null?void 0:_[i])||{},Er=ue!==void 0&&Te!==Xe?{label:"sync",onClick:()=>{ue&&Me(Xe)}}:void 0;(0,A.useEffect)(()=>{if(e){const Vt=(0,Fn.CY)(43);Xd(Vt).then(Ot=>{Oe(Vt),Me(Ot),yt(Ot)})}},[e]);const cr=Vt=>{if(!Vt||(a.validate(),!(0,Fn.Qr)(fr)))return;ke(!0),Ce(null);const Ot=d?d+(0,xt.jg)(Vt):Vt,pn=d&&f?d+(0,xt.jg)(f):f,Ki=a.getValue(`auth.${i}.scopes`),qn={authorizationUrl:Ot.startsWith("http")?Ot:h+Ot,clientId:at.client_id,scopes:Ki,redirectUri:U,routingBasePath:G,successCallback:Kr=>{a.setValue(`auth.${i}.token`,Kr),ke(!1),Ce(null)},errorCallback:Kr=>{ke(!1),Ce(Kr?.message||"Failed to retrieve the access token")}};if(o==="implicit"&&ki.authorizeImplicit(qn),!(0,xt.xl)(v)){console.log(`Unsupported token endpoint auth method: ${v}`);return}o==="authorizationCode"&&ki.authorizeAuthorizationCode(Zf(Id(Zf({},qn),{tokenUrl:pn?.startsWith("http")?pn:h+pn,clientSecret:at.client_secret,extraHeaders:(0,xt.Or)({authMethod:v,clientId:at.client_id,clientSecret:at.client_secret})}),e&&{codeVerifier:ue,codeChallenge:Te}))},Tr=()=>{kt(),Ce(null)},nr=()=>{ke(!1),Ce(null),ki.clearRedirectData(o)},kt=()=>{a.setValue(`auth.${i}.token`,"")},Yt=()=>{me(Vt=>!Vt)},Ht=Vt=>ay(void 0,[Vt],function*({target:{value:Ot}}){const pn=yield Xd(Ot);Oe(Ot),yt(pn)});if(!b)return A.createElement(Ye.Xq,null,"No flow info");let _e=(0,dt.YQ)(`auth.${i}.token`)||JSON.stringify(E?.token);_e=_e?JSON.parse(_e):"";const qe=(0,dt.Al)(i,"client_id"),Tt={field:`auth.${i}.client_id`,fullWidth:!0,initialValue:(0,dt.YQ)(`auth.${i}.client_id`)||V||E?.client_id,initValue:(0,dt.YQ)(`auth.${i}.client_id`)||V||E?.client_id,placeholder:"Your OAuth2 app Client ID",validate:oy,validateOnBlur:!0,validateOnChange:!0};return A.createElement("div",null,A.createElement(Ye.n5,null,A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Client ID: "),qe?A.createElement(jl,Id(Zf({},Tt),{options:qe})):A.createElement(In,Id(Zf({},Tt),{"data-cy":"client-id-input",panel:"try-it"}))),o==="authorizationCode"&&A.createElement(A.Fragment,null,(!e?.hideClientSecretInput||!e)&&A.createElement(Ye.NI,null,A.createElement(Ye.lX,null,"Client Secret:"),A.createElement(In,{type:"password",fullWidth:!0,field:`auth.${i}.client_secret`,initialValue:(0,dt.YQ)(`auth.${i}.client_secret`)||E?.client_secret,validateOnBlur:!0,validateOnChange:!0,panel:"try-it","data-cy":"client-secret-input"})),e&&!e.disableManualConfiguration&&A.createElement(Dm,null,A.createElement(Bh,{id:"pkce-opitons-toggle",label:"Configure PKCE manually",checked:be,onChange:Yt,"data-cy":"pkce-options-toggle"}),be&&A.createElement(Bm,null,A.createElement(Ye.NI,null,A.createElement(Ye.lX,null,"Code Verifier"),A.createElement(Vl,{fullWidth:!0,value:ue,onChange:Ht,panel:"try-it","data-cy":"code-verifier-input"})),A.createElement(Ye.NI,null,A.createElement(Ye.lX,null,"Code Challenge"),A.createElement(Vl,{fullWidth:!0,value:Te,onChange:({target:{value:Vt}})=>{Me(Vt)},inputActionButton:Er,panel:"try-it","data-cy":"code-challenge-input"}))))),A.createElement(In,{fullWidth:!0,field:`auth.${i}.token`,type:"hidden",initialValue:_e,panel:"try-it"}),A.createElement(Vh,{id:i,scopes:g}),at.token&&at.token.access_token?A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Access Token: "),A.createElement(Vl,{disabled:!0,type:"password",fullWidth:!0,value:at.token.access_token,panel:"try-it"})):null),A.createElement(Rm,null,at.token&&at.token.access_token?A.createElement(Jt.Button,{fullWidth:!0,onClick:Tr},"Log out"):ge?A.createElement(A.Fragment,null,A.createElement(Jt.Button,{fullWidth:!0,onClick:nr},"Cancel"),A.createElement(Nh,null)):A.createElement(Jt.Button,{fullWidth:!0,color:"secondary",disabled:!(0,Fn.Qr)(fr),onClick:()=>{cr(b)}},"Authorize")),ge||ce||!at.token||!at.token.access_token&&A.createElement(qm,{loading:ge,error:ce,token:at.token}))};var sy=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});function ly(e){var r,i;const{scheme:a,defaultValues:o}=e,[f,d]=(0,A.useState)({}),[v,h]=(0,A.useState)(),[g,b]=(0,A.useState)(!1);(0,A.useEffect)(()=>{E(a.openIdConnectUrl)},[a.openIdConnectUrl]);const E=V=>sy(this,null,function*(){b(!0),h("");try{const I=yield Lm(V);d(I)}catch(I){h(I.message)}b(!1)});return g?A.createElement(uy,null):v?A.createElement(Hh,{message:v}):A.createElement("div",null,A.createElement("div",null,(r=f?.response_types_supported)!=null&&r.includes("token")?A.createElement(A.Fragment,null,A.createElement(mn.S6,null,"OAuth2 Implicit Flow"),A.createElement(qf,{key:e.id,authorizationUrl:f.authorization_endpoint,authCorsProxyUrl:e.authCorsProxyUrl,scopes:f.scopes_supported,server:e.server,id:e.id,form:e.form,formApi:e.formApi,clientId:e.clientId,flow:"implicit",defaultValues:o})):(i=f?.response_types_supported)!=null&&i.includes("code")?A.createElement(A.Fragment,null,A.createElement(mn.S6,null,"OAuth2 Authorization Flow"),A.createElement(qf,{key:e.id,authorizationUrl:f.authorization_endpoint,tokenUrl:f.token_endpoint,authCorsProxyUrl:e.authCorsProxyUrl,scopes:f.scopes_supported,server:e.server,id:e.id,form:e.form,formApi:e.formApi,clientId:e.clientId,tokenEndpointAuthMethod:f?.token_endpoint_auth_methods_supported,flow:"authorizationCode",defaultValues:o})):A.createElement("div",null,"Unsupported flow")))}function uy(){return A.createElement("div",null,A.createElement("div",null,A.createElement("div",null,"Fetching OpenID Connect metadata..."),A.createElement(Nh,null)))}function Hh({message:e}){return A.createElement("div",null,A.createElement("div",null,A.createElement(Ye.Xq,null,e)))}var fy=Object.defineProperty,cy=Object.defineProperties,dy=Object.getOwnPropertyDescriptors,Uh=Object.getOwnPropertySymbols,py=Object.prototype.hasOwnProperty,hy=Object.prototype.propertyIsEnumerable,_h=(e,r,i)=>r in e?fy(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,zh=(e,r)=>{for(var i in r||(r={}))py.call(r,i)&&_h(e,i,r[i]);if(Uh)for(var i of Uh(r))hy.call(r,i)&&_h(e,i,r[i]);return e},Gh=(e,r)=>cy(e,dy(r)),vy=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});function gy(e){if(!e)return"Token is required"}const my=({form:e,id:r,formApi:i,server:a,flow:o,authCorsProxyUrl:f,defaultValues:d,clientId:v})=>{var h,g,b,E;const[V,I]=(0,A.useState)(""),[W,Y]=(0,A.useState)(!1),[_,U]=(0,A.useState)(!0),G=((g=(h=e?.values)==null?void 0:h.auth)==null?void 0:g[r])||{},ce=((E=(b=e.errors)==null?void 0:b.auth)==null?void 0:E[r])||{},Ce=()=>{i.setValue(`auth.${r}.token`,""),(0,dt.WW)(`auth.${r}.token`,"")},ge=()=>{U(Te=>!Te)},ke=()=>vy(void 0,null,function*(){if(W)return;const Te=f&&o.tokenUrl?f+(0,xt.jg)(o.tokenUrl):o.tokenUrl;if(ce.client_id||ce.client_secret){console.log("Provide client_id and client_secret");return}const Me=G.client_id,Xe=G.client_secret;if(!Me||!Xe){console.log("Provide client_id and client_secret");return}Y(!0);const yt=o["x-tokenEndpointAuthMethod"];if(!(0,xt.xl)(yt)){console.log(`Unsupported token endpoint auth method: ${yt}`);return}yield ki.authorizeClientCredentials({tokenUrl:Te.startsWith("http")?Te:a+Te,clientId:Me,clientSecret:Xe,scopes:G.scopes,extraHeaders:(0,xt.Or)({authMethod:yt,clientId:Me,clientSecret:Xe}),successCallback:at=>{i.setValue(`auth.${r}.token`,at),Y(!1)},errorCallback:at=>{Ce(),I(at.message),Y(!1)}})}),be=Object.keys(o.scopes);let me=(0,dt.YQ)(`auth.${r}.token`)||JSON.stringify(d?.token);me=me?JSON.parse(me):"";const ue=(0,dt.Al)(r,"client_id"),Oe={field:`auth.${r}.client_id`,fullWidth:!0,initialValue:(0,dt.YQ)(`auth.${r}.client_id`)||v||d?.client_id,initValue:(0,dt.YQ)(`auth.${r}.client_id`)||v||d?.client_id,placeholder:"Your OAuth2 app Client ID"};return A.createElement(A.Fragment,null,A.createElement(Ye.n5,null,A.createElement(Ye.NI,null,A.createElement(Ye.lX,null,"Client ID:"),ue?A.createElement(jl,Gh(zh({},Oe),{options:ue})):A.createElement(In,Gh(zh({},Oe),{type:"password",panel:"try-it"}))),A.createElement(Ye.NI,null,A.createElement(Ye.lX,null,"Client Secret:"),A.createElement(In,{type:"password",fullWidth:!0,field:`auth.${r}.client_secret`,initialValue:(0,dt.YQ)(`auth.${r}.client_secret`)||d?.client_secret,panel:"try-it"})),A.createElement(In,{fullWidth:!0,field:`auth.${r}.token`,type:"hidden",initialValue:me,validate:gy}),A.createElement(Vh,{id:r,scopes:be})),A.createElement(Jt.Button,{color:"primary",onClick:ke,blinking:W},W?"Loading...":"Request Token"),A.createElement(Ye.ph,null," Access Token "),V?A.createElement(Ye.Xq,{style:{marginBottom:"1em"}},"Failed to request token: ",A.createElement("pre",null,V)," "):G.token&&G.token.access_token?A.createElement(Ye.TR,null,A.createElement(Ye.WA,{length:G.token.access_token.length,masked:_},G.token.access_token),A.createElement(Ye.lf,{onClick:ge},_?"Show":"Hide"," "),A.createElement(Ye.h,{onClick:Ce}," Clear ")):A.createElement(Ye.Xq,{style:{marginBottom:"1em"}},"No token"))};var yy=Object.defineProperty,by=Object.defineProperties,xy=Object.getOwnPropertyDescriptors,$h=Object.getOwnPropertySymbols,Sy=Object.prototype.hasOwnProperty,wy=Object.prototype.propertyIsEnumerable,Kh=(e,r,i)=>r in e?yy(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Ds=(e,r)=>{for(var i in r||(r={}))Sy.call(r,i)&&Kh(e,i,r[i]);if($h)for(var i of $h(r))wy.call(r,i)&&Kh(e,i,r[i]);return e},Bs=(e,r)=>by(e,xy(r));const Cy=({securityDefaults:e,operation:r,activeServer:i,authCorsProxyUrl:a,form:o,formApi:f})=>{var d,v;const[h,g]=(0,A.useState)(0),{parser:b}=(0,ui.useRecoilValue)(Hi.cS);(0,A.useEffect)(()=>{const U=r.security.map(Ce=>Ce.schemes.map(ge=>ge.id).join(" and ")),G=(0,dt.YQ)("securityRequirementName"),ce=U.findIndex(Ce=>Ce===G);g(ce<0?0:ce)},[r]);const E=U=>{g(U.idx),(0,dt.WW)("securityRequirementName",U.value)},V=r.security,W=V.map(U=>U.schemes.map(G=>G.id).join(" and ")).filter(Boolean).map((U,G)=>({value:U,idx:G}));if(W.length===0)return A.createElement(Hh,{message:"Cannot find security schema in the definition"});const Y=V[h],_=(0,dt.A8)(Y.schemes[0].id);return A.createElement(A.Fragment,null,A.createElement(Ye.n5,null,W.length>1&&A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Security scheme: "),A.createElement(mn.VD,{variant:"dark",fullWidth:!0,options:W,value:W[h].value,onChange:E}))||null,A.createElement(Jt.TryItSecurityApps,{apiId:(v=(d=b?.definition.info)==null?void 0:d["x-metadata"])==null?void 0:v.apiId,value:f.getValue(`auth.${_}`),onChange:U=>{f.setValue(`auth.${_}`,U)}}),V[h].schemes.map(U=>{var G,ce,Ce,ge,ke,be,me;const ue=(0,dt.A8)(U.id);if(U.type==="apiKey"){const Oe=(0,dt.Al)(ue,""),Te={field:`auth.${ue}`,fullWidth:!0,initialValue:(0,xt.NG)(U)||(0,dt.YQ)(`auth.${ue}`)||e?.[ue],initValue:(0,xt.NG)(U)||(0,dt.YQ)(`auth.${ue}`)||e?.[ue],validate:xt.np,validateOnBlur:!0,validateOnChange:!0};return A.createElement(Ye.NI,{key:ue},A.createElement(Ye.lX,null," ",U.name,": "),Oe?A.createElement(jl,Bs(Ds({},Te),{options:Oe})):A.createElement(In,Bs(Ds({},Te),{type:"password",panel:"try-it","data-cy":"apiKey-auth-password"})))}else if(U.type==="http"){if(U.scheme==="basic"){const Oe=(0,dt.Al)(ue,"username"),Te={field:`auth.${ue}.username`,fullWidth:!0,initialValue:(0,dt.YQ)(`auth.${ue}.username`)||((G=e?.[ue])==null?void 0:G.username),initValue:(0,dt.YQ)(`auth.${ue}.username`)||((ce=e?.[ue])==null?void 0:ce.username),validate:xt.np,validateOnBlur:!0,validateOnChange:!0};return A.createElement(A.Fragment,{key:ue},A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," ",(0,Bl.l)("tryItAuthBasicUsername"),": "),Oe?A.createElement(jl,Bs(Ds({},Te),{options:Oe})):A.createElement(In,Bs(Ds({},Te),{panel:"try-it"}))),A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," ",(0,Bl.l)("tryItAuthBasicPassword"),": "),A.createElement(In,{type:"password","data-cy":"http-auth-password",fullWidth:!0,field:`auth.${ue}.password`,initialValue:(0,dt.YQ)(`auth.${ue}.password`)||((Ce=e?.[ue])==null?void 0:Ce.password)||"",validateOnBlur:!0,validateOnChange:!0,panel:"try-it"})))}else if(U.scheme==="bearer"){const Oe=(0,dt.Al)(ue,""),Te={field:`auth.${ue}`,fullWidth:!0,initialValue:(0,dt.YQ)(`auth.${ue}`)||e?.[ue],initValue:(0,dt.YQ)(`auth.${ue}`)||e?.[ue],validate:xt.np,validateOnBlur:!0,validateOnChange:!0};return A.createElement(A.Fragment,{key:ue},A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Bearer Token: "),Oe?A.createElement(jl,Bs(Ds({},Te),{options:Oe})):A.createElement(In,Bs(Ds({},Te),{type:"password",placeholder:"(without 'Bearer')",panel:"try-it"}))))}}else{if(U.type==="oauth2"&&U.flows&&U.flows.clientCredentials)return A.createElement(my,{key:ue,flow:U.flows.clientCredentials,server:i,authCorsProxyUrl:a,id:ue,form:o,formApi:f,clientId:U.flows.clientCredentials["x-defaultClientId"]||U["x-defaultClientId"],defaultValues:e?.[ue]});if(U.type==="oauth2"&&U.flows&&U.flows.implicit)return A.createElement(qf,{key:ue,authorizationUrl:U.flows.implicit.authorizationUrl,authCorsProxyUrl:a,scopes:Object.keys(((ke=(ge=U?.flows)==null?void 0:ge.implicit)==null?void 0:ke.scopes)||{}),server:i,id:ue,form:o,formApi:f,clientId:U.flows.implicit["x-defaultClientId"]||U["x-defaultClientId"],flow:"implicit",defaultValues:e?.[ue]});if(U.type==="oauth2"&&U.flows&&U.flows.authorizationCode)return A.createElement(qf,{key:ue,authorizationUrl:U.flows.authorizationCode.authorizationUrl,tokenUrl:U.flows.authorizationCode.tokenUrl,authCorsProxyUrl:a,scopes:Object.keys(((be=U.flows.authorizationCode)==null?void 0:be.scopes)||{}),server:i,id:ue,form:o,formApi:f,clientId:U.flows.authorizationCode["x-defaultClientId"]||U["x-defaultClientId"],flow:"authorizationCode",tokenEndpointAuthMethod:U.flows.authorizationCode["x-tokenEndpointAuthMethod"],usePkce:U.flows.authorizationCode["x-usePkce"],defaultValues:e?.[ue]});if(U.type==="oauth2"){let Oe=(0,dt.YQ)(`auth.${ue}.token`)||JSON.stringify((me=e?.[ue])==null?void 0:me.token);return Oe=Oe?JSON.parse(Oe):{},A.createElement(A.Fragment,{key:ue},A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Access Token Type: "),A.createElement(In,{fullWidth:!0,field:`auth.${ue}.token.token_type`,initialValue:Oe.token_type||"Bearer",panel:"try-it"})),A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Access Token: "),A.createElement(In,{type:"password",fullWidth:!0,field:`auth.${ue}.token.access_token`,validate:xt.np,initialValue:Oe.access_token,validateOnBlur:!0,validateOnChange:!0,panel:"try-it"})))}else if(U.type==="openIdConnect")return A.createElement(ly,{key:ue,server:i,authCorsProxyUrl:a,id:ue,form:o,formApi:f,scheme:U,clientId:U["x-defaultClientId"],defaultValues:e?.[ue]})}})),A.createElement("small",null,A.createElement("strong",null,"Note"),": Your credentials will be saved until the end of the browser session"))};var Ay=c(55919),Oy=Object.defineProperty,Yh=Object.getOwnPropertySymbols,Ey=Object.prototype.hasOwnProperty,Ty=Object.prototype.propertyIsEnumerable,Xh=(e,r,i)=>r in e?Oy(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,ky=(e,r)=>{for(var i in r||(r={}))Ey.call(r,i)&&Xh(e,i,r[i]);if(Yh)for(var i of Yh(r))Ty.call(r,i)&&Xh(e,i,r[i]);return e};function Py({operation:e,properties:r,securityDefaults:i,form:a,resolvedRawSpec:o,server:f,formApi:d,setFormApi:v,handleChange:h,handleServerChange:g}){const b=a.errors||{},E=b.path||b.cookie||b.header||b.query,{hooks:V,authCorsProxyUrl:I}=(0,ui.useRecoilValue)(Hi.lk),W=o&&dt.IB.get(o,e.pointer);let Y=a.values&&a.values.auth&&Object.keys(a.values.auth)[0];(!Y||!a.values.auth[Y])&&(Y=void 0),Y&&(a.values.auth[Y].token!==void 0||a.values.auth[Y].client_id!==void 0||a.values.auth[Y].client_secret!==void 0)&&(!a.values.auth[Y].token||!a.values.auth[Y].token.access_token)&&(Y=void 0),Y&&a.values.auth[Y].username!=null&&(!a.values.auth[Y].username||!a.values.auth[Y].password)&&(Y=void 0);const _=e.parameters||[];return!o&&A.createElement(A.Fragment,null,"Loading...")||A.createElement($t,{onChange:h,getApi:v,style:{flex:1,display:"flex",flexDirection:"column",margin:0}},A.createElement(Lv,{operation:e,onChange:g}),A.createElement(ca.UQ,{initialActiveIdx:e.security.length&&Y?1:0},e.security.length&&d&&A.createElement(ud,{header:(0,Bl.l)("tryItAuth"),"data-cy":"security-trigger",error:!Y&&!!b.auth,success:!!Y,renderChildrenHidden:!0},Jt.OpenApiTryItSecurityPanel||V?.ReplaceTryItSecurityPanel?A.createElement(Fy,{field:"auth",validate:xt.np},U=>A.createElement(Ay.Q,{Hook:Jt.OpenApiTryItSecurityPanel||V?.ReplaceTryItSecurityPanel,props:{server:f,operation:e,onChange:U,OAuth2:ki}})):A.createElement(Cy,{formApi:d,form:a,operation:e,activeServer:f.url,authCorsProxyUrl:I,securityDefaults:i}))||null,e.requestBody&&d&&A.createElement(ud,{header:(0,Bl.l)("tryItBody"),"data-cy":"body-trigger",error:!!b.body,renderChildrenHidden:!0},A.createElement(bm,{validate:Iy,formApi:d,body:e.requestBody,pointer:e.pointer,id:e.id,resolvedBody:W?.requestBody,properties:r}))||null,_.length&&A.createElement(ud,{header:(0,Bl.l)("tryItParameters"),"data-cy":"parameters-trigger",error:E,renderChildrenHidden:!0},A.createElement(Fm,{operation:e,values:a.values,errors:a.errors||{}}))||null))}function Fy(e){const{fieldApi:r,render:i,userProps:a}=to(ky({},e)),{setValue:o}=r,{children:f}=a;return i(A.createElement(A.Fragment,null,f(o)))}function Iy(){}const Ly=(0,A.memo)(Py);function My({shaking:e,className:r,children:i,rootElement:a}){const[o]=(0,Fd.Bs)(a),f=(0,ui.useRecoilValue)(Hi.lk);return A.createElement(mn.q2,{scrollYOffset:f.scrollYOffset,shaking:e,className:r,"data-cy":"console",fullWidth:o?.width},i)}const Ny=(0,A.memo)(My);var Ry=Object.defineProperty,Dy=Object.defineProperties,By=Object.getOwnPropertyDescriptors,ec=Object.getOwnPropertySymbols,Jh=Object.prototype.hasOwnProperty,Qh=Object.prototype.propertyIsEnumerable,Zh=(e,r,i)=>r in e?Ry(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Lr=(e,r)=>{for(var i in r||(r={}))Jh.call(r,i)&&Zh(e,i,r[i]);if(ec)for(var i of ec(r))Qh.call(r,i)&&Zh(e,i,r[i]);return e},wn=(e,r)=>Dy(e,By(r)),qh=(e,r)=>{var i={};for(var a in e)Jh.call(e,a)&&r.indexOf(a)<0&&(i[a]=e[a]);if(e!=null&&ec)for(var a of ec(e))r.indexOf(a)<0&&Qh.call(e,a)&&(i[a]=e[a]);return i},ev=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});function tv(e){return e.startsWith("//")?"https:"+e:e}function Vy({operation:e,onResponse:r,className:i,rootElement:a,properties:o,securityDefaults:f,onClose:d}){let v=(0,A.useRef)();const[h,g]=(0,ui.useRecoilState)((0,cd.N)(e.pointer)),[b,E]=(0,A.useState)(h.activeServer||e.activeServer),[V,I]=(0,A.useState)(0),[W,Y]=(0,A.useState)(!1),[_,U]=(0,A.useState)(!1),[G,ce]=(0,A.useState)({values:{path:(0,xt.ZS)(e.parameters,"path"),cookie:(0,xt.ZS)(e.parameters,"cookie"),header:(0,xt.ZS)(e.parameters,"header"),query:(0,xt.ZS)(e.parameters,"query")}}),[Ce,ge]=(0,A.useState)(),[ke,be]=(0,A.useState)(),[me,ue]=(0,A.useState)(),[Oe,Te]=(0,A.useState)(),Me=(0,Fd.D9)(e),{parser:Xe,options:yt}=(0,ui.useRecoilValue)(Hi.cS),at=(0,A.useCallback)((kt,Yt=kt.getState())=>{var Ht=Yt,{values:_e}=Ht,qe=qh(Ht,["values"]);v.current=kt,setTimeout(()=>{ce(wn(Lr({},qe),{values:wn(Lr({},_e),{query:(0,xt.FU)(_e.query||{})})}))},0)},[]),fr=(0,A.useCallback)(kt=>{var Yt=kt,{values:Ht}=Yt,_e=qh(Yt,["values"]);const qe=wn(Lr({},_e),{values:wn(Lr({},Ht),{query:(0,xt.FU)(Ht.query||{})})});g(Tt=>wn(Lr({},Tt),{requestValues:JSON.parse(JSON.stringify(Ht))})),ce(qe),(0,xt.Hc)(qe)},[g]),Er=(0,A.useCallback)(kt=>{I(kt)},[]),cr=(0,A.useCallback)(kt=>{E(kt),g(Yt=>wn(Lr({},Yt),{activeServer:kt}))},[g]),Tr=(0,A.useCallback)(()=>ev(this,null,function*(){var kt,Yt,Ht,_e,qe,Tt,Vt,Ot,pn,Ki,qn,Kr,uo,No,Nn,Aa,tc;const{values:Fi,invalid:Vs}=((kt=v?.current)==null?void 0:kt.getState())||G||{};if((Yt=v.current)==null||Yt.submitForm(),Vs){U(!0),setTimeout(()=>U(!1),1e3),(_e=(Ht=yt.events)==null?void 0:Ht.tryItSent)==null||_e.call(Ht,{eventType:Sr.nQ.TryItSent,resource:"Redocly_OperationTryIt",action:"ValidationFailed",operationId:e.operationId,operationPath:e.path,operationHttpVerb:e.httpVerb,operationSummary:e.description});return}const{servers:Yi,requestBody:Oa}=e,Ld=Oa&&Oa.content&&((qe=(0,$n.getActiveMediaType)(Oa.content))==null?void 0:qe.name)||"";let Xi=Fi.body;if(/json/.test(Ld))try{Xi=JSON.parse(Xi)}catch(Mt){console.error(Mt)}Y(!0);const Yr=Ce,js=(e.httpVerb||"").toLowerCase();if(!Yi)throw console.error("Servers are not specified in your OpenAPI file. You can't use Try It Out console without specifying servers. If you use OpenAPI 2, make sure you configured host and basepath"),new Error("Servers are not specified");const Jl=Yi.find(Mt=>b.url.endsWith(Mt.url.endsWith("/")?Mt.url.substring(0,Mt.url.length-1):Mt.url)),Md=Date.now();let ei,Ea=Fi.auth;if(Fi.auth){const Mt=Object.keys(Fi.auth)[0],ti=(0,zc.dw)(Mt);ei=wn(Lr({},Yr),{components:wn(Lr({},Yr?.components),{securitySchemes:wn(Lr({},(Tt=Yr?.components)==null?void 0:Tt.securitySchemes),{[ti]:wn(Lr({},(Ot=(Vt=Yr?.components)==null?void 0:Vt.securitySchemes)==null?void 0:Ot[ti]),{type:((qn=(Ki=(pn=Yr?.components)==null?void 0:pn.securitySchemes)==null?void 0:Ki[ti])==null?void 0:qn.type)==="openIdConnect"?"oauth2":((uo=(Kr=Yr?.components)==null?void 0:Kr.securitySchemes)==null?void 0:uo[ti]).type})})})}),Ea=wn(Lr({},Ea),{[ti]:Ea[Mt]})}else ei=Lr({},Yr);ei.servers=Yi;const Ro=yt.corsProxyUrl;Ro&&Yi.length&&(ei.servers=Yi.map(Mt=>wn(Lr({},Mt),{url:Ro+tv(Mt.url)})),ei.paths=wn(Lr({},ei.paths),{[e.path]:wn(Lr({},ei.paths[e.path]),{[js]:wn(Lr({},ei.paths[e.path][js]),{servers:void 0}),servers:void 0})}));const Ql=Oa?.content&&((No=(0,$n.getActiveMediaType)(Oa.content))==null?void 0:No.name)||null;if(Ql&&Xi&&pa(Ql)){const Mt=Object.values(Xi);Xi=Mt.length>1?Mt:Mt[0]}const Zl={server:Ro?Ro+tv(Jl.url):Jl.url,serverVariables:(0,xt.mj)(Jl),spec:ei,pathName:e.path,method:e.httpVerb,parameters:Lr(Lr(Lr(Lr({},Fi.path),Fi.query),Fi.header),Fi.cookie),securities:{authorized:Ea},requestBody:Xi,requestContentType:Ql,responseContentType:((Nn=Fi.header)==null?void 0:Nn.Accept)||null,requestInterceptor:(0,xt.Tz)(yt,e,Ea?.Authorization)};try{const Mt=yield Wc(Zl),ti=Mt?.data;ti instanceof Blob&&(pa(ti.type)&&(Mt.fileInfo={rawData:ti,fileName:(0,xt.AM)(Mt.headers)}),Mt.data=yield ti.text()),r?.({request:Zl,response:Mt}),Te(Mt),ue(void 0)}catch(Mt){Mt&&Mt.response&&Mt.response.data instanceof Blob&&(Mt.response.data=yield Mt.response.data.text(),r?.({request:Zl,response:Mt.response})),Te(void 0),ue(Mt)}finally{Y(!1),I(1),be(Date.now()-Md),(tc=(Aa=yt.events)==null?void 0:Aa.tryItSent)==null||tc.call(Aa,{eventType:Sr.nQ.TryItSent,resource:"Redocly_OperationTryIt",action:"Sent",operationId:e.operationId,operationPath:e.path,operationHttpVerb:e.httpVerb,operationSummary:e.description})}}),[b.url,G,r,e,yt,Ce]);(0,Jt.useMount)(()=>ev(this,null,function*(){var kt;const Yt=yield _c(e,Xe.definition);ge(Yt),(kt=v.current)==null||kt.setValues({})})),(0,A.useEffect)(()=>{Me&&Me!==e&&(Te(void 0),ue(void 0),I(0))},[e,Me]);const nr=!!(Oe||me);return A.createElement(Ny,{shaking:_,className:i,rootElement:a},A.createElement(ca.Hc,null,A.createElement(Ao,{active:V,hasResponse:nr,onChange:Er}),d&&A.createElement(mn.PZ,{onClick:d}," \u2715 ")),A.createElement(mn.RE,{hidden:V!==0,"data-cy":"console-request-body"},A.createElement(Ly,{operation:e,properties:o,securityDefaults:f,form:G,resolvedRawSpec:Ce,server:b,formApi:v.current,setFormApi:at,handleChange:fr,handleServerChange:cr})),A.createElement(mn.RE,{hidden:V!==1,"data-cy":"console-response-body"},A.createElement(af,{response:Oe,error:me,time:ke})),A.createElement(lf,{hasResponse:nr,params:G.values,operation:e,loading:W,execute:Tr}))}const jy=(0,A.memo)(Vy)},85208:(S,R,c)=>{var m=c(34440),O=c(84108),k=c(61085),L=c(77706),D=c(8636);function j(X){var te=-1,re=X==null?0:X.length;for(this.clear();++te<re;){var he=X[te];this.set(he[0],he[1])}}j.prototype.clear=m,j.prototype.delete=O,j.prototype.get=k,j.prototype.has=L,j.prototype.set=D,S.exports=j},81998:(S,R,c)=>{var m=c(90266),O=c(42875),k=c(45828),L=c(24115),D=c(67690);function j(X){var te=-1,re=X==null?0:X.length;for(this.clear();++te<re;){var he=X[te];this.set(he[0],he[1])}}j.prototype.clear=m,j.prototype.delete=O,j.prototype.get=k,j.prototype.has=L,j.prototype.set=D,S.exports=j},72887:(S,R,c)=>{var m=c(65234),O=c(84100),k=m(O,"Map");S.exports=k},95678:(S,R,c)=>{var m=c(39016),O=c(62363),k=c(64348),L=c(53062),D=c(30262);function j(X){var te=-1,re=X==null?0:X.length;for(this.clear();++te<re;){var he=X[te];this.set(he[0],he[1])}}j.prototype.clear=m,j.prototype.delete=O,j.prototype.get=k,j.prototype.has=L,j.prototype.set=D,S.exports=j},70861:(S,R,c)=>{var m=c(84100),O=m.Symbol;S.exports=O},29233:S=>{function R(c,m){for(var O=-1,k=c==null?0:c.length,L=Array(k);++O<k;)L[O]=m(c[O],O,c);return L}S.exports=R},18498:(S,R,c)=>{var m=c(58260);function O(k,L){for(var D=k.length;D--;)if(m(k[D][0],L))return D;return-1}S.exports=O},40548:(S,R,c)=>{var m=c(24007),O=c(86040);function k(L,D){D=m(D,L);for(var j=0,X=D.length;L!=null&&j<X;)L=L[O(D[j++])];return j&&j==X?L:void 0}S.exports=k},69823:(S,R,c)=>{var m=c(70861),O=c(91339),k=c(25151),L="[object Null]",D="[object Undefined]",j=m?m.toStringTag:void 0;function X(te){return te==null?te===void 0?D:L:j&&j in Object(te)?O(te):k(te)}S.exports=X},99817:(S,R,c)=>{var m=c(45563),O=c(28597),k=c(93702),L=c(55784),D=/[\\^$.*+?()[\]{}|]/g,j=/^\[object .+?Constructor\]$/,X=Function.prototype,te=Object.prototype,re=X.toString,he=te.hasOwnProperty,oe=RegExp("^"+re.call(he).replace(D,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fe(J){if(!k(J)||O(J))return!1;var F=m(J)?oe:j;return F.test(L(J))}S.exports=fe},86245:(S,R,c)=>{var m=c(70861),O=c(29233),k=c(55589),L=c(52624),D=1/0,j=m?m.prototype:void 0,X=j?j.toString:void 0;function te(re){if(typeof re=="string")return re;if(k(re))return O(re,te)+"";if(L(re))return X?X.call(re):"";var he=re+"";return he=="0"&&1/re==-D?"-0":he}S.exports=te},24007:(S,R,c)=>{var m=c(55589),O=c(5130),k=c(44041),L=c(99835);function D(j,X){return m(j)?j:O(j,X)?[j]:k(L(j))}S.exports=D},1622:(S,R,c)=>{var m=c(84100),O=m["__core-js_shared__"];S.exports=O},20302:(S,R,c)=>{var m=typeof c.g=="object"&&c.g&&c.g.Object===Object&&c.g;S.exports=m},77570:(S,R,c)=>{var m=c(58949);function O(k,L){var D=k.__data__;return m(L)?D[typeof L=="string"?"string":"hash"]:D.map}S.exports=O},65234:(S,R,c)=>{var m=c(99817),O=c(67736);function k(L,D){var j=O(L,D);return m(j)?j:void 0}S.exports=k},91339:(S,R,c)=>{var m=c(70861),O=Object.prototype,k=O.hasOwnProperty,L=O.toString,D=m?m.toStringTag:void 0;function j(X){var te=k.call(X,D),re=X[D];try{X[D]=void 0;var he=!0}catch{}var oe=L.call(X);return he&&(te?X[D]=re:delete X[D]),oe}S.exports=j},67736:S=>{function R(c,m){return c?.[m]}S.exports=R},34440:(S,R,c)=>{var m=c(24545);function O(){this.__data__=m?m(null):{},this.size=0}S.exports=O},84108:S=>{function R(c){var m=this.has(c)&&delete this.__data__[c];return this.size-=m?1:0,m}S.exports=R},61085:(S,R,c)=>{var m=c(24545),O="__lodash_hash_undefined__",k=Object.prototype,L=k.hasOwnProperty;function D(j){var X=this.__data__;if(m){var te=X[j];return te===O?void 0:te}return L.call(X,j)?X[j]:void 0}S.exports=D},77706:(S,R,c)=>{var m=c(24545),O=Object.prototype,k=O.hasOwnProperty;function L(D){var j=this.__data__;return m?j[D]!==void 0:k.call(j,D)}S.exports=L},8636:(S,R,c)=>{var m=c(24545),O="__lodash_hash_undefined__";function k(L,D){var j=this.__data__;return this.size+=this.has(L)?0:1,j[L]=m&&D===void 0?O:D,this}S.exports=k},5130:(S,R,c)=>{var m=c(55589),O=c(52624),k=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,L=/^\w*$/;function D(j,X){if(m(j))return!1;var te=typeof j;return te=="number"||te=="symbol"||te=="boolean"||j==null||O(j)?!0:L.test(j)||!k.test(j)||X!=null&&j in Object(X)}S.exports=D},58949:S=>{function R(c){var m=typeof c;return m=="string"||m=="number"||m=="symbol"||m=="boolean"?c!=="__proto__":c===null}S.exports=R},28597:(S,R,c)=>{var m=c(1622),O=function(){var L=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||"");return L?"Symbol(src)_1."+L:""}();function k(L){return!!O&&O in L}S.exports=k},90266:S=>{function R(){this.__data__=[],this.size=0}S.exports=R},42875:(S,R,c)=>{var m=c(18498),O=Array.prototype,k=O.splice;function L(D){var j=this.__data__,X=m(j,D);if(X<0)return!1;var te=j.length-1;return X==te?j.pop():k.call(j,X,1),--this.size,!0}S.exports=L},45828:(S,R,c)=>{var m=c(18498);function O(k){var L=this.__data__,D=m(L,k);return D<0?void 0:L[D][1]}S.exports=O},24115:(S,R,c)=>{var m=c(18498);function O(k){return m(this.__data__,k)>-1}S.exports=O},67690:(S,R,c)=>{var m=c(18498);function O(k,L){var D=this.__data__,j=m(D,k);return j<0?(++this.size,D.push([k,L])):D[j][1]=L,this}S.exports=O},39016:(S,R,c)=>{var m=c(85208),O=c(81998),k=c(72887);function L(){this.size=0,this.__data__={hash:new m,map:new(k||O),string:new m}}S.exports=L},62363:(S,R,c)=>{var m=c(77570);function O(k){var L=m(this,k).delete(k);return this.size-=L?1:0,L}S.exports=O},64348:(S,R,c)=>{var m=c(77570);function O(k){return m(this,k).get(k)}S.exports=O},53062:(S,R,c)=>{var m=c(77570);function O(k){return m(this,k).has(k)}S.exports=O},30262:(S,R,c)=>{var m=c(77570);function O(k,L){var D=m(this,k),j=D.size;return D.set(k,L),this.size+=D.size==j?0:1,this}S.exports=O},32924:(S,R,c)=>{var m=c(67997),O=500;function k(L){var D=m(L,function(X){return j.size===O&&j.clear(),X}),j=D.cache;return D}S.exports=k},24545:(S,R,c)=>{var m=c(65234),O=m(Object,"create");S.exports=O},25151:S=>{var R=Object.prototype,c=R.toString;function m(O){return c.call(O)}S.exports=m},84100:(S,R,c)=>{var m=c(20302),O=typeof self=="object"&&self&&self.Object===Object&&self,k=m||O||Function("return this")();S.exports=k},44041:(S,R,c)=>{var m=c(32924),O=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,k=/\\(\\)?/g,L=m(function(D){var j=[];return D.charCodeAt(0)===46&&j.push(""),D.replace(O,function(X,te,re,he){j.push(re?he.replace(k,"$1"):te||X)}),j});S.exports=L},86040:(S,R,c)=>{var m=c(52624),O=1/0;function k(L){if(typeof L=="string"||m(L))return L;var D=L+"";return D=="0"&&1/L==-O?"-0":D}S.exports=k},55784:S=>{var R=Function.prototype,c=R.toString;function m(O){if(O!=null){try{return c.call(O)}catch{}try{return O+""}catch{}}return""}S.exports=m},58260:S=>{function R(c,m){return c===m||c!==c&&m!==m}S.exports=R},13546:(S,R,c)=>{var m=c(40548);function O(k,L,D){var j=k==null?void 0:m(k,L);return j===void 0?D:j}S.exports=O},55589:S=>{var R=Array.isArray;S.exports=R},45563:(S,R,c)=>{var m=c(69823),O=c(93702),k="[object AsyncFunction]",L="[object Function]",D="[object GeneratorFunction]",j="[object Proxy]";function X(te){if(!O(te))return!1;var re=m(te);return re==L||re==D||re==k||re==j}S.exports=X},93702:S=>{function R(c){var m=typeof c;return c!=null&&(m=="object"||m=="function")}S.exports=R},50440:S=>{function R(c){return c!=null&&typeof c=="object"}S.exports=R},52624:(S,R,c)=>{var m=c(69823),O=c(50440),k="[object Symbol]";function L(D){return typeof D=="symbol"||O(D)&&m(D)==k}S.exports=L},67997:(S,R,c)=>{var m=c(95678),O="Expected a function";function k(L,D){if(typeof L!="function"||D!=null&&typeof D!="function")throw new TypeError(O);var j=function(){var X=arguments,te=D?D.apply(this,X):X[0],re=j.cache;if(re.has(te))return re.get(te);var he=L.apply(this,X);return j.cache=re.set(te,he)||re,he};return j.cache=new(k.Cache||m),j}k.Cache=m,S.exports=k},99835:(S,R,c)=>{var m=c(86245);function O(k){return k==null?"":m(k)}S.exports=O},14927:(S,R,c)=>{var m=typeof Map=="function"&&Map.prototype,O=Object.getOwnPropertyDescriptor&&m?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,k=m&&O&&typeof O.get=="function"?O.get:null,L=m&&Map.prototype.forEach,D=typeof Set=="function"&&Set.prototype,j=Object.getOwnPropertyDescriptor&&D?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,X=D&&j&&typeof j.get=="function"?j.get:null,te=D&&Set.prototype.forEach,re=typeof WeakMap=="function"&&WeakMap.prototype,he=re?WeakMap.prototype.has:null,oe=typeof WeakSet=="function"&&WeakSet.prototype,fe=oe?WeakSet.prototype.has:null,J=typeof WeakRef=="function"&&WeakRef.prototype,F=J?WeakRef.prototype.deref:null,ee=Boolean.prototype.valueOf,N=Object.prototype.toString,w=Function.prototype.toString,M=String.prototype.match,B=String.prototype.slice,Z=String.prototype.replace,ae=String.prototype.toUpperCase,H=String.prototype.toLowerCase,le=RegExp.prototype.test,z=Array.prototype.concat,q=Array.prototype.join,pe=Array.prototype.slice,xe=Math.floor,Q=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ye=Object.getOwnPropertySymbols,ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,je=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ze=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===je||"symbol")?Symbol.toStringTag:null,Ue=Object.prototype.propertyIsEnumerable,vt=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(se){return se.__proto__}:null);function pt(se,we){if(se===1/0||se===-1/0||se!==se||se&&se>-1e3&&se<1e3||le.call(/e/,we))return we;var Ve=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof se=="number"){var nt=se<0?-xe(-se):xe(se);if(nt!==se){var ht=String(nt),ct=B.call(we,ht.length+1);return Z.call(ht,Ve,"$&_")+"."+Z.call(Z.call(ct,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Z.call(we,Ve,"$&_")}var ut=c(65710),er=ut.custom,gt=tr(er)?er:null;S.exports=function se(we,Ve,nt,ht){var ct=Ve||{};if(et(ct,"quoteStyle")&&ct.quoteStyle!=="single"&&ct.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(et(ct,"maxStringLength")&&(typeof ct.maxStringLength=="number"?ct.maxStringLength<0&&ct.maxStringLength!==1/0:ct.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Qt=et(ct,"customInspect")?ct.customInspect:!0;if(typeof Qt!="boolean"&&Qt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(et(ct,"indent")&&ct.indent!==null&&ct.indent!==" "&&!(parseInt(ct.indent,10)===ct.indent&&ct.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(et(ct,"numericSeparator")&&typeof ct.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Gr=ct.numericSeparator;if(typeof we>"u")return"undefined";if(we===null)return"null";if(typeof we=="boolean")return we?"true":"false";if(typeof we=="string")return jn(we,ct);if(typeof we=="number"){if(we===0)return 1/0/we>0?"0":"-0";var Ft=String(we);return Gr?pt(we,Ft):Ft}if(typeof we=="bigint"){var dr=String(we)+"n";return Gr?pt(we,dr):dr}var vi=typeof ct.depth>"u"?5:ct.depth;if(typeof nt>"u"&&(nt=0),nt>=vi&&vi>0&&typeof we=="object")return He(we)?"[Array]":"[Object]";var Nr=ft(ct,nt);if(typeof ht>"u")ht=[];else if(_r(ht,we)>=0)return"[Circular]";function Rr(Qr,pr,ai){if(pr&&(ht=pe.call(ht),ht.push(pr)),ai){var An={depth:ct.depth};return et(ct,"quoteStyle")&&(An.quoteStyle=ct.quoteStyle),se(Qr,An,nt+1,ht)}return se(Qr,ct,nt+1,ht)}if(typeof we=="function"&&!Be(we)){var gi=jt(we),$r=mt(we,Rr);return"[Function"+(gi?": "+gi:" (anonymous)")+"]"+($r.length>0?" { "+q.call($r,", ")+" }":"")}if(tr(we)){var ni=je?Z.call(String(we),/^(Symbol\(.*\))_[^)]*$/,"$1"):ie.call(we);return typeof we=="object"&&!je?Mr(ni):ni}if(ri(we)){for(var ii="<"+H.call(String(we.nodeName)),Dr=we.attributes||[],mi=0;mi<Dr.length;mi++)ii+=" "+Dr[mi].name+"="+Rt(st(Dr[mi].value),"double",ct);return ii+=">",we.childNodes&&we.childNodes.length&&(ii+="..."),ii+="</"+H.call(String(we.nodeName))+">",ii}if(He(we)){if(we.length===0)return"[]";var Wn=mt(we,Rr);return Nr&&!St(Wn)?"["+tt(Wn,Nr)+"]":"[ "+q.call(Wn,", ")+" ]"}if(lt(we)){var Ii=mt(we,Rr);return!("cause"in Error.prototype)&&"cause"in we&&!Ue.call(we,"cause")?"{ ["+String(we)+"] "+q.call(z.call("[cause]: "+Rr(we.cause),Ii),", ")+" }":Ii.length===0?"["+String(we)+"]":"{ ["+String(we)+"] "+q.call(Ii,", ")+" }"}if(typeof we=="object"&&Qt){if(gt&&typeof we[gt]=="function"&&ut)return ut(we,{depth:vi-nt});if(Qt!=="symbol"&&typeof we.inspect=="function")return we.inspect()}if(zt(we)){var Ta=[];return L&&L.call(we,function(Qr,pr){Ta.push(Rr(pr,we,!0)+" => "+Rr(Qr,we))}),Gt("Map",k.call(we),Ta,Nr)}if(nn(we)){var hn=[];return te&&te.call(we,function(Qr){hn.push(Rr(Qr,we))}),Gt("Set",X.call(we),hn,Nr)}if(Bn(we))return zr("WeakMap");if(Cn(we))return zr("WeakSet");if(Vn(we))return zr("WeakRef");if(rt(we))return Mr(Rr(Number(we)));if(or(we))return Mr(Rr(Q.call(we)));if(Pt(we))return Mr(ee.call(we));if(_t(we))return Mr(Rr(String(we)));if(!Re(we)&&!Be(we)){var Jr=mt(we,Rr),vn=vt?vt(we)===Object.prototype:we instanceof Object||we.constructor===Object,on=we instanceof Object?"":"null prototype",sn=!vn&&ze&&Object(we)===we&&ze in we?B.call(Et(we),8,-1):on?"Object":"",fo=vn||typeof we.constructor!="function"?"":we.constructor.name?we.constructor.name+" ":"",Hn=fo+(sn||on?"["+q.call(z.call([],sn||[],on||[]),": ")+"] ":"");return Jr.length===0?Hn+"{}":Nr?Hn+"{"+tt(Jr,Nr)+"}":Hn+"{ "+q.call(Jr,", ")+" }"}return String(we)};function Rt(se,we,Ve){var nt=(Ve.quoteStyle||we)==="double"?'"':"'";return nt+se+nt}function st(se){return Z.call(String(se),/"/g,"&quot;")}function He(se){return Et(se)==="[object Array]"&&(!ze||!(typeof se=="object"&&ze in se))}function Re(se){return Et(se)==="[object Date]"&&(!ze||!(typeof se=="object"&&ze in se))}function Be(se){return Et(se)==="[object RegExp]"&&(!ze||!(typeof se=="object"&&ze in se))}function lt(se){return Et(se)==="[object Error]"&&(!ze||!(typeof se=="object"&&ze in se))}function _t(se){return Et(se)==="[object String]"&&(!ze||!(typeof se=="object"&&ze in se))}function rt(se){return Et(se)==="[object Number]"&&(!ze||!(typeof se=="object"&&ze in se))}function Pt(se){return Et(se)==="[object Boolean]"&&(!ze||!(typeof se=="object"&&ze in se))}function tr(se){if(je)return se&&typeof se=="object"&&se instanceof Symbol;if(typeof se=="symbol")return!0;if(!se||typeof se!="object"||!ie)return!1;try{return ie.call(se),!0}catch{}return!1}function or(se){if(!se||typeof se!="object"||!Q)return!1;try{return Q.call(se),!0}catch{}return!1}var kr=Object.prototype.hasOwnProperty||function(se){return se in this};function et(se,we){return kr.call(se,we)}function Et(se){return N.call(se)}function jt(se){if(se.name)return se.name;var we=M.call(w.call(se),/^function\s*([\w$]+)/);return we?we[1]:null}function _r(se,we){if(se.indexOf)return se.indexOf(we);for(var Ve=0,nt=se.length;Ve<nt;Ve++)if(se[Ve]===we)return Ve;return-1}function zt(se){if(!k||!se||typeof se!="object")return!1;try{k.call(se);try{X.call(se)}catch{return!0}return se instanceof Map}catch{}return!1}function Bn(se){if(!he||!se||typeof se!="object")return!1;try{he.call(se,he);try{fe.call(se,fe)}catch{return!0}return se instanceof WeakMap}catch{}return!1}function Vn(se){if(!F||!se||typeof se!="object")return!1;try{return F.call(se),!0}catch{}return!1}function nn(se){if(!X||!se||typeof se!="object")return!1;try{X.call(se);try{k.call(se)}catch{return!0}return se instanceof Set}catch{}return!1}function Cn(se){if(!fe||!se||typeof se!="object")return!1;try{fe.call(se,fe);try{he.call(se,he)}catch{return!0}return se instanceof WeakSet}catch{}return!1}function ri(se){return!se||typeof se!="object"?!1:typeof HTMLElement<"u"&&se instanceof HTMLElement?!0:typeof se.nodeName=="string"&&typeof se.getAttribute=="function"}function jn(se,we){if(se.length>we.maxStringLength){var Ve=se.length-we.maxStringLength,nt="... "+Ve+" more character"+(Ve>1?"s":"");return jn(B.call(se,0,we.maxStringLength),we)+nt}var ht=Z.call(Z.call(se,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,an);return Rt(ht,"single",we)}function an(se){var we=se.charCodeAt(0),Ve={8:"b",9:"t",10:"n",12:"f",13:"r"}[we];return Ve?"\\"+Ve:"\\x"+(we<16?"0":"")+ae.call(we.toString(16))}function Mr(se){return"Object("+se+")"}function zr(se){return se+" { ? }"}function Gt(se,we,Ve,nt){var ht=nt?tt(Ve,nt):q.call(Ve,", ");return se+" ("+we+") {"+ht+"}"}function St(se){for(var we=0;we<se.length;we++)if(_r(se[we],`
496
496
  `)>=0)return!1;return!0}function ft(se,we){var Ve;if(se.indent===" ")Ve=" ";else if(typeof se.indent=="number"&&se.indent>0)Ve=q.call(Array(se.indent+1)," ");else return null;return{base:Ve,prev:q.call(Array(we+1),Ve)}}function tt(se,we){if(se.length===0)return"";var Ve=`
497
497
  `+we.prev+we.base;return Ve+q.call(se,","+Ve)+`
498
- `+we.prev}function mt(se,we){var Ve=He(se),nt=[];if(Ve){nt.length=se.length;for(var ht=0;ht<se.length;ht++)nt[ht]=et(se,ht)?we(se[ht],se):""}var ct=typeof ye=="function"?ye(se):[],Qt;if(je){Qt={};for(var Gr=0;Gr<ct.length;Gr++)Qt["$"+ct[Gr]]=ct[Gr]}for(var Ft in se)et(se,Ft)&&(Ve&&String(Number(Ft))===Ft&&Ft<se.length||je&&Qt["$"+Ft]instanceof Symbol||(le.call(/[^\w$]/,Ft)?nt.push(we(Ft,se)+": "+we(se[Ft],se)):nt.push(Ft+": "+we(se[Ft],se))));if(typeof ye=="function")for(var dr=0;dr<ct.length;dr++)Ue.call(se,ct[dr])&&nt.push("["+we(ct[dr])+"]: "+we(se[ct[dr]],se));return nt}},83949:S=>{"use strict";var N=String.prototype.replace,c=/%20/g,m={RFC1738:"RFC1738",RFC3986:"RFC3986"};S.exports={default:m.RFC3986,formatters:{RFC1738:function(O){return N.call(O,c,"+")},RFC3986:function(O){return String(O)}},RFC1738:m.RFC1738,RFC3986:m.RFC3986}},67905:(S,N,c)=>{"use strict";var m=c(85095),O=c(95990),k=c(83949);S.exports={formats:k,parse:O,stringify:m}},95990:(S,N,c)=>{"use strict";var m=c(37748),O=Object.prototype.hasOwnProperty,k=Array.isArray,L={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:m.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},R=function(J){return J.replace(/&#(\d+);/g,function(F,ee){return String.fromCharCode(parseInt(ee,10))})},V=function(J,F){return J&&typeof J=="string"&&F.comma&&J.indexOf(",")>-1?J.split(","):J},X="utf8=%26%2310003%3B",te="utf8=%E2%9C%93",re=function(F,ee){var D={__proto__:null},w=ee.ignoreQueryPrefix?F.replace(/^\?/,""):F,M=ee.parameterLimit===1/0?void 0:ee.parameterLimit,B=w.split(ee.delimiter,M),Z=-1,ae,H=ee.charset;if(ee.charsetSentinel)for(ae=0;ae<B.length;++ae)B[ae].indexOf("utf8=")===0&&(B[ae]===te?H="utf-8":B[ae]===X&&(H="iso-8859-1"),Z=ae,ae=B.length);for(ae=0;ae<B.length;++ae)if(ae!==Z){var le=B[ae],z=le.indexOf("]="),q=z===-1?le.indexOf("="):z+1,pe,xe;q===-1?(pe=ee.decoder(le,L.decoder,H,"key"),xe=ee.strictNullHandling?null:""):(pe=ee.decoder(le.slice(0,q),L.decoder,H,"key"),xe=m.maybeMap(V(le.slice(q+1),ee),function(Q){return ee.decoder(Q,L.decoder,H,"value")})),xe&&ee.interpretNumericEntities&&H==="iso-8859-1"&&(xe=R(xe)),le.indexOf("[]=")>-1&&(xe=k(xe)?[xe]:xe),O.call(D,pe)?D[pe]=m.combine(D[pe],xe):D[pe]=xe}return D},he=function(J,F,ee,D){for(var w=D?F:V(F,ee),M=J.length-1;M>=0;--M){var B,Z=J[M];if(Z==="[]"&&ee.parseArrays)B=[].concat(w);else{B=ee.plainObjects?Object.create(null):{};var ae=Z.charAt(0)==="["&&Z.charAt(Z.length-1)==="]"?Z.slice(1,-1):Z,H=parseInt(ae,10);!ee.parseArrays&&ae===""?B={0:w}:!isNaN(H)&&Z!==ae&&String(H)===ae&&H>=0&&ee.parseArrays&&H<=ee.arrayLimit?(B=[],B[H]=w):ae!=="__proto__"&&(B[ae]=w)}w=B}return w},oe=function(F,ee,D,w){if(F){var M=D.allowDots?F.replace(/\.([^.[]+)/g,"[$1]"):F,B=/(\[[^[\]]*])/,Z=/(\[[^[\]]*])/g,ae=D.depth>0&&B.exec(M),H=ae?M.slice(0,ae.index):M,le=[];if(H){if(!D.plainObjects&&O.call(Object.prototype,H)&&!D.allowPrototypes)return;le.push(H)}for(var z=0;D.depth>0&&(ae=Z.exec(M))!==null&&z<D.depth;){if(z+=1,!D.plainObjects&&O.call(Object.prototype,ae[1].slice(1,-1))&&!D.allowPrototypes)return;le.push(ae[1])}return ae&&le.push("["+M.slice(ae.index)+"]"),he(le,ee,D,w)}},fe=function(F){if(!F)return L;if(F.decoder!==null&&F.decoder!==void 0&&typeof F.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof F.charset!="undefined"&&F.charset!=="utf-8"&&F.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var ee=typeof F.charset=="undefined"?L.charset:F.charset;return{allowDots:typeof F.allowDots=="undefined"?L.allowDots:!!F.allowDots,allowPrototypes:typeof F.allowPrototypes=="boolean"?F.allowPrototypes:L.allowPrototypes,allowSparse:typeof F.allowSparse=="boolean"?F.allowSparse:L.allowSparse,arrayLimit:typeof F.arrayLimit=="number"?F.arrayLimit:L.arrayLimit,charset:ee,charsetSentinel:typeof F.charsetSentinel=="boolean"?F.charsetSentinel:L.charsetSentinel,comma:typeof F.comma=="boolean"?F.comma:L.comma,decoder:typeof F.decoder=="function"?F.decoder:L.decoder,delimiter:typeof F.delimiter=="string"||m.isRegExp(F.delimiter)?F.delimiter:L.delimiter,depth:typeof F.depth=="number"||F.depth===!1?+F.depth:L.depth,ignoreQueryPrefix:F.ignoreQueryPrefix===!0,interpretNumericEntities:typeof F.interpretNumericEntities=="boolean"?F.interpretNumericEntities:L.interpretNumericEntities,parameterLimit:typeof F.parameterLimit=="number"?F.parameterLimit:L.parameterLimit,parseArrays:F.parseArrays!==!1,plainObjects:typeof F.plainObjects=="boolean"?F.plainObjects:L.plainObjects,strictNullHandling:typeof F.strictNullHandling=="boolean"?F.strictNullHandling:L.strictNullHandling}};S.exports=function(J,F){var ee=fe(F);if(J===""||J===null||typeof J=="undefined")return ee.plainObjects?Object.create(null):{};for(var D=typeof J=="string"?re(J,ee):J,w=ee.plainObjects?Object.create(null):{},M=Object.keys(D),B=0;B<M.length;++B){var Z=M[B],ae=oe(Z,D[Z],ee,typeof J=="string");w=m.merge(w,ae,ee)}return ee.allowSparse===!0?w:m.compact(w)}},85095:(S,N,c)=>{"use strict";var m=c(44852),O=c(37748),k=c(83949),L=Object.prototype.hasOwnProperty,R={brackets:function(w){return w+"[]"},comma:"comma",indices:function(w,M){return w+"["+M+"]"},repeat:function(w){return w}},V=Array.isArray,X=Array.prototype.push,te=function(D,w){X.apply(D,V(w)?w:[w])},re=Date.prototype.toISOString,he=k.default,oe={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:O.encode,encodeValuesOnly:!1,format:he,formatter:k.formatters[he],indices:!1,serializeDate:function(w){return re.call(w)},skipNulls:!1,strictNullHandling:!1},fe=function(w){return typeof w=="string"||typeof w=="number"||typeof w=="boolean"||typeof w=="symbol"||typeof w=="bigint"},J={},F=function D(w,M,B,Z,ae,H,le,z,q,pe,xe,Q,ye,ie,je,ze){for(var Ue=w,vt=ze,pt=0,ut=!1;(vt=vt.get(J))!==void 0&&!ut;){var er=vt.get(w);if(pt+=1,typeof er!="undefined"){if(er===pt)throw new RangeError("Cyclic object value");ut=!0}typeof vt.get(J)=="undefined"&&(pt=0)}if(typeof z=="function"?Ue=z(M,Ue):Ue instanceof Date?Ue=xe(Ue):B==="comma"&&V(Ue)&&(Ue=O.maybeMap(Ue,function(tr){return tr instanceof Date?xe(tr):tr})),Ue===null){if(ae)return le&&!ie?le(M,oe.encoder,je,"key",Q):M;Ue=""}if(fe(Ue)||O.isBuffer(Ue)){if(le){var gt=ie?M:le(M,oe.encoder,je,"key",Q);return[ye(gt)+"="+ye(le(Ue,oe.encoder,je,"value",Q))]}return[ye(M)+"="+ye(String(Ue))]}var Rt=[];if(typeof Ue=="undefined")return Rt;var st;if(B==="comma"&&V(Ue))ie&&le&&(Ue=O.maybeMap(Ue,le)),st=[{value:Ue.length>0?Ue.join(",")||null:void 0}];else if(V(z))st=z;else{var He=Object.keys(Ue);st=q?He.sort(q):He}for(var Re=Z&&V(Ue)&&Ue.length===1?M+"[]":M,Be=0;Be<st.length;++Be){var lt=st[Be],_t=typeof lt=="object"&&typeof lt.value!="undefined"?lt.value:Ue[lt];if(!(H&&_t===null)){var rt=V(Ue)?typeof B=="function"?B(Re,lt):Re:Re+(pe?"."+lt:"["+lt+"]");ze.set(w,pt);var Pt=m();Pt.set(J,ze),te(Rt,D(_t,rt,B,Z,ae,H,B==="comma"&&ie&&V(Ue)?null:le,z,q,pe,xe,Q,ye,ie,je,Pt))}}return Rt},ee=function(w){if(!w)return oe;if(w.encoder!==null&&typeof w.encoder!="undefined"&&typeof w.encoder!="function")throw new TypeError("Encoder has to be a function.");var M=w.charset||oe.charset;if(typeof w.charset!="undefined"&&w.charset!=="utf-8"&&w.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var B=k.default;if(typeof w.format!="undefined"){if(!L.call(k.formatters,w.format))throw new TypeError("Unknown format option provided.");B=w.format}var Z=k.formatters[B],ae=oe.filter;return(typeof w.filter=="function"||V(w.filter))&&(ae=w.filter),{addQueryPrefix:typeof w.addQueryPrefix=="boolean"?w.addQueryPrefix:oe.addQueryPrefix,allowDots:typeof w.allowDots=="undefined"?oe.allowDots:!!w.allowDots,charset:M,charsetSentinel:typeof w.charsetSentinel=="boolean"?w.charsetSentinel:oe.charsetSentinel,delimiter:typeof w.delimiter=="undefined"?oe.delimiter:w.delimiter,encode:typeof w.encode=="boolean"?w.encode:oe.encode,encoder:typeof w.encoder=="function"?w.encoder:oe.encoder,encodeValuesOnly:typeof w.encodeValuesOnly=="boolean"?w.encodeValuesOnly:oe.encodeValuesOnly,filter:ae,format:B,formatter:Z,serializeDate:typeof w.serializeDate=="function"?w.serializeDate:oe.serializeDate,skipNulls:typeof w.skipNulls=="boolean"?w.skipNulls:oe.skipNulls,sort:typeof w.sort=="function"?w.sort:null,strictNullHandling:typeof w.strictNullHandling=="boolean"?w.strictNullHandling:oe.strictNullHandling}};S.exports=function(D,w){var M=D,B=ee(w),Z,ae;typeof B.filter=="function"?(ae=B.filter,M=ae("",M)):V(B.filter)&&(ae=B.filter,Z=ae);var H=[];if(typeof M!="object"||M===null)return"";var le;w&&w.arrayFormat in R?le=w.arrayFormat:w&&"indices"in w?le=w.indices?"indices":"repeat":le="indices";var z=R[le];if(w&&"commaRoundTrip"in w&&typeof w.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var q=z==="comma"&&w&&w.commaRoundTrip;Z||(Z=Object.keys(M)),B.sort&&Z.sort(B.sort);for(var pe=m(),xe=0;xe<Z.length;++xe){var Q=Z[xe];B.skipNulls&&M[Q]===null||te(H,F(M[Q],Q,z,q,B.strictNullHandling,B.skipNulls,B.encode?B.encoder:null,B.filter,B.sort,B.allowDots,B.serializeDate,B.format,B.formatter,B.encodeValuesOnly,B.charset,pe))}var ye=H.join(B.delimiter),ie=B.addQueryPrefix===!0?"?":"";return B.charsetSentinel&&(B.charset==="iso-8859-1"?ie+="utf8=%26%2310003%3B&":ie+="utf8=%E2%9C%93&"),ye.length>0?ie+ye:""}},37748:(S,N,c)=>{"use strict";var m=c(83949),O=Object.prototype.hasOwnProperty,k=Array.isArray,L=function(){for(var D=[],w=0;w<256;++w)D.push("%"+((w<16?"0":"")+w.toString(16)).toUpperCase());return D}(),R=function(w){for(;w.length>1;){var M=w.pop(),B=M.obj[M.prop];if(k(B)){for(var Z=[],ae=0;ae<B.length;++ae)typeof B[ae]!="undefined"&&Z.push(B[ae]);M.obj[M.prop]=Z}}},V=function(w,M){for(var B=M&&M.plainObjects?Object.create(null):{},Z=0;Z<w.length;++Z)typeof w[Z]!="undefined"&&(B[Z]=w[Z]);return B},X=function D(w,M,B){if(!M)return w;if(typeof M!="object"){if(k(w))w.push(M);else if(w&&typeof w=="object")(B&&(B.plainObjects||B.allowPrototypes)||!O.call(Object.prototype,M))&&(w[M]=!0);else return[w,M];return w}if(!w||typeof w!="object")return[w].concat(M);var Z=w;return k(w)&&!k(M)&&(Z=V(w,B)),k(w)&&k(M)?(M.forEach(function(ae,H){if(O.call(w,H)){var le=w[H];le&&typeof le=="object"&&ae&&typeof ae=="object"?w[H]=D(le,ae,B):w.push(ae)}else w[H]=ae}),w):Object.keys(M).reduce(function(ae,H){var le=M[H];return O.call(ae,H)?ae[H]=D(ae[H],le,B):ae[H]=le,ae},Z)},te=function(w,M){return Object.keys(M).reduce(function(B,Z){return B[Z]=M[Z],B},w)},re=function(D,w,M){var B=D.replace(/\+/g," ");if(M==="iso-8859-1")return B.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(B)}catch(Z){return B}},he=function(w,M,B,Z,ae){if(w.length===0)return w;var H=w;if(typeof w=="symbol"?H=Symbol.prototype.toString.call(w):typeof w!="string"&&(H=String(w)),B==="iso-8859-1")return escape(H).replace(/%u[0-9a-f]{4}/gi,function(pe){return"%26%23"+parseInt(pe.slice(2),16)+"%3B"});for(var le="",z=0;z<H.length;++z){var q=H.charCodeAt(z);if(q===45||q===46||q===95||q===126||q>=48&&q<=57||q>=65&&q<=90||q>=97&&q<=122||ae===m.RFC1738&&(q===40||q===41)){le+=H.charAt(z);continue}if(q<128){le=le+L[q];continue}if(q<2048){le=le+(L[192|q>>6]+L[128|q&63]);continue}if(q<55296||q>=57344){le=le+(L[224|q>>12]+L[128|q>>6&63]+L[128|q&63]);continue}z+=1,q=65536+((q&1023)<<10|H.charCodeAt(z)&1023),le+=L[240|q>>18]+L[128|q>>12&63]+L[128|q>>6&63]+L[128|q&63]}return le},oe=function(w){for(var M=[{obj:{o:w},prop:"o"}],B=[],Z=0;Z<M.length;++Z)for(var ae=M[Z],H=ae.obj[ae.prop],le=Object.keys(H),z=0;z<le.length;++z){var q=le[z],pe=H[q];typeof pe=="object"&&pe!==null&&B.indexOf(pe)===-1&&(M.push({obj:H,prop:q}),B.push(pe))}return R(M),w},fe=function(w){return Object.prototype.toString.call(w)==="[object RegExp]"},J=function(w){return!w||typeof w!="object"?!1:!!(w.constructor&&w.constructor.isBuffer&&w.constructor.isBuffer(w))},F=function(w,M){return[].concat(w,M)},ee=function(w,M){if(k(w)){for(var B=[],Z=0;Z<w.length;Z+=1)B.push(M(w[Z]));return B}return M(w)};S.exports={arrayToObject:V,assign:te,combine:F,compact:oe,decode:re,encode:he,isBuffer:J,isRegExp:fe,maybeMap:ee,merge:X}},99913:(S,N,c)=>{"use strict";var m;function O(){return O=Object.assign||function(fe){for(var J=1;J<arguments.length;J++){var F=arguments[J];for(var ee in F)Object.prototype.hasOwnProperty.call(F,ee)&&(fe[ee]=F[ee])}return fe},O.apply(this,arguments)}function k(fe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?k=function(F){return typeof F}:k=function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},k(fe)}var L=function(){var fe=function(F,ee){return fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,w){D.__proto__=w}||function(D,w){for(var M in w)w.hasOwnProperty(M)&&(D[M]=w[M])},fe(F,ee)};return function(J,F){fe(J,F);function ee(){this.constructor=J}J.prototype=F===null?Object.create(F):(ee.prototype=F.prototype,new ee)}}();m={value:!0},m=N.fk=void 0;var R=c(29901),V=typeof navigator=="undefined"||c.g.PREVENT_CODEMIRROR_RENDER===!0,X;V||(X=c(46944));var te=function(){function fe(){}return fe.equals=function(J,F){var ee=this,D=Object.keys,w=k(J),M=k(F);return J&&F&&w==="object"&&w===M?D(J).length===D(F).length&&D(J).every(function(B){return ee.equals(J[B],F[B])}):J===F},fe}(),re=function(){function fe(J,F){this.editor=J,this.props=F}return fe.prototype.delegateCursor=function(J,F,ee){var D=this.editor.getDoc();ee&&this.editor.focus(),F?D.setCursor(J):D.setCursor(J,null,{scroll:!1})},fe.prototype.delegateScroll=function(J){this.editor.scrollTo(J.x,J.y)},fe.prototype.delegateSelection=function(J,F){var ee=this.editor.getDoc();ee.setSelections(J),F&&this.editor.focus()},fe.prototype.apply=function(J){J&&J.selection&&J.selection.ranges&&this.delegateSelection(J.selection.ranges,J.selection.focus||!1),J&&J.cursor&&this.delegateCursor(J.cursor,J.autoScroll||!1,this.editor.getOption("autofocus")||!1),J&&J.scroll&&this.delegateScroll(J.scroll)},fe.prototype.applyNext=function(J,F,ee){J&&J.selection&&J.selection.ranges&&F&&F.selection&&F.selection.ranges&&!te.equals(J.selection.ranges,F.selection.ranges)&&this.delegateSelection(F.selection.ranges,F.selection.focus||!1),J&&J.cursor&&F&&F.cursor&&!te.equals(J.cursor,F.cursor)&&this.delegateCursor(ee.cursor||F.cursor,F.autoScroll||!1,F.autoCursor||!1),J&&J.scroll&&F&&F.scroll&&!te.equals(J.scroll,F.scroll)&&this.delegateScroll(F.scroll)},fe.prototype.applyUserDefined=function(J,F){F&&F.cursor&&this.delegateCursor(F.cursor,J.autoScroll||!1,this.editor.getOption("autofocus")||!1)},fe.prototype.wire=function(J){var F=this;Object.keys(J||{}).filter(function(ee){return/^on/.test(ee)}).forEach(function(ee){switch(ee){case"onBlur":F.editor.on("blur",function(D,w){F.props.onBlur(F.editor,w)});break;case"onContextMenu":{F.editor.on("contextmenu",function(D,w){F.props.onContextMenu(F.editor,w)});break}case"onCopy":{F.editor.on("copy",function(D,w){F.props.onCopy(F.editor,w)});break}case"onCursor":F.editor.on("cursorActivity",function(D){F.props.onCursor(F.editor,F.editor.getDoc().getCursor())});break;case"onCursorActivity":F.editor.on("cursorActivity",function(D){F.props.onCursorActivity(F.editor)});break;case"onCut":{F.editor.on("cut",function(D,w){F.props.onCut(F.editor,w)});break}case"onDblClick":{F.editor.on("dblclick",function(D,w){F.props.onDblClick(F.editor,w)});break}case"onDragEnter":F.editor.on("dragenter",function(D,w){F.props.onDragEnter(F.editor,w)});break;case"onDragLeave":{F.editor.on("dragleave",function(D,w){F.props.onDragLeave(F.editor,w)});break}case"onDragOver":F.editor.on("dragover",function(D,w){F.props.onDragOver(F.editor,w)});break;case"onDragStart":{F.editor.on("dragstart",function(D,w){F.props.onDragStart(F.editor,w)});break}case"onDrop":F.editor.on("drop",function(D,w){F.props.onDrop(F.editor,w)});break;case"onFocus":F.editor.on("focus",function(D,w){F.props.onFocus(F.editor,w)});break;case"onGutterClick":F.editor.on("gutterClick",function(D,w,M,B){F.props.onGutterClick(F.editor,w,M,B)});break;case"onInputRead":F.editor.on("inputRead",function(D,w){F.props.onInputRead(F.editor,w)});break;case"onKeyDown":F.editor.on("keydown",function(D,w){F.props.onKeyDown(F.editor,w)});break;case"onKeyHandled":F.editor.on("keyHandled",function(D,w,M){F.props.onKeyHandled(F.editor,w,M)});break;case"onKeyPress":F.editor.on("keypress",function(D,w){F.props.onKeyPress(F.editor,w)});break;case"onKeyUp":F.editor.on("keyup",function(D,w){F.props.onKeyUp(F.editor,w)});break;case"onMouseDown":{F.editor.on("mousedown",function(D,w){F.props.onMouseDown(F.editor,w)});break}case"onPaste":{F.editor.on("paste",function(D,w){F.props.onPaste(F.editor,w)});break}case"onRenderLine":{F.editor.on("renderLine",function(D,w,M){F.props.onRenderLine(F.editor,w,M)});break}case"onScroll":F.editor.on("scroll",function(D){F.props.onScroll(F.editor,F.editor.getScrollInfo())});break;case"onSelection":F.editor.on("beforeSelectionChange",function(D,w){F.props.onSelection(F.editor,w)});break;case"onTouchStart":{F.editor.on("touchstart",function(D,w){F.props.onTouchStart(F.editor,w)});break}case"onUpdate":F.editor.on("update",function(D){F.props.onUpdate(F.editor)});break;case"onViewportChange":F.editor.on("viewportChange",function(D,w,M){F.props.onViewportChange(F.editor,w,M)});break}})},fe}(),he=function(fe){L(J,fe);function J(F){var ee=fe.call(this,F)||this;return V||(ee.applied=!1,ee.appliedNext=!1,ee.appliedUserDefined=!1,ee.deferred=null,ee.emulating=!1,ee.hydrated=!1,ee.initCb=function(){ee.props.editorDidConfigure&&ee.props.editorDidConfigure(ee.editor)},ee.mounted=!1),ee}return J.prototype.hydrate=function(F){var ee=this,D=F&&F.options?F.options:{},w=O({},X.defaults,this.editor.options,D),M=Object.keys(w).some(function(B){return ee.editor.getOption(B)!==w[B]});M&&Object.keys(w).forEach(function(B){D.hasOwnProperty(B)&&ee.editor.getOption(B)!==w[B]&&(ee.editor.setOption(B,w[B]),ee.mirror.setOption(B,w[B]))}),this.hydrated||(this.deferred?this.resolveChange(F.value):this.initChange(F.value||"")),this.hydrated=!0},J.prototype.initChange=function(F){this.emulating=!0;var ee=this.editor.getDoc(),D=ee.lastLine(),w=ee.getLine(ee.lastLine()).length;ee.replaceRange(F||"",{line:0,ch:0},{line:D,ch:w}),this.mirror.setValue(F),ee.clearHistory(),this.mirror.clearHistory(),this.emulating=!1},J.prototype.resolveChange=function(F){this.emulating=!0;var ee=this.editor.getDoc();if(this.deferred.origin==="undo"?ee.undo():this.deferred.origin==="redo"?ee.redo():ee.replaceRange(this.deferred.text,this.deferred.from,this.deferred.to,this.deferred.origin),F&&F!==ee.getValue()){var D=ee.getCursor();ee.setValue(F),ee.setCursor(D)}this.emulating=!1,this.deferred=null},J.prototype.mirrorChange=function(F){var ee=this.editor.getDoc();return F.origin==="undo"?(ee.setHistory(this.mirror.getHistory()),this.mirror.undo()):F.origin==="redo"?(ee.setHistory(this.mirror.getHistory()),this.mirror.redo()):this.mirror.replaceRange(F.text,F.from,F.to,F.origin),this.mirror.getValue()},J.prototype.componentDidMount=function(){var F=this;V||(this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&X.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=X(this.ref,this.props.options),this.shared=new re(this.editor,this.props),this.mirror=X(function(){},this.props.options),this.editor.on("electricInput",function(){F.mirror.setHistory(F.editor.getDoc().getHistory())}),this.editor.on("cursorActivity",function(){F.mirror.setCursor(F.editor.getDoc().getCursor())}),this.editor.on("beforeChange",function(ee,D){if(!F.emulating){D.cancel(),F.deferred=D;var w=F.mirrorChange(F.deferred);F.props.onBeforeChange&&F.props.onBeforeChange(F.editor,F.deferred,w)}}),this.editor.on("change",function(ee,D){F.mounted&&F.props.onChange&&F.props.onChange(F.editor,D,F.editor.getValue())}),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getOption("autofocus")&&this.editor.focus(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},J.prototype.componentDidUpdate=function(F){if(!V){var ee={cursor:null};this.props.value!==F.value&&(this.hydrated=!1),!this.props.autoCursor&&this.props.autoCursor!==void 0&&(ee.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.appliedNext||(this.shared.applyNext(F,this.props,ee),this.appliedNext=!0),this.shared.applyUserDefined(F,ee),this.appliedUserDefined=!0}},J.prototype.componentWillUnmount=function(){V||this.props.editorWillUnmount&&this.props.editorWillUnmount(X)},J.prototype.shouldComponentUpdate=function(F,ee){return!V},J.prototype.render=function(){var F=this;if(V)return null;var ee=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return R.createElement("div",{className:ee,ref:function(w){return F.ref=w}})},J}(R.Component);N.fk=he;var oe=function(fe){L(J,fe);function J(F){var ee=fe.call(this,F)||this;return V||(ee.applied=!1,ee.appliedUserDefined=!1,ee.continueChange=!1,ee.detached=!1,ee.hydrated=!1,ee.initCb=function(){ee.props.editorDidConfigure&&ee.props.editorDidConfigure(ee.editor)},ee.mounted=!1,ee.onBeforeChangeCb=function(){ee.continueChange=!0}),ee}return J.prototype.hydrate=function(F){var ee=this,D=F&&F.options?F.options:{},w=O({},X.defaults,this.editor.options,D),M=Object.keys(w).some(function(H){return ee.editor.getOption(H)!==w[H]});if(M&&Object.keys(w).forEach(function(H){D.hasOwnProperty(H)&&ee.editor.getOption(H)!==w[H]&&ee.editor.setOption(H,w[H])}),!this.hydrated){var B=this.editor.getDoc(),Z=B.lastLine(),ae=B.getLine(B.lastLine()).length;B.replaceRange(F.value||"",{line:0,ch:0},{line:Z,ch:ae})}this.hydrated=!0},J.prototype.componentDidMount=function(){var F=this;V||(this.detached=this.props.detach===!0,this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&X.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=X(this.ref,this.props.options),this.shared=new re(this.editor,this.props),this.editor.on("beforeChange",function(ee,D){F.props.onBeforeChange&&F.props.onBeforeChange(F.editor,D,F.editor.getValue(),F.onBeforeChangeCb)}),this.editor.on("change",function(ee,D){!F.mounted||!F.props.onChange||(F.props.onBeforeChange?F.continueChange&&F.props.onChange(F.editor,D,F.editor.getValue()):F.props.onChange(F.editor,D,F.editor.getValue()))}),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getDoc().clearHistory(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},J.prototype.componentDidUpdate=function(F){if(this.detached&&this.props.detach===!1&&(this.detached=!1,F.editorDidAttach&&F.editorDidAttach(this.editor)),!this.detached&&this.props.detach===!0&&(this.detached=!0,F.editorDidDetach&&F.editorDidDetach(this.editor)),!(V||this.detached)){var ee={cursor:null};this.props.value!==F.value&&(this.hydrated=!1,this.applied=!1,this.appliedUserDefined=!1),!F.autoCursor&&F.autoCursor!==void 0&&(ee.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.applied||(this.shared.apply(F),this.applied=!0),this.appliedUserDefined||(this.shared.applyUserDefined(F,ee),this.appliedUserDefined=!0)}},J.prototype.componentWillUnmount=function(){V||this.props.editorWillUnmount&&this.props.editorWillUnmount(X)},J.prototype.shouldComponentUpdate=function(F,ee){var D=!0;return V&&(D=!1),this.detached&&F.detach&&(D=!1),D},J.prototype.render=function(){var F=this;if(V)return null;var ee=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return R.createElement("div",{className:ee,ref:function(w){return F.ref=w}})},J}(R.Component);m=oe},44852:(S,N,c)=>{"use strict";var m=c(71013),O=c(2864),k=c(14927),L=m("%TypeError%"),R=m("%WeakMap%",!0),V=m("%Map%",!0),X=O("WeakMap.prototype.get",!0),te=O("WeakMap.prototype.set",!0),re=O("WeakMap.prototype.has",!0),he=O("Map.prototype.get",!0),oe=O("Map.prototype.set",!0),fe=O("Map.prototype.has",!0),J=function(w,M){for(var B=w,Z;(Z=B.next)!==null;B=Z)if(Z.key===M)return B.next=Z.next,Z.next=w.next,w.next=Z,Z},F=function(w,M){var B=J(w,M);return B&&B.value},ee=function(w,M,B){var Z=J(w,M);Z?Z.value=B:w.next={key:M,next:w.next,value:B}},D=function(w,M){return!!J(w,M)};S.exports=function(){var M,B,Z,ae={assert:function(H){if(!ae.has(H))throw new L("Side channel does not contain "+k(H))},get:function(H){if(R&&H&&(typeof H=="object"||typeof H=="function")){if(M)return X(M,H)}else if(V){if(B)return he(B,H)}else if(Z)return F(Z,H)},has:function(H){if(R&&H&&(typeof H=="object"||typeof H=="function")){if(M)return re(M,H)}else if(V){if(B)return fe(B,H)}else if(Z)return D(Z,H);return!1},set:function(H,le){R&&H&&(typeof H=="object"||typeof H=="function")?(M||(M=new R),te(M,H,le)):V?(B||(B=new V),oe(B,H,le)):(Z||(Z={key:{},next:null}),ee(Z,H,le))}};return ae}},83539:(S,N,c)=>{var m=c(26673),O=c(20788);O=O.__esModule?O.default:O,typeof O=="string"&&(O=[[S.id,O,""]]);var k={};k.insert="head",k.singleton=!1;var L=m(O,k);S.exports=O.locals||{}},17664:(S,N,c)=>{var m=c(26673),O=c(15218);O=O.__esModule?O.default:O,typeof O=="string"&&(O=[[S.id,O,""]]);var k={};k.insert="head",k.singleton=!1;var L=m(O,k);S.exports=O.locals||{}},6766:(S,N,c)=>{var m=c(26673),O=c(80766);O=O.__esModule?O.default:O,typeof O=="string"&&(O=[[S.id,O,""]]);var k={};k.insert="head",k.singleton=!1;var L=m(O,k);S.exports=O.locals||{}},49812:(S,N,c)=>{var m=c(26673),O=c(62459);O=O.__esModule?O.default:O,typeof O=="string"&&(O=[[S.id,O,""]]);var k={};k.insert="head",k.singleton=!1;var L=m(O,k);S.exports=O.locals||{}},56089:S=>{"use strict";S.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg=="},17735:S=>{"use strict";S.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII="},96192:S=>{"use strict";S.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC"},71090:S=>{"use strict";S.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII="},46050:S=>{"use strict";S.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII="},65710:()=>{},93652:(S,N,c)=>{S.exports=c(24018)},10017:(S,N,c)=>{S.exports=c(27411)},34961:(S,N,c)=>{S.exports=c(79155)},86751:(S,N,c)=>{S.exports=c(13375)},12953:(S,N,c)=>{S.exports=c(95442)},11099:(S,N,c)=>{S.exports=c(55334)},86351:(S,N,c)=>{S.exports=c(48261)},70762:(S,N,c)=>{S.exports=c(92864)},10954:(S,N,c)=>{S.exports=c(27923)},55839:(S,N,c)=>{S.exports=c(89225)},23422:(S,N,c)=>{S.exports=c(95281)},47319:(S,N,c)=>{S.exports=c(55468)}}])});s0();})();
498
+ `+we.prev}function mt(se,we){var Ve=He(se),nt=[];if(Ve){nt.length=se.length;for(var ht=0;ht<se.length;ht++)nt[ht]=et(se,ht)?we(se[ht],se):""}var ct=typeof ye=="function"?ye(se):[],Qt;if(je){Qt={};for(var Gr=0;Gr<ct.length;Gr++)Qt["$"+ct[Gr]]=ct[Gr]}for(var Ft in se)et(se,Ft)&&(Ve&&String(Number(Ft))===Ft&&Ft<se.length||je&&Qt["$"+Ft]instanceof Symbol||(le.call(/[^\w$]/,Ft)?nt.push(we(Ft,se)+": "+we(se[Ft],se)):nt.push(Ft+": "+we(se[Ft],se))));if(typeof ye=="function")for(var dr=0;dr<ct.length;dr++)Ue.call(se,ct[dr])&&nt.push("["+we(ct[dr])+"]: "+we(se[ct[dr]],se));return nt}},83949:S=>{"use strict";var R=String.prototype.replace,c=/%20/g,m={RFC1738:"RFC1738",RFC3986:"RFC3986"};S.exports={default:m.RFC3986,formatters:{RFC1738:function(O){return R.call(O,c,"+")},RFC3986:function(O){return String(O)}},RFC1738:m.RFC1738,RFC3986:m.RFC3986}},67905:(S,R,c)=>{"use strict";var m=c(85095),O=c(95990),k=c(83949);S.exports={formats:k,parse:O,stringify:m}},95990:(S,R,c)=>{"use strict";var m=c(37748),O=Object.prototype.hasOwnProperty,k=Array.isArray,L={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:m.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},D=function(J){return J.replace(/&#(\d+);/g,function(F,ee){return String.fromCharCode(parseInt(ee,10))})},j=function(J,F){return J&&typeof J=="string"&&F.comma&&J.indexOf(",")>-1?J.split(","):J},X="utf8=%26%2310003%3B",te="utf8=%E2%9C%93",re=function(F,ee){var N={__proto__:null},w=ee.ignoreQueryPrefix?F.replace(/^\?/,""):F,M=ee.parameterLimit===1/0?void 0:ee.parameterLimit,B=w.split(ee.delimiter,M),Z=-1,ae,H=ee.charset;if(ee.charsetSentinel)for(ae=0;ae<B.length;++ae)B[ae].indexOf("utf8=")===0&&(B[ae]===te?H="utf-8":B[ae]===X&&(H="iso-8859-1"),Z=ae,ae=B.length);for(ae=0;ae<B.length;++ae)if(ae!==Z){var le=B[ae],z=le.indexOf("]="),q=z===-1?le.indexOf("="):z+1,pe,xe;q===-1?(pe=ee.decoder(le,L.decoder,H,"key"),xe=ee.strictNullHandling?null:""):(pe=ee.decoder(le.slice(0,q),L.decoder,H,"key"),xe=m.maybeMap(j(le.slice(q+1),ee),function(Q){return ee.decoder(Q,L.decoder,H,"value")})),xe&&ee.interpretNumericEntities&&H==="iso-8859-1"&&(xe=D(xe)),le.indexOf("[]=")>-1&&(xe=k(xe)?[xe]:xe),O.call(N,pe)?N[pe]=m.combine(N[pe],xe):N[pe]=xe}return N},he=function(J,F,ee,N){for(var w=N?F:j(F,ee),M=J.length-1;M>=0;--M){var B,Z=J[M];if(Z==="[]"&&ee.parseArrays)B=[].concat(w);else{B=ee.plainObjects?Object.create(null):{};var ae=Z.charAt(0)==="["&&Z.charAt(Z.length-1)==="]"?Z.slice(1,-1):Z,H=parseInt(ae,10);!ee.parseArrays&&ae===""?B={0:w}:!isNaN(H)&&Z!==ae&&String(H)===ae&&H>=0&&ee.parseArrays&&H<=ee.arrayLimit?(B=[],B[H]=w):ae!=="__proto__"&&(B[ae]=w)}w=B}return w},oe=function(F,ee,N,w){if(F){var M=N.allowDots?F.replace(/\.([^.[]+)/g,"[$1]"):F,B=/(\[[^[\]]*])/,Z=/(\[[^[\]]*])/g,ae=N.depth>0&&B.exec(M),H=ae?M.slice(0,ae.index):M,le=[];if(H){if(!N.plainObjects&&O.call(Object.prototype,H)&&!N.allowPrototypes)return;le.push(H)}for(var z=0;N.depth>0&&(ae=Z.exec(M))!==null&&z<N.depth;){if(z+=1,!N.plainObjects&&O.call(Object.prototype,ae[1].slice(1,-1))&&!N.allowPrototypes)return;le.push(ae[1])}return ae&&le.push("["+M.slice(ae.index)+"]"),he(le,ee,N,w)}},fe=function(F){if(!F)return L;if(F.decoder!==null&&F.decoder!==void 0&&typeof F.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof F.charset<"u"&&F.charset!=="utf-8"&&F.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var ee=typeof F.charset>"u"?L.charset:F.charset;return{allowDots:typeof F.allowDots>"u"?L.allowDots:!!F.allowDots,allowPrototypes:typeof F.allowPrototypes=="boolean"?F.allowPrototypes:L.allowPrototypes,allowSparse:typeof F.allowSparse=="boolean"?F.allowSparse:L.allowSparse,arrayLimit:typeof F.arrayLimit=="number"?F.arrayLimit:L.arrayLimit,charset:ee,charsetSentinel:typeof F.charsetSentinel=="boolean"?F.charsetSentinel:L.charsetSentinel,comma:typeof F.comma=="boolean"?F.comma:L.comma,decoder:typeof F.decoder=="function"?F.decoder:L.decoder,delimiter:typeof F.delimiter=="string"||m.isRegExp(F.delimiter)?F.delimiter:L.delimiter,depth:typeof F.depth=="number"||F.depth===!1?+F.depth:L.depth,ignoreQueryPrefix:F.ignoreQueryPrefix===!0,interpretNumericEntities:typeof F.interpretNumericEntities=="boolean"?F.interpretNumericEntities:L.interpretNumericEntities,parameterLimit:typeof F.parameterLimit=="number"?F.parameterLimit:L.parameterLimit,parseArrays:F.parseArrays!==!1,plainObjects:typeof F.plainObjects=="boolean"?F.plainObjects:L.plainObjects,strictNullHandling:typeof F.strictNullHandling=="boolean"?F.strictNullHandling:L.strictNullHandling}};S.exports=function(J,F){var ee=fe(F);if(J===""||J===null||typeof J>"u")return ee.plainObjects?Object.create(null):{};for(var N=typeof J=="string"?re(J,ee):J,w=ee.plainObjects?Object.create(null):{},M=Object.keys(N),B=0;B<M.length;++B){var Z=M[B],ae=oe(Z,N[Z],ee,typeof J=="string");w=m.merge(w,ae,ee)}return ee.allowSparse===!0?w:m.compact(w)}},85095:(S,R,c)=>{"use strict";var m=c(44852),O=c(37748),k=c(83949),L=Object.prototype.hasOwnProperty,D={brackets:function(w){return w+"[]"},comma:"comma",indices:function(w,M){return w+"["+M+"]"},repeat:function(w){return w}},j=Array.isArray,X=Array.prototype.push,te=function(N,w){X.apply(N,j(w)?w:[w])},re=Date.prototype.toISOString,he=k.default,oe={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:O.encode,encodeValuesOnly:!1,format:he,formatter:k.formatters[he],indices:!1,serializeDate:function(w){return re.call(w)},skipNulls:!1,strictNullHandling:!1},fe=function(w){return typeof w=="string"||typeof w=="number"||typeof w=="boolean"||typeof w=="symbol"||typeof w=="bigint"},J={},F=function N(w,M,B,Z,ae,H,le,z,q,pe,xe,Q,ye,ie,je,ze){for(var Ue=w,vt=ze,pt=0,ut=!1;(vt=vt.get(J))!==void 0&&!ut;){var er=vt.get(w);if(pt+=1,typeof er<"u"){if(er===pt)throw new RangeError("Cyclic object value");ut=!0}typeof vt.get(J)>"u"&&(pt=0)}if(typeof z=="function"?Ue=z(M,Ue):Ue instanceof Date?Ue=xe(Ue):B==="comma"&&j(Ue)&&(Ue=O.maybeMap(Ue,function(tr){return tr instanceof Date?xe(tr):tr})),Ue===null){if(ae)return le&&!ie?le(M,oe.encoder,je,"key",Q):M;Ue=""}if(fe(Ue)||O.isBuffer(Ue)){if(le){var gt=ie?M:le(M,oe.encoder,je,"key",Q);return[ye(gt)+"="+ye(le(Ue,oe.encoder,je,"value",Q))]}return[ye(M)+"="+ye(String(Ue))]}var Rt=[];if(typeof Ue>"u")return Rt;var st;if(B==="comma"&&j(Ue))ie&&le&&(Ue=O.maybeMap(Ue,le)),st=[{value:Ue.length>0?Ue.join(",")||null:void 0}];else if(j(z))st=z;else{var He=Object.keys(Ue);st=q?He.sort(q):He}for(var Re=Z&&j(Ue)&&Ue.length===1?M+"[]":M,Be=0;Be<st.length;++Be){var lt=st[Be],_t=typeof lt=="object"&&typeof lt.value<"u"?lt.value:Ue[lt];if(!(H&&_t===null)){var rt=j(Ue)?typeof B=="function"?B(Re,lt):Re:Re+(pe?"."+lt:"["+lt+"]");ze.set(w,pt);var Pt=m();Pt.set(J,ze),te(Rt,N(_t,rt,B,Z,ae,H,B==="comma"&&ie&&j(Ue)?null:le,z,q,pe,xe,Q,ye,ie,je,Pt))}}return Rt},ee=function(w){if(!w)return oe;if(w.encoder!==null&&typeof w.encoder<"u"&&typeof w.encoder!="function")throw new TypeError("Encoder has to be a function.");var M=w.charset||oe.charset;if(typeof w.charset<"u"&&w.charset!=="utf-8"&&w.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var B=k.default;if(typeof w.format<"u"){if(!L.call(k.formatters,w.format))throw new TypeError("Unknown format option provided.");B=w.format}var Z=k.formatters[B],ae=oe.filter;return(typeof w.filter=="function"||j(w.filter))&&(ae=w.filter),{addQueryPrefix:typeof w.addQueryPrefix=="boolean"?w.addQueryPrefix:oe.addQueryPrefix,allowDots:typeof w.allowDots>"u"?oe.allowDots:!!w.allowDots,charset:M,charsetSentinel:typeof w.charsetSentinel=="boolean"?w.charsetSentinel:oe.charsetSentinel,delimiter:typeof w.delimiter>"u"?oe.delimiter:w.delimiter,encode:typeof w.encode=="boolean"?w.encode:oe.encode,encoder:typeof w.encoder=="function"?w.encoder:oe.encoder,encodeValuesOnly:typeof w.encodeValuesOnly=="boolean"?w.encodeValuesOnly:oe.encodeValuesOnly,filter:ae,format:B,formatter:Z,serializeDate:typeof w.serializeDate=="function"?w.serializeDate:oe.serializeDate,skipNulls:typeof w.skipNulls=="boolean"?w.skipNulls:oe.skipNulls,sort:typeof w.sort=="function"?w.sort:null,strictNullHandling:typeof w.strictNullHandling=="boolean"?w.strictNullHandling:oe.strictNullHandling}};S.exports=function(N,w){var M=N,B=ee(w),Z,ae;typeof B.filter=="function"?(ae=B.filter,M=ae("",M)):j(B.filter)&&(ae=B.filter,Z=ae);var H=[];if(typeof M!="object"||M===null)return"";var le;w&&w.arrayFormat in D?le=w.arrayFormat:w&&"indices"in w?le=w.indices?"indices":"repeat":le="indices";var z=D[le];if(w&&"commaRoundTrip"in w&&typeof w.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var q=z==="comma"&&w&&w.commaRoundTrip;Z||(Z=Object.keys(M)),B.sort&&Z.sort(B.sort);for(var pe=m(),xe=0;xe<Z.length;++xe){var Q=Z[xe];B.skipNulls&&M[Q]===null||te(H,F(M[Q],Q,z,q,B.strictNullHandling,B.skipNulls,B.encode?B.encoder:null,B.filter,B.sort,B.allowDots,B.serializeDate,B.format,B.formatter,B.encodeValuesOnly,B.charset,pe))}var ye=H.join(B.delimiter),ie=B.addQueryPrefix===!0?"?":"";return B.charsetSentinel&&(B.charset==="iso-8859-1"?ie+="utf8=%26%2310003%3B&":ie+="utf8=%E2%9C%93&"),ye.length>0?ie+ye:""}},37748:(S,R,c)=>{"use strict";var m=c(83949),O=Object.prototype.hasOwnProperty,k=Array.isArray,L=function(){for(var N=[],w=0;w<256;++w)N.push("%"+((w<16?"0":"")+w.toString(16)).toUpperCase());return N}(),D=function(w){for(;w.length>1;){var M=w.pop(),B=M.obj[M.prop];if(k(B)){for(var Z=[],ae=0;ae<B.length;++ae)typeof B[ae]<"u"&&Z.push(B[ae]);M.obj[M.prop]=Z}}},j=function(w,M){for(var B=M&&M.plainObjects?Object.create(null):{},Z=0;Z<w.length;++Z)typeof w[Z]<"u"&&(B[Z]=w[Z]);return B},X=function N(w,M,B){if(!M)return w;if(typeof M!="object"){if(k(w))w.push(M);else if(w&&typeof w=="object")(B&&(B.plainObjects||B.allowPrototypes)||!O.call(Object.prototype,M))&&(w[M]=!0);else return[w,M];return w}if(!w||typeof w!="object")return[w].concat(M);var Z=w;return k(w)&&!k(M)&&(Z=j(w,B)),k(w)&&k(M)?(M.forEach(function(ae,H){if(O.call(w,H)){var le=w[H];le&&typeof le=="object"&&ae&&typeof ae=="object"?w[H]=N(le,ae,B):w.push(ae)}else w[H]=ae}),w):Object.keys(M).reduce(function(ae,H){var le=M[H];return O.call(ae,H)?ae[H]=N(ae[H],le,B):ae[H]=le,ae},Z)},te=function(w,M){return Object.keys(M).reduce(function(B,Z){return B[Z]=M[Z],B},w)},re=function(N,w,M){var B=N.replace(/\+/g," ");if(M==="iso-8859-1")return B.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(B)}catch{return B}},he=function(w,M,B,Z,ae){if(w.length===0)return w;var H=w;if(typeof w=="symbol"?H=Symbol.prototype.toString.call(w):typeof w!="string"&&(H=String(w)),B==="iso-8859-1")return escape(H).replace(/%u[0-9a-f]{4}/gi,function(pe){return"%26%23"+parseInt(pe.slice(2),16)+"%3B"});for(var le="",z=0;z<H.length;++z){var q=H.charCodeAt(z);if(q===45||q===46||q===95||q===126||q>=48&&q<=57||q>=65&&q<=90||q>=97&&q<=122||ae===m.RFC1738&&(q===40||q===41)){le+=H.charAt(z);continue}if(q<128){le=le+L[q];continue}if(q<2048){le=le+(L[192|q>>6]+L[128|q&63]);continue}if(q<55296||q>=57344){le=le+(L[224|q>>12]+L[128|q>>6&63]+L[128|q&63]);continue}z+=1,q=65536+((q&1023)<<10|H.charCodeAt(z)&1023),le+=L[240|q>>18]+L[128|q>>12&63]+L[128|q>>6&63]+L[128|q&63]}return le},oe=function(w){for(var M=[{obj:{o:w},prop:"o"}],B=[],Z=0;Z<M.length;++Z)for(var ae=M[Z],H=ae.obj[ae.prop],le=Object.keys(H),z=0;z<le.length;++z){var q=le[z],pe=H[q];typeof pe=="object"&&pe!==null&&B.indexOf(pe)===-1&&(M.push({obj:H,prop:q}),B.push(pe))}return D(M),w},fe=function(w){return Object.prototype.toString.call(w)==="[object RegExp]"},J=function(w){return!w||typeof w!="object"?!1:!!(w.constructor&&w.constructor.isBuffer&&w.constructor.isBuffer(w))},F=function(w,M){return[].concat(w,M)},ee=function(w,M){if(k(w)){for(var B=[],Z=0;Z<w.length;Z+=1)B.push(M(w[Z]));return B}return M(w)};S.exports={arrayToObject:j,assign:te,combine:F,compact:oe,decode:re,encode:he,isBuffer:J,isRegExp:fe,maybeMap:ee,merge:X}},99913:(S,R,c)=>{"use strict";var m;function O(){return O=Object.assign||function(fe){for(var J=1;J<arguments.length;J++){var F=arguments[J];for(var ee in F)Object.prototype.hasOwnProperty.call(F,ee)&&(fe[ee]=F[ee])}return fe},O.apply(this,arguments)}function k(fe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?k=function(F){return typeof F}:k=function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},k(fe)}var L=function(){var fe=function(F,ee){return fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,w){N.__proto__=w}||function(N,w){for(var M in w)w.hasOwnProperty(M)&&(N[M]=w[M])},fe(F,ee)};return function(J,F){fe(J,F);function ee(){this.constructor=J}J.prototype=F===null?Object.create(F):(ee.prototype=F.prototype,new ee)}}();m={value:!0},m=R.fk=void 0;var D=c(29901),j=typeof navigator>"u"||c.g.PREVENT_CODEMIRROR_RENDER===!0,X;j||(X=c(46944));var te=function(){function fe(){}return fe.equals=function(J,F){var ee=this,N=Object.keys,w=k(J),M=k(F);return J&&F&&w==="object"&&w===M?N(J).length===N(F).length&&N(J).every(function(B){return ee.equals(J[B],F[B])}):J===F},fe}(),re=function(){function fe(J,F){this.editor=J,this.props=F}return fe.prototype.delegateCursor=function(J,F,ee){var N=this.editor.getDoc();ee&&this.editor.focus(),F?N.setCursor(J):N.setCursor(J,null,{scroll:!1})},fe.prototype.delegateScroll=function(J){this.editor.scrollTo(J.x,J.y)},fe.prototype.delegateSelection=function(J,F){var ee=this.editor.getDoc();ee.setSelections(J),F&&this.editor.focus()},fe.prototype.apply=function(J){J&&J.selection&&J.selection.ranges&&this.delegateSelection(J.selection.ranges,J.selection.focus||!1),J&&J.cursor&&this.delegateCursor(J.cursor,J.autoScroll||!1,this.editor.getOption("autofocus")||!1),J&&J.scroll&&this.delegateScroll(J.scroll)},fe.prototype.applyNext=function(J,F,ee){J&&J.selection&&J.selection.ranges&&F&&F.selection&&F.selection.ranges&&!te.equals(J.selection.ranges,F.selection.ranges)&&this.delegateSelection(F.selection.ranges,F.selection.focus||!1),J&&J.cursor&&F&&F.cursor&&!te.equals(J.cursor,F.cursor)&&this.delegateCursor(ee.cursor||F.cursor,F.autoScroll||!1,F.autoCursor||!1),J&&J.scroll&&F&&F.scroll&&!te.equals(J.scroll,F.scroll)&&this.delegateScroll(F.scroll)},fe.prototype.applyUserDefined=function(J,F){F&&F.cursor&&this.delegateCursor(F.cursor,J.autoScroll||!1,this.editor.getOption("autofocus")||!1)},fe.prototype.wire=function(J){var F=this;Object.keys(J||{}).filter(function(ee){return/^on/.test(ee)}).forEach(function(ee){switch(ee){case"onBlur":F.editor.on("blur",function(N,w){F.props.onBlur(F.editor,w)});break;case"onContextMenu":{F.editor.on("contextmenu",function(N,w){F.props.onContextMenu(F.editor,w)});break}case"onCopy":{F.editor.on("copy",function(N,w){F.props.onCopy(F.editor,w)});break}case"onCursor":F.editor.on("cursorActivity",function(N){F.props.onCursor(F.editor,F.editor.getDoc().getCursor())});break;case"onCursorActivity":F.editor.on("cursorActivity",function(N){F.props.onCursorActivity(F.editor)});break;case"onCut":{F.editor.on("cut",function(N,w){F.props.onCut(F.editor,w)});break}case"onDblClick":{F.editor.on("dblclick",function(N,w){F.props.onDblClick(F.editor,w)});break}case"onDragEnter":F.editor.on("dragenter",function(N,w){F.props.onDragEnter(F.editor,w)});break;case"onDragLeave":{F.editor.on("dragleave",function(N,w){F.props.onDragLeave(F.editor,w)});break}case"onDragOver":F.editor.on("dragover",function(N,w){F.props.onDragOver(F.editor,w)});break;case"onDragStart":{F.editor.on("dragstart",function(N,w){F.props.onDragStart(F.editor,w)});break}case"onDrop":F.editor.on("drop",function(N,w){F.props.onDrop(F.editor,w)});break;case"onFocus":F.editor.on("focus",function(N,w){F.props.onFocus(F.editor,w)});break;case"onGutterClick":F.editor.on("gutterClick",function(N,w,M,B){F.props.onGutterClick(F.editor,w,M,B)});break;case"onInputRead":F.editor.on("inputRead",function(N,w){F.props.onInputRead(F.editor,w)});break;case"onKeyDown":F.editor.on("keydown",function(N,w){F.props.onKeyDown(F.editor,w)});break;case"onKeyHandled":F.editor.on("keyHandled",function(N,w,M){F.props.onKeyHandled(F.editor,w,M)});break;case"onKeyPress":F.editor.on("keypress",function(N,w){F.props.onKeyPress(F.editor,w)});break;case"onKeyUp":F.editor.on("keyup",function(N,w){F.props.onKeyUp(F.editor,w)});break;case"onMouseDown":{F.editor.on("mousedown",function(N,w){F.props.onMouseDown(F.editor,w)});break}case"onPaste":{F.editor.on("paste",function(N,w){F.props.onPaste(F.editor,w)});break}case"onRenderLine":{F.editor.on("renderLine",function(N,w,M){F.props.onRenderLine(F.editor,w,M)});break}case"onScroll":F.editor.on("scroll",function(N){F.props.onScroll(F.editor,F.editor.getScrollInfo())});break;case"onSelection":F.editor.on("beforeSelectionChange",function(N,w){F.props.onSelection(F.editor,w)});break;case"onTouchStart":{F.editor.on("touchstart",function(N,w){F.props.onTouchStart(F.editor,w)});break}case"onUpdate":F.editor.on("update",function(N){F.props.onUpdate(F.editor)});break;case"onViewportChange":F.editor.on("viewportChange",function(N,w,M){F.props.onViewportChange(F.editor,w,M)});break}})},fe}(),he=function(fe){L(J,fe);function J(F){var ee=fe.call(this,F)||this;return j||(ee.applied=!1,ee.appliedNext=!1,ee.appliedUserDefined=!1,ee.deferred=null,ee.emulating=!1,ee.hydrated=!1,ee.initCb=function(){ee.props.editorDidConfigure&&ee.props.editorDidConfigure(ee.editor)},ee.mounted=!1),ee}return J.prototype.hydrate=function(F){var ee=this,N=F&&F.options?F.options:{},w=O({},X.defaults,this.editor.options,N),M=Object.keys(w).some(function(B){return ee.editor.getOption(B)!==w[B]});M&&Object.keys(w).forEach(function(B){N.hasOwnProperty(B)&&ee.editor.getOption(B)!==w[B]&&(ee.editor.setOption(B,w[B]),ee.mirror.setOption(B,w[B]))}),this.hydrated||(this.deferred?this.resolveChange(F.value):this.initChange(F.value||"")),this.hydrated=!0},J.prototype.initChange=function(F){this.emulating=!0;var ee=this.editor.getDoc(),N=ee.lastLine(),w=ee.getLine(ee.lastLine()).length;ee.replaceRange(F||"",{line:0,ch:0},{line:N,ch:w}),this.mirror.setValue(F),ee.clearHistory(),this.mirror.clearHistory(),this.emulating=!1},J.prototype.resolveChange=function(F){this.emulating=!0;var ee=this.editor.getDoc();if(this.deferred.origin==="undo"?ee.undo():this.deferred.origin==="redo"?ee.redo():ee.replaceRange(this.deferred.text,this.deferred.from,this.deferred.to,this.deferred.origin),F&&F!==ee.getValue()){var N=ee.getCursor();ee.setValue(F),ee.setCursor(N)}this.emulating=!1,this.deferred=null},J.prototype.mirrorChange=function(F){var ee=this.editor.getDoc();return F.origin==="undo"?(ee.setHistory(this.mirror.getHistory()),this.mirror.undo()):F.origin==="redo"?(ee.setHistory(this.mirror.getHistory()),this.mirror.redo()):this.mirror.replaceRange(F.text,F.from,F.to,F.origin),this.mirror.getValue()},J.prototype.componentDidMount=function(){var F=this;j||(this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&X.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=X(this.ref,this.props.options),this.shared=new re(this.editor,this.props),this.mirror=X(function(){},this.props.options),this.editor.on("electricInput",function(){F.mirror.setHistory(F.editor.getDoc().getHistory())}),this.editor.on("cursorActivity",function(){F.mirror.setCursor(F.editor.getDoc().getCursor())}),this.editor.on("beforeChange",function(ee,N){if(!F.emulating){N.cancel(),F.deferred=N;var w=F.mirrorChange(F.deferred);F.props.onBeforeChange&&F.props.onBeforeChange(F.editor,F.deferred,w)}}),this.editor.on("change",function(ee,N){F.mounted&&F.props.onChange&&F.props.onChange(F.editor,N,F.editor.getValue())}),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getOption("autofocus")&&this.editor.focus(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},J.prototype.componentDidUpdate=function(F){if(!j){var ee={cursor:null};this.props.value!==F.value&&(this.hydrated=!1),!this.props.autoCursor&&this.props.autoCursor!==void 0&&(ee.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.appliedNext||(this.shared.applyNext(F,this.props,ee),this.appliedNext=!0),this.shared.applyUserDefined(F,ee),this.appliedUserDefined=!0}},J.prototype.componentWillUnmount=function(){j||this.props.editorWillUnmount&&this.props.editorWillUnmount(X)},J.prototype.shouldComponentUpdate=function(F,ee){return!j},J.prototype.render=function(){var F=this;if(j)return null;var ee=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return D.createElement("div",{className:ee,ref:function(w){return F.ref=w}})},J}(D.Component);R.fk=he;var oe=function(fe){L(J,fe);function J(F){var ee=fe.call(this,F)||this;return j||(ee.applied=!1,ee.appliedUserDefined=!1,ee.continueChange=!1,ee.detached=!1,ee.hydrated=!1,ee.initCb=function(){ee.props.editorDidConfigure&&ee.props.editorDidConfigure(ee.editor)},ee.mounted=!1,ee.onBeforeChangeCb=function(){ee.continueChange=!0}),ee}return J.prototype.hydrate=function(F){var ee=this,N=F&&F.options?F.options:{},w=O({},X.defaults,this.editor.options,N),M=Object.keys(w).some(function(H){return ee.editor.getOption(H)!==w[H]});if(M&&Object.keys(w).forEach(function(H){N.hasOwnProperty(H)&&ee.editor.getOption(H)!==w[H]&&ee.editor.setOption(H,w[H])}),!this.hydrated){var B=this.editor.getDoc(),Z=B.lastLine(),ae=B.getLine(B.lastLine()).length;B.replaceRange(F.value||"",{line:0,ch:0},{line:Z,ch:ae})}this.hydrated=!0},J.prototype.componentDidMount=function(){var F=this;j||(this.detached=this.props.detach===!0,this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&X.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=X(this.ref,this.props.options),this.shared=new re(this.editor,this.props),this.editor.on("beforeChange",function(ee,N){F.props.onBeforeChange&&F.props.onBeforeChange(F.editor,N,F.editor.getValue(),F.onBeforeChangeCb)}),this.editor.on("change",function(ee,N){!F.mounted||!F.props.onChange||(F.props.onBeforeChange?F.continueChange&&F.props.onChange(F.editor,N,F.editor.getValue()):F.props.onChange(F.editor,N,F.editor.getValue()))}),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getDoc().clearHistory(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},J.prototype.componentDidUpdate=function(F){if(this.detached&&this.props.detach===!1&&(this.detached=!1,F.editorDidAttach&&F.editorDidAttach(this.editor)),!this.detached&&this.props.detach===!0&&(this.detached=!0,F.editorDidDetach&&F.editorDidDetach(this.editor)),!(j||this.detached)){var ee={cursor:null};this.props.value!==F.value&&(this.hydrated=!1,this.applied=!1,this.appliedUserDefined=!1),!F.autoCursor&&F.autoCursor!==void 0&&(ee.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.applied||(this.shared.apply(F),this.applied=!0),this.appliedUserDefined||(this.shared.applyUserDefined(F,ee),this.appliedUserDefined=!0)}},J.prototype.componentWillUnmount=function(){j||this.props.editorWillUnmount&&this.props.editorWillUnmount(X)},J.prototype.shouldComponentUpdate=function(F,ee){var N=!0;return j&&(N=!1),this.detached&&F.detach&&(N=!1),N},J.prototype.render=function(){var F=this;if(j)return null;var ee=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return D.createElement("div",{className:ee,ref:function(w){return F.ref=w}})},J}(D.Component);m=oe},44852:(S,R,c)=>{"use strict";var m=c(71013),O=c(2864),k=c(14927),L=m("%TypeError%"),D=m("%WeakMap%",!0),j=m("%Map%",!0),X=O("WeakMap.prototype.get",!0),te=O("WeakMap.prototype.set",!0),re=O("WeakMap.prototype.has",!0),he=O("Map.prototype.get",!0),oe=O("Map.prototype.set",!0),fe=O("Map.prototype.has",!0),J=function(w,M){for(var B=w,Z;(Z=B.next)!==null;B=Z)if(Z.key===M)return B.next=Z.next,Z.next=w.next,w.next=Z,Z},F=function(w,M){var B=J(w,M);return B&&B.value},ee=function(w,M,B){var Z=J(w,M);Z?Z.value=B:w.next={key:M,next:w.next,value:B}},N=function(w,M){return!!J(w,M)};S.exports=function(){var M,B,Z,ae={assert:function(H){if(!ae.has(H))throw new L("Side channel does not contain "+k(H))},get:function(H){if(D&&H&&(typeof H=="object"||typeof H=="function")){if(M)return X(M,H)}else if(j){if(B)return he(B,H)}else if(Z)return F(Z,H)},has:function(H){if(D&&H&&(typeof H=="object"||typeof H=="function")){if(M)return re(M,H)}else if(j){if(B)return fe(B,H)}else if(Z)return N(Z,H);return!1},set:function(H,le){D&&H&&(typeof H=="object"||typeof H=="function")?(M||(M=new D),te(M,H,le)):j?(B||(B=new j),oe(B,H,le)):(Z||(Z={key:{},next:null}),ee(Z,H,le))}};return ae}},83539:(S,R,c)=>{var m=c(26673),O=c(20788);O=O.__esModule?O.default:O,typeof O=="string"&&(O=[[S.id,O,""]]);var k={};k.insert="head",k.singleton=!1;var L=m(O,k);S.exports=O.locals||{}},17664:(S,R,c)=>{var m=c(26673),O=c(15218);O=O.__esModule?O.default:O,typeof O=="string"&&(O=[[S.id,O,""]]);var k={};k.insert="head",k.singleton=!1;var L=m(O,k);S.exports=O.locals||{}},6766:(S,R,c)=>{var m=c(26673),O=c(80766);O=O.__esModule?O.default:O,typeof O=="string"&&(O=[[S.id,O,""]]);var k={};k.insert="head",k.singleton=!1;var L=m(O,k);S.exports=O.locals||{}},49812:(S,R,c)=>{var m=c(26673),O=c(62459);O=O.__esModule?O.default:O,typeof O=="string"&&(O=[[S.id,O,""]]);var k={};k.insert="head",k.singleton=!1;var L=m(O,k);S.exports=O.locals||{}},56089:S=>{"use strict";S.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg=="},17735:S=>{"use strict";S.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII="},96192:S=>{"use strict";S.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC"},71090:S=>{"use strict";S.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII="},46050:S=>{"use strict";S.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII="},65710:()=>{},93652:(S,R,c)=>{S.exports=c(24018)},10017:(S,R,c)=>{S.exports=c(27411)},34961:(S,R,c)=>{S.exports=c(79155)},86751:(S,R,c)=>{S.exports=c(13375)},12953:(S,R,c)=>{S.exports=c(95442)},11099:(S,R,c)=>{S.exports=c(55334)},86351:(S,R,c)=>{S.exports=c(48261)},70762:(S,R,c)=>{S.exports=c(92864)},10954:(S,R,c)=>{S.exports=c(27923)},55839:(S,R,c)=>{S.exports=c(89225)},23422:(S,R,c)=>{S.exports=c(95281)},47319:(S,R,c)=>{S.exports=c(55468)}}]);