"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5056],{58909:function(e,t,n){n.d(t,{FZ:function(){return l}});var r=n(87462),i=n(35524),o=n(47421),s=n(59119),createTheme=e=>{var{theme:t,settings:n={},styles:r=[]}=e,i={".cm-gutters":{}},a={};n.background&&(a.backgroundColor=n.background),n.backgroundImage&&(a.backgroundImage=n.backgroundImage),n.foreground&&(a.color=n.foreground),(n.background||n.foreground)&&(i["&"]=a),n.fontFamily&&(i["&.cm-editor .cm-scroller"]={fontFamily:n.fontFamily}),n.gutterBackground&&(i[".cm-gutters"].backgroundColor=n.gutterBackground),n.gutterForeground&&(i[".cm-gutters"].color=n.gutterForeground),n.gutterBorder&&(i[".cm-gutters"].borderRightColor=n.gutterBorder),n.caret&&(i[".cm-content"]={caretColor:n.caret},i[".cm-cursor, .cm-dropCursor"]={borderLeftColor:n.caret});var l={};n.gutterActiveForeground&&(l.color=n.gutterActiveForeground),n.lineHighlight&&(i[".cm-activeLine"]={backgroundColor:n.lineHighlight},l.backgroundColor=n.lineHighlight),i[".cm-activeLineGutter"]=l,n.selection&&(i["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:n.selection+" !important"}),n.selectionMatch&&(i["& .cm-selectionMatch"]={backgroundColor:n.selectionMatch});var c=o.tk.theme(i,{dark:"dark"===t}),O=s.Qf.define(r);return[c,(0,s.nF)(O)]},a={background:"#FFFFFF",foreground:"#000000",caret:"#FBAC52",selection:"#FFD420",selectionMatch:"#FFD420",gutterBackground:"#f5f5f5",gutterForeground:"#4D4D4C",gutterBorder:"transparent",lineHighlight:"#00000012"},l=(e=>{var{theme:t="light",settings:n={},styles:o=[]}={};return createTheme({theme:t,settings:(0,r.Z)({},a,n),styles:[{tag:[i.pJ.meta,i.pJ.comment],color:"#804000"},{tag:[i.pJ.keyword,i.pJ.strong],color:"#0000FF"},{tag:[i.pJ.number],color:"#FF0080"},{tag:[i.pJ.string],color:"#FF0080"},{tag:[i.pJ.variableName],color:"#006600"},{tag:[i.pJ.escape],color:"#33CC33"},{tag:[i.pJ.tagName],color:"#1C02FF"},{tag:[i.pJ.heading],color:"#0C07FF"},{tag:[i.pJ.quote],color:"#000000"},{tag:[i.pJ.list],color:"#B90690"},{tag:[i.pJ.documentMeta],color:"#888888"},{tag:[i.pJ.function(i.pJ.variableName)],color:"#0000A2"},{tag:[i.pJ.definition(i.pJ.typeName),i.pJ.typeName],color:"#6D79DE"},...o]})})()},95089:function(e,t,n){n.d(t,{ZP:function(){return eU}});var r=n(87462),i=n(63366),o=n(67294),s=n(78120),a=n(47421),l=n(59119),c=n(41113);function command(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return!!i&&(r(n.update(i)),!0)}}let O=command(changeLineComment,0),h=command(changeBlockComment,0),u=command((e,t)=>changeBlockComment(e,t,selectedLineRanges(t)),0);function getConfig(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}function findBlockComment(e,{open:t,close:n},r,i){let o,s,a=e.sliceDoc(r-50,r),l=e.sliceDoc(i,i+50),c=/\s*$/.exec(a)[0].length,O=/^\s*/.exec(l)[0].length,h=a.length-c;if(a.slice(h-t.length,h)==t&&l.slice(O,O+n.length)==n)return{open:{pos:r-c,margin:c&&1},close:{pos:i+O,margin:O&&1}};i-r<=100?o=s=e.sliceDoc(r,i):(o=e.sliceDoc(r,r+50),s=e.sliceDoc(i-50,i));let u=/^\s*/.exec(o)[0].length,f=/\s*$/.exec(s)[0].length,d=s.length-f-n.length;return o.slice(u,u+t.length)==t&&s.slice(d,d+n.length)==n?{open:{pos:r+u+t.length,margin:/\s/.test(o.charAt(u+t.length))?1:0},close:{pos:i-f-n.length,margin:/\s/.test(s.charAt(d-1))?1:0}}:null}function selectedLineRanges(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to),o=t.length-1;o>=0&&t[o].to>r.from?t[o].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function changeBlockComment(e,t,n=t.selection.ranges){let r=n.map(e=>getConfig(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>findBlockComment(t,r[n],e.from,e.to));if(2!=e&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}]))};if(1!=e&&i.some(e=>e)){let e=[];for(let t=0,n;ti&&(e==o||o>l.from)){i=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,n=l.text.slice(e,e+a.length)==a?e:-1;ee.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:o,single:s}of r)(s||!o)&&e.push({from:t.from+i,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,o=r+i.length;" "==t.text[o-t.from]&&o++,e.push({from:r,to:o})}return{changes:e}}return null}let f=s.q6.define(),d=s.q6.define(),p=s.r$.define(),g=s.r$.define({combine:e=>(0,s.BO)(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}),m=s.QQ.define({create:()=>HistoryState.empty,update(e,t){let n=t.state.facet(g),r=t.annotation(f);if(r){let i=HistEvent.fromTransaction(t,r.selection),o=r.side,s=0==o?e.undone:e.done;return s=i?updateBranch(s,s.length,n.minDepth,i):addSelection(s,t.startState.selection),new HistoryState(0==o?r.rest:s,0==o?s:r.rest)}let i=t.annotation(d);if(("full"==i||"before"==i)&&(e=e.isolate()),!1===t.annotation(s.YW.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let o=HistEvent.fromTransaction(t),a=t.annotation(s.YW.time),l=t.annotation(s.YW.userEvent);return o?e=e.addChanges(o,a,l,n,t):t.selection&&(e=e.addSelection(t.startState.selection,a,l,n.newGroupDelay)),("full"==i||"after"==i)&&(e=e.isolate()),e},toJSON:e=>({done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}),fromJSON:e=>new HistoryState(e.done.map(HistEvent.fromJSON),e.undone.map(HistEvent.fromJSON))});function dist_history(e={}){return[m,g.of(e),a.tk.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?S:"historyRedo"==e.inputType?Q:null;return!!n&&(e.preventDefault(),n(t))}})]}function cmd(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(m,!1);if(!i)return!1;let o=i.pop(e,n,t);return!!o&&(r(o),!0)}}let S=cmd(0,!1),Q=cmd(1,!1),$=cmd(0,!0),y=cmd(1,!0);let HistEvent=class HistEvent{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(e){return new HistEvent(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(e){return new HistEvent(e.changes&&s.as.fromJSON(e.changes),[],e.mapped&&s.n0.fromJSON(e.mapped),e.startSelection&&s.jT.fromJSON(e.startSelection),e.selectionsAfter.map(s.jT.fromJSON))}static fromTransaction(e,t){let n=b;for(let t of e.startState.facet(p)){let r=t(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new HistEvent(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,b)}static selection(e){return new HistEvent(void 0,b,void 0,void 0,e)}};function updateBranch(e,t,n,r){let i=t+1>n+20?t-n-1:0,o=e.slice(i,t);return o.push(r),o}function isAdjacent(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,o)=>{for(let e=0;e=t&&i<=s&&(r=!0)}}),r}function eqSelectionShape(e,t){return e.ranges.length==t.ranges.length&&0===e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length}function conc(e,t){return e.length?t.length?e.concat(t):e:t}let b=[];function addSelection(e,t){if(!e.length)return[HistEvent.selection([t])];{let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-200));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),updateBranch(e,e.length-1,1e9,n.setSelAfter(r)))}}function popSelection(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function addMappingToBranch(e,t){if(!e.length)return e;let n=e.length,r=b;for(;n;){let i=mapEvent(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[HistEvent.selection(r)]:b}function mapEvent(e,t,n){let r=conc(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):b,n);if(!e.changes)return HistEvent.selection(r);let i=e.changes.map(t),o=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(o):o;return new HistEvent(i,s.Py.mapEffects(e.effects,t),a,e.startSelection.map(o),r)}let x=/^(input\.type|delete)($|\.)/;let HistoryState=class HistoryState{constructor(e,t,n=0,r){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new HistoryState(this.done,this.undone):this}addChanges(e,t,n,r,i){let o=this.done,s=o[o.length-1];return new HistoryState(o=s&&s.changes&&!s.changes.empty&&e.changes&&(!n||x.test(n))&&(!s.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimen.empty?e.moveByChar(n,t):rangeEnd(n,t))}function ltrAtCursor(e){return e.textDirectionAt(e.state.selection.main.head)==a.Nm.LTR}let cursorCharLeft=e=>cursorByChar(e,!ltrAtCursor(e)),cursorCharRight=e=>cursorByChar(e,ltrAtCursor(e));function cursorByGroup(e,t){return moveSel(e,n=>n.empty?e.moveByGroup(n,t):rangeEnd(n,t))}function interestingNode(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function moveBySyntax(e,t,n){let r,i,o=(0,l.qz)(e).resolveInner(t.head),a=n?c.md.closedBy:c.md.openedBy;for(let r=t.head;;){let t=n?o.childAfter(r):o.childBefore(r);if(!t)break;interestingNode(e,t,a)?o=t:r=n?t.to:t.from}return i=o.type.prop(a)&&(r=n?(0,l.Um)(e,o.from,1):(0,l.Um)(e,o.to,-1))&&r.matched?n?r.end.to:r.end.from:n?o.to:o.from,s.jT.cursor(i,n?-1:1)}function cursorByLine(e,t){return moveSel(e,n=>{if(!n.empty)return rangeEnd(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)})}"undefined"!=typeof Intl&&Intl.Segmenter;let cursorLineUp=e=>cursorByLine(e,!1),cursorLineDown=e=>cursorByLine(e,!0);function pageInfo(e){let t=e.scrollDOM.clientHeightn.empty?e.moveVertically(n,t,r.height):rangeEnd(n,t));if(o.eq(i.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(i.selection.main.head),s=e.scrollDOM.getBoundingClientRect(),l=s.top+r.marginTop,c=s.bottom-r.marginBottom;t&&t.top>l&&t.bottomcursorByPage(e,!1),cursorPageDown=e=>cursorByPage(e,!0);function moveByLineBoundary(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=s.jT.cursor(r.from+n))}return i}function toMatchingBracket(e,t,n){let r=!1,i=updateSel(e.selection,t=>{let i=(0,l.Um)(e,t.head,-1)||(0,l.Um)(e,t.head,1)||t.head>0&&(0,l.Um)(e,t.head-1,1)||t.head{let n=t(e);return s.jT.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)});return!n.eq(e.state.selection)&&(e.dispatch(setSel(e.state,n)),!0)}function selectByChar(e,t){return extendSel(e,n=>e.moveByChar(n,t))}let selectCharLeft=e=>selectByChar(e,!ltrAtCursor(e)),selectCharRight=e=>selectByChar(e,ltrAtCursor(e));function selectByGroup(e,t){return extendSel(e,n=>e.moveByGroup(n,t))}function selectByLine(e,t){return extendSel(e,n=>e.moveVertically(n,t))}let selectLineUp=e=>selectByLine(e,!1),selectLineDown=e=>selectByLine(e,!0);function selectByPage(e,t){return extendSel(e,n=>e.moveVertically(n,t,pageInfo(e).height))}let selectPageUp=e=>selectByPage(e,!1),selectPageDown=e=>selectByPage(e,!0),cursorDocStart=({state:e,dispatch:t})=>(t(setSel(e,{anchor:0})),!0),cursorDocEnd=({state:e,dispatch:t})=>(t(setSel(e,{anchor:e.doc.length})),!0),selectDocStart=({state:e,dispatch:t})=>(t(setSel(e,{anchor:e.selection.main.anchor,head:0})),!0),selectDocEnd=({state:e,dispatch:t})=>(t(setSel(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function deleteBy(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:o}=r;if(i==o){let s=t(r);si&&(n="delete.forward",s=skipAtomic(e,s,!0)),i=Math.min(i,s),o=Math.max(o,s)}else i=skipAtomic(e,i,!1),o=skipAtomic(e,o,!0);return i==o?{range:r}:{changes:{from:i,to:o},range:s.jT.cursor(i,it(e)))r.between(t,t,(e,r)=>{et&&(t=n?r:e)});return t}let deleteByChar=(e,t)=>deleteBy(e,n=>{let r=n.from,{state:i}=e,o=i.doc.lineAt(r),a,c;if(!t&&r>o.from&&rdeleteByChar(e,!1),deleteCharForward=e=>deleteByChar(e,!0),deleteByGroup=(e,t)=>deleteBy(e,n=>{let r=n.head,{state:i}=e,o=i.doc.lineAt(r),a=i.charCategorizer(r);for(let e=null;;){if(r==(t?o.to:o.from)){r==n.head&&o.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let l=(0,s.cp)(o.text,r-o.from,t)+o.from,c=o.text.slice(Math.min(r,l)-o.from,Math.max(r,l)-o.from),O=a(c);if(null!=e&&O!=e)break;(" "!=c||r!=n.head)&&(e=O),r=l}return r}),deleteGroupBackward=e=>deleteByGroup(e,!1);function selectedLineBlocks(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),o=e.doc.lineAt(r.to);if(r.empty||r.to!=o.from||(o=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=o.to,e.ranges.push(r)}else t.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return t}function moveLine(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of selectedLineBlocks(e)){if(n?t.to==e.doc.length:0==t.from)continue;let o=e.doc.lineAt(n?t.to+1:t.from-1),a=o.length+1;if(n)for(let n of(r.push({from:t.to,to:o.to},{from:t.from,insert:o.text+e.lineBreak}),t.ranges))i.push(s.jT.range(Math.min(e.doc.length,n.anchor+a),Math.min(e.doc.length,n.head+a)));else for(let n of(r.push({from:o.from,to:t.from},{from:t.to,insert:e.lineBreak+o.text}),t.ranges))i.push(s.jT.range(n.anchor-a,n.head-a))}return!!r.length&&(t(e.update({changes:r,scrollIntoView:!0,selection:s.jT.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}function copyLine(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of selectedLineBlocks(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}function isBetweenBrackets(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=(0,l.qz)(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),o;return r&&i&&r.to<=t&&i.from>=t&&(o=r.type.prop(c.md.closedBy))&&o.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}let k=newlineAndIndent(!1),P=newlineAndIndent(!0);function newlineAndIndent(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,o=t.doc.lineAt(r),a=!e&&r==i&&isBetweenBrackets(t,r);e&&(r=i=(i<=o.to?o:t.doc.lineAt(i)).to);let c=new l.Gn(t,{simulateBreak:r,simulateDoubleBreak:!!a}),O=(0,l.K0)(c,r);for(null==O&&(O=(0,s.IS)(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize));io.from&&r{let i=[];for(let o=r.from;o<=r.to;){let s=e.doc.lineAt(o);s.number>n&&(r.empty||r.to>s.from)&&(t(s,i,r),n=s.number),o=s.to+1}let o=e.changes(i);return{changes:i,range:s.jT.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}let indentMore=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(changeBySelectedLine(e,(t,n)=>{n.push({from:t.from,insert:e.facet(l.c)})}),{userEvent:"input.indent"})),!0),indentLess=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(changeBySelectedLine(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=(0,s.IS)(r,e.tabSize),o=0,a=(0,l.SS)(e,Math.max(0,i-(0,l.y1)(e)));for(;omoveSel(e,t=>s.jT.cursor(e.lineBlockAt(t.head).from,1)),shift:e=>extendSel(e,t=>s.jT.cursor(e.lineBlockAt(t.head).from))},{key:"Ctrl-e",run:e=>moveSel(e,t=>s.jT.cursor(e.lineBlockAt(t.head).to,-1)),shift:e=>extendSel(e,t=>s.jT.cursor(e.lineBlockAt(t.head).to))},{key:"Ctrl-d",run:deleteCharForward},{key:"Ctrl-h",run:deleteCharBackward},{key:"Ctrl-k",run:e=>deleteBy(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:s.xv.of(["",""])},range:s.jT.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:(0,s.cp)(r.text,n-r.from,!1)+r.from,o=n==r.to?n+1:(0,s.cp)(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:o,insert:e.doc.slice(n,o).append(e.doc.slice(i,n))},range:s.jT.cursor(o)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:cursorPageDown}],Z=[{key:"ArrowLeft",run:cursorCharLeft,shift:selectCharLeft,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>cursorByGroup(e,!ltrAtCursor(e)),shift:e=>selectByGroup(e,!ltrAtCursor(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>moveSel(e,t=>moveByLineBoundary(e,t,!ltrAtCursor(e))),shift:e=>extendSel(e,t=>moveByLineBoundary(e,t,!ltrAtCursor(e))),preventDefault:!0},{key:"ArrowRight",run:cursorCharRight,shift:selectCharRight,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>cursorByGroup(e,ltrAtCursor(e)),shift:e=>selectByGroup(e,ltrAtCursor(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>moveSel(e,t=>moveByLineBoundary(e,t,ltrAtCursor(e))),shift:e=>extendSel(e,t=>moveByLineBoundary(e,t,ltrAtCursor(e))),preventDefault:!0},{key:"ArrowUp",run:cursorLineUp,shift:selectLineUp,preventDefault:!0},{mac:"Cmd-ArrowUp",run:cursorDocStart,shift:selectDocStart},{mac:"Ctrl-ArrowUp",run:cursorPageUp,shift:selectPageUp},{key:"ArrowDown",run:cursorLineDown,shift:selectLineDown,preventDefault:!0},{mac:"Cmd-ArrowDown",run:cursorDocEnd,shift:selectDocEnd},{mac:"Ctrl-ArrowDown",run:cursorPageDown,shift:selectPageDown},{key:"PageUp",run:cursorPageUp,shift:selectPageUp},{key:"PageDown",run:cursorPageDown,shift:selectPageDown},{key:"Home",run:e=>moveSel(e,t=>moveByLineBoundary(e,t,!1)),shift:e=>extendSel(e,t=>moveByLineBoundary(e,t,!1)),preventDefault:!0},{key:"Mod-Home",run:cursorDocStart,shift:selectDocStart},{key:"End",run:e=>moveSel(e,t=>moveByLineBoundary(e,t,!0)),shift:e=>extendSel(e,t=>moveByLineBoundary(e,t,!0)),preventDefault:!0},{key:"Mod-End",run:cursorDocEnd,shift:selectDocEnd},{key:"Enter",run:k},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:deleteCharBackward,shift:deleteCharBackward},{key:"Delete",run:deleteCharForward},{key:"Mod-Backspace",mac:"Alt-Backspace",run:deleteGroupBackward},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>deleteByGroup(e,!0)},{mac:"Mod-Backspace",run:e=>deleteBy(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)})},{mac:"Mod-Delete",run:e=>deleteBy(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head({mac:e.key,run:e.run,shift:e.shift}))),T=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>moveSel(e,t=>moveBySyntax(e.state,t,!ltrAtCursor(e))),shift:e=>extendSel(e,t=>moveBySyntax(e.state,t,!ltrAtCursor(e)))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>moveSel(e,t=>moveBySyntax(e.state,t,ltrAtCursor(e))),shift:e=>extendSel(e,t=>moveBySyntax(e.state,t,ltrAtCursor(e)))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>moveLine(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>copyLine(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>moveLine(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>copyLine(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=s.jT.create([n.main]):n.main.empty||(r=s.jT.create([s.jT.cursor(n.main.head)])),!!r&&(t(setSel(e,r)),!0)}},{key:"Mod-Enter",run:P},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=selectedLineBlocks(e).map(({from:t,to:n})=>s.jT.range(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:s.jT.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=updateSel(e.selection,t=>{var n;let r=(0,l.qz)(e).resolveStack(t.from,1);for(let e=r;e;e=e.next){let{node:r}=e;if((r.from=t.to||r.to>t.to&&r.from<=t.from)&&(null===(n=r.parent)||void 0===n?void 0:n.parent))return s.jT.range(r.to,r.from)}return t});return t(setSel(e,n)),!0},preventDefault:!0},{key:"Mod-[",run:indentLess},{key:"Mod-]",run:indentMore},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new l.Gn(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),i=changeBySelectedLine(e,(t,i,o)=>{let s=(0,l.K0)(r,t.from);if(null==s)return;/\S/.test(t.text)||(s=0);let a=/^\s*/.exec(t.text)[0],c=(0,l.SS)(e,s);(a!=c||o.from{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(selectedLineBlocks(t).map(({from:e,to:n})=>(e>0?e--:ne.moveVertically(t,!0)).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>toMatchingBracket(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=getConfig(e.state,n.from);return r.line?O(e):!!r.block&&u(e)}},{key:"Alt-A",run:h}].concat(Z),C={key:"Tab",run:indentMore,shift:indentLess};function crelt(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];"string"==typeof i?e.setAttribute(r,i):null!=i&&(e[r]=i)}t++}for(;te.normalize("NFKD"):e=>e;let SearchCursor=class SearchCursor{constructor(e,t,n=0,r=e.length,i,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(X(e)):X,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return -1;this.bufferPos=0,this.buffer=this.iter.value}return(0,s.gm)(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=(0,s.bg)(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=(0,s.nZ)(e);let r=this.normalize(t);for(let e=0,i=n;;e++){let o=r.charCodeAt(e),s=this.match(o,i);if(e==r.length-1){if(s)return this.value=s,this;break}i==n&&ethis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=toCharEnd(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=n||r.to<=t){let r=new FlattenedDoc(t,e.sliceString(t,n));return A.set(e,r),r}if(r.from==t&&r.to==n)return r;let{text:i,from:o}=r;return o>t&&(i=e.sliceString(t,o)+i,o=t),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=toCharEnd(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=FlattenedDoc.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}};function validRegExp(e){try{return new RegExp(e,R),!0}catch(e){return!1}}function toCharEnd(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t=56320&&r<57344;)t++;return t}function createLineDialog(e){let t=crelt("input",{class:"cm-textfield",name:"line",value:String(e.state.doc.lineAt(e.state.selection.main.head).number)});function go(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!n)return;let{state:r}=e,i=r.doc.lineAt(r.selection.main.head),[,o,l,c,O]=n,h=c?+c.slice(1):0,u=l?+l:i.number;if(l&&O){let e=u/100;o&&(e=e*("-"==o?-1:1)+i.number/r.doc.lines),u=Math.round(r.doc.lines*e)}else l&&o&&(u=u*("-"==o?-1:1)+i.number);let f=r.doc.line(Math.max(1,Math.min(r.doc.lines,u))),d=s.jT.cursor(f.from+Math.max(0,Math.min(h,f.length)));e.dispatch({effects:[_.of(!1),a.tk.scrollIntoView(d.from,{y:"center"})],selection:d}),e.focus()}return{dom:crelt("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:_.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),go())},onsubmit:e=>{e.preventDefault(),go()}},crelt("label",e.state.phrase("Go to line"),": ",t)," ",crelt("button",{class:"cm-button",type:"submit"},e.state.phrase("go")))}}"undefined"!=typeof Symbol&&(RegExpCursor.prototype[Symbol.iterator]=MultilineRegExpCursor.prototype[Symbol.iterator]=function(){return this});let _=s.Py.define(),W=s.QQ.define({create:()=>!0,update(e,t){for(let n of t.effects)n.is(_)&&(e=n.value);return e},provide:e=>a.mH.from(e,e=>e?createLineDialog:null)}),U=a.tk.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),q={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},j=s.r$.define({combine:e=>(0,s.BO)(e,q,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})});function highlightSelectionMatches(e){let t=[V,E];return e&&t.push(j.of(e)),t}let I=a.p.mark({class:"cm-selectionMatch"}),z=a.p.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function insideWordBoundaries(e,t,n,r){return(0==n||e(t.sliceDoc(n-1,n))!=s.D0.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=s.D0.Word)}function insideWord(e,t,n,r){return e(t.sliceDoc(n,n+1))==s.D0.Word&&e(t.sliceDoc(r-1,r))==s.D0.Word}let E=a.lg.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(j),{state:n}=e,r=n.selection;if(r.ranges.length>1)return a.p.none;let i=r.main,o,s=null;if(i.empty){if(!t.highlightWordAroundCursor)return a.p.none;let e=n.wordAt(i.head);if(!e)return a.p.none;s=n.charCategorizer(i.head),o=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e200)return a.p.none;if(t.wholeWords){if(o=n.sliceDoc(i.from,i.to),!(insideWordBoundaries(s=n.charCategorizer(i.head),n,i.from,i.to)&&insideWord(s,n,i.from,i.to)))return a.p.none}else if(!(o=n.sliceDoc(i.from,i.to).trim()))return a.p.none}let l=[];for(let r of e.visibleRanges){let e=new SearchCursor(n.doc,o,r.from,r.to);for(;!e.next().done;){let{from:r,to:o}=e.value;if((!s||insideWordBoundaries(s,n,r,o))&&(i.empty&&r<=i.from&&o>=i.to?l.push(z.range(r,o)):(r>=i.to||o<=i.from)&&l.push(I.range(r,o)),l.length>t.maxMatches))return a.p.none}}return a.p.set(l)}},{decorations:e=>e.decorations}),V=a.tk.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),selectWord=({state:e,dispatch:t})=>{let{selection:n}=e,r=s.jT.create(n.ranges.map(t=>e.wordAt(t.head)||s.jT.cursor(t.head)),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)};function findNextOccurrence(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new SearchCursor(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new SearchCursor(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(o){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}let G=s.r$.define({combine:e=>(0,s.BO)(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new SearchPanel(e),scrollToMatch:e=>a.tk.scrollIntoView(e)})});let SearchQuery=class SearchQuery{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||validRegExp(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new RegExpQuery(this):new StringQuery(this)}getCursor(e,t=0,n){let r=e.doc?e:s.yy.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?regexpCursor(this,r,t,n):stringCursor(this,r,t,n)}};let QueryType=class QueryType{constructor(e){this.spec=e}};function stringCursor(e,t,n,r){return new SearchCursor(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?stringWordTest(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}function stringWordTest(e,t){return(n,r,i,o)=>((o>n||o+i.length=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=stringCursor(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function regexpCursor(e,t,n,r){return new RegExpCursor(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?regexpWordTest(t.charCategorizer(t.selection.main.head)):void 0},n,r)}function charBefore(e,t){return e.slice((0,s.cp)(e,t,!1),t)}function charAfter(e,t){return e.slice(t,(0,s.cp)(e,t))}function regexpWordTest(e){return(t,n,r)=>!r[0].length||(e(charBefore(r.input,r.index))!=s.D0.Word||e(charAfter(r.input,r.index))!=s.D0.Word)&&(e(charAfter(r.input,r.index+r[0].length))!=s.D0.Word||e(charBefore(r.input,r.index+r[0].length))!=s.D0.Word)}let RegExpQuery=class RegExpQuery extends QueryType{nextMatch(e,t,n){let r=regexpCursor(this.spec,e,n,e.doc.length).next();return r.done&&(r=regexpCursor(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-1e4*r),o=regexpCursor(this.spec,e,i,n),s=null;for(;!o.next().done;)s=o.value;if(s&&(i==t||s.from>i+10))return s;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,n)=>"$"==n?"$":"&"==n?e.match[0]:"0"!=n&&+n=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=regexpCursor(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};let B=s.Py.define(),N=s.Py.define(),D=s.QQ.define({create:e=>new SearchState(defaultQuery(e).create(),null),update(e,t){for(let n of t.effects)n.is(B)?e=new SearchState(n.value.create(),e.panel):n.is(N)&&(e=new SearchState(e.query,n.value?createSearchPanel:null));return e},provide:e=>a.mH.from(e,e=>e.panel)});let SearchState=class SearchState{constructor(e,t){this.query=e,this.panel=t}};let M=a.p.mark({class:"cm-searchMatch"}),J=a.p.mark({class:"cm-searchMatch cm-searchMatch-selected"}),L=a.lg.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(D))}update(e){let t=e.state.field(D);(t!=e.startState.field(D)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return a.p.none;let{view:n}=this,r=new s.f_;for(let t=0,i=n.visibleRanges,o=i.length;ti[t+1].from-500;)a=i[++t].to;e.highlight(n.state,s,a,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?J:M)})}return r.finish()}},{decorations:e=>e.decorations});function searchCommand(e){return t=>{let n=t.state.field(D,!1);return n&&n.query.spec.valid?e(t,n):openSearchPanel(t)}}let F=searchCommand((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=s.jT.single(r.from,r.to),o=e.state.facet(G);return e.dispatch({selection:i,effects:[announceMatch(e,r),o.scrollToMatch(i.main,e)],userEvent:"select.search"}),selectSearchInput(e),!0}),H=searchCommand((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let o=s.jT.single(i.from,i.to),a=e.state.facet(G);return e.dispatch({selection:o,effects:[announceMatch(e,i),a.scrollToMatch(o.main,e)],userEvent:"select.search"}),selectSearchInput(e),!0}),K=searchCommand((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!!n&&!!n.length&&(e.dispatch({selection:s.jT.create(n.map(e=>s.jT.range(e.from,e.to))),userEvent:"select.search.matches"}),!0)}),ee=searchCommand((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=t.nextMatch(n,r,r);if(!o)return!1;let l=[],c,O,h=[];if(o.from==r&&o.to==i&&(O=n.toText(t.getReplacement(o)),l.push({from:o.from,to:o.to,insert:O}),o=t.nextMatch(n,o.from,o.to),h.push(a.tk.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),o){let t=0==l.length||l[0].from>=o.to?0:o.to-o.from-O.length;c=s.jT.single(o.from-t,o.to-t),h.push(announceMatch(e,o)),h.push(n.facet(G).scrollToMatch(c.main,e))}return e.dispatch({changes:l,selection:c,effects:h,userEvent:"input.replace"}),!0}),et=searchCommand((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(e=>{let{from:n,to:r}=e;return{from:n,to:r,insert:t.getReplacement(e)}});if(!n.length)return!1;let r=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:a.tk.announce.of(r),userEvent:"input.replace.all"}),!0});function createSearchPanel(e){return e.state.facet(G).createPanel(e)}function defaultQuery(e,t){var n,r,i,o,s;let a=e.selection.main,l=a.empty||a.to>a.from+100?"":e.sliceDoc(a.from,a.to);if(t&&!l)return t;let c=e.facet(G);return new SearchQuery({search:(null!==(n=null==t?void 0:t.literal)&&void 0!==n?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==t?void 0:t.caseSensitive)&&void 0!==r?r:c.caseSensitive,literal:null!==(i=null==t?void 0:t.literal)&&void 0!==i?i:c.literal,regexp:null!==(o=null==t?void 0:t.regexp)&&void 0!==o?o:c.regexp,wholeWord:null!==(s=null==t?void 0:t.wholeWord)&&void 0!==s?s:c.wholeWord})}function getSearchInput(e){let t=(0,a.Sd)(e,createSearchPanel);return t&&t.dom.querySelector("[main-field]")}function selectSearchInput(e){let t=getSearchInput(e);t&&t==e.root.activeElement&&t.select()}let openSearchPanel=e=>{let t=e.state.field(D,!1);if(t&&t.panel){let n=getSearchInput(e);if(n&&n!=e.root.activeElement){let r=defaultQuery(e.state,t.query.spec);r.valid&&e.dispatch({effects:B.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[N.of(!0),t?B.of(defaultQuery(e.state,t.query.spec)):s.Py.appendConfig.of(eo)]});return!0},closeSearchPanel=e=>{let t=e.state.field(D,!1);if(!t||!t.panel)return!1;let n=(0,a.Sd)(e,createSearchPanel);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:N.of(!1)}),!0},en=[{key:"Mod-f",run:openSearchPanel,scope:"editor search-panel"},{key:"F3",run:F,shift:H,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:F,shift:H,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:closeSearchPanel,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],a=0;for(let t=new SearchCursor(e.doc,e.sliceDoc(r,i));!t.next().done;){if(o.length>1e3)return!1;t.value.from==r&&(a=o.length),o.push(s.jT.range(t.value.from,t.value.to))}return t(e.update({selection:s.jT.create(o,a),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:e=>{let t=(0,a.Sd)(e,createLineDialog);if(!t){let n=[_.of(!0)];null==e.state.field(W,!1)&&n.push(s.Py.appendConfig.of([W,U])),e.dispatch({effects:n}),t=(0,a.Sd)(e,createLineDialog)}return t&&t.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return selectWord({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=findNextOccurrence(e,r);return!!i&&(t(e.update({selection:e.selection.addRange(s.jT.range(i.from,i.to),!1),effects:a.tk.scrollIntoView(i.to)})),!0)},preventDefault:!0}];let SearchPanel=class SearchPanel{constructor(e){this.view=e;let t=this.query=e.state.field(D).query.spec;function button(e,t,n){return crelt("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=crelt("input",{value:t.search,placeholder:phrase(e,"Find"),"aria-label":phrase(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=crelt("input",{value:t.replace,placeholder:phrase(e,"Replace"),"aria-label":phrase(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=crelt("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=crelt("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=crelt("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=crelt("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,button("next",()=>F(e),[phrase(e,"next")]),button("prev",()=>H(e),[phrase(e,"previous")]),button("select",()=>K(e),[phrase(e,"all")]),crelt("label",null,[this.caseField,phrase(e,"match case")]),crelt("label",null,[this.reField,phrase(e,"regexp")]),crelt("label",null,[this.wordField,phrase(e,"by word")]),...e.state.readOnly?[]:[crelt("br"),this.replaceField,button("replace",()=>ee(e),[phrase(e,"replace")]),button("replaceAll",()=>et(e),[phrase(e,"replace all")])],crelt("button",{name:"close",onclick:()=>closeSearchPanel(e),"aria-label":phrase(e,"close"),type:"button"},["\xd7"])])}commit(){let e=new SearchQuery({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:B.of(e)}))}keydown(e){(0,a.$1)(this.view,e,"search-panel")?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?H:F)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),ee(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(B)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(G).top}};function phrase(e,t){return e.state.phrase(t)}let er=/[\s\.,:;?!]/;function announceMatch(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,o=Math.max(r.from,t-30),s=Math.min(i,n+30),l=e.state.sliceDoc(o,s);if(o!=r.from){for(let e=0;e<30;e++)if(!er.test(l[e+1])&&er.test(l[e])){l=l.slice(e);break}}if(s!=i){for(let e=l.length-1;e>l.length-30;e--)if(!er.test(l[e-1])&&er.test(l[e])){l=l.slice(0,e);break}}return a.tk.announce.of(`${e.state.phrase("current match")}. ${l} ${e.state.phrase("on line")} ${r.number}.`)}let ei=a.tk.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),eo=[D,s.Wl.low(L),ei];var es=n(34790);let SelectedDiagnostic=class SelectedDiagnostic{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}};let LintState=class LintState{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let r=e,i=n.facet(ef).markerFilter;i&&(r=i(r));let o=a.p.set(r.map(e=>e.from==e.to||e.from==e.to-1&&n.doc.lineAt(e.from).to==e.from?a.p.widget({widget:new DiagnosticWidget(e),diagnostic:e}).range(e.from):a.p.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity+(e.markClass?" "+e.markClass:"")},diagnostic:e}).range(e.from,e.to)),!0);return new LintState(o,t,findDiagnostic(o))}};function findDiagnostic(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:i})=>{if(!t||i.diagnostic==t)return r=new SelectedDiagnostic(e,n,i.diagnostic),!1}),r}function hideTooltip(e,t){let n=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(ea))||e.changes.touchesRange(n.from,n.to))}function maybeEnableLint(e,t){return e.field(eO,!1)?t:t.concat(s.Py.appendConfig.of(em))}let ea=s.Py.define(),el=s.Py.define(),ec=s.Py.define(),eO=s.QQ.define({create:()=>new LintState(a.p.none,null,null),update(e,t){if(t.docChanged){let n=e.diagnostics.map(t.changes),r=null;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=findDiagnostic(n,e.selected.diagnostic,i)||findDiagnostic(n,null,i)}e=new LintState(n,e.panel,r)}for(let n of t.effects)n.is(ea)?e=LintState.init(n.value,e.panel,t.state):n.is(el)?e=new LintState(e.diagnostics,n.value?LintPanel.open:null,e.selected):n.is(ec)&&(e=new LintState(e.diagnostics,e.panel,n.value));return e},provide:e=>[a.mH.from(e,e=>e.panel),a.tk.decorations.from(e,e=>e.diagnostics)]}),eh=a.p.mark({class:"cm-lintRange cm-lintRange-active"});function lintTooltip(e,t,n){let{diagnostics:r}=e.state.field(eO),i=[],o=2e8,s=0;r.between(t-(n<0?1:0),t+(n>0?1:0),(e,r,{spec:a})=>{t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t({dom:diagnosticsTooltip(e,i)})}:null}function diagnosticsTooltip(e,t){return crelt("ul",{class:"cm-tooltip-lint"},t.map(t=>renderDiagnostic(e,t,!1)))}let closeLintPanel=e=>{let t=e.state.field(eO,!1);return!!t&&!!t.panel&&(e.dispatch({effects:el.of(!1)}),!0)},eu=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(eO,!1);t&&t.panel||e.dispatch({effects:maybeEnableLint(e.state,[el.of(!0)])});let n=(0,a.Sd)(e,LintPanel.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(eO,!1);if(!t)return!1;let n=e.state.selection.main,r=t.diagnostics.iter(n.to+1);return(!!r.value||!!(r=t.diagnostics.iter(0)).value&&(r.from!=n.from||r.to!=n.to))&&(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],ef=s.r$.define({combine:e=>Object.assign({sources:e.map(e=>e.source)},(0,s.BO)(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))});function assignKeys(e){let t=[];if(e)e:for(let{name:n}of e){for(let e=0;ee.toLowerCase()==r.toLowerCase())){t.push(r);continue e}}t.push("")}return t}function renderDiagnostic(e,t,n){var r;let i=n?assignKeys(t.actions):[];return crelt("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},crelt("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage():t.message),null===(r=t.actions)||void 0===r?void 0:r.map((n,r)=>{let o=!1,click=r=>{if(r.preventDefault(),o)return;o=!0;let i=findDiagnostic(e.state.field(eO).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:s}=n,a=i[r]?s.indexOf(i[r]):-1,l=a<0?s:[s.slice(0,a),crelt("u",s.slice(a,a+1)),s.slice(a+1)];return crelt("button",{type:"button",class:"cm-diagnosticAction",onclick:click,onmousedown:click,"aria-label":` Action: ${s}${a<0?"":` (access key "${i[r]})"`}.`},l)}),t.source&&crelt("div",{class:"cm-diagnosticSource"},t.source))}let DiagnosticWidget=class DiagnosticWidget extends a.l9{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return crelt("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}};let PanelItem=class PanelItem{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=renderDiagnostic(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}};let LintPanel=class LintPanel{constructor(e){this.view=e,this.items=[],this.list=crelt("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)closeLintPanel(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65)||!(t.keyCode<=90)||!(this.selectedIndex>=0))return;let{diagnostic:n}=this.items[this.selectedIndex],r=assignKeys(n.actions);for(let i=0;i{for(let t=0;tcloseLintPanel(this.view)},"\xd7")),this.update()}get selectedIndex(){let e=this.view.state.field(eO).selected;if(!e)return -1;for(let t=0;t{let a=-1,l;for(let e=n;en&&(this.items.splice(n,a-n),r=!0)),t&&l.diagnostic==t.diagnostic?l.dom.hasAttribute("aria-selected")||(l.dom.setAttribute("aria-selected","true"),i=l):l.dom.hasAttribute("aria-selected")&&l.dom.removeAttribute("aria-selected"),n++});n({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.topt.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function rm(){let t=e;e=t.nextSibling,t.remove()}for(let t of this.items)if(t.dom.parentNode==this.list){for(;e!=t.dom;)rm();e=t.dom.nextSibling}else this.list.insertBefore(t.dom,e);for(;e;)rm()}moveSelection(e){if(this.selectedIndex<0)return;let t=findDiagnostic(this.view.state.field(eO).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:ec.of(t)})}static open(e){return new LintPanel(e)}};function svg(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(e)}')`}function underline(e){return svg(``,'width="6" height="3"')}let ed=a.tk.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:underline("#d11")},".cm-lintRange-warning":{backgroundImage:underline("orange")},".cm-lintRange-info":{backgroundImage:underline("#999")},".cm-lintRange-hint":{backgroundImage:underline("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function severityWeight(e){return"error"==e?4:"warning"==e?3:"info"==e?2:1}function trackHoverOn(e,t){let mousemove=n=>{let r=t.getBoundingClientRect();if(!(n.clientX>r.left-10)||!(n.clientXr.top-10)||!(n.clientY({dom:diagnosticsTooltip(e,n),getCoords:()=>t.getBoundingClientRect()})})}),t.onmouseout=t.onmousemove=null,trackHoverOn(e,t)}let{hoverTime:r}=e.state.facet(eS),i=setTimeout(hovered,r);t.onmouseout=()=>{clearTimeout(i),t.onmouseout=t.onmousemove=null},t.onmousemove=()=>{clearTimeout(i),i=setTimeout(hovered,r)}}a.SJ;let ep=s.Py.define(),eg=s.QQ.define({create:()=>null,update:(e,t)=>(e&&t.docChanged&&(e=hideTooltip(t,e)?null:Object.assign(Object.assign({},e),{pos:t.changes.mapPos(e.pos)})),t.effects.reduce((e,t)=>t.is(ep)?t.value:e,e)),provide:e=>a.hJ.from(e)}),em=[eO,a.tk.decorations.compute([eO],e=>{let{selected:t,panel:n}=e.field(eO);return t&&n&&t.from!=t.to?a.p.set([eh.range(t.from,t.to)]):a.p.none}),(0,a.bF)(lintTooltip,{hideOn:hideTooltip}),ed],eS=s.r$.define({combine:e=>(0,s.BO)(e,{hoverTime:300,markerFilter:null,tooltipFilter:null})});var basicSetup=function(e){void 0===e&&(e={});var{crosshairCursor:t=!1}=e,n=[];!1!==e.closeBracketsKeymap&&(n=n.concat(es.GA)),!1!==e.defaultKeymap&&(n=n.concat(T)),!1!==e.searchKeymap&&(n=n.concat(en)),!1!==e.historyKeymap&&(n=n.concat(v)),!1!==e.foldKeymap&&(n=n.concat(l.e7)),!1!==e.completionKeymap&&(n=n.concat(es.B1)),!1!==e.lintKeymap&&(n=n.concat(eu));var r=[];return!1!==e.lineNumbers&&r.push((0,a.Eu)()),!1!==e.highlightActiveLineGutter&&r.push((0,a.HQ)()),!1!==e.highlightSpecialChars&&r.push((0,a.AE)()),!1!==e.history&&r.push(dist_history()),!1!==e.foldGutter&&r.push((0,l.mi)()),!1!==e.drawSelection&&r.push((0,a.Uw)()),!1!==e.dropCursor&&r.push((0,a.qr)()),!1!==e.allowMultipleSelections&&r.push(s.yy.allowMultipleSelections.of(!0)),!1!==e.indentOnInput&&r.push((0,l.nY)()),!1!==e.syntaxHighlighting&&r.push((0,l.nF)(l.R_,{fallback:!0})),!1!==e.bracketMatching&&r.push((0,l.n$)()),!1!==e.closeBrackets&&r.push((0,es.vQ)()),!1!==e.autocompletion&&r.push((0,es.ys)()),!1!==e.rectangularSelection&&r.push((0,a.Zs)()),!1!==t&&r.push((0,a.S2)()),!1!==e.highlightActiveLine&&r.push((0,a.ZO)()),!1!==e.highlightSelectionMatches&&r.push(highlightSelectionMatches()),e.tabSize&&"number"==typeof e.tabSize&&r.push(l.c.of(" ".repeat(e.tabSize))),r.concat([a.$f.of(n.flat())]).filter(Boolean)},eQ=n(35524);let e$="#e06c75",ey="#abb2bf",eb="#7d8799",ex="#d19a66",ev="#2c313a",ek="#282c34",eP="#353a42",ew="#528bff",eZ=a.tk.theme({"&":{color:ey,backgroundColor:ek},".cm-content":{caretColor:ew},".cm-cursor, .cm-dropCursor":{borderLeftColor:ew},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:ey},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:ek,color:eb,border:"none"},".cm-activeLineGutter":{backgroundColor:ev},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:eP},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:eP,borderBottomColor:eP},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:ev,color:ey}}},{dark:!0}),eT=l.Qf.define([{tag:eQ.pJ.keyword,color:"#c678dd"},{tag:[eQ.pJ.name,eQ.pJ.deleted,eQ.pJ.character,eQ.pJ.propertyName,eQ.pJ.macroName],color:e$},{tag:[eQ.pJ.function(eQ.pJ.variableName),eQ.pJ.labelName],color:"#61afef"},{tag:[eQ.pJ.color,eQ.pJ.constant(eQ.pJ.name),eQ.pJ.standard(eQ.pJ.name)],color:ex},{tag:[eQ.pJ.definition(eQ.pJ.name),eQ.pJ.separator],color:ey},{tag:[eQ.pJ.typeName,eQ.pJ.className,eQ.pJ.number,eQ.pJ.changed,eQ.pJ.annotation,eQ.pJ.modifier,eQ.pJ.self,eQ.pJ.namespace],color:"#e5c07b"},{tag:[eQ.pJ.operator,eQ.pJ.operatorKeyword,eQ.pJ.url,eQ.pJ.escape,eQ.pJ.regexp,eQ.pJ.link,eQ.pJ.special(eQ.pJ.string)],color:"#56b6c2"},{tag:[eQ.pJ.meta,eQ.pJ.comment],color:eb},{tag:eQ.pJ.strong,fontWeight:"bold"},{tag:eQ.pJ.emphasis,fontStyle:"italic"},{tag:eQ.pJ.strikethrough,textDecoration:"line-through"},{tag:eQ.pJ.link,color:eb,textDecoration:"underline"},{tag:eQ.pJ.heading,fontWeight:"bold",color:e$},{tag:[eQ.pJ.atom,eQ.pJ.bool,eQ.pJ.special(eQ.pJ.variableName)],color:ex},{tag:[eQ.pJ.processingInstruction,eQ.pJ.string,eQ.pJ.inserted],color:"#98c379"},{tag:eQ.pJ.invalid,color:"#ffffff"}]),eC=[eZ,(0,l.nF)(eT)];var eX=a.tk.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),getDefaultExtensions=function(e){void 0===e&&(e={});var{indentWithTab:t=!0,editable:n=!0,readOnly:r=!1,theme:i="light",placeholder:o="",basicSetup:l=!0}=e,c=[];switch(t&&c.unshift(a.$f.of([C])),l&&("boolean"==typeof l?c.unshift(basicSetup()):c.unshift(basicSetup(l))),o&&c.unshift((0,a.W$)(o)),i){case"light":c.push(eX);break;case"dark":c.push(eC);break;case"none":break;default:c.push(i)}return!1===n&&c.push(a.tk.editable.of(!1)),r&&c.push(s.yy.readOnly.of(!0)),[...c]},getStatistics=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(e=>!e.empty)}),eY=s.q6.define(),eR=[];function useCodeMirror(e){var{value:t,selection:n,onChange:r,onStatistics:i,onCreateEditor:l,onUpdate:c,extensions:O=eR,autoFocus:h,theme:u="light",height:f=null,minHeight:d=null,maxHeight:p=null,width:g=null,minWidth:m=null,maxWidth:S=null,placeholder:Q="",editable:$=!0,readOnly:y=!1,indentWithTab:b=!0,basicSetup:x=!0,root:v,initialState:k}=e,[P,w]=(0,o.useState)(),[Z,T]=(0,o.useState)(),[C,X]=(0,o.useState)(),Y=a.tk.theme({"&":{height:f,minHeight:d,maxHeight:p,width:g,minWidth:m,maxWidth:S},"& .cm-scroller":{height:"100% !important"}}),R=[a.tk.updateListener.of(e=>{e.docChanged&&"function"==typeof r&&!e.transactions.some(e=>e.annotation(eY))&&r(e.state.doc.toString(),e),i&&i(getStatistics(e))}),Y,...getDefaultExtensions({theme:u,editable:$,readOnly:y,placeholder:Q,indentWithTab:b,basicSetup:x})];return c&&"function"==typeof c&&R.push(a.tk.updateListener.of(c)),R=R.concat(O),(0,o.useEffect)(()=>{if(P&&!C){var e={doc:t,selection:n,extensions:R},r=k?s.yy.fromJSON(k.json,e,k.fields):s.yy.create(e);if(X(r),!Z){var i=new a.tk({state:r,parent:P,root:v});T(i),l&&l(i,r)}}return()=>{Z&&(X(void 0),T(void 0))}},[P,C]),(0,o.useEffect)(()=>w(e.container),[e.container]),(0,o.useEffect)(()=>()=>{Z&&(Z.destroy(),T(void 0))},[Z]),(0,o.useEffect)(()=>{h&&Z&&Z.focus()},[h,Z]),(0,o.useEffect)(()=>{Z&&Z.dispatch({effects:s.Py.reconfigure.of(R)})},[u,O,f,d,p,g,m,S,Q,$,y,b,x,r,c]),(0,o.useEffect)(()=>{if(void 0!==t){var e=Z?Z.state.doc.toString():"";Z&&t!==e&&Z.dispatch({changes:{from:0,to:e.length,insert:t||""},annotations:[eY.of(!0)]})}},[t,Z]),{state:C,setState:X,view:Z,setView:T,container:P,setContainer:w}}var eA=n(85893),e_=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],eW=(0,o.forwardRef)((e,t)=>{var{className:n,value:s="",selection:a,extensions:l=[],onChange:c,onStatistics:O,onCreateEditor:h,onUpdate:u,autoFocus:f,theme:d="light",height:p,minHeight:g,maxHeight:m,width:S,minWidth:Q,maxWidth:$,basicSetup:y,placeholder:b,indentWithTab:x,editable:v,readOnly:k,root:P,initialState:w}=e,Z=(0,i.Z)(e,e_),T=(0,o.useRef)(null),{state:C,view:X,container:Y}=useCodeMirror({container:T.current,root:P,value:s,autoFocus:f,theme:d,height:p,minHeight:g,maxHeight:m,width:S,minWidth:Q,maxWidth:$,basicSetup:y,placeholder:b,indentWithTab:x,editable:v,readOnly:k,selection:a,onChange:c,onStatistics:O,onCreateEditor:h,onUpdate:u,extensions:l,initialState:w});if((0,o.useImperativeHandle)(t,()=>({editor:T.current,state:C,view:X}),[T,Y,C,X]),"string"!=typeof s)throw Error("value must be typeof string but got "+typeof s);var R="string"==typeof d?"cm-theme-"+d:"cm-theme";return(0,eA.jsx)("div",(0,r.Z)({ref:T,className:""+R+(n?" "+n:"")},Z))});eW.displayName="CodeMirror";var eU=eW},34790:function(e,t,n){n.d(t,{B1:function(){return q},GA:function(){return U},Gn:function(){return snippetCompletion},Mb:function(){return completeFromList},TK:function(){return CompletionContext},eC:function(){return ifNotIn},vQ:function(){return closeBrackets},ys:function(){return autocompletion}});var r=n(78120),i=n(47421),o=n(59119);let CompletionContext=class CompletionContext{constructor(e,t,n){this.state=e,this.pos=t,this.explicit=n,this.abortListeners=[]}tokenBefore(e){let t=(0,o.qz)(this.state).resolveInner(this.pos,-1);for(;t&&0>e.indexOf(t.name);)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(ensureAnchor(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return null==this.abortListeners}addEventListener(e,t){"abort"==e&&this.abortListeners&&this.abortListeners.push(t)}};function toSet(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function prefixMatch(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e"string"==typeof e?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:prefixMatch(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function ifNotIn(e,t){return n=>{for(let t=(0,o.qz)(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}let Option=class Option{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function cur(e){return e.selection.main.from}function ensureAnchor(e,t){var n;let{source:r}=e,i=t&&"^"!=r[0],o="$"!=r[r.length-1];return i||o?RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}let s=r.q6.define();function insertCompletionText(e,t,n,i){let{main:o}=e.selection,s=n-o.from,a=i-o.from;return Object.assign(Object.assign({},e.changeByRange(l=>l!=o&&n!=i&&e.sliceDoc(l.from+s,l.from+a)!=e.sliceDoc(n,i)?{range:l}:{changes:{from:l.from+s,to:i==o.from?l.to:l.from+a,insert:t},range:r.jT.cursor(l.from+s+t.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}let a=new WeakMap;function asSource(e){if(!Array.isArray(e))return e;let t=a.get(e);return t||a.set(e,t=completeFromList(e)),t}let l=r.Py.define(),c=r.Py.define();let FuzzyMatcher=class FuzzyMatcher{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&c<=57||c>=97&&c<=122?2:c>=65&&c<=90?1:0:(Q=(0,r.bg)(c))!=Q.toLowerCase()?1:Q!=Q.toUpperCase()?2:0;(!i||1==$&&g||0==S&&0!=$)&&(t[h]==c||n[h]==c&&(u=!0)?s[h++]=i:s.length&&(m=!1)),S=$,i+=(0,r.nZ)(c)}return h==l&&0==s[0]&&m?this.result(-100+(u?-200:0),s,e):f==l&&0==d?this.ret(-200-e.length+(p==e.length?0:-100),[0,p]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):f==l?this.ret(-900-e.length,[d,p]):h==l?this.result(-100+(u?-200:0)+-700+(m?0:-1100),s,e):2!=t.length&&this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,n){let i=[],o=0;for(let e of t){let t=e+(this.astral?(0,r.nZ)((0,r.gm)(n,e)):1);o&&i[o-1]==e?i[o-1]=t:(i[o++]=e,i[o++]=t)}return this.ret(e-n.length,i)}};let O=r.r$.define({combine:e=>(0,r.BO)(e,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:defaultPositionInfo,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>joinClass(e(n),t(n)),optionClass:(e,t)=>n=>joinClass(e(n),t(n)),addToOptions:(e,t)=>e.concat(t)})});function joinClass(e,t){return e?t?e+" "+t:e:t}function defaultPositionInfo(e,t,n,r,o,s){let a=e.textDirection==i.Nm.RTL,l=a,c=!1,O="top",h,u,f=t.left-o.left,d=o.right-t.right,p=r.right-r.left,g=r.bottom-r.top;if(l&&f=g||e>t.top?h=n.bottom-t.top:(O="bottom",h=t.bottom-n.top)}let m=(t.bottom-t.top)/s.offsetHeight,S=(t.right-t.left)/s.offsetWidth;return{style:`${O}: ${h/m}px; max-width: ${u/S}px`,class:"cm-completionInfo-"+(c?a?"left-narrow":"right-narrow":l?"left":"right")}}function optionContent(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>"cm-completionIcon-"+e)),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,n,r){let i=document.createElement("span");i.className="cm-completionLabel";let o=e.displayLabel||e.label,s=0;for(let e=0;es&&i.appendChild(document.createTextNode(o.slice(s,t)));let a=i.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(o.slice(t,n))),a.className="cm-completionMatchedText",s=n}return se.position-t.position).map(e=>e.render)}function rangeAroundSelected(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*n}}let CompletionTooltip=class CompletionTooltip{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:i,selected:o}=r.open,s=e.state.facet(O);this.optionContent=optionContent(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=rangeAroundSelected(i.length,o,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",n=>{let{options:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if("LI"==t.nodeName&&(i=/-(\d+)$/.exec(t.id))&&+i[1]{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(O).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:c.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=r){let{options:i,selected:o,disabled:s}=n.open;r.open&&r.open.options==i||(this.range=rangeAroundSelected(i.length,o,e.state.facet(O).maxRenderedOptions),this.showOptions(i,n.id)),this.updateSel(),s!=(null===(t=r.open)||void 0===t?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=rangeAroundSelected(t.options.length,t.selected,this.view.state.facet(O).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:r}=n;if(!r)return;let o="string"==typeof r?document.createTextNode(r):r(n);if(!o)return;"then"in o?o.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,n)}).catch(e=>(0,i.OO)(this.view.state,e,"completion info")):this.addInfoPane(o,n)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)"LI"==n.nodeName&&n.id?r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected"):r--;return t&&scrollIntoView(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.defaultView||window;i={left:0,top:0,right:e.innerWidth,bottom:e.innerHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottomn.from||0==n.from)&&(i=e,"string"!=typeof l&&l.header?r.appendChild(l.header(l)):r.appendChild(document.createElement("completion-section")).textContent=e)}let c=r.appendChild(document.createElement("li"));c.id=t+"-"+o,c.setAttribute("role","option");let O=this.optionClass(s);for(let e of(O&&(c.className=O),this.optionContent)){let t=e(s,this.view.state,this.view,a);t&&c.appendChild(t)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.tonew CompletionTooltip(n,e,t)}function scrollIntoView(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.topn.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}function score(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}function sortOptions(e,t){let n=[],r=null,addOption=e=>{n.push(e);let{section:t}=e.completion;if(t){r||(r=[]);let e="string"==typeof t?t:t.name;r.some(t=>t.name==e)||r.push("string"==typeof t?{name:e}:t)}};for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(!1===r.result.filter)for(let t of r.result.options)addOption(new Option(t,r.source,e?e(t):[],1e9-n.length));else{let n=new FuzzyMatcher(t.sliceDoc(r.from,r.to));for(let t of r.result.options)if(n.match(t.label)){let i=t.displayLabel?e?e(t,n.matched):[]:n.matched;addOption(new Option(t,r.source,i,n.score+(t.boost||0)))}}}if(r){let e=Object.create(null),t=0;for(let n of r.sort((e,t)=>{var n,r;return(null!==(n=e.rank)&&void 0!==n?n:1e9)-(null!==(r=t.rank)&&void 0!==r?r:1e9)||(e.namet.score-e.score||s(e.completion,t.completion))){let t=e.completion;o&&o.label==t.label&&o.detail==t.detail&&(null==o.type||null==t.type||o.type==t.type)&&o.apply==t.apply&&o.boost==t.boost?score(e.completion)>score(o)&&(i[i.length-1]=e):i.push(e),o=e.completion}return i}let CompletionDialog=class CompletionDialog{constructor(e,t,n,r,i,o){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new CompletionDialog(this.options,makeAttrs(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,r,i){let o=sortOptions(e,t);if(!o.length)return r&&e.some(e=>1==e.state)?new CompletionDialog(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let s=t.facet(O).selectOnOpen?0:-1;if(r&&r.selected!=s&&-1!=r.selected){let e=r.options[r.selected].completion;for(let t=0;tt.hasResult()?Math.min(e,t.from):e,1e8),create:g,above:i.aboveCursor},r?r.timestamp:Date.now(),s,!1)}map(e){return new CompletionDialog(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}};let CompletionState=class CompletionState{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new CompletionState(u,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(O),r=(n.override||t.languageDataAt("autocomplete",cur(t)).map(asSource)).map(t=>(this.active.find(e=>e.source==t)||new ActiveSource(t,this.active.some(e=>0!=e.state)?1:0)).update(e,n));r.length==this.active.length&&r.every((e,t)=>e==this.active[t])&&(r=this.active);let i=this.open;for(let o of(i&&e.docChanged&&(i=i.map(e.changes)),e.selection||r.some(t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to))||!sameResults(r,this.active)?i=CompletionDialog.build(r,t,this.id,i,n):i&&i.disabled&&!r.some(e=>1==e.state)&&(i=null),!i&&r.every(e=>1!=e.state)&&r.some(e=>e.hasResult())&&(r=r.map(e=>e.hasResult()?new ActiveSource(e.source,0):e)),e.effects))o.is(d)&&(i=i&&i.setSelected(o.value,this.id));return r==this.active&&i==this.open?this:new CompletionState(r,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:h}};function sameResults(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n-1&&(n["aria-activedescendant"]=e+"-"+t),n}let u=[];function getUserEvent(e){return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}let ActiveSource=class ActiveSource{constructor(e,t,n=-1){this.source=e,this.state=t,this.explicitPos=n}hasResult(){return!1}update(e,t){let n=getUserEvent(e),r=this;for(let i of(n?r=r.handleUserEvent(e,n,t):e.docChanged?r=r.handleChange(e):e.selection&&0!=r.state&&(r=new ActiveSource(r.source,0)),e.effects))if(i.is(l))r=new ActiveSource(r.source,1,i.value?cur(e.state):-1);else if(i.is(c))r=new ActiveSource(r.source,0);else if(i.is(f))for(let e of i.value)e.source==r.source&&(r=e);return r}handleUserEvent(e,t,n){return"delete"!=t&&n.activateOnTyping?new ActiveSource(this.source,1):this.map(e.changes)}handleChange(e){return e.changes.touchesRange(cur(e.startState))?new ActiveSource(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new ActiveSource(this.source,this.state,e.mapPos(this.explicitPos))}};let ActiveResult=class ActiveResult extends ActiveSource{constructor(e,t,n,r,i){super(e,2,t),this.result=n,this.from=r,this.to=i}hasResult(){return!0}handleUserEvent(e,t,n){var r;let i=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),s=cur(e.state);if((this.explicitPos<0?s<=i:so||"delete"==t&&cur(e.startState)==this.from)return new ActiveSource(this.source,"input"==t&&n.activateOnTyping?1:0);let a=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),l;return checkValid(this.result.validFor,e.state,i,o)?new ActiveResult(this.source,a,this.result,i,o):this.result.update&&(l=this.result.update(this.result,i,o,new CompletionContext(e.state,s,a>=0)))?new ActiveResult(this.source,a,l,l.from,null!==(r=l.to)&&void 0!==r?r:cur(e.state)):new ActiveSource(this.source,1,a)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new ActiveSource(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new ActiveResult(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}};function checkValid(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return"function"==typeof e?e(i,n,r,t):ensureAnchor(e,!0).test(i)}let f=r.Py.define({map:(e,t)=>e.map(e=>e.map(t))}),d=r.Py.define(),p=r.QQ.define({create:()=>CompletionState.start(),update:(e,t)=>e.update(t),provide:e=>[i.hJ.from(e,e=>e.tooltip),i.tk.contentAttributes.from(e,e=>e.attrs)]});function applyCompletion(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(p).active.find(e=>e.source==t.source);return r instanceof ActiveResult&&("string"==typeof n?e.dispatch(Object.assign(Object.assign({},insertCompletionText(e.state,n,r.from,r.to)),{annotations:s.of(t.completion)})):n(e,t.completion,r.from,r.to),!0)}let g=completionTooltip(p,applyCompletion);function moveCompletionSelection(e,t="option"){return n=>{let r=n.state.field(p,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+o*(e?1:-1):e?0:a-1;return l<0?l="page"==t?0:a-1:l>=a&&(l="page"==t?a-1:0),n.dispatch({effects:d.of(l)}),!0}}let RunningQuery=class RunningQuery{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}};let m=i.lg.fromClass(class{constructor(e){for(let t of(this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0,e.state.field(p).active))1==t.state&&this.startQuery(t)}update(e){let t=e.state.field(p);if(!e.selectionSet&&!e.docChanged&&e.startState.field(p)==t)return;let n=e.transactions.some(e=>(e.selection||e.docChanged)&&!getUserEvent(e));for(let t=0;t50&&Date.now()-r.time>1e3){for(let e of r.context.abortListeners)try{e()}catch(e){(0,i.OO)(this.view.state,e)}r.context.abortListeners=null,this.running.splice(t--,1)}else r.updates.push(...e.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=t.active.some(e=>1==e.state&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),50):-1,0!=this.composing)for(let t of e.transactions)"input"==getUserEvent(t)?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:e}=this.view;for(let t of e.field(p).active)1!=t.state||this.running.some(e=>e.active.source==t.source)||this.startQuery(t)}startQuery(e){let{state:t}=this.view,n=cur(t),r=new CompletionContext(t,n,e.explicitPos==n),o=new RunningQuery(e,r);this.running.push(o),Promise.resolve(e.source(r)).then(e=>{o.context.aborted||(o.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:c.of(null)}),(0,i.OO)(this.view.state,e)})}scheduleAccept(){this.running.every(e=>void 0!==e.done)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(O).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(O);for(let r=0;re.source==i.active.source);if(o&&1==o.state){if(null==i.done){let e=new ActiveSource(i.active.source,0);for(let t of i.updates)e=e.update(t,n);1!=e.state&&t.push(e)}else this.startQuery(o)}}t.length&&this.view.dispatch({effects:f.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(p,!1);if(t&&t.tooltip&&this.view.state.facet(O).closeOnBlur){let n=t.open&&(0,i.gB)(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||this.view.dispatch({effects:c.of(null)})}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:l.of(!1)}),20),this.composing=0}}}),S=i.tk.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'\uD835\uDC65'"}},".cm-completionIcon-constant":{"&:after":{content:"'\uD835\uDC36'"}},".cm-completionIcon-type":{"&:after":{content:"'\uD835\uDC61'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\uD83D\uDD11︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});let FieldPos=class FieldPos{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}};let FieldRange=class FieldRange{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,r.gc.TrackDel),n=e.mapPos(this.to,1,r.gc.TrackDel);return null==t||null==n?null:new FieldRange(this.field,t,n)}};let Snippet=class Snippet{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),s=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=s,a=/^\t*/.exec(i)[0].length;for(let t=0;tnew FieldRange(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(e){let t=[],n=[],r=[],i;for(let o of e.split(/\r\n?|\n/)){for(;i=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(o);){let e=i[1]?+i[1]:null,s=i[2]||i[3]||"",a=-1;for(let n=0;n=a&&i.field++}r.push(new FieldPos(a,n.length,i.index,i.index+s.length)),o=o.slice(0,i.index)+s+o.slice(i.index+i[0].length)}for(let e;e=/\\([{}])/.exec(o);)for(let t of(o=o.slice(0,e.index)+e[1]+o.slice(e.index+e[0].length),r))t.line==n.length&&t.from>e.index&&(t.from--,t.to--);n.push(o)}return new Snippet(n,r)}};let Q=i.p.widget({widget:new class extends i.l9{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),$=i.p.mark({class:"cm-snippetField"});let ActiveSnippet=class ActiveSnippet{constructor(e,t){this.ranges=e,this.active=t,this.deco=i.p.set(e.map(e=>(e.from==e.to?Q:$).range(e.from,e.to)))}map(e){let t=[];for(let n of this.ranges){let r=n.map(e);if(!r)return null;t.push(r)}return new ActiveSnippet(t,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}};let y=r.Py.define({map:(e,t)=>e&&e.map(t)}),b=r.Py.define(),x=r.QQ.define({create:()=>null,update(e,t){for(let n of t.effects){if(n.is(y))return n.value;if(n.is(b)&&e)return new ActiveSnippet(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>i.tk.decorations.from(e,e=>e?e.deco:i.p.none)});function fieldSelection(e,t){return r.jT.create(e.filter(e=>e.field==t).map(e=>r.jT.range(e.from,e.to)))}function snippet(e){let t=Snippet.parse(e);return(e,n,i,o)=>{let{text:a,ranges:l}=t.instantiate(e.state,i),c={changes:{from:i,to:o,insert:r.xv.of(a)},scrollIntoView:!0,annotations:n?s.of(n):void 0};if(l.length&&(c.selection=fieldSelection(l,0)),l.length>1){let t=new ActiveSnippet(l,0),n=c.effects=[y.of(t)];void 0===e.state.field(x,!1)&&n.push(r.Py.appendConfig.of([x,Z,T,S]))}e.dispatch(e.state.update(c))}}function moveField(e){return({state:t,dispatch:n})=>{let r=t.field(x,!1);if(!r||e<0&&0==r.active)return!1;let i=r.active+e,o=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:fieldSelection(r.ranges,i),effects:y.of(o?null:new ActiveSnippet(r.ranges,i)),scrollIntoView:!0})),!0}}let v=moveField(1),k=moveField(-1),P=[{key:"Tab",run:v,shift:k},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(x,!1)&&(t(e.update({effects:y.of(null)})),!0)}],w=r.r$.define({combine:e=>e.length?e[0]:P}),Z=r.Wl.highest(i.$f.compute([w],e=>e.facet(w)));function snippetCompletion(e,t){return Object.assign(Object.assign({},t),{apply:snippet(e)})}let T=i.tk.domEventHandlers({mousedown(e,t){let n=t.state.field(x,!1),r;if(!n||null==(r=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!!i&&i.field!=n.active&&(t.dispatch({selection:fieldSelection(n.ranges,i.field),effects:y.of(n.ranges.some(e=>e.field>i.field)?new ActiveSnippet(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),C={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},X=r.Py.define({map(e,t){let n=t.mapPos(e,-1,r.gc.TrackAfter);return null==n?void 0:n}}),Y=new class extends r.uU{};Y.startSide=1,Y.endSide=-1;let R=r.QQ.define({create:()=>r.Xs.empty,update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(X)&&(e=e.update({add:[Y.range(n.value,n.value+1)]}));return e}});function closeBrackets(){return[W,R]}let A="()[]{}<>";function closing(e){for(let t=0;t{if((_?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let o=e.state.selection.main;if(i.length>2||2==i.length&&1==(0,r.nZ)((0,r.gm)(i,0))||t!=o.from||n!=o.to)return!1;let s=insertBracket(e.state,i);return!!s&&(e.dispatch(s),!0)}),U=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=config(e,e.selection.main.head).brackets||C.brackets,i=null,o=e.changeByRange(t=>{if(t.empty){let i=prevChar(e.doc,t.head);for(let o of n)if(o==i&&nextChar(e.doc,t.head)==closing((0,r.gm)(o,0)))return{changes:{from:t.head-o.length,to:t.head+o.length},range:r.jT.cursor(t.head-o.length)}}return{range:i=t}});return i||t(e.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i}}];function insertBracket(e,t){let n=config(e,e.selection.main.head),i=n.brackets||C.brackets;for(let o of i){let s=closing((0,r.gm)(o,0));if(t==o)return s==o?handleSame(e,o,i.indexOf(o+o+o)>-1,n):handleOpen(e,o,s,n.before||C.before);if(t==s&&closedBracketAt(e,e.selection.main.from))return handleClose(e,o,s)}return null}function closedBracketAt(e,t){let n=!1;return e.field(R).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function nextChar(e,t){let n=e.sliceString(t,t+2);return n.slice(0,(0,r.nZ)((0,r.gm)(n,0)))}function prevChar(e,t){let n=e.sliceString(t-2,t);return(0,r.nZ)((0,r.gm)(n,0))==n.length?n:n.slice(1)}function handleOpen(e,t,n,i){let o=null,s=e.changeByRange(s=>{if(!s.empty)return{changes:[{insert:t,from:s.from},{insert:n,from:s.to}],effects:X.of(s.to+t.length),range:r.jT.range(s.anchor+t.length,s.head+t.length)};let a=nextChar(e.doc,s.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:t+n,from:s.head},effects:X.of(s.head+t.length),range:r.jT.cursor(s.head+t.length)}:{range:o=s}});return o?null:e.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function handleClose(e,t,n){let i=null,o=e.changeByRange(t=>t.empty&&nextChar(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:r.jT.cursor(t.head+n.length)}:i={range:t});return i?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function handleSame(e,t,n,i){let o=i.stringPrefixes||C.stringPrefixes,s=null,a=e.changeByRange(i=>{if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:t,from:i.to}],effects:X.of(i.to+t.length),range:r.jT.range(i.anchor+t.length,i.head+t.length)};let a=i.head,l=nextChar(e.doc,a),c;if(l==t){if(nodeStart(e,a))return{changes:{insert:t+t,from:a},effects:X.of(a+t.length),range:r.jT.cursor(a+t.length)};if(closedBracketAt(e,a)){let i=n&&e.sliceDoc(a,a+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:a,to:a+i.length,insert:i},range:r.jT.cursor(a+i.length)}}}else if(n&&e.sliceDoc(a-2*t.length,a)==t+t&&(c=canStartStringAt(e,a-2*t.length,o))>-1&&nodeStart(e,c))return{changes:{insert:t+t+t+t,from:a},effects:X.of(a+t.length),range:r.jT.cursor(a+t.length)};else if(e.charCategorizer(a)(l)!=r.D0.Word&&canStartStringAt(e,a,o)>-1&&!probablyInString(e,a,t,o))return{changes:{insert:t+t,from:a},effects:X.of(a+t.length),range:r.jT.cursor(a+t.length)};return{range:s=i}});return s?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function nodeStart(e,t){let n=(0,o.qz)(e).resolveInner(t+1);return n.parent&&n.from==t}function probablyInString(e,t,n,r){let i=(0,o.qz)(e).resolveInner(t,-1),s=r.reduce((e,t)=>Math.max(e,t.length),0);for(let o=0;o<5;o++){let o=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+s)),a=o.indexOf(n);if(!a||a>-1&&r.indexOf(o.slice(0,a))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+a;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let l=i.to==t&&i.parent;if(!l)break;i=l}return!1}function canStartStringAt(e,t,n){let i=e.charCategorizer(t);if(i(e.sliceDoc(t-1,t))!=r.D0.Word)return t;for(let o of n){let n=t-o.length;if(e.sliceDoc(n,t)==o&&i(e.sliceDoc(n-1,n))!=r.D0.Word)return n}return -1}function autocompletion(e={}){return[p,O.of(e),m,j,S]}let q=[{key:"Ctrl-Space",run:e=>!!e.state.field(p,!1)&&(e.dispatch({effects:l.of(!0)}),!0)},{key:"Escape",run:e=>{let t=e.state.field(p,!1);return!!(t&&t.active.some(e=>0!=e.state))&&(e.dispatch({effects:c.of(null)}),!0)}},{key:"ArrowDown",run:moveCompletionSelection(!0)},{key:"ArrowUp",run:moveCompletionSelection(!1)},{key:"PageDown",run:moveCompletionSelection(!0,"page")},{key:"PageUp",run:moveCompletionSelection(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(p,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestampe.facet(O).defaultKeymap?[q]:[]))},48120:function(e,t,n){n.r(t),n.d(t,{css:function(){return css},cssCompletionSource:function(){return v},cssLanguage:function(){return k},defineCSSCompletionSource:function(){return defineCSSCompletionSource}});var r=n(53105),i=n(35524);let o=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function isAlpha(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function isDigit(e){return e>=48&&e<=57}let s=new r.Jq((e,t)=>{for(let n=!1,r=0,i=0;;i++){let{next:o}=e;if(isAlpha(o)||45==o||95==o||n&&isDigit(o))!n&&(45!=o||i>0)&&(n=!0),r===i&&45==o&&r++,e.advance();else if(92==o&&10!=e.peek(1))e.advance(),e.next>-1&&e.advance(),n=!0;else{n&&e.acceptToken(40==o?97:2==r&&t.canShift(2)?2:98);break}}}),a=new r.Jq(e=>{if(o.includes(e.peek(-1))){let{next:t}=e;(isAlpha(t)||95==t||35==t||46==t||91==t||58==t||45==t||38==t)&&e.acceptToken(96)}}),l=new r.Jq(e=>{if(!o.includes(e.peek(-1))){let{next:t}=e;if(37==t&&(e.advance(),e.acceptToken(1)),isAlpha(t)){do e.advance();while(isAlpha(e.next));e.acceptToken(1)}}}),c=(0,i.Gv)({"AtKeyword import charset namespace keyframes media supports":i.pJ.definitionKeyword,"from to selector":i.pJ.keyword,NamespaceName:i.pJ.namespace,KeyframeName:i.pJ.labelName,KeyframeRangeName:i.pJ.operatorKeyword,TagName:i.pJ.tagName,ClassName:i.pJ.className,PseudoClassName:i.pJ.constant(i.pJ.className),IdName:i.pJ.labelName,"FeatureName PropertyName":i.pJ.propertyName,AttributeName:i.pJ.attributeName,NumberLiteral:i.pJ.number,KeywordQuery:i.pJ.keyword,UnaryQueryOp:i.pJ.operatorKeyword,"CallTag ValueName":i.pJ.atom,VariableName:i.pJ.variableName,Callee:i.pJ.operatorKeyword,Unit:i.pJ.unit,"UniversalSelector NestingSelector":i.pJ.definitionOperator,MatchOp:i.pJ.compareOperator,"ChildOp SiblingOp, LogicOp":i.pJ.logicOperator,BinOp:i.pJ.arithmeticOperator,Important:i.pJ.modifier,Comment:i.pJ.blockComment,ColorLiteral:i.pJ.color,"ParenthesizedContent StringLiteral":i.pJ.string,":":i.pJ.punctuation,"PseudoOp #":i.pJ.derefOperator,"; ,":i.pJ.separator,"( )":i.pJ.paren,"[ ]":i.pJ.squareBracket,"{ }":i.pJ.brace}),O={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},h={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},u={__proto__:null,not:128,only:128},f=r.WQ.deserialize({version:14,states:"9bQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DPO$vQ[O'#DTOOQP'#Ej'#EjO${QdO'#DeO%gQ[O'#DrO${QdO'#DtO%xQ[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'S;=`%o<%lO%^bBbU]QOy%^z![%^![!]Bt!];'S%^;'S;=`%o<%lO%^bB{S^Qo`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!W^Oy%^z;'S%^;'S;=`%o<%lO%^dCoSzSOy%^z;'S%^;'S;=`%o<%lO%^bDQU|QOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS|Qo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[!YQo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bFfSxQOy%^z;'S%^;'S;=`%o<%lO%^lFwSv[Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!`Qo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!RUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!Q^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!PQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[a,l,s,1,2,3,4,new r.RA("m~RRYZ[z{a~~g~aO#Z~~dP!P!Qg~lO#[~~",28,102)],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:97,get:e=>O[e]||-1},{term:56,get:e=>h[e]||-1},{term:98,get:e=>u[e]||-1}],tokenPrec:1169});var d=n(59119),p=n(41113);let g=null;function properties(){if(!g&&"object"==typeof document&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let r in e)"cssText"==r||"cssFloat"==r||"string"!=typeof e[r]||(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())),n.has(r)||(t.push(r),n.add(r)));g=t.sort().map(e=>({type:"property",label:e}))}return g||[]}let m=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),S=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),Q=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),$=/^(\w[\w-]*|-\w[\w-]*|)$/,y=/^-(-[\w-]*)?$/;function isVarArg(e,t){var n;if(("("==e.name||e.type.isError)&&(e=e.parent||e),"ArgList"!=e.name)return!1;let r=null===(n=e.parent)||void 0===n?void 0:n.firstChild;return(null==r?void 0:r.name)=="Callee"&&"var"==t.sliceString(r.from,r.to)}let b=new p.hr,x=["Declaration"];function astTop(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function variableNames(e,t,n){if(t.to-t.from>4096){let r=b.get(t);if(r)return r;let i=[],o=new Set,s=t.cursor(p.vj.IncludeAnonymous);if(s.firstChild())do for(let t of variableNames(e,s.node,n))o.has(t.label)||(o.add(t.label),i.push(t));while(s.nextSibling());return b.set(t,i),i}{let r=[],i=new Set;return t.cursor().iterate(t=>{var o;if(n(t)&&t.matchContext(x)&&(null===(o=t.node.nextSibling)||void 0===o?void 0:o.name)==":"){let n=e.sliceString(t.from,t.to);i.has(n)||(i.add(n),r.push({label:n,type:"variable"}))}}),r}}let defineCSSCompletionSource=e=>t=>{let{state:n,pos:r}=t,i=(0,d.qz)(n).resolveInner(r,-1),o=i.type.isError&&i.from==i.to-1&&"-"==n.doc.sliceString(i.from,i.to);if("PropertyName"==i.name||(o||"TagName"==i.name)&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:properties(),validFor:$};if("ValueName"==i.name)return{from:i.from,options:S,validFor:$};if("PseudoClassName"==i.name)return{from:i.from,options:m,validFor:$};if(e(i)||(t.explicit||o)&&isVarArg(i,n.doc))return{from:e(i)||o?i.from:r,options:variableNames(n.doc,astTop(i),e),validFor:y};if("TagName"==i.name){for(let{parent:e}=i;e;e=e.parent)if("Block"==e.name)return{from:i.from,options:properties(),validFor:$};return{from:i.from,options:Q,validFor:$}}if(!t.explicit)return null;let s=i.resolve(r),a=s.childBefore(r);return a&&":"==a.name&&"PseudoClassSelector"==s.name?{from:r,options:m,validFor:$}:a&&":"==a.name&&"Declaration"==s.name||"ArgList"==s.name?{from:r,options:S,validFor:$}:"Block"==s.name||"Styles"==s.name?{from:r,options:properties(),validFor:$}:null},v=defineCSSCompletionSource(e=>"VariableName"==e.name),k=d.qp.define({name:"css",parser:f.configure({props:[d.uj.add({Declaration:(0,d.tC)()}),d.x0.add({"Block KeyframeList":d.Dv})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function css(){return new d.ri(k,k.data.of({autocomplete:v}))}},82261:function(e,t,n){n.r(t),n.d(t,{autoCloseTags:function(){return B},html:function(){return html},htmlCompletionSource:function(){return htmlCompletionSource},htmlCompletionSourceWith:function(){return htmlCompletionSourceWith},htmlLanguage:function(){return V},htmlPlain:function(){return E}});var r=n(53105),i=n(35524),o=n(41113);let s={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},a={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},l={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function nameChar(e){return 45==e||46==e||58==e||e>=65&&e<=90||95==e||e>=97&&e<=122||e>=161}function isSpace(e){return 9==e||10==e||13==e||32==e}let c=null,O=null,h=0;function tagNameAfter(e,t){let n=e.pos+t;if(h==n&&O==e)return c;let r=e.peek(t);for(;isSpace(r);)r=e.peek(++t);let i="";for(;nameChar(r);)i+=String.fromCharCode(r),r=e.peek(++t);return O=e,h=n,c=i?i.toLowerCase():r==u||r==f?void 0:null}let u=63,f=33;function ElementContext(e,t){this.name=e,this.parent=t,this.hash=t?t.hash:0;for(let t=0;td.indexOf(t)>-1?new ElementContext(tagNameAfter(r,1)||"",e):e,reduce:(e,t)=>20==t&&e?e.parent:e,reuse(e,t,n,r){let i=t.type.id;return 6==i||36==i?new ElementContext(tagNameAfter(r,1)||"",e):e},hash:e=>e?e.hash:0,strict:!1}),g=new r.Jq((e,t)=>{if(60!=e.next){e.next<0&&t.context&&e.acceptToken(57);return}e.advance();let n=47==e.next;n&&e.advance();let r=tagNameAfter(e,0);if(void 0===r)return;if(!r)return e.acceptToken(n?14:6);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(11);if(i&&a[i])return e.acceptToken(57,-2);if(t.dialectEnabled(0))return e.acceptToken(12);for(let e=t.context;e;e=e.parent)if(e.name==r)return;e.acceptToken(13)}else{if("script"==r)return e.acceptToken(7);if("style"==r)return e.acceptToken(8);if("textarea"==r)return e.acceptToken(9);if(s.hasOwnProperty(r))return e.acceptToken(10);i&&l[i]&&l[i][r]?e.acceptToken(57,-1):e.acceptToken(6)}},{contextual:!0}),m=new r.Jq(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(58);break}if(45==e.next)t++;else if(62==e.next&&t>=2){n>=3&&e.acceptToken(58,-2);break}else t=0;e.advance()}});function inForeignElement(e){for(;e;e=e.parent)if("svg"==e.name||"math"==e.name)return!0;return!1}let S=new r.Jq((e,t)=>{if(47==e.next&&62==e.peek(1)){let n=t.dialectEnabled(1)||inForeignElement(t.context);e.acceptToken(n?5:4,2)}else 62==e.next&&e.acceptToken(4,1)});function contentTokenizer(e,t,n){let i=2+e.length;return new r.Jq(r=>{for(let o=0,s=0,a=0;;a++){if(r.next<0){a&&r.acceptToken(t);break}if(0==o&&60==r.next||1==o&&47==r.next||o>=2&&os?r.acceptToken(t,-s):r.acceptToken(n,-(s-2));break}else if((10==r.next||13==r.next)&&a){r.acceptToken(t,1);break}else o=s=0;r.advance()}})}let Q=contentTokenizer("script",54,1),$=contentTokenizer("style",55,2),y=contentTokenizer("textarea",56,3),b=(0,i.Gv)({"Text RawText":i.pJ.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":i.pJ.angleBracket,TagName:i.pJ.tagName,"MismatchedCloseTag/TagName":[i.pJ.tagName,i.pJ.invalid],AttributeName:i.pJ.attributeName,"AttributeValue UnquotedAttributeValue":i.pJ.attributeValue,Is:i.pJ.definitionOperator,"EntityReference CharacterReference":i.pJ.character,Comment:i.pJ.blockComment,ProcessingInst:i.pJ.processingInstruction,DoctypeDecl:i.pJ.documentMeta}),x=r.WQ.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#D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sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:p,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[b],skippedNodes:[0],repeatNodeCount:9,tokenData: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;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let o=e.type.id;if(28==o)return maybeNest(e,t,n);if(31==o)return maybeNest(e,t,r);if(34==o)return maybeNest(e,t,i);if(20==o&&s.length){let n=e.node,r=n.firstChild,i=r&&findTagName(r,t),o;if(i){for(let e of s)if(e.tag==i&&(!e.attrs||e.attrs(o||(o=getAttrs(n,t))))){let t=n.lastChild,i=37==t.type.id?t.from:n.to;if(i>r.to)return{parser:e.parser,overlay:[{from:r.to,to:i}]}}}}if(a&&23==o){let n=e.node,r;if(r=n.firstChild){let e=a[t.read(r.from,r.to)];if(e)for(let r of e){if(r.tagName&&r.tagName!=findTagName(n.parent,t))continue;let e=n.lastChild;if(26==e.type.id){let t=e.from+1,n=e.lastChild,i=e.to-(n&&n.isError?0:1);if(i>t)return{parser:r.parser,overlay:[{from:t,to:i}]}}else if(27==e.type.id)return{parser:r.parser,overlay:[{from:e.from,to:e.to}]}}}}return null})}var v=n(48120),k=n(122),P=n(47421),w=n(78120),Z=n(59119);let T=["_blank","_self","_top","_parent"],C=["ascii","utf-8","utf-16","latin1","latin1"],X=["get","post","put","delete"],Y=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],R=["true","false"],A={},_={a:{attrs:{href:null,ping:null,type:null,media:null,target:T,hreflang:null}},abbr:A,address:A,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:A,aside:A,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:A,base:{attrs:{href:null,target:T}},bdi:A,bdo:A,blockquote:{attrs:{cite:null}},body:A,br:A,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Y,formmethod:X,formnovalidate:["novalidate"],formtarget:T,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:A,center:A,cite:A,code:A,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:A,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:A,div:A,dl:A,dt:A,em:A,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:A,figure:A,footer:A,form:{attrs:{action:null,name:null,"accept-charset":C,autocomplete:["on","off"],enctype:Y,method:X,novalidate:["novalidate"],target:T}},h1:A,h2:A,h3:A,h4:A,h5:A,h6:A,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:A,hgroup:A,hr:A,html:{attrs:{manifest:null}},i:A,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Y,formmethod:X,formnovalidate:["novalidate"],formtarget:T,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:A,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:A,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:A,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:C,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:A,noscript:A,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:A,param:{attrs:{name:null,value:null}},pre:A,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:A,rt:A,ruby:A,samp:A,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:C}},section:A,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:A,source:{attrs:{src:null,type:null,media:null}},span:A,strong:A,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:A,summary:A,sup:A,table:A,tbody:A,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:A,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:A,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:A,time:{attrs:{datetime:null}},title:A,tr:A,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:A,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:A},W={accesskey:null,class:null,contenteditable:R,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:R,autocorrect:R,autocapitalize:R,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":R,"aria-autocomplete":["inline","list","both","none"],"aria-busy":R,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":R,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":R,"aria-hidden":R,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":R,"aria-multiselectable":R,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":R,"aria-relevant":null,"aria-required":R,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},U="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(e=>"on"+e);for(let e of U)W[e]=null;let Schema=class Schema{constructor(e,t){this.tags=Object.assign(Object.assign({},_),e),this.globalAttrs=Object.assign(Object.assign({},W),t),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};function elementName(e,t,n=e.length){if(!t)return"";let r=t.firstChild,i=r&&r.getChild("TagName");return i?e.sliceString(i.from,Math.min(i.to,n)):""}function findParentElement(e,t=!1){for(;e;e=e.parent)if("Element"==e.name){if(!t)return e;t=!1}return null}function allowedChildren(e,t,n){let r=n.tags[elementName(e,findParentElement(t))];return(null==r?void 0:r.children)||n.allTags}function openTags(e,t){let n=[];for(let r=findParentElement(t);r&&!r.type.isTop;r=findParentElement(r.parent)){let i=elementName(e,r);if(i&&"CloseTag"==r.lastChild.name)break;i&&0>n.indexOf(i)&&("EndTag"==t.name||t.from>=r.firstChild.to)&&n.push(i)}return n}Schema.default=new Schema;let q=/^[:\-\.\w\u00b7-\uffff]*$/;function completeTag(e,t,n,r,i){let o=/\s*>/.test(e.sliceDoc(i,i+5))?"":">",s=findParentElement(n,!0);return{from:r,to:i,options:allowedChildren(e.doc,s,t).map(e=>({label:e,type:"type"})).concat(openTags(e.doc,n).map((e,t)=>({label:"/"+e,apply:"/"+e+o,type:"type",boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function completeCloseTag(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:openTags(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:"type",boost:99-t})),validFor:q}}function completeStartTag(e,t,n,r){let i=[],o=0;for(let r of allowedChildren(e.doc,n,t))i.push({label:"<"+r,type:"type"});for(let t of openTags(e.doc,n))i.push({label:"",type:"type",boost:99-o++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function completeAttrName(e,t,n,r,i){let o=findParentElement(n),s=o?t.tags[elementName(e.doc,o)]:null,a=s&&s.attrs?Object.keys(s.attrs):[];return{from:r,to:i,options:(s&&!1===s.globalAttrs?a:a.length?a.concat(t.globalAttrNames):t.globalAttrNames).map(e=>({label:e,type:"property"})),validFor:q}}function completeAttrValue(e,t,n,r,i){var o;let s=null===(o=n.parent)||void 0===o?void 0:o.getChild("AttributeName"),a=[],l;if(s){let o=e.sliceDoc(s.from,s.to),c=t.globalAttrs[o];if(!c){let r=findParentElement(n),i=r?t.tags[elementName(e.doc,r)]:null;c=(null==i?void 0:i.attrs)&&i.attrs[o]}if(c){let t=e.sliceDoc(r,i).toLowerCase(),n='"',o='"';for(let s of(/^['"]/.test(t)?(l='"'==t[0]?/^[^"]*$/:/^[^']*$/,n="",o=e.sliceDoc(i,i+1)==t[0]?"":t[0],t=t.slice(1),r++):l=/^[^\s<>='"]*$/,c))a.push({label:s,apply:n+s+o,type:"constant"})}}return{from:r,to:i,options:a,validFor:l}}function htmlCompletionFor(e,t){let{state:n,pos:r}=t,i=(0,Z.qz)(n).resolveInner(r,-1),o=i.resolve(r);for(let e=r,t;o==i&&(t=i.childBefore(e));){let n=t.lastChild;if(!n||!n.type.isError||n.fromhtmlCompletionFor(r,e)}let j=k.javascriptLanguage.parser.configure({top:"SingleExpression"}),I=[{tag:"script",attrs:e=>"text/typescript"==e.type||"ts"==e.lang,parser:k.typescriptLanguage.parser},{tag:"script",attrs:e=>"text/babel"==e.type||"text/jsx"==e.type,parser:k.jsxLanguage.parser},{tag:"script",attrs:e=>"text/typescript-jsx"==e.type,parser:k.tsxLanguage.parser},{tag:"script",attrs:e=>/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type),parser:j},{tag:"script",attrs:e=>!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type),parser:k.javascriptLanguage.parser},{tag:"style",attrs:e=>(!e.lang||"css"==e.lang)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type)),parser:v.cssLanguage.parser}],z=[{name:"style",parser:v.cssLanguage.parser.configure({top:"Styles"})}].concat(U.map(e=>({name:e,parser:k.javascriptLanguage.parser}))),E=Z.qp.define({name:"html",parser:x.configure({props:[Z.uj.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag":e=>e.column(e.node.from)+e.unit,Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].lengthe.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),V=E.configure({wrap:configureNesting(I,z)});function html(e={}){let t="",n;!1===e.matchClosingTags&&(t="noMatch"),!0===e.selfClosingTags&&(t=(t?t+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=configureNesting((e.nestedLanguages||[]).concat(I),(e.nestedAttributes||[]).concat(z)));let r=n?E.configure({wrap:n,dialect:t}):t?V.configure({dialect:t}):V;return new Z.ri(r,[V.data.of({autocomplete:htmlCompletionSourceWith(e)}),!1!==e.autoCloseTags?B:[],(0,k.javascript)().support,(0,v.css)().support])}let G=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),B=P.tk.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||">"!=r&&"/"!=r||!V.isActiveAt(e.state,t,-1))return!1;let o=i(),{state:s}=o,a=s.changeByRange(e=>{var t,n,i;let o=s.doc.sliceString(e.from-1,e.to)==r,{head:a}=e,l=(0,Z.qz)(s).resolveInner(a-1,-1),c;if(("TagName"==l.name||"StartTag"==l.name)&&(l=l.parent),o&&">"==r&&"OpenTag"==l.name){if((null===(n=null===(t=l.parent)||void 0===t?void 0:t.lastChild)||void 0===n?void 0:n.name)!="CloseTag"&&(c=elementName(s.doc,l.parent,a))&&!G.has(c)){let t=a+(">"===s.doc.sliceString(a,a+1)?1:0);return{range:e,changes:{from:a,to:t,insert:``}}}}else if(o&&"/"==r&&"IncompleteCloseTag"==l.name){let e=l.parent;if(l.from==a-2&&(null===(i=e.lastChild)||void 0===i?void 0:i.name)!="CloseTag"&&(c=elementName(s.doc,e,a))&&!G.has(c)){let e=a+(">"===s.doc.sliceString(a,a+1)?1:0),t=`${c}>`;return{range:w.jT.cursor(a+t.length,-1),changes:{from:a,to:e,insert:t}}}}return{range:e}});return!a.changes.empty&&(e.dispatch([o,s.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)})},122:function(e,t,n){n.r(t),n.d(t,{autoCloseTags:function(){return W},completionPath:function(){return completionPath},esLint:function(){return esLint},javascript:function(){return javascript},javascriptLanguage:function(){return Z},jsxLanguage:function(){return X},localCompletionSource:function(){return localCompletionSource},scopeCompletionSource:function(){return scopeCompletionSource},snippets:function(){return $},tsxLanguage:function(){return Y},typescriptLanguage:function(){return C},typescriptSnippets:function(){return y}});var r=n(53105),i=n(35524);let o=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],s=new r.IK({start:!1,shift:(e,t)=>3==t||4==t||307==t?e:308==t,strict:!1}),a=new r.Jq((e,t)=>{let{next:n}=e;(125==n||-1==n||t.context)&&e.acceptToken(305)},{contextual:!0,fallback:!0}),l=new r.Jq((e,t)=>{let{next:n}=e,r;!(o.indexOf(n)>-1)&&(47==n&&(47==(r=e.peek(1))||42==r)||125==n||59==n||-1==n||t.context||e.acceptToken(304))},{contextual:!0}),c=new r.Jq((e,t)=>{let{next:n}=e;if((43==n||45==n)&&(e.advance(),n==e.next)){e.advance();let n=!t.context&&t.canShift(1);e.acceptToken(n?1:2)}},{contextual:!0}),O=(0,i.Gv)({"get set async static":i.pJ.modifier,"for while do if else switch try catch finally return throw break continue default case":i.pJ.controlKeyword,"in of await yield void typeof delete instanceof":i.pJ.operatorKeyword,"let var const using function class extends":i.pJ.definitionKeyword,"import export from":i.pJ.moduleKeyword,"with debugger as new":i.pJ.keyword,TemplateString:i.pJ.special(i.pJ.string),super:i.pJ.atom,BooleanLiteral:i.pJ.bool,this:i.pJ.self,null:i.pJ.null,Star:i.pJ.modifier,VariableName:i.pJ.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":i.pJ.function(i.pJ.variableName),VariableDefinition:i.pJ.definition(i.pJ.variableName),Label:i.pJ.labelName,PropertyName:i.pJ.propertyName,PrivatePropertyName:i.pJ.special(i.pJ.propertyName),"CallExpression/MemberExpression/PropertyName":i.pJ.function(i.pJ.propertyName),"FunctionDeclaration/VariableDefinition":i.pJ.function(i.pJ.definition(i.pJ.variableName)),"ClassDeclaration/VariableDefinition":i.pJ.definition(i.pJ.className),PropertyDefinition:i.pJ.definition(i.pJ.propertyName),PrivatePropertyDefinition:i.pJ.definition(i.pJ.special(i.pJ.propertyName)),UpdateOp:i.pJ.updateOperator,"LineComment Hashbang":i.pJ.lineComment,BlockComment:i.pJ.blockComment,Number:i.pJ.number,String:i.pJ.string,Escape:i.pJ.escape,ArithOp:i.pJ.arithmeticOperator,LogicOp:i.pJ.logicOperator,BitOp:i.pJ.bitwiseOperator,CompareOp:i.pJ.compareOperator,RegExp:i.pJ.regexp,Equals:i.pJ.definitionOperator,Arrow:i.pJ.function(i.pJ.punctuation),": Spread":i.pJ.punctuation,"( )":i.pJ.paren,"[ ]":i.pJ.squareBracket,"{ }":i.pJ.brace,"InterpolationStart InterpolationEnd":i.pJ.special(i.pJ.brace),".":i.pJ.derefOperator,", ;":i.pJ.separator,"@":i.pJ.meta,TypeName:i.pJ.typeName,TypeDefinition:i.pJ.definition(i.pJ.typeName),"type enum interface implements namespace module declare":i.pJ.definitionKeyword,"abstract global Privacy readonly override":i.pJ.modifier,"is keyof unique infer":i.pJ.operatorKeyword,JSXAttributeValue:i.pJ.attributeValue,JSXText:i.pJ.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":i.pJ.angleBracket,"JSXIdentifier JSXNameSpacedName":i.pJ.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":i.pJ.attributeName,"JSXBuiltin/JSXIdentifier":i.pJ.standard(i.pJ.tagName)}),h={__proto__:null,export:16,as:21,from:29,default:32,async:37,function:38,extends:48,this:52,true:60,false:60,null:72,void:76,typeof:80,super:98,new:132,delete:148,yield:157,await:161,class:166,public:223,private:223,protected:223,readonly:225,instanceof:244,satisfies:247,in:248,const:250,import:282,keyof:337,unique:341,infer:347,is:383,abstract:403,implements:405,type:407,let:410,var:412,using:415,interface:421,enum:425,namespace:431,module:433,declare:437,global:441,for:460,of:469,while:472,with:476,do:480,if:484,else:486,switch:490,case:496,try:502,catch:506,finally:510,return:514,throw:518,break:522,continue:526,debugger:530},u={__proto__:null,async:119,get:121,set:123,declare:183,public:185,private:185,protected:185,static:187,abstract:189,override:191,readonly:197,accessor:199,new:387},f={__proto__:null,"<":139},d=r.WQ.deserialize({version:14,states:"$6zO%TQUOOO%[QUOOO'_QWOOP(lOSOOO*zQ(CjO'#CgO+ROpO'#ChO+aO!bO'#ChO+oO07`O'#D[O.QQUO'#DbO.bQUO'#DmO%[Q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}'US-c'c'dQ-e'eQ2Q-QR2`-dR(p#wR(s#xQ!fQT-R'V-S]!qQ!r'V-S0z4uQ#o]R'`9rT#jZ%^S#iZ%^S%dm,^U(]#g#h#kS-w(^(_Q-{(`Q0R*}Q2e-xU2f-y-z-|S5{2g2hR7z5|`#]W#V#Y%a'y(S*z-rr#fZm#g#h#k%^(^(_(`*}-x-y-z-|2g2h5|Q1a,^Q1w,tQ5j1oQ7r5kT:}'O*{T#`W%aS#_W%aS'z#V(SS(P#Y*zS,y'O*{T-m'y-rT'T!e%bQ$kfR)o$pT)d$k)eR3`.pT*T$x*VR*]${Q0V+VQ2j.TQ4x0|Q6Q2nQ7^4{Q7}6PQ8j7]Q8|7|Q9]8lQ9e9OQ9j9^R9m9fnqOXst!Z#c%f&i&k&l&n,b,g1g1jQ&c!VR,V&`tmOXst!U!V!Z#c%f&`&i&k&l&n,b,g1g1jR,^&fT%em,^R0v+vR,U&^Q%||R+n%}R+d%wT&g!W&jT&h!W&jT1i,g1j",nodeNames:"⚠ ArithOp ArithOp LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:367,context:s,nodeProps:[["group",-26,7,15,17,63,200,204,208,209,211,214,217,227,229,235,237,239,241,244,250,256,258,260,262,264,266,267,"Statement",-32,11,12,26,29,30,36,46,49,50,52,57,65,73,77,79,81,82,104,105,114,115,132,135,137,138,139,140,142,143,163,164,166,"Expression",-23,25,27,31,35,37,39,167,169,171,172,174,175,176,178,179,180,182,183,184,194,196,198,199,"Type",-3,85,97,103,"ClassItem"],["openedBy",32,"InterpolationStart",51,"[",55,"{",70,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!JZ<%lO!GY!f!HZb'|!b!SSOY'}Zw'}x#O'}#P#Z'}#Z#[!HS#[#]'}#]#^!HS#^#a'}#a#b!HS#b#g'}#g#h!HS#h#i'}#i#j!HS#j#m'}#m#n!HS#n;'S'};'S;=`(f<%lO'}!f!IhX'|!bOY!IcZw!Icwx!Acx#O!Ic#O#P!A{#P#Q!GY#Q;'S!Ic;'S;=`!JT<%lO!Ic!f!JWP;=`<%l!Ic!f!J^P;=`<%l!GY(Q!Jh^$e&j'|!bOY!JaYZ&cZw!Jawx!Bwx!^!Ja!^!_!Ic!_#O!Ja#O#P!Cr#P#Q!Q#V#X%Z#X#Y!4|#Y#b%Z#b#c#Zd$e&j'yp'|!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#?i!R!S#?i!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#?i#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#?tf$e&j'yp'|!bm$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#?i!R!S#?i!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#?i#S#b%Z#b#c#h[e]||-1},{term:330,get:e=>u[e]||-1},{term:68,get:e=>f[e]||-1}],tokenPrec:12868});var p=n(59119),g=n(78120),m=n(47421),S=n(34790),Q=n(41113);let $=[(0,S.Gn)("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),(0,S.Gn)("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),(0,S.Gn)("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),(0,S.Gn)("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),(0,S.Gn)("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),(0,S.Gn)("try {\n ${}\n} catch (${error}) {\n ${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),(0,S.Gn)("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),(0,S.Gn)("if (${}) {\n ${}\n} else {\n ${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),(0,S.Gn)("class ${name} {\n constructor(${params}) {\n ${}\n }\n}",{label:"class",detail:"definition",type:"keyword"}),(0,S.Gn)('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),(0,S.Gn)('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],y=$.concat([(0,S.Gn)("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),(0,S.Gn)("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),(0,S.Gn)("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),b=new Q.hr,x=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function defID(e){return(t,n)=>{let r=t.node.getChild("VariableDefinition");return r&&n(r,e),!0}}let v=["FunctionDeclaration"],k={FunctionDeclaration:defID("function"),ClassDeclaration:defID("class"),ClassExpression:()=>!0,EnumDeclaration:defID("constant"),TypeAliasDeclaration:defID("type"),NamespaceDeclaration:defID("namespace"),VariableDefinition(e,t){e.matchContext(v)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function getScope(e,t){let n=b.get(t);if(n)return n;let r=[],i=!0;function def(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(Q.vj.IncludeAnonymous).iterate(t=>{if(i)i=!1;else if(t.name){let e=k[t.name];if(e&&e(t,def)||x.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of getScope(e,t.node))r.push(n);return!1}}),b.set(t,r),r}let P=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,w=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function localCompletionSource(e){let t=(0,p.qz)(e.state).resolveInner(e.pos,-1);if(w.indexOf(t.name)>-1)return null;let n="VariableName"==t.name||t.to-t.from<20&&P.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)x.has(n.name)&&(r=r.concat(getScope(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:P}}function pathFor(e,t,n){var r;let i=[];for(;;){let o=t.firstChild,s;if((null==o?void 0:o.name)=="VariableName")return i.push(e(o)),{path:i.reverse(),name:n};if((null==o?void 0:o.name)!="MemberExpression"||(null===(r=s=o.lastChild)||void 0===r?void 0:r.name)!="PropertyName")return null;i.push(e(s)),t=o}}function completionPath(e){let read=t=>e.state.doc.sliceString(t.from,t.to),t=(0,p.qz)(e.state).resolveInner(e.pos,-1);return"PropertyName"==t.name?pathFor(read,t.parent,read(t)):("."==t.name||"?."==t.name)&&"MemberExpression"==t.parent.name?pathFor(read,t.parent,""):w.indexOf(t.name)>-1?null:"VariableName"==t.name||t.to-t.from<20&&P.test(read(t))?{path:[],name:read(t)}:"MemberExpression"==t.name?pathFor(read,t,""):e.explicit?{path:[],name:""}:null}function enumeratePropertyCompletions(e,t){let n=[],r=new Set;for(let i=0;;i++){for(let o of(Object.getOwnPropertyNames||Object.keys)(e)){let s;if(!(!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(o)||r.has(o))){r.add(o);try{s=e[o]}catch(e){continue}n.push({label:o,type:"function"==typeof s?/^[A-Z]/.test(o)?"class":t?"function":"method":t?"variable":"property",boost:-i})}}let o=Object.getPrototypeOf(e);if(!o)return n;e=o}}function scopeCompletionSource(e){let t=new Map;return n=>{let r=completionPath(n);if(!r)return null;let i=e;for(let e of r.path)if(!(i=i[e]))return null;let o=t.get(i);return o||t.set(i,o=enumeratePropertyCompletions(i,!r.path.length)),{from:n.pos-r.name.length,options:o,validFor:P}}}let Z=p.qp.define({name:"javascript",parser:d.configure({props:[p.uj.add({IfStatement:(0,p.tC)({except:/^\s*({|else\b)/}),TryStatement:(0,p.tC)({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:p.ze,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:(0,p.vw)({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":(0,p.tC)({except:/^{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag":e=>e.column(e.node.from)+e.unit}),p.x0.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":p.Dv,BlockComment:e=>({from:e.from+2,to:e.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),T={test:e=>/^JSX/.test(e.name),facet:(0,p.kU)({commentTokens:{block:{open:"{/*",close:"*/}"}}})},C=Z.configure({dialect:"ts"},"typescript"),X=Z.configure({dialect:"jsx",props:[p.KC.add(e=>e.isTop?[T]:void 0)]}),Y=Z.configure({dialect:"jsx ts",props:[p.KC.add(e=>e.isTop?[T]:void 0)]},"typescript"),kwCompletion=e=>({label:e,type:"keyword"}),R="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(kwCompletion),A=R.concat(["declare","implements","private","protected","public"].map(kwCompletion));function javascript(e={}){let t=e.jsx?e.typescript?Y:X:e.typescript?C:Z,n=e.typescript?y.concat(A):$.concat(R);return new p.ri(t,[Z.data.of({autocomplete:(0,S.eC)(w,(0,S.Mb)(n))}),Z.data.of({autocomplete:localCompletionSource}),e.jsx?W:[]])}function findOpenTag(e){for(;;){if("JSXOpenTag"==e.name||"JSXSelfClosingTag"==e.name||"JSXFragmentTag"==e.name)return e;if("JSXEscape"==e.name||!e.parent)return null;e=e.parent}}function elementName(e,t,n=e.length){for(let r=null==t?void 0:t.firstChild;r;r=r.nextSibling)if("JSXIdentifier"==r.name||"JSXBuiltin"==r.name||"JSXNamespacedName"==r.name||"JSXMemberExpression"==r.name)return e.sliceString(r.from,Math.min(r.to,n));return""}let _="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),W=m.tk.inputHandler.of((e,t,n,r,i)=>{if((_?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||">"!=r&&"/"!=r||!Z.isActiveAt(e.state,t,-1))return!1;let o=i(),{state:s}=o,a=s.changeByRange(e=>{var t;let{head:n}=e,i=(0,p.qz)(s).resolveInner(n-1,-1),o;if("JSXStartTag"==i.name&&(i=i.parent),s.doc.sliceString(n-1,n)!=r||"JSXAttributeValue"==i.name&&i.to>n);else if(">"==r&&"JSXFragmentTag"==i.name)return{range:e,changes:{from:n,insert:""}};else if("/"==r&&"JSXStartCloseTag"==i.name){let e=i.parent,r=e.parent;if(r&&e.from==n-2&&((o=elementName(s.doc,r.firstChild,n))||(null===(t=r.firstChild)||void 0===t?void 0:t.name)=="JSXFragmentTag")){let e=`${o}>`;return{range:g.jT.cursor(n+e.length,-1),changes:{from:n,insert:e}}}}else if(">"==r){let t=findOpenTag(i);if(t&&!/^\/?>|^<\//.test(s.doc.sliceString(n,n+2))&&(o=elementName(s.doc,t,n)))return{range:e,changes:{from:n,insert:``}}}return{range:e}});return!a.changes.empty&&(e.dispatch([o,s.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function esLint(e,t){return t||(t={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},e.getRules().forEach((e,n)=>{e.meta.docs.recommended&&(t.rules[n]=2)})),n=>{let{state:r}=n,i=[];for(let{from:n,to:o}of Z.findRegions(r)){let s=r.doc.lineAt(n),a={line:s.number-1,col:n-s.from,pos:n};for(let s of e.verify(r.sliceDoc(n,o),t))i.push(translateDiagnostic(s,r.doc,a))}return i}}function mapPos(e,t,n,r){return n.line(e+r.line).from+t+(1==e?r.col-1:-1)}function translateDiagnostic(e,t,n){let r=mapPos(e.line,e.column,t,n),i={from:r,to:null!=e.endLine&&1!=e.endColumn?mapPos(e.endLine,e.endColumn,t,n):r,message:e.message,source:e.ruleId?"eslint:"+e.ruleId:"eslint",severity:1==e.severity?"warning":"error"};if(e.fix){let{range:t,text:o}=e.fix,s=t[0]+n.pos-r,a=t[1]+n.pos-r;i.actions=[{name:"fix",apply(e,t){e.dispatch({changes:{from:t+s,to:t+a,insert:o},scrollIntoView:!0})}}]}return i}},59119:function(e,t,n){n.d(t,{Be:function(){return ParseContext},Dv:function(){return foldInside},Gn:function(){return IndentContext},K0:function(){return getIndentation},KC:function(){return O},Qf:function(){return HighlightStyle},R_:function(){return Y},SQ:function(){return Language},SS:function(){return indentString},Um:function(){return matchBrackets},a0:function(){return I},c:function(){return g},c6:function(){return LanguageDescription},e7:function(){return x},il:function(){return StreamLanguage},kU:function(){return defineLanguageFacet},mi:function(){return foldGutter},n$:function(){return bracketMatching},nF:function(){return syntaxHighlighting},nY:function(){return indentOnInput},pp:function(){return c},qp:function(){return LRLanguage},qz:function(){return syntaxTree},ri:function(){return LanguageSupport},rs:function(){return S},tC:function(){return continuedIndent},uj:function(){return m},vw:function(){return delimitedIndent},x0:function(){return Q},y1:function(){return getIndentUnit},ze:function(){return flatIndent}});var r,i=n(41113),o=n(78120),s=n(47421),a=n(35524),l=n(28699);let c=new i.md;function defineLanguageFacet(e){return o.r$.define({combine:e?t=>t.concat(e):void 0})}let O=new i.md;let Language=class Language{constructor(e,t,n=[],r=""){this.data=e,this.name=r,o.yy.prototype.hasOwnProperty("tree")||Object.defineProperty(o.yy.prototype,"tree",{get(){return syntaxTree(this)}}),this.parser=t,this.extension=[d.of(this),o.yy.languageData.of((e,t,n)=>{let r=topNodeAt(e,t,n),i=r.type.prop(c);if(!i)return[];let o=e.facet(i),s=r.type.prop(O);if(s){let i=r.resolve(t-r.from,n);for(let t of s)if(t.test(i,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(o)}}return o})].concat(n)}isActiveAt(e,t,n=-1){return topNodeAt(e,t,n).type.prop(c)==this.data}findRegions(e){let t=e.facet(d);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],explore=(e,t)=>{if(e.prop(c)==this.data){n.push({from:t,to:t+e.length});return}let r=e.prop(i.md.mounted);if(r){if(r.tree.prop(c)==this.data){if(r.overlay)for(let e of r.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(r.overlay){let e=n.length;if(explore(r.tree,r.overlay[0].from+t),n.length>e)return}}for(let n=0;ne.isTop?t:void 0)]}),e.name)}configure(e,t){return new LRLanguage(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function syntaxTree(e){let t=e.field(Language.state,!1);return t?t.tree:i.mp.empty}let DocInput=class DocInput{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}};let h=null;let ParseContext=class ParseContext{constructor(e,t,n=[],r,i,o,s,a){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=o,this.skipped=s,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new ParseContext(e,t,[],i.mp.empty,0,n,[],null)}startParse(){return this.parser.startParse(new DocInput(this.state.doc),this.fragments)}work(e,t){return(null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=i.mp.empty&&this.isDone(null!=t?t:this.state.doc.length))?(this.takeTree(),!0):this.withContext(()=>{var n;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(i.i9.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=h;h=this;try{return e()}finally{h=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=cutFragments(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:r,treeLen:o,viewport:s,skipped:a}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges((e,n,r,i)=>t.push({fromA:e,toA:n,fromB:r,toB:i})),n=i.i9.applyChanges(n,t),r=i.mp.empty,o=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length)for(let t of(a=[],this.skipped)){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);ne.from&&(this.fragments=cutFragments(this.fragments,n,r),this.skipped.splice(t--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends i._b{createParse(t,n,r){let o=r[0].from,s=r[r.length-1].to;return{parsedPos:o,advance(){let t=h;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=s,new i.mp(i.Jq.none,[],[],s-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return h}};function cutFragments(e,t,n){return i.i9.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}let LanguageState=class LanguageState{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new LanguageState(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=ParseContext.create(e.facet(d).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new LanguageState(n)}};Language.state=o.QQ.define({create:LanguageState.init,update(e,t){for(let e of t.effects)if(e.is(Language.setState))return e.value;return t.startState.facet(d)!=t.state.facet(d)?LanguageState.init(t.state):e.apply(t)}});let requestIdle=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(requestIdle=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});let u="undefined"!=typeof navigator&&(null===(r=navigator.scheduling)||void 0===r?void 0:r.isInputPending)?()=>navigator.scheduling.isInputPending():null,f=s.lg.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Language.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Language.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=requestIdle(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndr+1e3,a=i.context.work(()=>u&&u()||Date.now()>o,r+(s?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:Language.setState.of(new LanguageState(i.context))})),this.chunkBudget>0&&!(a&&!s)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>(0,s.OO)(this.view.state,e)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),d=o.r$.define({combine:e=>e.length?e[0]:null,enables:e=>[Language.state,f,s.tk.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]});let LanguageSupport=class LanguageSupport{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}};let LanguageDescription=class LanguageDescription{constructor(e,t,n,r,i,o){this.name=e,this.alias=t,this.extensions=n,this.filename=r,this.loadFunc=i,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:t,support:n}=e;if(!t){if(!n)throw RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(n)}return new LanguageDescription(e.name,(e.alias||[]).concat(e.name).map(e=>e.toLowerCase()),e.extensions||[],e.filename,t,n)}static matchFilename(e,t){for(let n of e)if(n.filename&&n.filename.test(t))return n;let n=/\.([^.]+)$/.exec(t);if(n){for(let t of e)if(t.extensions.indexOf(n[1])>-1)return t}return null}static matchLanguageName(e,t,n=!0){for(let n of(t=t.toLowerCase(),e))if(n.alias.some(e=>e==t))return n;if(n)for(let n of e)for(let e of n.alias){let r=t.indexOf(e);if(r>-1&&(e.length>2||!/\w/.test(t[r-1])&&!/\w/.test(t[r+e.length])))return n}return null}};let p=o.r$.define(),g=o.r$.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function getIndentUnit(e){let t=e.facet(g);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function indentString(e,t){let n="",r=e.tabSize,i=e.facet(g)[0];if(" "==i){for(;t>=r;)n+=" ",t-=r;i=" "}for(let e=0;e=t?syntaxIndentation(e,n,t):null}let IndentContext=class IndentContext{constructor(e,t={}){this.state=e,this.options=t,this.unit=getIndentUnit(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return null!=r&&r>=n.from&&r<=n.to?i&&r==e?{text:"",from:e}:(t<0?r-1&&(i+=o-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return(0,o.IS)(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}};let m=new i.md;function syntaxIndentation(e,t,n){let r=t.resolveStack(n),i=r.node.enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t!=r.node;t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return indentFor(r,e,n)}function indentFor(e,t,n){for(let r=e;r;r=r.next){let e=indentStrategy(r.node);if(e)return e(TreeIndentContext.create(t,n,r))}return 0}function ignoreClosed(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function indentStrategy(e){let t=e.type.prop(m);if(t)return t;let n=e.firstChild,r;if(n&&(r=n.type.prop(i.md.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>delimitedStrategy(e,!0,1,void 0,n&&!ignoreClosed(e)?t.from:void 0)}return null==e.parent?topIndent:null}function topIndent(){return 0}let TreeIndentContext=class TreeIndentContext extends IndentContext{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new TreeIndentContext(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(isParent(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return indentFor(this.context.next,this.base,this.pos)}};function isParent(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function bracketedAligned(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,o=e.state.doc.lineAt(n.from),s=null==i||i<=o.from?o.to:Math.min(o.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped)return i.fromdelimitedStrategy(r,t,n,e)}function delimitedStrategy(e,t,n,r,i){let o=e.textAfter,s=o.match(/^\s*/)[0].length,a=r&&o.slice(s,s+r.length)==r||i==e.pos+s,l=t?bracketedAligned(e):null;return l?a?e.column(l.from):e.column(l.to):e.baseIndent+(a?0:e.unit*n)}let flatIndent=e=>e.baseIndent;function continuedIndent({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}function indentOnInput(){return o.yy.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:r}=e.newSelection.main,i=n.lineAt(r);if(r>i.from+200)return e;let o=n.sliceString(i.from,r);if(!t.some(e=>e.test(o)))return e;let{state:s}=e,a=-1,l=[];for(let{head:e}of s.selection.ranges){let t=s.doc.lineAt(e);if(t.from==a)continue;a=t.from;let n=getIndentation(s,t.from);if(null==n)continue;let r=/^\s*/.exec(t.text)[0],i=indentString(s,n);r!=i&&l.push({from:t.from,to:t.from+r.length,insert:i})}return l.length?[e,{changes:l,sequential:!0}]:e})}let S=o.r$.define(),Q=new i.md;function foldInside(e){let t=e.firstChild,n=e.lastChild;return t&&t.ton)continue;if(o&&i.from=t&&r.to>n&&(o=r)}}return o}function isUnfinished(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function foldable(e,t,n){for(let r of e.facet(S)){let i=r(e,t,n);if(i)return i}return syntaxFolding(e,t,n)}function mapRange(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}let $=o.Py.define({map:mapRange}),y=o.Py.define({map:mapRange});function selectedLines(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(e=>e.from<=n&&e.to>=n)||t.push(e.lineBlockAt(n));return t}let b=o.QQ.define({create:()=>s.p.none,update(e,t){for(let n of(e=e.map(t.changes),t.effects))if(n.is($)&&!foldExists(e,n.value.from,n.value.to)){let{preparePlaceholder:r}=t.state.facet(k),i=r?s.p.replace({widget:new PreparedFoldWidget(r(t.state,n.value))}):P;e=e.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(y)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));if(t.selection){let n=!1,{head:r}=t.selection.main;e.between(r,r,(e,t)=>{er&&(n=!0)}),n&&(e=e.update({filterFrom:r,filterTo:r,filter:(e,t)=>t<=r||e>=r}))}return e},provide:e=>s.tk.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n{(!i||i.from>e)&&(i={from:e,to:t})}),i}function foldExists(e,t,n){let r=!1;return e.between(t,t,(e,i)=>{e==t&&i==n&&(r=!0)}),r}function maybeEnable(e,t){return e.field(b,!1)?t:t.concat(o.Py.appendConfig.of(codeFolding()))}function announceFold(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return s.tk.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${e.state.phrase("to")} ${i}.`)}let x=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of selectedLines(e)){let n=foldable(e.state,t.from,t.to);if(n)return e.dispatch({effects:maybeEnable(e.state,[$.of(n),announceFold(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(b,!1))return!1;let t=[];for(let n of selectedLines(e)){let r=findFold(e.state,n.from,n.to);r&&t.push(y.of(r),announceFold(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let r=0;r{let t=e.state.field(b,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(y.of({from:e,to:t}))}),e.dispatch({effects:n}),!0}}],v={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},k=o.r$.define({combine:e=>(0,o.BO)(e,v)});function codeFolding(e){let t=[b,Z];return e&&t.push(k.of(e)),t}function widgetToDOM(e,t){let{state:n}=e,r=n.facet(k),onclick=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=findFold(e.state,n.from,n.to);r&&e.dispatch({effects:y.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,onclick,t);let i=document.createElement("span");return i.textContent=r.placeholderText,i.setAttribute("aria-label",n.phrase("folded code")),i.title=n.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=onclick,i}let P=s.p.replace({widget:new class extends s.l9{toDOM(e){return widgetToDOM(e,null)}}});let PreparedFoldWidget=class PreparedFoldWidget extends s.l9{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return widgetToDOM(e,this.value)}};let w={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};let FoldMarker=class FoldMarker extends s.SJ{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}};function foldGutter(e={}){let t=Object.assign(Object.assign({},w),e),n=new FoldMarker(t,!0),r=new FoldMarker(t,!1),i=s.lg.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(d)!=e.state.facet(d)||e.startState.field(b,!1)!=e.state.field(b,!1)||syntaxTree(e.startState)!=syntaxTree(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new o.f_;for(let i of e.viewportLineBlocks){let o=findFold(e.state,i.from,i.to)?r:foldable(e.state,i.from,i.to)?n:null;o&&t.add(i.from,i.from,o)}return t.finish()}}),{domEventHandlers:a}=t;return[i,(0,s.v5)({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(i))||void 0===t?void 0:t.markers)||o.Xs.empty},initialSpacer:()=>new FoldMarker(t,!1),domEventHandlers:Object.assign(Object.assign({},a),{click:(e,t,n)=>{if(a.click&&a.click(e,t,n))return!0;let r=findFold(e.state,t.from,t.to);if(r)return e.dispatch({effects:y.of(r)}),!0;let i=foldable(e.state,t.from,t.to);return!!i&&(e.dispatch({effects:$.of(i)}),!0)}})}),codeFolding()]}let Z=s.tk.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});let HighlightStyle=class HighlightStyle{constructor(e,t){let n;function def(e){let t=l.V.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;let r="string"==typeof t.all?t.all:t.all?def(t.all):void 0,i=t.scope;this.scope=i instanceof Language?e=>e.prop(c)==i.data:i?e=>e==i:void 0,this.style=(0,a.QR)(e.map(e=>({tag:e.tag,class:e.class||def(Object.assign({},e,{tag:null}))})),{all:r}).style,this.module=n?new l.V(n):null,this.themeType=t.themeType}static define(e,t){return new HighlightStyle(e,t||{})}};let T=o.r$.define(),C=o.r$.define({combine:e=>e.length?[e[0]]:null});function getHighlighters(e){let t=e.facet(T);return t.length?t:e.facet(C)}function syntaxHighlighting(e,t){let n=[X],r;return e instanceof HighlightStyle&&(e.module&&n.push(s.tk.styleModule.of(e.module)),r=e.themeType),(null==t?void 0:t.fallback)?n.push(C.of(e)):r?n.push(T.computeN([s.tk.darkTheme],t=>t.facet(s.tk.darkTheme)==("dark"==r)?[e]:[])):n.push(T.of(e)),n}let TreeHighlighter=class TreeHighlighter{constructor(e){this.markCache=Object.create(null),this.tree=syntaxTree(e.state),this.decorations=this.buildDeco(e,getHighlighters(e.state))}update(e){let t=syntaxTree(e.state),n=getHighlighters(e.state),r=n!=getHighlighters(e.startState);t.length{n.add(e,t,this.markCache[r]||(this.markCache[r]=s.p.mark({class:r})))},r,i);return n.finish()}};let X=o.Wl.high(s.lg.fromClass(TreeHighlighter,{decorations:e=>e.decorations})),Y=HighlightStyle.define([{tag:a.pJ.meta,color:"#404740"},{tag:a.pJ.link,textDecoration:"underline"},{tag:a.pJ.heading,textDecoration:"underline",fontWeight:"bold"},{tag:a.pJ.emphasis,fontStyle:"italic"},{tag:a.pJ.strong,fontWeight:"bold"},{tag:a.pJ.strikethrough,textDecoration:"line-through"},{tag:a.pJ.keyword,color:"#708"},{tag:[a.pJ.atom,a.pJ.bool,a.pJ.url,a.pJ.contentSeparator,a.pJ.labelName],color:"#219"},{tag:[a.pJ.literal,a.pJ.inserted],color:"#164"},{tag:[a.pJ.string,a.pJ.deleted],color:"#a11"},{tag:[a.pJ.regexp,a.pJ.escape,a.pJ.special(a.pJ.string)],color:"#e40"},{tag:a.pJ.definition(a.pJ.variableName),color:"#00f"},{tag:a.pJ.local(a.pJ.variableName),color:"#30a"},{tag:[a.pJ.typeName,a.pJ.namespace],color:"#085"},{tag:a.pJ.className,color:"#167"},{tag:[a.pJ.special(a.pJ.variableName),a.pJ.macroName],color:"#256"},{tag:a.pJ.definition(a.pJ.propertyName),color:"#00c"},{tag:a.pJ.comment,color:"#940"},{tag:a.pJ.invalid,color:"#f00"}]),R=s.tk.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),A="()[]{}",_=o.r$.define({combine:e=>(0,o.BO)(e,{afterCursor:!0,brackets:A,maxScanDistance:1e4,renderMatch:defaultRenderMatch})}),W=s.p.mark({class:"cm-matchingBracket"}),U=s.p.mark({class:"cm-nonmatchingBracket"});function defaultRenderMatch(e){let t=[],n=e.matched?W:U;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}let q=o.QQ.define({create:()=>s.p.none,update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],r=t.state.facet(_);for(let e of t.state.selection.ranges){if(!e.empty)continue;let i=matchBrackets(t.state,e.head,-1,r)||e.head>0&&matchBrackets(t.state,e.head-1,1,r)||r.afterCursor&&(matchBrackets(t.state,e.head,1,r)||e.heads.tk.decorations.from(e)}),j=[q,R];function bracketMatching(e={}){return[_.of(e),j]}let I=new i.md;function matchingNodes(e,t,n){let r=e.prop(t<0?i.md.openedBy:i.md.closedBy);if(r)return r;if(1==e.name.length){let r=n.indexOf(e.name);if(r>-1&&r%2==(t<0?1:0))return[n[r+t]]}return null}function findHandle(e){let t=e.type.prop(I);return t?t(e.node):e}function matchBrackets(e,t,n,r={}){let i=r.maxScanDistance||1e4,o=r.brackets||A,s=syntaxTree(e),a=s.resolveInner(t,n);for(let r=a;r;r=r.parent){let i=matchingNodes(r.type,n,o);if(i&&r.from0?t>=s.from&&ts.from&&t<=s.to))return matchMarkedBrackets(e,t,n,r,s,i,o)}}return matchPlainBrackets(e,t,n,s,a.type,i,o)}function matchMarkedBrackets(e,t,n,r,i,o,s){let a=r.parent,l={from:i.from,to:i.to},c=0,O=null==a?void 0:a.cursor();if(O&&(n<0?O.childBefore(r.from):O.childAfter(r.to)))do if(n<0?O.to<=r.from:O.from>=r.to){if(0==c&&o.indexOf(O.type.name)>-1&&O.from0)return null;let c={from:n<0?t-1:t,to:n>0?t+1:t},O=e.doc.iterRange(t,n>0?e.doc.length:0),h=0;for(let e=0;!O.next().done&&e<=o;){let o=O.value;n<0&&(e+=o.length);let a=t+e*n;for(let e=n>0?0:o.length-1,t=n>0?o.length:-1;e!=t;e+=n){let t=s.indexOf(o[e]);if(!(t<0)&&r.resolveInner(a+e,1).type==i){if(t%2==0==n>0)h++;else{if(1==h)return{start:c,end:{from:a+e,to:a+e+1},matched:t>>1==l>>1};h--}}}n>0&&(e+=o.length)}return O.done?{start:c,matched:!1}:null}function countCol(e,t,n,r=0,i=0){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);let o=i;for(let i=r;i=this.string.length}sol(){return 0==this.pos}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.post}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPosn?e.toLowerCase():e;return cased(this.string.substr(this.pos,e.length))==cased(e)?(!1!==t&&(this.pos+=e.length),!0):null}{let n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}}current(){return this.string.slice(this.start,this.pos)}};function fullParser(e){return{name:e.name||"",token:e.token,blankLine:e.blankLine||(()=>{}),startState:e.startState||(()=>!0),copyState:e.copyState||defaultCopyState,indent:e.indent||(()=>null),languageData:e.languageData||{},tokenTable:e.tokenTable||E}}function defaultCopyState(e){if("object"!=typeof e)return e;let t={};for(let n in e){let r=e[n];t[n]=r instanceof Array?r.slice():r}return t}let z=new WeakMap;let StreamLanguage=class StreamLanguage extends Language{constructor(e){let t=defineLanguageFacet(e.languageData),n=fullParser(e),r;super(t,new class extends i._b{createParse(e,t,n){return new Parse(r,e,t,n)}},[p.of((e,t)=>this.getIndent(e,t))],e.name),this.topNode=docID(t),r=this,this.streamParser=n,this.stateAfter=new i.md({perNode:!0}),this.tokenTable=e.tokenTable?new TokenTable(n.tokenTable):M}static define(e){return new StreamLanguage(e)}getIndent(e,t){let n,r=syntaxTree(e.state),i=r.resolve(t);for(;i&&i.type!=this.topNode;)i=i.parent;if(!i)return null;let{overrideIndentation:o}=e.options;o&&null!=(n=z.get(e.state))&&n1e4)return null;for(;a=r&&n+t.length<=o&&t.prop(e.stateAfter);if(s)return{state:e.streamParser.copyState(s),pos:n+t.length};for(let s=t.children.length-1;s>=0;s--){let a=t.children[s],l=n+t.positions[s],c=a instanceof i.mp&&l=t.length)return t;o||t.type!=e.topNode||(o=!0);for(let s=t.children.length-1;s>=0;s--){let a=t.positions[s],l=t.children[s],c;if(an&&findState(e,r.tree,0-r.offset,n,i),s;if(o&&(s=cutTree(e,r.tree,n+r.offset,o.pos+r.offset,!1)))return{state:o.state,tree:s}}return{state:e.streamParser.startState(r?getIndentUnit(r):4),tree:i.mp.empty}}let Parse=class Parse{constructor(e,t,n,r){this.lang=e,this.input=t,this.fragments=n,this.ranges=r,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=r[r.length-1].to;let i=ParseContext.get(),o=r[0].from,{state:s,tree:a}=findStartInFragments(e,n,o,null==i?void 0:i.state);this.state=s,this.parsedPos=this.chunkStart=o+a.length;for(let e=0;e=t)?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,t),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let t=this.input.chunk(e);if(this.input.lineChunks)"\n"==t&&(t="");else{let e=t.indexOf("\n");e>-1&&(t=t.slice(0,e))}return e+t.length<=this.to?t:t.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,t=this.lineAfter(e),n=e+t.length;for(let e=this.rangeIndex;;){let r=this.ranges[e].to;if(r>=n||(t=t.slice(0,r-(n-t.length)),++e==this.ranges.length))break;let i=this.ranges[e].from,o=this.lineAfter(i);t+=o,n=i+o.length}return{line:t,end:n}}skipGapsTo(e,t,n){for(;;){let r=this.ranges[this.rangeIndex].to,i=e+t;if(n>0?r>i:r>=i)break;let o=this.ranges[++this.rangeIndex].from;t+=o-r}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){i=this.skipGapsTo(t,i,1),t+=i;let e=this.chunk.length;i=this.skipGapsTo(n,i,-1),n+=i,r+=this.chunk.length-e}return this.chunk.push(e,t,n,r),i}parseLine(e){let{line:t,end:n}=this.nextLine(),r=0,{streamParser:i}=this.lang,o=new StringStream(t,e?e.state.tabSize:4,e?getIndentUnit(e.state):2);if(o.eol())i.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let e=readToken(i.token,o,this.state);if(e&&(r=this.emitToken(this.lang.tokenTable.resolve(e),this.parsedPos+o.start,this.parsedPos+o.pos,4,r)),o.start>1e4)break}this.parsedPos=n,this.moveRangeIndex(),this.parsedPost.start)return r}throw Error("Stream parser failed to advance stream.")}let E=Object.create(null),V=[i.Jq.none],G=new i.Lj(V),B=[],N=Object.create(null),D=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])D[e]=createTokenType(E,t);let TokenTable=class TokenTable{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),D)}resolve(e){return e?this.table[e]||(this.table[e]=createTokenType(this.extra,e)):0}};let M=new TokenTable(E);function warnForPart(e,t){B.indexOf(e)>-1||(B.push(e),console.warn(t))}function createTokenType(e,t){let n=[];for(let r of t.split(" ")){let t=[];for(let n of r.split(".")){let r=e[n]||a.pJ[n];r?"function"==typeof r?t.length?t=t.map(r):warnForPart(n,`Modifier ${n} used at start of tag`):t.length?warnForPart(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:warnForPart(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,"_"),o=r+" "+n.map(e=>e.id),s=N[o];if(s)return s.id;let l=N[o]=i.Jq.define({id:V.length,name:r,props:[(0,a.Gv)({[r]:n})]});return V.push(l),l.id}function docID(e){let t=i.Jq.define({id:V.length,name:"Document",props:[c.add(()=>e)],top:!0});return V.push(t),t}},78120:function(e,t,n){let r;n.d(t,{BO:function(){return combineConfig},D0:function(){return y},Gz:function(){return findColumn},IS:function(){return countColumn},Py:function(){return StateEffect},QQ:function(){return StateField},Wl:function(){return u},Xs:function(){return RangeSet},YW:function(){return Transaction},as:function(){return ChangeSet},bg:function(){return fromCodePoint},cp:function(){return findClusterBreak},f_:function(){return RangeSetBuilder},gc:function(){return l},gm:function(){return codePointAt},jT:function(){return EditorSelection},n0:function(){return ChangeDesc},nZ:function(){return codePointSize},q6:function(){return Annotation},r$:function(){return Facet},uU:function(){return RangeValue},xv:function(){return Text},yy:function(){return EditorState}});let Text=class Text{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),TextNode.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let n=[];return this.decompose(e,t,n,0),TextNode.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new RawTextCursor(this),i=new RawTextCursor(e);for(let e=t,o=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(o+=r.value.length,r.done||o>=n)return!0}}iter(e=1){return new RawTextCursor(this,e)}iterRange(e,t=this.length){return new PartialTextCursor(this,e,t)}iterLines(e,t){let n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new LineCursor(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(0==e.length)throw RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new TextLeaf(e):TextNode.from(TextLeaf.split(e,[])):Text.empty}};let TextLeaf=class TextLeaf extends Text{constructor(e,t=textLength(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let o=this.text[i],s=r+o.length;if((t?n:s)>=e)return new Line(r,s,n,o);r=s+1,n++}}decompose(e,t,n,r){let i=e<=0&&t>=this.length?this:new TextLeaf(appendText(this.text,[""],e,t),Math.min(t,this.length)-Math.max(0,e));if(1&r){let e=n.pop(),t=appendText(i.text,e.text.slice(),0,i.length);if(t.length<=32)n.push(new TextLeaf(t,e.length+i.length));else{let e=t.length>>1;n.push(new TextLeaf(t.slice(0,e)),new TextLeaf(t.slice(e)))}}else n.push(i)}replace(e,t,n){if(!(n instanceof TextLeaf))return super.replace(e,t,n);let r=appendText(this.text,appendText(n.text,appendText(this.text,[""],0,e)),t),i=this.length+n.length-(t-e);return r.length<=32?new TextLeaf(r,i):TextNode.from(TextLeaf.split(r,[]),i)}sliceString(e,t=this.length,n="\n"){let r="";for(let i=0,o=0;i<=t&&oe&&o&&(r+=n),ei&&(r+=s.slice(Math.max(0,e-i),t-i)),i=a+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],r=-1;for(let i of e)n.push(i),r+=i.length+1,32==n.length&&(t.push(new TextLeaf(n,r)),n=[],r=-1);return r>-1&&t.push(new TextLeaf(n,r)),t}};let TextNode=class TextNode extends Text{constructor(e,t){for(let n of(super(),this.children=e,this.length=t,this.lines=0,e))this.lines+=n.lines}lineInner(e,t,n,r){for(let i=0;;i++){let o=this.children[i],s=r+o.length,a=n+o.lines-1;if((t?a:s)>=e)return o.lineInner(e,t,n,r);r=s+1,n=a+1}}decompose(e,t,n,r){for(let i=0,o=0;o<=t&&i=o){let i=r&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!i?n.push(s):s.decompose(e-o,t-o,n,i)}o=a+1}}replace(e,t,n){if(n.lines=i&&t<=s){let a=o.replace(e-i,t-i,n),l=this.lines-o.lines+a.lines;if(a.lines>4&&a.lines>l>>6){let i=this.children.slice();return i[r]=a,new TextNode(i,this.length-(t-e)+n.length)}return super.replace(i,s,a)}i=s+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){let r="";for(let i=0,o=0;ie&&i&&(r+=n),eo&&(r+=s.sliceString(e-o,t-o,n)),o=a+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof TextNode))return 0;let n=0,[r,i,o,s]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,i+=t){if(r==o||i==s)return n;let a=this.children[r],l=e.children[i];if(a!=l)return n+a.scanIdentical(l,t);n+=a.length+1}}static from(e,t=e.reduce((e,t)=>e+t.length+1,-1)){let n=0;for(let t of e)n+=t.lines;if(n<32){let n=[];for(let t of e)t.flatten(n);return new TextLeaf(n,t)}let r=Math.max(32,n>>5),i=r<<1,o=r>>1,s=[],a=0,l=-1,c=[];function add(e){let t;if(e.lines>i&&e instanceof TextNode)for(let t of e.children)add(t);else e.lines>o&&(a>o||!a)?(flush(),s.push(e)):e instanceof TextLeaf&&a&&(t=c[c.length-1])instanceof TextLeaf&&e.lines+t.lines<=32?(a+=e.lines,l+=e.length+1,c[c.length-1]=new TextLeaf(t.text.concat(e.text),t.length+1+e.length)):(a+e.lines>r&&flush(),a+=e.lines,l+=e.length+1,c.push(e))}function flush(){0!=a&&(s.push(1==c.length?c[0]:TextNode.from(c,l)),l=-1,a=c.length=0)}for(let t of e)add(t);return flush(),1==s.length?s[0]:new TextNode(s,t)}};function textLength(e){let t=-1;for(let n of e)t+=n.length+1;return t}function appendText(e,t,n=0,r=1e9){for(let i=0,o=0,s=!0;o=n&&(l>r&&(a=a.slice(0,r-i)),i0?1:(e instanceof TextLeaf?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],o=i>>1,s=r instanceof TextLeaf?r.text.length:r.children.length;if(o==(t>0?s:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof TextLeaf){let i=r.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=0==e?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[o+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof TextLeaf?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}};let PartialTextCursor=class PartialTextCursor{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new RawTextCursor(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}};let LineCursor=class LineCursor{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};"undefined"!=typeof Symbol&&(Text.prototype[Symbol.iterator]=function(){return this.iter()},RawTextCursor.prototype[Symbol.iterator]=PartialTextCursor.prototype[Symbol.iterator]=LineCursor.prototype[Symbol.iterator]=function(){return this});let Line=class Line{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};let i="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20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ator(e){return e>=127462&&e<=127487}function findClusterBreak(e,t,n=!0,r=!0){return(n?nextClusterBreak:prevClusterBreak)(e,t,r)}function nextClusterBreak(e,t,n){if(t==e.length)return t;t&&surrogateLow(e.charCodeAt(t))&&surrogateHigh(e.charCodeAt(t-1))&&t--;let r=codePointAt(e,t);for(t+=codePointSize(r);t=0&&isRegionalIndicator(codePointAt(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function prevClusterBreak(e,t,n){for(;t>0;){let r=nextClusterBreak(e,t-2,n);if(r=56320&&e<57344}function surrogateHigh(e){return e>=55296&&e<56320}function codePointAt(e,t){let n=e.charCodeAt(t);if(!surrogateHigh(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return surrogateLow(r)?(n-55296<<10)+(r-56320)+65536:n}function fromCodePoint(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10)+55296,(1023&e)+56320)}function codePointSize(e){return e<65536?1:2}let o=/\r\n?|\n/;var s,a,l=((s=l||(l={}))[s.Simple=0]="Simple",s[s.TrackDel=1]="TrackDel",s[s.TrackBefore=2]="TrackBefore",s[s.TrackAfter=3]="TrackAfter",s);let ChangeDesc=class ChangeDesc{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return i+(e-r);i+=s}else{if(n!=l.Simple&&c>=e&&(n==l.TrackDel&&re||n==l.TrackBefore&&re))return null;if(c>e||c==e&&t<0&&!s)return e==r||t<0?i:i+a;i+=a}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n=0&&r<=t&&s>=e)return!(rt)||"cover";r=s}return!1}toString(){let e="";for(let t=0;t=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(e=>"number"!=typeof e))throw RangeError("Invalid JSON representation of ChangeDesc");return new ChangeDesc(e)}static create(e){return new ChangeDesc(e)}};let ChangeSet=class ChangeSet extends ChangeDesc{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError("Applying change set to a document with the wrong length");return iterChanges(this,(t,n,r,i,o)=>e=e.replace(r,r+(n-t),o),!1),e}mapDesc(e,t=!1){return mapSet(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let r=0,i=0;r=0){t[r]=s,t[r+1]=o;let a=r>>1;for(;n.length0&&addInsert(n,t,i.text),i.forward(e),s+=e}let l=e[o++];for(;s>1].toJSON()))}return e}static of(e,t,n){let r=[],i=[],s=0,a=null;function flush(e=!1){if(!e&&!r.length)return;sl||a<0||l>t)throw RangeError(`Invalid change range ${a} to ${l} (in doc of length ${t})`);let O=c?"string"==typeof c?Text.of(c.split(n||o)):c:Text.empty,h=O.length;if(a==l&&0==h)return;as&&addSection(r,a-s,-1),addSection(r,l-a,h),addInsert(i,r,O),s=l}}return process(e),flush(!a),a}static empty(e){return new ChangeSet(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let r=0;rt&&"string"!=typeof e))throw RangeError("Invalid JSON representation of ChangeSet");else if(1==i.length)t.push(i[0],0);else{for(;n.length=0&&n<=0&&n==e[i+1]?e[i]+=t:0==t&&0==e[i]?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function addInsert(e,t,n){if(0==n.length)return;let r=t.length-2>>1;if(r>1])),!n&&s!=e.sections.length&&!(e.sections[s+1]<0);)a=e.sections[s++],l=e.sections[s++];t(i,c,o,O,h),i=c,o=O}}}function mapSet(e,t,n,r=!1){let i=[],o=r?[]:null,s=new SectionIter(e),a=new SectionIter(t);for(let e=-1;;)if(-1==s.ins&&-1==a.ins){let e=Math.min(s.len,a.len);addSection(i,e,-1),s.forward(e),a.forward(e)}else if(a.ins>=0&&(s.ins<0||e==s.i||0==s.off&&(a.len=0&&e=0){let t=0,n=s.len;for(;n;)if(-1==a.ins){let e=Math.min(n,a.len);t+=e,n-=e,a.forward(e)}else if(0==a.ins&&a.lent||s.ins>=0&&s.len>t)&&(e||r.length>n),o.forward2(t),s.forward(t)}}else addSection(r,0,s.ins,e),i&&addInsert(i,r,s.text),s.next()}}let SectionIter=class SectionIter{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?Text.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?Text.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}};let SelectionRange=class SelectionRange{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}get goalColumn(){let e=this.flags>>6;return 16777215==e?void 0:e}map(e,t=-1){let n,r;return this.empty?n=r=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new SelectionRange(n,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return EditorSelection.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return EditorSelection.range(this.anchor,n)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw RangeError("Invalid JSON representation for SelectionRange");return EditorSelection.range(e.anchor,e.head)}static create(e,t,n){return new SelectionRange(e,t,n)}};let EditorSelection=class EditorSelection{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:EditorSelection.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;te.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw RangeError("Invalid JSON representation for EditorSelection");return new EditorSelection(e.ranges.map(e=>SelectionRange.fromJSON(e)),e.main)}static single(e,t=e){return new EditorSelection([EditorSelection.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw RangeError("A selection needs at least one range");for(let n=0,r=0;re?8:0)|i)}static normalized(e,t=0){let n=e[t];e.sort((e,t)=>e.from-t.from),t=e.indexOf(n);for(let n=1;nr.head?EditorSelection.range(s,o):EditorSelection.range(o,s))}}return new EditorSelection(e,t)}};function checkSelection(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError("Selection points outside of document")}let c=0;let Facet=class Facet{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=c++,this.default=e([]),this.extensions="function"==typeof i?i(this):i}get reader(){return this}static define(e={}){return new Facet(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:sameArray),!!e.static,e.enables)}of(e){return new FacetProvider([],this,0,e)}compute(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new FacetProvider(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new FacetProvider(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],n=>t(n.field(e)))}};function sameArray(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}let FacetProvider=class FacetProvider{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=c++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,i=this.id,o=e[i]>>1,s=2==this.type,a=!1,l=!1,c=[];for(let n of this.dependencies)"doc"==n?a=!0:"selection"==n?l=!0:((null!==(t=e[n.id])&&void 0!==t?t:1)&1)==0&&c.push(e[n.id]);return{create:e=>(e.values[o]=n(e),1),update(e,t){if(a&&t.docChanged||l&&(t.docChanged||t.selection)||ensureAll(e,c)){let t=n(e);if(s?!compareArray(t,e.values[o],r):!r(t,e.values[o]))return e.values[o]=t,1}return 0},reconfigure:(e,t)=>{let a,l=t.config.address[i];if(null!=l){let i=getAddr(t,l);if(this.dependencies.every(n=>n instanceof Facet?t.facet(n)===e.facet(n):!(n instanceof StateField)||t.field(n,!1)==e.field(n,!1))||(s?compareArray(a=n(e),i,r):r(a=n(e),i)))return e.values[o]=i,0}else a=n(e);return e.values[o]=a,1}}}};function compareArray(e,t,n){if(e.length!=t.length)return!1;for(let r=0;re[t.id]),i=n.map(e=>e.type),o=r.filter(e=>!(1&e)),s=e[t.id]>>1;function get(e){let n=[];for(let t=0;te===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(O).find(e=>e.field==this);return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>null!=n.config.address[this.id]?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}init(e){return[this,O.of({field:this,create:e})]}get extension(){return this}};let h={lowest:4,low:3,default:2,high:1,highest:0};function prec(e){return t=>new PrecExtension(t,e)}let u={highest:prec(h.highest),high:prec(h.high),default:prec(h.default),low:prec(h.low),lowest:prec(h.lowest)};let PrecExtension=class PrecExtension{constructor(e,t){this.inner=e,this.prec=t}};let Compartment=class Compartment{of(e){return new CompartmentInstance(this,e)}reconfigure(e){return Compartment.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}};let CompartmentInstance=class CompartmentInstance{constructor(e,t){this.compartment=e,this.inner=t}};let Configuration=class Configuration{constructor(e,t,n,r,i,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,n){let r=[],i=Object.create(null),o=new Map;for(let n of flatten(e,t,o))n instanceof StateField?r.push(n):(i[n.facet.id]||(i[n.facet.id]=[])).push(n);let s=Object.create(null),a=[],l=[];for(let e of r)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let c=null==n?void 0:n.config.facets;for(let e in i){let t=i[e],r=t[0].facet,o=c&&c[e]||[];if(t.every(e=>0==e.type)){if(s[r.id]=a.length<<1|1,sameArray(o,t))a.push(n.facet(r));else{let e=r.combine(t.map(e=>e.value));a.push(n&&r.compare(e,n.facet(r))?n.facet(r):e)}}else{for(let e of t)0==e.type?(s[e.id]=a.length<<1|1,a.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[r.id]=l.length<<1,l.push(e=>dynamicFacetSlot(e,r,t))}}return new Configuration(e,o,l.map(e=>e(s)),s,a,i)}};function flatten(e,t,n){let r=[[],[],[],[],[]],i=new Map;function inner(e,o){let s=i.get(e);if(null!=s){if(s<=o)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof CompartmentInstance&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)inner(t,o);else if(e instanceof CompartmentInstance){if(n.has(e.compartment))throw RangeError("Duplicate use of compartment in extensions");let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),inner(r,o)}else if(e instanceof PrecExtension)inner(e.inner,e.prec);else if(e instanceof StateField)r[o].push(e),e.provides&&inner(e.provides,o);else if(e instanceof FacetProvider)r[o].push(e),e.facet.extensions&&inner(e.facet.extensions,h.default);else{let t=e.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);inner(t,o)}}return inner(e,h.default),r.reduce((e,t)=>e.concat(t))}function ensureAddr(e,t){if(1&t)return 2;let n=t>>1,r=e.status[n];if(4==r)throw Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function getAddr(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}let f=Facet.define(),d=Facet.define({combine:e=>e.some(e=>e),static:!0}),p=Facet.define({combine:e=>e.length?e[0]:void 0,static:!0}),g=Facet.define(),m=Facet.define(),S=Facet.define(),Q=Facet.define({combine:e=>!!e.length&&e[0]});let Annotation=class Annotation{constructor(e,t){this.type=e,this.value=t}static define(){return new AnnotationType}};let AnnotationType=class AnnotationType{of(e){return new Annotation(this,e)}};let StateEffectType=class StateEffectType{constructor(e){this.map=e}of(e){return new StateEffect(this,e)}};let StateEffect=class StateEffect{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new StateEffect(this.type,t)}is(e){return this.type==e}static define(e={}){return new StateEffectType(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}};StateEffect.reconfigure=StateEffect.define(),StateEffect.appendConfig=StateEffect.define();let Transaction=class Transaction{constructor(e,t,n,r,i,o){this.startState=e,this.changes=t,this.selection=n,this.effects=r,this.annotations=i,this.scrollIntoView=o,this._doc=null,this._state=null,n&&checkSelection(n,t.newLength),i.some(e=>e.type==Transaction.time)||(this.annotations=i.concat(Transaction.time.of(Date.now())))}static create(e,t,n,r,i,o){return new Transaction(e,t,n,r,i,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Transaction.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}};function joinRanges(e,t){let n=[];for(let r=0,i=0;;){let o,s;if(r=e[r]))o=e[r++],s=e[r++];else{if(!(i=0;n--){let i=r[n](e);e=i instanceof Transaction?i:Array.isArray(i)&&1==i.length&&i[0]instanceof Transaction?i[0]:resolveTransaction(t,asArray(i),!1)}return e}function extendTransaction(e){let t=e.startState,n=t.facet(S),r=e;for(let i=n.length-1;i>=0;i--){let o=n[i](e);o&&Object.keys(o).length&&(r=mergeTransaction(r,resolveTransactionInner(t,o,e.changes.newLength),!0))}return r==e?e:Transaction.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}Transaction.time=Annotation.define(),Transaction.userEvent=Annotation.define(),Transaction.addToHistory=Annotation.define(),Transaction.remote=Annotation.define();let $=[];function asArray(e){return null==e?$:Array.isArray(e)?e:[e]}var y=((a=y||(y={}))[a.Word=0]="Word",a[a.Space=1]="Space",a[a.Other=2]="Other",a);let b=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{r=RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}function hasWordChar(e){if(r)return r.test(e);for(let t=0;t"\x80"&&(n.toUpperCase()!=n.toLowerCase()||b.test(n)))return!0}return!1}function makeCategorizer(e){return t=>{if(!/\S/.test(t))return y.Space;if(hasWordChar(t))return y.Word;for(let n=0;n-1)return y.Word;return y.Other}}let EditorState=class EditorState{constructor(e,t,n,r,i,o){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,o&&(o._state=this);for(let e=0;ei.set(t,e)),n=null),i.set(t.value.compartment,t.value.extension)):t.is(StateEffect.reconfigure)?(n=null,r=t.value):t.is(StateEffect.appendConfig)&&(n=null,r=asArray(r).concat(t.value));t=n?e.startState.values.slice():new EditorState(n=Configuration.resolve(r,i,this),this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values;let o=e.startState.facet(d)?e.newSelection:e.newSelection.asSingle();new EditorState(n,e.newDoc,o,t,(t,n)=>n.update(t,e),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:EditorSelection.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],o=asArray(n.effects);for(let n=1;ni.spec.fromJSON(o,e)))}}return EditorState.create({doc:e.doc,selection:EditorSelection.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=Configuration.resolve(e.extensions||[],new Map),n=e.doc instanceof Text?e.doc:Text.of((e.doc||"").split(t.staticFacet(EditorState.lineSeparator)||o)),r=e.selection?e.selection instanceof EditorSelection?e.selection:EditorSelection.single(e.selection.anchor,e.selection.head):EditorSelection.single(0);return checkSelection(r,n.length),t.staticFacet(d)||(r=r.asSingle()),new EditorState(t,n,r,t.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(EditorState.tabSize)}get lineBreak(){return this.facet(EditorState.lineSeparator)||"\n"}get readOnly(){return this.facet(Q)}phrase(e,...t){for(let t of this.facet(EditorState.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(e,n)=>{if("$"==n)return"$";let r=+(n||1);return!r||r>t.length?e:t[r-1]})),e}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(f))for(let o of i(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&r.push(o[e]);return r}charCategorizer(e){return makeCategorizer(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),o=e-n,s=e-n;for(;o>0;){let e=findClusterBreak(t,o,!1);if(i(t.slice(e,o))!=y.Word)break;o=e}for(;se.length?e[0]:4}),EditorState.lineSeparator=p,EditorState.readOnly=Q,EditorState.phrases=Facet.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),EditorState.languageData=f,EditorState.changeFilter=g,EditorState.transactionFilter=m,EditorState.transactionExtender=S,Compartment.reconfigure=StateEffect.define();let RangeValue=class RangeValue{eq(e){return this==e}range(e,t=e){return Range.create(e,t,this)}};RangeValue.prototype.startSide=RangeValue.prototype.endSide=0,RangeValue.prototype.point=!1,RangeValue.prototype.mapMode=l.TrackDel;let Range=class Range{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new Range(e,t,n)}};function cmpRange(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}let Chunk=class Chunk{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let o=r,s=i.length;;){if(o==s)return o;let r=o+s>>1,a=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==o)return a>=0?o:s;a>=0?s=r:o=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,i);i(u=t.mapPos(O,l.endSide))||h==u&&l.startSide>0&&l.endSide<=0)continue;0>(u-h||l.endSide-l.startSide)||(o<0&&(o=h),l.point&&(s=Math.max(s,u-h)),n.push(l),r.push(h-o),i.push(u-o))}return{mapped:n.length?new Chunk(r,i,n,s):null,pos:o}}};let RangeSet=class RangeSet{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(e,t,n,r){return new RangeSet(e,t,n,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:r=0,filterTo:i=this.length}=e,o=e.filter;if(0==t.length&&!o)return this;if(n&&(t=t.slice().sort(cmpRange)),this.isEmpty)return t.length?RangeSet.of(t):this;let s=new LayerCursor(this,null,-1).goto(0),a=0,l=[],c=new RangeSetBuilder;for(;s.value||a=0){let e=t[a++];c.addInner(e.from,e.to,e.value)||l.push(e)}else 1==s.rangeIndex&&s.chunkIndexthis.chunkEnd(s.chunkIndex)||is.to||i=i&&e<=i+o.length&&!1===o.between(i,e-i,t-i,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return HeapCursor.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return HeapCursor.from(e).goto(t)}static compare(e,t,n,r,i=-1){let o=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),a=findSharedChunks(o,s,n),l=new SpanCursor(o,a,i),c=new SpanCursor(s,a,i);n.iterGaps((e,t,n)=>compare(l,e,c,t,n,r)),n.empty&&0==n.length&&compare(l,0,c,0,0,r)}static eq(e,t,n=0,r){null==r&&(r=999999999);let i=e.filter(e=>!e.isEmpty&&0>t.indexOf(e)),o=t.filter(t=>!t.isEmpty&&0>e.indexOf(t));if(i.length!=o.length)return!1;if(!i.length)return!0;let s=findSharedChunks(i,o),a=new SpanCursor(i,s,0).goto(n),l=new SpanCursor(o,s,0).goto(n);for(;;){if(a.to!=l.to||!sameValues(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>r)return!0;a.next(),l.next()}}static spans(e,t,n,r,i=-1){let o=new SpanCursor(e,null,i).goto(t),s=t,a=o.openStart;for(;;){let e=Math.min(o.to,n);if(o.point){let n=o.activeForPoint(o.to),i=o.pointFroms&&(r.span(s,e,o.active,a),a=o.openEnd(e));if(o.to>n)return a+(o.point&&o.to>n?1:0);s=o.to,o.next()}}static of(e,t=!1){let n=new RangeSetBuilder;for(let r of e instanceof Range?[e]:t?lazySort(e):e)n.add(r.from,r.to,r.value);return n.finish()}};function lazySort(e){if(e.length>1)for(let t=e[0],n=1;n0)return e.slice().sort(cmpRange);t=r}return e}RangeSet.empty=new RangeSet([],[],null,-1),RangeSet.empty.nextLayer=RangeSet.empty;let RangeSetBuilder=class RangeSetBuilder{finishChunk(e){this.chunks.push(new Chunk(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new RangeSetBuilder)).add(e,t,n)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&0>(e-this.lastFrom||n.startSide-this.last.startSide))throw Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if(0>(e-this.lastTo||t.value[0].startSide-this.last.endSide))return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(RangeSet.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=RangeSet.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};function findSharedChunks(e,t,n){let r=new Map;for(let t of e)for(let e=0;e(this.to-e||this.endSide-t)&&this.gotoInner(e,t,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=n&&r.push(new LayerCursor(o,t,n,i));return 1==r.length?r[0]:new HeapCursor(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)heapBubble(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)heapBubble(this.heap,e);0>(this.to-e||this.value.endSide-t)&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),heapBubble(this.heap,0)}}};function heapBubble(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1=0&&(i=e[r+1],r++),0>n.compare(i))break;e[r]=n,e[t]=i,t=r}}let SpanCursor=class SpanCursor{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=HeapCursor.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&0>(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t);)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){remove(this.active,e),remove(this.activeTo,e),remove(this.activeRank,e),this.minActive=findMinIndex(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t-1&&0>(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&remove(n,r)}else if(this.cursor.value){if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(t&&this.cursor.to==this.to&&this.cursor.from=0&&n[t]=0&&!(this.activeRank[n]e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};function compare(e,t,n,r,i,o){e.goto(t),n.goto(r);let s=r+i,a=r,l=r-t;for(;;){let t=e.to+l-n.to||e.endSide-n.endSide,r=t<0?e.to+l:n.to,i=Math.min(r,s);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&sameValues(e.activeForPoint(e.to),n.activeForPoint(n.to))||o.comparePoint(a,i,e.point,n.point):i>a&&!sameValues(e.active,n.active)&&o.compareRange(a,i,e.active,n.active),r>s)break;a=r,t<=0&&e.next(),t>=0&&n.next()}}function sameValues(e,t){if(e.length!=t.length)return!1;for(let n=0;n=t;n--)e[n+1]=e[n];e[t]=n}function findMinIndex(e,t){let n=-1,r=1e9;for(let i=0;i(t[i]-r||e[i].endSide-e[n].endSide)&&(n=i,r=t[i]);return n}function countColumn(e,t,n=e.length){let r=0;for(let i=0;i=t)return r;if(r==e.length)break;i+=9==e.charCodeAt(r)?n-i%n:1,r=findClusterBreak(e,r)}return!0===r?-1:e.length}},41113:function(e,t,n){var r,i;n.d(t,{FE:function(){return parseMixed},Jq:function(){return NodeType},L3:function(){return o},Lj:function(){return NodeSet},_b:function(){return Parser},hr:function(){return NodeWeakMap},i9:function(){return TreeFragment},md:function(){return NodeProp},mp:function(){return Tree},vj:function(){return r}});let o=1024,s=0;let Range=class Range{constructor(e,t){this.from=e,this.to=t}};let NodeProp=class NodeProp{constructor(e={}){this.id=s++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=NodeType.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}};NodeProp.closedBy=new NodeProp({deserialize:e=>e.split(" ")}),NodeProp.openedBy=new NodeProp({deserialize:e=>e.split(" ")}),NodeProp.group=new NodeProp({deserialize:e=>e.split(" ")}),NodeProp.contextHash=new NodeProp({perNode:!0}),NodeProp.lookAhead=new NodeProp({perNode:!0}),NodeProp.mounted=new NodeProp({perNode:!0});let MountedTree=class MountedTree{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[NodeProp.mounted.id]}};let a=Object.create(null);let NodeType=class NodeType{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):a,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),r=new NodeType(e.name||"",t,e.id,n);if(e.props){for(let n of e.props)if(Array.isArray(n)||(n=n(r)),n){if(n[0].perNode)throw RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(NodeProp.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(" "))t[r]=e[n];return e=>{for(let n=e.prop(NodeProp.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}};NodeType.none=new NodeType("",Object.create(null),0,8);let NodeSet=class NodeSet{constructor(e){this.types=e;for(let t=0;t0;for(let e=this.cursor(s|r.IncludeAnonymous);;){let r=!1;if(e.from<=o&&e.to>=i&&(!a&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;r=!0}for(;r&&n&&(a||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;r=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:balanceRange(NodeType.none,this.children,this.positions,0,this.children.length,0,this.length,(e,t,n)=>new Tree(this.type,e,t,n,this.propValues),e.makeTree||((e,t,n)=>new Tree(NodeType.none,e,t,n)))}static build(e){return buildTree(e)}};Tree.empty=new Tree(NodeType.none,[],[],0);let FlatBufferCursor=class FlatBufferCursor{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new FlatBufferCursor(this.buffer,this.index)}};let TreeBuffer=class TreeBuffer{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return NodeType.none}toString(){let e=[];for(let t=0;t0)));a=o[a+3]);return s}slice(e,t,n){let r=this.buffer,i=new Uint16Array(t-e),o=0;for(let s=e,a=0;s=t&&nt;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function resolveNode(e,t,n,i){for(var o;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to0?a.length:-1;e!=c;e+=t){let c=a[e],O=l[e]+s.from;if(checkSide(i,n,O,O+c.length)){if(c instanceof TreeBuffer){if(o&r.ExcludeBuffers)continue;let a=c.findChild(0,c.buffer.length,t,n-O,i);if(a>-1)return new BufferNode(new BufferContext(s,c,e,O),null,a)}else if(o&r.IncludeAnonymous||!c.type.isAnonymous||hasChild(c)){let a;if(!(o&r.IgnoreMounts)&&(a=MountedTree.get(c))&&!a.overlay)return new TreeNode(a.tree,O,e,s);let l=new TreeNode(c,O,e,s);return o&r.IncludeAnonymous||!l.type.isAnonymous?l:l.nextChild(t<0?c.children.length-1:0,t,n,i)}}}if(o&r.IncludeAnonymous||!s.type.isAnonymous||(e=s.index>=0?s.index+t:t<0?-1:s._parent._tree.children.length,!(s=s._parent)))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let i;if(!(n&r.IgnoreOverlays)&&(i=MountedTree.get(this._tree))&&i.overlay){let n=e-this.from;for(let{from:e,to:r}of i.overlay)if((t>0?e<=n:e=n:r>n))return new TreeNode(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function getChildren(e,t,n,r){let i=e.cursor(),o=[];if(!i.firstChild())return o;if(null!=n){for(;!i.type.is(n);)if(!i.nextSibling())return o}for(;;){if(null!=r&&i.type.is(r))return o;if(i.type.is(t)&&o.push(i.node),!i.nextSibling())return null==r?o:[]}}function matchNodeContext(e,t,n=t.length-1){for(let r=e.parent;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}let BufferContext=class BufferContext{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}};let BufferNode=class BufferNode extends BaseNode{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return i<0?null:new BufferNode(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&r.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return o<0?null:new BufferNode(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new BufferNode(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new BufferNode(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let o=n.buffer[this.index+1];e.push(n.slice(r,i,o)),t.push(0)}return new Tree(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function iterStack(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;rn.from||i.to=t){let s=new TreeNode(o.tree,o.overlay[0].from+e.from,-1,e);(i||(i=[r])).push(resolveNode(s,t,n,!1))}}return i?iterStack(i):r}let TreeCursor=class TreeCursor{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof TreeNode)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return!!e&&(e instanceof TreeNode?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return!(i<0)&&(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?!(n&r.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&r.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&r.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:i}=this;if(i){if(e>0){if(this.index-1)for(let i=t+e,o=e<0?-1:n._tree.children.length;i!=o;i+=e){let e=n._tree.children[i];if(this.mode&r.IncludeAnonymous||e instanceof TreeBuffer||!e.type.isAnonymous||hasChild(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,n=i+1;break n}r=this.stack[--i]}for(let e=n;e=0;i--){if(i<0)return matchNodeContext(this.node,e,r);let o=n[t.buffer[this.stack[i]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}};function hasChild(e){return e.children.some(e=>e instanceof TreeBuffer||!e.type.isAnonymous||hasChild(e))}function buildTree(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:i=o,reused:s=[],minRepeatType:a=r.types.length}=e,l=Array.isArray(n)?new FlatBufferCursor(n,n.length):n,c=r.types,O=0,h=0;function takeNode(e,t,n,o,u,f){let{id:d,start:p,end:g,size:m}=l,S=h;for(;m<0;){if(l.next(),-1==m){let t=s[d];n.push(t),o.push(p-e);return}if(-3==m){O=d;return}if(-4==m){h=d;return}throw RangeError(`Unrecognized record size: ${m}`)}let Q=c[d],$,y,b=p-e;if(g-p<=i&&(y=findBufferSize(l.pos-t,u))){let t=new Uint16Array(y.size-y.skip),n=l.pos-y.size,i=t.length;for(;l.pos>n;)i=copyToBuffer(y.start,t,i);$=new TreeBuffer(t,g-y.start,r),b=y.start-e}else{let e=l.pos-m;l.next();let t=[],n=[],r=d>=a?d:-1,o=0,s=g;for(;l.pos>e;)r>=0&&l.id==r&&l.size>=0?(l.end<=s-i&&(makeRepeatLeaf(t,n,p,o,l.end,s,r,S),o=t.length,s=l.end),l.next()):f>2500?takeFlatNode(p,e,t,n):takeNode(p,e,t,n,r,f+1);if(r>=0&&o>0&&o-1&&o>0){let e=makeBalanced(Q);$=balanceRange(Q,t,n,0,t.length,0,g-p,e,e)}else $=makeTree(Q,t,n,g-p,S-g)}n.push($),o.push(b)}function takeFlatNode(e,t,n,o){let s=[],a=0,c=-1;for(;l.pos>t;){let{id:e,start:t,end:n,size:r}=l;if(r>4)l.next();else if(c>-1&&t=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-i,t[n++]=s[e+2]-i,t[n++]=n;n.push(new TreeBuffer(t,s[2]-i,r)),o.push(i-e)}}function makeBalanced(e){return(t,n,r)=>{let i=0,o=t.length-1,s,a;if(o>=0&&(s=t[o])instanceof Tree){if(!o&&s.type==e&&s.length==r)return s;(a=s.prop(NodeProp.lookAhead))&&(i=n[o]+s.length+a)}return makeTree(e,t,n,r,i)}}function makeRepeatLeaf(e,t,n,i,o,s,a,l){let c=[],O=[];for(;e.length>i;)c.push(e.pop()),O.push(t.pop()+n-o);e.push(makeTree(r.types[a],c,O,s-o,l-s)),t.push(o-n)}function makeTree(e,t,n,r,i=0,o){if(O){let e=[NodeProp.contextHash,O];o=o?[e].concat(o):[e]}if(i>25){let e=[NodeProp.lookAhead,i];o=o?[e].concat(o):[e]}return new Tree(e,t,n,r,o)}function findBufferSize(e,t){let n=l.fork(),r=0,o=0,s=0,c=n.end-i,O={size:0,start:0,skip:0};n:for(let i=n.pos-e;n.pos>i;){let e=n.size;if(n.id==t&&e>=0){O.size=r,O.start=o,O.skip=s,s+=4,r+=4,n.next();continue}let l=n.pos-e;if(e<0||l=a?4:0,u=n.start;for(n.next();n.pos>l;){if(n.size<0){if(-3==n.size)h+=4;else break n}else n.id>=a&&(h+=4);n.next()}o=u,r+=e,s+=h}return(t<0||r==e)&&(O.size=r,O.start=o,O.skip=s),O.size>4?O:void 0}function copyToBuffer(e,t,n){let{id:r,start:i,end:o,size:s}=l;if(l.next(),s>=0&&r4){let r=l.pos-(s-4);for(;l.pos>r;)n=copyToBuffer(e,t,n)}t[--n]=a,t[--n]=o-e,t[--n]=i-e,t[--n]=r}else -3==s?O=r:-4==s&&(h=r);return n}let u=[],f=[];for(;l.pos>0;)takeNode(e.start||0,e.bufferStart||0,u,f,-1,0);let d=null!==(t=e.length)&&void 0!==t?t:u.length?f[0]+u[0].length:0;return new Tree(c[e.topID],u.reverse(),f.reverse(),d)}let O=new WeakMap;function nodeSize(e,t){if(!e.isAnonymous||t instanceof TreeBuffer||t.type!=e)return 1;let n=O.get(t);if(null==n){for(let r of(n=1,t.children)){if(r.type!=e||!(r instanceof Tree)){n=1;break}n+=nodeSize(e,r)}O.set(t,n)}return n}function balanceRange(e,t,n,r,i,o,s,a,l){let c=0;for(let n=r;n=O)break;f+=n}if(a==r+1){if(f>O){let e=t[r];divide(e.children,e.positions,0,e.children.length,n[r]+s);continue}h.push(t[r])}else{let i=n[a-1]+t[a-1].length-c;h.push(balanceRange(e,t,n,r,a,c,i,null,l))}u.push(c+s-o)}}return divide(t,n,r,i,0),(a||l)(h,u,s)}let NodeWeakMap=class NodeWeakMap{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof BufferNode?this.setBuffer(e.context.buffer,e.index,t):e instanceof TreeNode&&this.map.set(e.tree,t)}get(e){return e instanceof BufferNode?this.getBuffer(e.context.buffer,e.index):e instanceof TreeNode?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}};let TreeFragment=class TreeFragment{constructor(e,t,n,r,i=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=(i?1:0)|(o?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let r=[new TreeFragment(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&r.push(n);return r}static applyChanges(e,t,n=128){if(!t.length)return e;let r=[],i=1,o=e.length?e[0]:null;for(let s=0,a=0,l=0;;s++){let c=s=n)for(;o&&o.from=t.from||O<=t.to||l){let e=Math.max(t.from,a)-l,n=Math.min(t.to,O)-l;t=e>=n?null:new TreeFragment(e,n,t.tree,t.offset+l,s>0,!!c)}if(t&&r.push(t),o.to>O)break;o=inew Range(e.from,e.to)):[new Range(0,0)]:[new Range(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}};let StringInput=class StringInput{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};function parseMixed(e){return(t,n,r,i)=>new MixedParse(t,e,n,r,i)}let InnerParse=class InnerParse{constructor(e,t,n,r,i){this.parser=e,this.parse=t,this.overlay=n,this.target=r,this.from=i}};function checkRanges(e){if(!e.length||e.some(e=>e.from>=e.to))throw RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}let ActiveOverlay=class ActiveOverlay{constructor(e,t,n,r,i,o,s){this.parser=e,this.predicate=t,this.mounts=n,this.index=r,this.start=i,this.target=o,this.prev=s,this.depth=0,this.ranges=[]}};let h=new NodeProp({perNode:!0});let MixedParse=class MixedParse{constructor(e,t,n,r,i){this.nest=t,this.input=n,this.fragments=r,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;if(this.baseParse=null,this.baseTree=e,this.startInner(),null!=this.stoppedAt)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return null!=this.stoppedAt&&(e=new Tree(e.type,e.children,e.positions,e.length,e.propValues.concat([[h,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[NodeProp.mounted.id]=new MountedTree(t,e.overlay,e.parser),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t=this.stoppedAt)s=!1;else if(e.hasNode(i)){if(t){let e=t.mounts.find(e=>e.frag.from<=i.from&&e.frag.to>=i.to&&e.mount.overlay);if(e)for(let n of e.mount.overlay){let r=n.from+e.pos,o=n.to+e.pos;r>=i.from&&o<=i.to&&!t.ranges.some(e=>e.fromr)&&t.ranges.push({from:r,to:o})}}s=!1}else if(n&&(o=checkCover(n.ranges,i.from,i.to)))s=2!=o;else if(!i.type.isAnonymous&&(r=this.nest(i,this.input))&&(i.fromnew Range(e.from-i.from,e.to-i.from)):null,i.tree,e.length?e[0].from:i.from)),r.overlay?e.length&&(n={ranges:e,depth:0,prev:n}):s=!1}}else t&&(a=t.predicate(i))&&(!0===a&&(a=new Range(i.from,i.to)),a.fromnew Range(e.from-t.start,e.to-t.start)),t.target,e[0].from))),t=t.prev}!n||--n.depth||(n=n.prev)}}}};function checkCover(e,t,n){for(let r of e){if(r.from>=n)break;if(r.to>t)return r.from<=t&&r.to>=n?2:1}return 0}function sliceBuf(e,t,n,r,i,o){if(t=t.to);r++);let s=i.children[r],a=s.buffer,l=[r];function split(e,r,i,o,c,O){let h=n[O],u=[],f=[];sliceBuf(s,e,h,u,f,o);let d=a[h+1],p=a[h+2];l.push(u.length);let g=O?split(h+4,a[h+3],s.set.types[a[h]],d,p-d,O-1):t.toTree();return u.push(g),f.push(d-o),sliceBuf(s,a[h+3],r,u,f,o),new Tree(i,u,f,c)}for(let t of(i.children[r]=split(0,a.length,NodeType.none,0,s.length,n.length-1),l)){let n=e.tree.children[t],r=e.tree.positions[t];e.yield(new TreeNode(n,r+e.from,t,e._tree))}}let StructureCursor=class StructureCursor{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(r.IncludeAnonymous|r.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from=e&&t.enter(n,1,r.IgnoreOverlays|r.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&0==t.positions[0]&&t.children[0]instanceof Tree)t=t.children[0];else break}return!1}};let FragmentCursor=class FragmentCursor{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=null!==(t=n.tree.prop(h))&&void 0!==t?t:n.to,this.inner=new StructureCursor(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(e=t.tree.prop(h))&&void 0!==e?e:t.to,this.inner=new StructureCursor(t.tree,-t.offset)}}findMounts(e,t){var n;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let i=null===(n=e.tree)||void 0===n?void 0:n.prop(NodeProp.mounted);if(i&&i.parser==t)for(let t=this.fragI;t=e.to)break;n.tree==this.curFrag.tree&&r.push({frag:n,pos:e.from-n.offset,mount:i})}}}return r}};function punchRanges(e,t){let n=null,r=t;for(let i=1,o=0;i=a)break;!(e.to<=s)&&(n||(r=n=t.slice()),e.froma&&n.splice(o+1,0,new Range(a,e.to))):e.to>a?n[o--]=new Range(a,e.to):n.splice(o--,1))}}return r}function findCoverChanges(e,t,n,r){let i=0,o=0,s=!1,a=!1,l=-1e9,c=[];for(;;){let O=i==e.length?1e9:s?e[i].to:e[i].from,h=o==t.length?1e9:a?t[o].to:t[o].from;if(s!=a){let e=Math.max(l,n),t=Math.min(O,h,r);enew Range(e.from+r,e.to+r)),a,l);for(let t=0,r=a;;t++){let a=t==s.length,c=a?l:s[t].from;if(c>r&&n.push(new TreeFragment(r,c,i.tree,-e,o.from>=r||o.openStart,o.to<=c||o.openEnd)),a)break;r=s[t].to}}else n.push(new TreeFragment(a,l,i.tree,-e,o.from>=e||o.openStart,o.to<=s||o.openEnd))}return n}},35524:function(e,t,n){n.d(t,{Gv:function(){return styleTags},QR:function(){return tagHighlighter},Vp:function(){return Tag},bW:function(){return highlightTree},pJ:function(){return b}});var r=n(41113);let i=0;let Tag=class Tag{constructor(e,t,n){this.set=e,this.base=t,this.modified=n,this.id=i++}static define(e){if(null==e?void 0:e.base)throw Error("Can not derive from a modified tag");let t=new Tag([],null,[]);if(t.set.push(t),e)for(let n of e.set)t.set.push(n);return t}static defineModifier(){let e=new Modifier;return t=>t.modified.indexOf(e)>-1?t:Modifier.get(t.base||t,t.modified.concat(e).sort((e,t)=>e.id-t.id))}};let o=0;let Modifier=class Modifier{constructor(){this.instances=[],this.id=o++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(n=>n.base==e&&sameArray(t,n.modified));if(n)return n;let r=[],i=new Tag(r,e,t);for(let e of t)e.instances.push(i);let o=powerSet(t);for(let t of e.set)if(!t.modified.length)for(let e of o)r.push(Modifier.get(t,e));return i}};function sameArray(e,t){return e.length==t.length&&e.every((e,n)=>e==t[n])}function powerSet(e){let t=[[]];for(let n=0;nt.length-e.length)}function styleTags(e){let t=Object.create(null);for(let n in e){let r=e[n];for(let e of(Array.isArray(r)||(r=[r]),n.split(" ")))if(e){let n=[],i=2,o=e;for(let t=0;;){if("..."==o&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!r)throw RangeError("Invalid path: "+e);if(n.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),(t+=r[0].length)==e.length)break;let s=e[t++];if(t==e.length&&"!"==s){i=0;break}if("/"!=s)throw RangeError("Invalid path: "+e);o=e.slice(t)}let s=n.length-1,a=n[s];if(!a)throw RangeError("Invalid path: "+e);let l=new Rule(r,i,s>0?n.slice(0,s):null);t[a]=l.sort(t[a])}}return s.add(t)}let s=new r.md;let Rule=class Rule{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+" "+r:r;break}}return t},scope:r}}function highlightTags(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+" "+e:e)}return n}function highlightTree(e,t,n,r=0,i=e.length){let o=new HighlightBuilder(r,Array.isArray(t)?t:[t],n);o.highlightRange(e.cursor(),r,i,"",o.highlighters),o.flush(i)}Rule.empty=new Rule([],2,null);let HighlightBuilder=class HighlightBuilder{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,i,o){let{type:s,from:a,to:l}=e;if(a>=n||l<=t)return;s.isTop&&(o=this.highlighters.filter(e=>!e.scope||e.scope(s)));let c=i,O=getStyleTags(e)||Rule.empty,h=highlightTags(o,O.tags);if(h&&(c&&(c+=" "),c+=h,1==O.mode&&(i+=(i?" ":"")+h)),this.startSpan(Math.max(t,a),c),O.opaque)return;let u=e.tree&&e.tree.prop(r.md.mounted);if(u&&u.overlay){let r=e.node.enter(u.overlay[0].from+a,1),s=this.highlighters.filter(e=>!e.scope||e.scope(u.tree.type)),O=e.firstChild();for(let h=0,f=a;;h++){let d=h=p)&&e.nextSibling()););if(!d||p>n)break;(f=d.to+a)>t&&(this.highlightRange(r.cursor(),Math.max(t,d.from+a),Math.min(n,f),"",s),this.startSpan(Math.min(n,f),c))}O&&e.parent()}else if(e.firstChild()){u&&(i="");do{if(e.to<=t)continue;if(e.from>=n)break;this.highlightRange(e,t,n,i,o),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}};function getStyleTags(e){let t=e.type.prop(s);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}let a=Tag.define,l=a(),c=a(),O=a(c),h=a(c),u=a(),f=a(u),d=a(u),p=a(),g=a(p),m=a(),S=a(),Q=a(),$=a(Q),y=a(),b={comment:l,lineComment:a(l),blockComment:a(l),docComment:a(l),name:c,variableName:a(c),typeName:O,tagName:a(O),propertyName:h,attributeName:a(h),className:a(c),labelName:a(c),namespace:a(c),macroName:a(c),literal:u,string:f,docString:a(f),character:a(f),attributeValue:a(f),number:d,integer:a(d),float:a(d),bool:a(u),regexp:a(u),escape:a(u),color:a(u),url:a(u),keyword:m,self:a(m),null:a(m),atom:a(m),unit:a(m),modifier:a(m),operatorKeyword:a(m),controlKeyword:a(m),definitionKeyword:a(m),moduleKeyword:a(m),operator:S,derefOperator:a(S),arithmeticOperator:a(S),logicOperator:a(S),bitwiseOperator:a(S),compareOperator:a(S),updateOperator:a(S),definitionOperator:a(S),typeOperator:a(S),controlOperator:a(S),punctuation:Q,separator:a(Q),bracket:$,angleBracket:a($),squareBracket:a($),paren:a($),brace:a($),content:p,heading:g,heading1:a(g),heading2:a(g),heading3:a(g),heading4:a(g),heading5:a(g),heading6:a(g),contentSeparator:a(p),list:a(p),quote:a(p),emphasis:a(p),strong:a(p),link:a(p),monospace:a(p),strikethrough:a(p),inserted:a(),deleted:a(),changed:a(),invalid:a(),meta:y,documentMeta:a(y),annotation:a(y),processingInstruction:a(y),definition:Tag.defineModifier(),constant:Tag.defineModifier(),function:Tag.defineModifier(),standard:Tag.defineModifier(),local:Tag.defineModifier(),special:Tag.defineModifier()};tagHighlighter([{tag:b.link,class:"tok-link"},{tag:b.heading,class:"tok-heading"},{tag:b.emphasis,class:"tok-emphasis"},{tag:b.strong,class:"tok-strong"},{tag:b.keyword,class:"tok-keyword"},{tag:b.atom,class:"tok-atom"},{tag:b.bool,class:"tok-bool"},{tag:b.url,class:"tok-url"},{tag:b.labelName,class:"tok-labelName"},{tag:b.inserted,class:"tok-inserted"},{tag:b.deleted,class:"tok-deleted"},{tag:b.literal,class:"tok-literal"},{tag:b.string,class:"tok-string"},{tag:b.number,class:"tok-number"},{tag:[b.regexp,b.escape,b.special(b.string)],class:"tok-string2"},{tag:b.variableName,class:"tok-variableName"},{tag:b.local(b.variableName),class:"tok-variableName tok-local"},{tag:b.definition(b.variableName),class:"tok-variableName tok-definition"},{tag:b.special(b.variableName),class:"tok-variableName2"},{tag:b.definition(b.propertyName),class:"tok-propertyName tok-definition"},{tag:b.typeName,class:"tok-typeName"},{tag:b.namespace,class:"tok-namespace"},{tag:b.className,class:"tok-className"},{tag:b.macroName,class:"tok-macroName"},{tag:b.propertyName,class:"tok-propertyName"},{tag:b.operator,class:"tok-operator"},{tag:b.comment,class:"tok-comment"},{tag:b.meta,class:"tok-meta"},{tag:b.invalid,class:"tok-invalid"},{tag:b.punctuation,class:"tok-punctuation"}])},53105:function(e,t,n){n.d(t,{IK:function(){return ContextTracker},Jq:function(){return ExternalTokenizer},RA:function(){return LocalTokenGroup},WQ:function(){return LRParser}});var r=n(41113),i=n(34155);let Stack=class Stack{constructor(e,t,n,r,i,o,s,a,l,c=0,O){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=o,this.buffer=s,this.bufferBase=a,this.curContext=l,this.lookAhead=c,this.parent=O}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let r=e.parser.context;return new Stack(e,[],t,n,n,0,[],0,r?new StackContext(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,r=65535&e,{parser:i}=this.p,o=i.dynamicPrecedence(r);if(o&&(this.score+=o),0==n){this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r=2e3&&!(null===(t=this.p.parser.nodeSet.types[r])||void 0===t?void 0:t.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=l):this.p.lastBigReductionSizes;)this.stack.pop();this.reduceContext(r,a)}storeNode(e,t,n,r=4,i=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==e.buffer[r-4]&&e.buffer[r-1]>-1){if(t==n)return;if(e.buffer[r-2]>=t){e.buffer[r-2]=n;return}}}if(i&&this.pos!=n){let i=this.buffer.length;if(i>0&&0!=this.buffer[i-4])for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4);this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}else this.buffer.push(e,t,n,r)}shift(e,t,n,r){if(131072&e)this.pushState(65535&e,this.pos);else if((262144&e)==0){let{parser:i}=this.p;(r>this.pos||t<=i.maxNode)&&(this.pos=r,i.stateFlag(e,1)||(this.reducePos=r)),this.pushState(e,n),this.shiftContext(t,n),t<=i.maxNode&&this.buffer.push(t,n,r,4)}else this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4)}apply(e,t,n,r){65536&e?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new Stack(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new SimulatedStack(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if((65536&n)==0)return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r1&t&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e>19,r=65535&t,i=this.stack.length-3*n;if(i<0||0>e.getGoto(this.stack[i],r,!1)){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],explore=(n,r)=>{if(!t.includes(n))return t.push(n),e.allActions(n,t=>{if(393216&t);else if(65536&t){let n=(t>>19)-r;if(n>1){let r=65535&t,i=this.stack.length-3*n;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=explore(t,r+1);if(null!=e)return e}})};return explore(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}};let StackContext=class StackContext{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}};let SimulatedStack=class SimulatedStack{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e>>19;0==t?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let n=this.start.p.parser.getGoto(this.stack[this.base-3],65535&e,!0);this.state=n}};let StackBufferCursor=class StackBufferCursor{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new StackBufferCursor(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new StackBufferCursor(this.stack,this.pos,this.index)}};function decodeArray(e,t=Uint16Array){if("string"!=typeof e)return e;let n=null;for(let r=0,i=0;r=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),o+=i,n)break;o*=46}n?n[i++]=o:n=new t(o)}return n}let CachedToken=class CachedToken{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}};let o=new CachedToken;let InputStream=class InputStream{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=o,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;in.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t=this.chunk2Pos&&nt.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=o,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}};let TokenGroup=class TokenGroup{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;readToken(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};TokenGroup.prototype.contextual=TokenGroup.prototype.fallback=TokenGroup.prototype.extend=!1;let LocalTokenGroup=class LocalTokenGroup{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data="string"==typeof e?decodeArray(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(readToken(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(null==this.elseToken)return;if(!n&&r++,null==i)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};LocalTokenGroup.prototype.contextual=TokenGroup.prototype.fallback=TokenGroup.prototype.extend=!1;let ExternalTokenizer=class ExternalTokenizer{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function readToken(e,t,n,r,i,o){let s=0,a=1<0){let n=e[r];if(l.allows(n)&&(-1==t.token.value||t.token.value==n||overrides(n,t.token.value,i,o))){t.acceptToken(n);break}}let r=t.next,c=0,O=e[s+2];if(t.next<0&&O>c&&65535==e[n+3*O-3]){s=e[n+3*O-1];continue}for(;c>1,o=n+i+(i<<1),a=e[o],l=e[o+1]||65536;if(r=l)c=i+1;else{s=e[o+2],t.advance();continue n}}break}}function findOffset(e,t,n){for(let r=t,i;65535!=(i=e[r]);r++)if(i==n)return r-t;return -1}function overrides(e,t,n,r){let i=findOffset(n,r,t);return i<0||findOffset(n,r,e)t)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,t-25)):Math.min(e.length,Math.max(i.from+1,t+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:e.length}}let FragmentCursor=class FragmentCursor{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?cutAt(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?cutAt(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=s,null;if(o instanceof r.mp){if(s==e){if(s=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[t]++,this.nextStart=s+o.length}}};let TokenCache=class TokenCache{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new CachedToken)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,o=r.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,a=0;for(let r=0;rc.end+25&&(a=Math.max(c.lookAhead,a)),0!=c.value)){let r=t;if(c.extended>-1&&(t=this.addActions(e,c.extended,c.end,t)),t=this.addActions(e,c.value,c.end,t),!l.extend&&(n=c,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),n||e.pos!=this.stream.end||((n=new CachedToken).value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new CachedToken,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r=0&&n.p.parser.dialect.allows(i>>1)){(1&i)==0?e.value=i>>1:e.extended=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t4*e.bufferLength?new FragmentCursor(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,r=this.minStackPos,i=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){let[e]=n;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;or)i.push(s);else{if(this.advanceStack(s,i,n))continue;e||(e=[],t=[]),e.push(s);let r=this.tokens.getMainToken(s);t.push(r.value,r.end)}break}}if(!i.length){let t=e&&findFinished(e);if(t)return s&&console.log("Finish with "+this.stackID(t)),this.stackToTree(t);if(this.parser.strict)throw s&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&e){let n=null!=this.stoppedAt&&e[0].pos>this.stoppedAt?e[0]:this.runRecovery(e,t,i);if(n)return s&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(i.length>e)for(i.sort((e,t)=>t.score-e.score);i.length>e;)i.pop();i.some(e=>e.reducePos>r)&&this.recovering--}else if(i.length>1){r:for(let e=0;e500&&r.buffer.length>500){if((t.score-r.score||t.buffer.length-r.buffer.length)>0)i.splice(n--,1);else{i.splice(e--,1);continue r}}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let e=1;e ":"";if(null!=this.stoppedAt&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let l=this.fragments.nodeAt(i);l;){let i=this.parser.nodeSet.types[l.type.id]==l.type?o.getGoto(e.state,l.type.id):-1;if(i>-1&&l.length&&(!t||(l.prop(r.md.contextHash)||0)==n))return e.useNode(l,i),s&&console.log(a+this.stackID(e)+` (via reuse of ${o.getName(l.type.id)})`),!0;if(!(l instanceof r.mp)||0==l.children.length||l.positions[0]>0)break;let c=l.children[0];if(c instanceof r.mp&&0==l.positions[0])l=c;else break}}let l=o.stateSlot(e.state,4);if(l>0)return e.reduce(l),s&&console.log(a+this.stackID(e)+` (via always-reduce ${o.getName(65535&l)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let c=this.tokens.getActions(e);for(let r=0;ri?t.push(f):n.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return pushStackDedup(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let o=0;o ":"";if(a.deadEnd&&(i||(i=!0,a.restart(),s&&console.log(O+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))))continue;let h=a.split(),u=O;for(let e=0;h.forceReduce()&&e<10&&(s&&console.log(u+this.stackID(h)+" (via force-reduce)"),!this.advanceFully(h,n));e++)s&&(u=this.stackID(h)+" -> ");for(let e of a.recoverByInsert(l))s&&console.log(O+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,n);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),s&&console.log(O+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),pushStackDedup(a,n)):(!r||r.scoree;let ContextTracker=class ContextTracker{constructor(e){this.start=e.start,this.shift=e.shift||id,this.reduce=e.reduce||id,this.reuse=e.reuse||id,this.hash=e.hash||(()=>0),this.strict=!1!==e.strict}};let LRParser=class LRParser extends r._b{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;ne.topRules[t][1]),i=[];for(let e=0;e=0)setProp(r,e,t[n++]);else{let i=t[n+-r];for(let o=-r;o>0;o--)setProp(t[n++],e,i);n++}}}this.nodeSet=new r.Lj(t.map((t,o)=>r.Jq.define({name:o>=this.minRepeatTerm?void 0:t,id:o,props:i[o],top:n.indexOf(o)>-1,error:0==o,skipped:e.skippedNodes&&e.skippedNodes.indexOf(o)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=r.L3;let o=decodeArray(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e"number"==typeof e?new TokenGroup(o,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new Parse(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return -1;for(let i=r[t+1];;){let t=r[i++],o=1&t,s=r[i++];if(o&&n)return s;for(let n=i+(t>>1);i0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);null==r;n+=3){if(65535==this.data[n]){if(1==this.data[n+1])n=pair(this.data,n+2);else break}r=t(pair(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n]){if(1==this.data[n+1])n=pair(this.data,n+2);else break}if((1&this.data[n+2])==0){let e=this.data[n+1];t.some((t,n)=>1&n&&t==e)||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create(LRParser.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(t=>{let n=e.tokenizers.find(e=>e.from==t);return n?n.to:t})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,r)=>{let i=e.specializers.find(e=>e.from==n.external);if(!i)return n;let o=Object.assign(Object.assign({},n),{external:i.to});return t.specializers[r]=getSpecializer(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(" ")){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;ee)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.scoree.external(n,r)<<1|t}return e.get}},28699:function(e,t,n){n.d(t,{V:function(){return StyleModule}});let r="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),i="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};let StyleModule=class StyleModule{constructor(e,t){this.rules=[];let{finish:n}=t||{};function splitSelector(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function render(e,t,r,i){let o=[],s=/^@(\w+)\b/.exec(e[0]),a=s&&"keyframes"==s[1];if(s&&null==t)return r.push(e[0]+";");for(let n in t){let i=t[n];if(/&/.test(n))render(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),i,r);else if(i&&"object"==typeof i){if(!s)throw RangeError("The value of a property ("+n+") should be a primitive value.");render(splitSelector(n),i,o,a)}else null!=i&&o.push(n.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())+": "+i+";")}(o.length||a)&&r.push((!n||s||i?e:e.map(n)).join(", ")+" {"+o.join(" ")+"}")}for(let t in e)render(splitSelector(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=o[r]||1;return o[r]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let r=e[i],o=n&&n.nonce;r?o&&r.setNonce(o):r=new StyleSet(e,o),r.mount(Array.isArray(t)?t:[t])}};let s=new Map;let StyleSet=class StyleSet{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=s.get(n);if(t)return e.adoptedStyleSheets=[t.sheet,...e.adoptedStyleSheets],e[i]=t;this.sheet=new r.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],s.set(n,this)}else{this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);let r=e.head||e;r.insertBefore(this.styleTag,r.firstChild)}this.modules=[],e[i]=this}mount(e){let t=this.sheet,n=0,r=0;for(let i=0;i-1&&(this.modules.splice(s,1),r--,s=-1),-1==s){if(this.modules.splice(r++,0,o),t)for(let e=0;e",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},o="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),s="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),a=0;a<10;a++)r[48+a]=r[96+a]=String(a);for(var a=1;a<=24;a++)r[a+111]="F"+a;for(var a=65;a<=90;a++)r[a]=String.fromCharCode(a+32),i[a]=String.fromCharCode(a);for(var l in r)i.hasOwnProperty(l)||(i[l]=r[l]);function keyName(e){var t=!(o&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||s&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?i:r)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}}}]);