From d1ce38c0696c35813a1c42df7f2f0d3c512de3c1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 2 Jan 2023 15:38:12 +0000 Subject: [PATCH] Bundle embedded web app --- static/web/404.html | 4 ++-- static/web/404/index.html | 4 ++-- static/web/_next/static/chunks/1943-701e08920ac663be.js | 1 - static/web/_next/static/chunks/1943-909ccbe5b3c551bb.js | 1 + .../_buildManifest.js | 2 +- .../_ssgManifest.js | 0 static/web/admin/access-tokens/index.html | 2 +- static/web/admin/actions/index.html | 2 +- static/web/admin/chat/emojis/index.html | 2 +- static/web/admin/chat/messages/index.html | 2 +- static/web/admin/chat/users/index.html | 2 +- static/web/admin/config-chat/index.html | 2 +- static/web/admin/config-federation/index.html | 2 +- static/web/admin/config-notify/index.html | 2 +- static/web/admin/config-social-items/index.html | 2 +- static/web/admin/config-video/index.html | 2 +- static/web/admin/config/general/AppearanceConfig/index.html | 2 +- .../web/admin/config/general/EditInstanceDetails/index.html | 2 +- static/web/admin/config/general/EditInstanceTags/index.html | 2 +- static/web/admin/config/general/EditPageContent/index.html | 2 +- static/web/admin/config/general/EditSocialLinks/index.html | 2 +- static/web/admin/config/general/GeneralConfig/index.html | 2 +- static/web/admin/config/general/index.html | 2 +- static/web/admin/config/server/EditStorage/index.html | 2 +- static/web/admin/config/server/ServerConfig/index.html | 2 +- static/web/admin/config/server/StorageConfig/index.html | 2 +- static/web/admin/config/server/StreamKeys/index.html | 2 +- static/web/admin/config/server/index.html | 2 +- static/web/admin/federation/actions/index.html | 2 +- static/web/admin/federation/followers/index.html | 2 +- static/web/admin/hardware-info/index.html | 2 +- static/web/admin/help/index.html | 2 +- static/web/admin/index.html | 2 +- static/web/admin/logs/index.html | 2 +- static/web/admin/stream-health/index.html | 2 +- static/web/admin/upgrade/index.html | 2 +- static/web/admin/viewer-info/index.html | 2 +- static/web/admin/webhooks/index.html | 2 +- static/web/embed/chat/readonly/index.html | 2 +- static/web/embed/chat/readwrite/index.html | 2 +- static/web/embed/video/index.html | 2 +- static/web/index.html | 4 ++-- 42 files changed, 43 insertions(+), 43 deletions(-) delete mode 100644 static/web/_next/static/chunks/1943-701e08920ac663be.js create mode 100644 static/web/_next/static/chunks/1943-909ccbe5b3c551bb.js rename static/web/_next/static/{dhEf29X9QvzQBRpv9fJ6_ => yn8vCZyLTcmFNqxQd-p0p}/_buildManifest.js (98%) rename static/web/_next/static/{dhEf29X9QvzQBRpv9fJ6_ => yn8vCZyLTcmFNqxQd-p0p}/_ssgManifest.js (100%) diff --git a/static/web/404.html b/static/web/404.html index 9f593d542..a697f1887 100644 --- a/static/web/404.html +++ b/static/web/404.html @@ -1,4 +1,4 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file + }

404

This page could not be found.

\ No newline at end of file diff --git a/static/web/404/index.html b/static/web/404/index.html index 9f593d542..a697f1887 100644 --- a/static/web/404/index.html +++ b/static/web/404/index.html @@ -1,4 +1,4 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file + }

404

This page could not be found.

\ No newline at end of file diff --git a/static/web/_next/static/chunks/1943-701e08920ac663be.js b/static/web/_next/static/chunks/1943-701e08920ac663be.js deleted file mode 100644 index 4be90f75e..000000000 --- a/static/web/_next/static/chunks/1943-701e08920ac663be.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1943],{58909:function(t,e,n){n.d(e,{F:function(){return a}});var i=n(87462),r=n(35524),s=n(47421),o=n(59119),l=t=>{var{theme:e,settings:n,styles:i}=t,r={"&":{backgroundColor:n.background,color:n.foreground},".cm-gutters":{}};n.fontFamily&&(r["&.cm-editor .cm-scroller"]={fontFamily:n.fontFamily}),n.gutterBackground&&(r[".cm-gutters"].backgroundColor=n.gutterBackground),n.gutterForeground&&(r[".cm-gutters"].color=n.gutterForeground),n.gutterBorder&&(r[".cm-gutters"].borderRightColor=n.gutterBorder),n.caret&&(r[".cm-content"]={caretColor:n.caret},r[".cm-cursor, .cm-dropCursor"]={borderLeftColor:n.caret});var l={};n.gutterActiveForeground&&(l.color=n.gutterActiveForeground),n.lineHighlight&&(r[".cm-activeLine"]={backgroundColor:n.lineHighlight},l.backgroundColor=n.lineHighlight),r[".cm-activeLineGutter"]=l,n.selection&&(r["&.cm-focused .cm-selectionBackground, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={backgroundColor:n.selection}),n.selectionMatch&&(r["& .cm-selectionMatch"]={backgroundColor:n.selectionMatch});var a=s.tk.theme(r,{dark:"dark"===e}),h=o.Qf.define(i);return[a,(0,o.nF)(h)]},a=(t=>{var{theme:e="light",settings:n={},styles:s=[]}={};return l({theme:e,settings:(0,i.Z)({background:"#FFFFFF",foreground:"#000000",caret:"#FBAC52",selection:"#FFD420",selectionMatch:"#FFD420",gutterBackground:"#f5f5f5",gutterForeground:"#4D4D4C",gutterBorder:"transparent",lineHighlight:"#00000012"},n),styles:[{tag:[r.pJ.meta,r.pJ.comment],color:"#804000"},{tag:[r.pJ.keyword,r.pJ.strong],color:"#0000FF"},{tag:[r.pJ.number],color:"#FF0080"},{tag:[r.pJ.string],color:"#FF0080"},{tag:[r.pJ.variableName],color:"#006600"},{tag:[r.pJ.escape],color:"#33CC33"},{tag:[r.pJ.tagName],color:"#1C02FF"},{tag:[r.pJ.heading],color:"#0C07FF"},{tag:[r.pJ.quote],color:"#000000"},{tag:[r.pJ.list],color:"#B90690"},{tag:[r.pJ.documentMeta],color:"#888888"},{tag:[r.pJ.function(r.pJ.variableName)],color:"#0000A2"},{tag:[r.pJ.definition(r.pJ.typeName),r.pJ.typeName],color:"#6D79DE"},...s]})})()},87685:function(t,e,n){n.d(e,{ZP:function(){return nF}});var i=n(87462),r=n(63366),s=n(67294),o=n(78120),l=n(47421),a=n(59119),h=n(41113);let c=t=>{let e=m(t.state);return e.line?f(t):!!e.block&&p(t)};function u(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return!!r&&(i(n.update(r)),!0)}}let f=u(function(t,e,n=e.selection.ranges){let i=[],r=-1;for(let{from:s,to:o}of n){let l=i.length,a=1e9;for(let h=s;h<=o;){let c=e.doc.lineAt(h);if(c.from>r&&(s==o||o>c.from)){r=c.from;let u=m(e,h).line;if(!u)continue;let f=/^\s*/.exec(c.text)[0].length,d=f==c.length,p=c.text.slice(f,f+u.length)==u?f:-1;ft.comment<0&&(!t.empty||t.single))){let k=[];for(let{line:y,token:v,indent:b,empty:O,single:x}of i)(x||!O)&&k.push({from:y.from+b,insert:v+" "});let w=e.changes(k);return{changes:w,selection:e.selection.map(w,1)}}if(1!=t&&i.some(t=>t.comment>=0)){let S=[];for(let{line:P,comment:C,token:A}of i)if(C>=0){let Q=P.from+C,T=Q+A.length;" "==P.text[T-P.from]&&T++,S.push({from:Q,to:T})}return{changes:S}}return null},0),d=u(g,0),p=u((t,e)=>g(t,e,function(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to),s=e.length-1;s>=0&&e[s].to>i.from?e[s].to=r.to:e.push({from:i.from,to:r.to})}return e}(e)),0);function m(t,e=t.selection.main.head){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}function g(t,e,n=e.selection.ranges){let i=n.map(t=>m(e,t.from).block);if(!i.every(t=>t))return null;let r=n.map((t,n)=>(function(t,{open:e,close:n},i,r){let s,o,l=t.sliceDoc(i-50,i),a=t.sliceDoc(r,r+50),h=/\s*$/.exec(l)[0].length,c=/^\s*/.exec(a)[0].length,u=l.length-h;if(l.slice(u-e.length,u)==e&&a.slice(c,c+n.length)==n)return{open:{pos:i-h,margin:h&&1},close:{pos:r+c,margin:c&&1}};r-i<=100?s=o=t.sliceDoc(i,r):(s=t.sliceDoc(i,i+50),o=t.sliceDoc(r-50,r));let f=/^\s*/.exec(s)[0].length,d=/\s*$/.exec(o)[0].length,p=o.length-d-n.length;return s.slice(f,f+e.length)==e&&o.slice(p,p+n.length)==n?{open:{pos:i+f+e.length,margin:/\s/.test(s.charAt(f+e.length))?1:0},close:{pos:r-d-n.length,margin:/\s/.test(o.charAt(p-1))?1:0}}:null})(e,i[n],t.from,t.to));if(2!=t&&!r.every(t=>t))return{changes:e.changes(n.map((t,e)=>r[e]?[]:[{from:t.from,insert:i[e].open+" "},{from:t.to,insert:" "+i[e].close}]))};if(1!=t&&r.some(t=>t)){let s=[];for(let o=0,l;o(0,o.BO)(t,{minDepth:100,newGroupDelay:500},{minDepth:Math.max,newGroupDelay:Math.min})}),O=o.QQ.define({create:()=>$.empty,update(t,e){let n=e.state.facet(b),i=e.annotation(k);if(i){var r;let s;let l=e.docChanged?o.jT.single((r=e.changes,s=0,r.iterChangedRanges((t,e)=>s=e),s)):void 0,a=A.fromTransaction(e,l),h=i.side,c=0==h?t.undone:t.done;return c=a?Q(c,c.length,n.minDepth,a):D(c,e.startState.selection),new $(0==h?i.rest:c,0==h?c:i.rest)}let u=e.annotation(y);if(("full"==u||"before"==u)&&(t=t.isolate()),!1===e.annotation(o.YW.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let f=A.fromTransaction(e),d=e.annotation(o.YW.time),p=e.annotation(o.YW.userEvent);return f?t=t.addChanges(f,d,p,n.newGroupDelay,n.minDepth):e.selection&&(t=t.addSelection(e.startState.selection,d,p,n.newGroupDelay)),("full"==u||"after"==u)&&(t=t.isolate()),t},toJSON:t=>({done:t.done.map(t=>t.toJSON()),undone:t.undone.map(t=>t.toJSON())}),fromJSON:t=>new $(t.done.map(A.fromJSON),t.undone.map(A.fromJSON))});function x(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(O,!1);if(!r)return!1;let s=r.pop(t,n,e);return!!s&&(i(s),!0)}}let w=x(0,!1),S=x(1,!1),P=x(0,!0),C=x(1,!0);class A{constructor(t,e,n,i,r){this.changes=t,this.effects=e,this.mapped=n,this.startSelection=i,this.selectionsAfter=r}setSelAfter(t){return new A(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,n;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(t=>t.toJSON())}}static fromJSON(t){return new A(t.changes&&o.as.fromJSON(t.changes),[],t.mapped&&o.n0.fromJSON(t.mapped),t.startSelection&&o.jT.fromJSON(t.startSelection),t.selectionsAfter.map(o.jT.fromJSON))}static fromTransaction(t,e){let n=I;for(let i of t.startState.facet(v)){let r=i(t);r.length&&(n=n.concat(r))}return!n.length&&t.changes.empty?null:new A(t.changes.invert(t.startState.doc),n,void 0,e||t.startState.selection,I)}static selection(t){return new A(void 0,I,void 0,void 0,t)}}function Q(t,e,n,i){let r=t.slice(e+1>n+20?e-n-1:0,e);return r.push(i),r}function T(t,e){return t.length?e.length?t.concat(e):t:e}let I=[];function D(t,e){if(!t.length)return[A.selection([e])];{let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-200));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),Q(t,t.length-1,1e9,n.setSelAfter(i)))}}function R(t,e){if(!t.length)return t;let n=t.length,i=I;for(;n;){let r=function(t,e,n){let i=T(t.selectionsAfter.length?t.selectionsAfter.map(t=>t.map(e)):I,n);if(!t.changes)return A.selection(i);let r=t.changes.map(e),s=e.mapDesc(t.changes,!0),l=t.mapped?t.mapped.composeDesc(s):s;return new A(r,o.Py.mapEffects(t.effects,e),l,t.startSelection.map(s),i)}(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let s=t.slice(0,n);return s[n-1]=r,s}e=r.mapped,n--,i=r.selectionsAfter}return i.length?[A.selection(i)]:I}let M=/^(input\.type|delete)($|\.)/;class ${constructor(t,e,n=0,i){this.done=t,this.undone=e,this.prevTime=n,this.prevUserEvent=i}isolate(){return this.prevTime?new $(this.done,this.undone):this}addChanges(t,e,n,i,r){var s,o;let l,a,h=this.done,c=h[h.length-1];return h=c&&c.changes&&!c.changes.empty&&t.changes&&(!n||M.test(n))&&(!c.selectionsAfter.length&&e-this.prevTimel.push(t,e)),o.iterChangedRanges((t,e,n,i)=>{for(let r=0;r=s&&n<=o&&(a=!0)}}),a)||"input.type.compose"==n)?Q(h,h.length-1,r,new A(t.changes.compose(c.changes),T(t.effects,c.effects),c.mapped,c.startSelection,I)):Q(h,h.length,r,t),new $(h,I,e,n)}addSelection(t,e,n,i){var r;let s=this.done.length?this.done[this.done.length-1].selectionsAfter:I;return s.length>0&&e-this.prevTimee.empty!=t.ranges[n].empty).length?this:new $(D(this.done,t),this.undone,e,n)}addMapping(t){return new $(R(this.done,t),R(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,n){let i=0==t?this.done:this.undone;if(0==i.length)return null;let r=i[i.length-1];if(n&&r.selectionsAfter.length){var s;let o,l;return e.update({selection:r.selectionsAfter[r.selectionsAfter.length-1],annotations:k.of({side:t,rest:(o=(s=i)[s.length-1],(l=s.slice())[s.length-1]=o.setSelAfter(o.selectionsAfter.slice(0,o.selectionsAfter.length-1)),l)}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0})}if(!r.changes)return null;{let a=1==i.length?I:i.slice(0,i.length-1);return r.mapped&&(a=R(a,r.mapped)),e.update({changes:r.changes,selection:r.startSelection,effects:r.effects,annotations:k.of({side:t,rest:a}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}}}$.empty=new $(I,I);let N=[{key:"Mod-z",run:w,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:S,preventDefault:!0},{linux:"Ctrl-Shift-z",run:S,preventDefault:!0},{key:"Mod-u",run:P,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:C,preventDefault:!0}];function E(t,e){return o.jT.create(t.ranges.map(e),t.mainIndex)}function z(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function B({state:t,dispatch:e},n){let i=E(t.selection,n);return!i.eq(t.selection)&&(e(z(t,i)),!0)}function W(t,e){return o.jT.cursor(e?t.to:t.from)}function J(t,e){return B(t,n=>n.empty?t.moveByChar(n,e):W(n,e))}function L(t){return t.textDirectionAt(t.state.selection.main.head)==l.Nm.LTR}let j=t=>J(t,!L(t)),F=t=>J(t,L(t));function _(t,e){return B(t,n=>n.empty?t.moveByGroup(n,e):W(n,e))}let U=t=>_(t,!L(t)),X=t=>_(t,L(t));function q(t,e,n){let i,r,s=(0,a.qz)(t).resolveInner(e.head),l=n?h.md.closedBy:h.md.openedBy;for(let c=e.head;;){let u=n?s.childAfter(c):s.childBefore(c);if(!u)break;!function(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}(t,u,l)?c=n?u.to:u.from:s=u}return r=s.type.prop(l)&&(i=n?(0,a.Um)(t,s.from,1):(0,a.Um)(t,s.to,-1))&&i.matched?n?i.end.to:i.end.from:n?s.to:s.from,o.jT.cursor(r,n?-1:1)}let V=t=>B(t,e=>q(t.state,e,!L(t))),G=t=>B(t,e=>q(t.state,e,L(t)));function Z(t,e){return B(t,n=>{if(!n.empty)return W(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}let Y=t=>Z(t,!1),K=t=>Z(t,!0);function H(t){return Math.max(t.defaultLineHeight,Math.min(t.dom.clientHeight,innerHeight)-5)}function tt(t,e){let n,{state:i}=t,r=E(i.selection,n=>n.empty?t.moveVertically(n,e,H(t)):W(n,e));if(r.eq(i.selection))return!1;let s=t.coordsAtPos(i.selection.main.head),o=t.scrollDOM.getBoundingClientRect();return s&&s.top>o.top&&s.bottomtt(t,!1),tn=t=>tt(t,!0);function ti(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let s=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&e.head!=i.from+s&&(r=o.jT.cursor(i.from+s))}return r}let tr=t=>B(t,e=>ti(t,e,!0)),ts=t=>B(t,e=>ti(t,e,!1)),to=t=>B(t,e=>ti(t,e,!L(t))),tl=t=>B(t,e=>ti(t,e,L(t))),ta=t=>B(t,e=>o.jT.cursor(t.lineBlockAt(e.head).from,1)),th=t=>B(t,e=>o.jT.cursor(t.lineBlockAt(e.head).to,-1)),tc=({state:t,dispatch:e})=>{let n,i;return n=!1,i=E(t.selection,e=>{let i=(0,a.Um)(t,e.head,-1)||(0,a.Um)(t,e.head,1)||e.head>0&&(0,a.Um)(t,e.head-1,1)||e.head{let n=e(t);return o.jT.range(t.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)});return!n.eq(t.state.selection)&&(t.dispatch(z(t.state,n)),!0)}function tf(t,e){return tu(t,n=>t.moveByChar(n,e))}let td=t=>tf(t,!L(t)),tp=t=>tf(t,L(t));function tm(t,e){return tu(t,n=>t.moveByGroup(n,e))}let tg=t=>tm(t,!L(t)),tk=t=>tm(t,L(t)),ty=t=>tu(t,e=>q(t.state,e,!L(t))),tv=t=>tu(t,e=>q(t.state,e,L(t)));function tb(t,e){return tu(t,n=>t.moveVertically(n,e))}let tO=t=>tb(t,!1),tx=t=>tb(t,!0);function tw(t,e){return tu(t,n=>t.moveVertically(n,e,H(t)))}let tS=t=>tw(t,!1),tP=t=>tw(t,!0),tC=t=>tu(t,e=>ti(t,e,!0)),tA=t=>tu(t,e=>ti(t,e,!1)),tQ=t=>tu(t,e=>ti(t,e,!L(t))),tT=t=>tu(t,e=>ti(t,e,L(t))),tI=t=>tu(t,e=>o.jT.cursor(t.lineBlockAt(e.head).from)),tD=t=>tu(t,e=>o.jT.cursor(t.lineBlockAt(e.head).to)),tR=({state:t,dispatch:e})=>(e(z(t,{anchor:0})),!0),tM=({state:t,dispatch:e})=>(e(z(t,{anchor:t.doc.length})),!0),t$=({state:t,dispatch:e})=>(e(z(t,{anchor:t.selection.main.anchor,head:0})),!0),tN=({state:t,dispatch:e})=>(e(z(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),tE=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),tz=({state:t,dispatch:e})=>{let n=tK(t).map(({from:e,to:n})=>o.jT.range(e,Math.min(n+1,t.doc.length)));return e(t.update({selection:o.jT.create(n),userEvent:"select"})),!0},tB=({state:t,dispatch:e})=>{let n=E(t.selection,e=>{var n;let i=(0,a.qz)(t).resolveInner(e.head,1);for(;!(i.from=e.to||i.to>e.to&&i.from<=e.from||!(null===(n=i.parent)||void 0===n?void 0:n.parent));)i=i.parent;return o.jT.range(i.to,i.from)});return e(z(t,n)),!0},tW=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=o.jT.create([n.main]):n.main.empty||(i=o.jT.create([o.jT.cursor(n.main.head)])),!!i&&(e(z(t,i)),!0)};function tJ(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange(i=>{let{from:r,to:s}=i;if(r==s){let l=e(r);lr&&(n="delete.forward",l=tL(t,l,!0)),r=Math.min(r,l),s=Math.max(s,l)}else r=tL(t,r,!1),s=tL(t,s,!0);return r==s?{range:i}:{changes:{from:r,to:s},range:o.jT.cursor(r)}});return!r.changes.empty&&(t.dispatch(i.update(r,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?l.tk.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function tL(t,e,n){if(t instanceof l.tk)for(let i of t.state.facet(l.tk.atomicRanges).map(e=>e(t)))i.between(e,e,(t,i)=>{te&&(e=n?i:t)});return e}let tj=(t,e)=>tJ(t,n=>{let{state:i}=t,r=i.doc.lineAt(n),s,l;if(!e&&n>r.from&&ntj(t,!1),t_=t=>tj(t,!0),tU=(t,e)=>tJ(t,n=>{let i=n,{state:r}=t,s=r.doc.lineAt(i),l=r.charCategorizer(i);for(let a=null;;){if(i==(e?s.to:s.from)){i==n&&s.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let h=(0,o.cp)(s.text,i-s.from,e)+s.from,c=s.text.slice(Math.min(i,h)-s.from,Math.max(i,h)-s.from),u=l(c);if(null!=a&&u!=a)break;(" "!=c||i!=n)&&(a=u),i=h}return i}),tX=t=>tU(t,!1),tq=t=>tU(t,!0),tV=t=>tJ(t,e=>{let n=t.lineBlockAt(e).to;return etJ(t,e=>{let n=t.lineBlockAt(e).from;return e>n?n:Math.max(0,e-1)}),tZ=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:o.xv.of(["",""])},range:o.jT.cursor(t.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},tY=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let n=e.from,i=t.doc.lineAt(n),r=n==i.from?n-1:(0,o.cp)(i.text,n-i.from,!1)+i.from,s=n==i.to?n+1:(0,o.cp)(i.text,n-i.from,!0)+i.from;return{changes:{from:r,to:s,insert:t.doc.slice(n,s).append(t.doc.slice(r,n))},range:o.jT.cursor(s)}});return!n.changes.empty&&(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function tK(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),s=t.doc.lineAt(i.to);if(i.empty||i.to!=s.from||(s=t.doc.lineAt(i.to-1)),n>=r.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(i)}else e.push({from:r.from,to:s.to,ranges:[i]});n=s.number+1}return e}function tH(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let s of tK(t)){if(n?s.to==t.doc.length:0==s.from)continue;let l=t.doc.lineAt(n?s.to+1:s.from-1),a=l.length+1;if(n)for(let h of(i.push({from:s.to,to:l.to},{from:s.from,insert:l.text+t.lineBreak}),s.ranges))r.push(o.jT.range(Math.min(t.doc.length,h.anchor+a),Math.min(t.doc.length,h.head+a)));else for(let c of(i.push({from:l.from,to:s.from},{from:s.to,insert:t.lineBreak+l.text}),s.ranges))r.push(o.jT.range(c.anchor-a,c.head-a))}return!!i.length&&(e(t.update({changes:i,scrollIntoView:!0,selection:o.jT.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0)}let t0=({state:t,dispatch:e})=>tH(t,e,!1),t1=({state:t,dispatch:e})=>tH(t,e,!0);function t2(t,e,n){if(t.readOnly)return!1;let i=[];for(let r of tK(t))n?i.push({from:r.from,insert:t.doc.slice(r.from,r.to)+t.lineBreak}):i.push({from:r.to,insert:t.lineBreak+t.doc.slice(r.from,r.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}let t5=({state:t,dispatch:e})=>t2(t,e,!1),t3=({state:t,dispatch:e})=>t2(t,e,!0),t4=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(tK(e).map(({from:t,to:n})=>(t>0?t--:nt.moveVertically(e,!0)).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0},t9=t8(!1),t6=t8(!0);function t8(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(n=>{let{from:i,to:r}=n,s=e.doc.lineAt(i),l=!t&&i==r&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=(0,a.qz)(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),s;return i&&r&&i.to<=e&&r.from>=e&&(s=i.type.prop(h.md.closedBy))&&s.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from?{from:i.to,to:r.from}:null}(e,i);t&&(i=r=(r<=s.to?s:e.doc.lineAt(r)).to);let c=new a.Gn(e,{simulateBreak:i,simulateDoubleBreak:!!l}),u=(0,a.K0)(c,i);for(null==u&&(u=/^\s*/.exec(e.doc.lineAt(i).text)[0].length);rs.from&&i{let r=[];for(let s=i.from;s<=i.to;){let l=t.doc.lineAt(s);l.number>n&&(i.empty||i.to>l.from)&&(e(l,r,i),n=l.number),s=l.to+1}let a=t.changes(r);return{changes:r,range:o.jT.range(a.mapPos(i.anchor,1),a.mapPos(i.head,1))}})}let et=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new a.Gn(t,{overrideIndentation:t=>{let e=n[t];return null==e?-1:e}}),r=t7(t,(e,r,s)=>{let o=(0,a.K0)(i,e.from);if(null==o)return;/\S/.test(e.text)||(o=0);let l=/^\s*/.exec(e.text)[0],h=(0,a.SS)(t,o);(l!=h||s.from!t.readOnly&&(e(t.update(t7(t,(e,n)=>{n.push({from:e.from,insert:t.facet(a.c)})}),{userEvent:"input.indent"})),!0),en=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(t7(t,(e,n)=>{let i=/^\s*/.exec(e.text)[0];if(!i)return;let r=(0,o.IS)(i,t.tabSize),s=0,l=(0,a.SS)(t,Math.max(0,r-(0,a.y1)(t)));for(;s({mac:t.key,run:t.run,shift:t.shift}))),er=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:V,shift:ty},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:G,shift:tv},{key:"Alt-ArrowUp",run:t0},{key:"Shift-Alt-ArrowUp",run:t5},{key:"Alt-ArrowDown",run:t1},{key:"Shift-Alt-ArrowDown",run:t3},{key:"Escape",run:tW},{key:"Mod-Enter",run:t6},{key:"Alt-l",mac:"Ctrl-l",run:tz},{key:"Mod-i",run:tB,preventDefault:!0},{key:"Mod-[",run:en},{key:"Mod-]",run:ee},{key:"Mod-Alt-\\",run:et},{key:"Shift-Mod-k",run:t4},{key:"Shift-Mod-\\",run:tc},{key:"Mod-/",run:c},{key:"Alt-A",run:d}].concat(ei),es={key:"Tab",run:ee,shift:en};function eo(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];"string"==typeof r?t.setAttribute(i,r):null!=r&&(t[i]=r)}e++}for(;et.normalize("NFKD"):t=>t;class ea{constructor(t,e,n=0,i=t.length,r,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(n,i),this.bufferStart=n,this.normalize=r?t=>r(el(t)):el,this.query=this.normalize(e)}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,o.gm)(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=(0,o.bg)(t),n=this.bufferStart+this.bufferPos;this.bufferPos+=(0,o.nZ)(t);let i=this.normalize(e);for(let r=0,s=n;;r++){let l=i.charCodeAt(r),a=this.match(l,s);if(a)return this.value=a,this;if(r==i.length-1)break;s==n&&rthis.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 t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let n=this.curLineStart+e.index,i=n+e[0].length;if(this.matchPos=em(this.text,i+(n==i?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,i,e)))return this.value={from:n,to:i,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=n||i.to<=e){let r=new ed(e,t.sliceString(e,n));return ef.set(t,r),r}if(i.from==e&&i.to==n)return i;let{text:s,from:o}=i;return o>e&&(s=t.sliceString(e,o)+s,o=e),i.to=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e){let n=this.flat.from+e.index,i=n+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,i,e)))return this.value={from:n,to:i,match:e},this.matchPos=em(this.text,i+(n==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=ed.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function em(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function eg(t){let e=eo("input",{class:"cm-textfield",name:"line"}),n=eo("form",{class:"cm-gotoLine",onkeydown:e=>{27==e.keyCode?(e.preventDefault(),t.dispatch({effects:ek.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),i())},onsubmit:t=>{t.preventDefault(),i()}},eo("label",t.state.phrase("Go to line"),": ",e)," ",eo("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function i(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!n)return;let{state:i}=t,r=i.doc.lineAt(i.selection.main.head),[,s,l,a,h]=n,c=a?+a.slice(1):0,u=l?+l:r.number;if(l&&h){let f=u/100;s&&(f=f*("-"==s?-1:1)+r.number/i.doc.lines),u=Math.round(i.doc.lines*f)}else l&&s&&(u=u*("-"==s?-1:1)+r.number);let d=i.doc.line(Math.max(1,Math.min(i.doc.lines,u)));t.dispatch({effects:ek.of(!1),selection:o.jT.cursor(d.from+Math.max(0,Math.min(c,d.length))),scrollIntoView:!0}),t.focus()}return{dom:n}}"undefined"!=typeof Symbol&&(eu.prototype[Symbol.iterator]=ep.prototype[Symbol.iterator]=function(){return this});let ek=o.Py.define(),ey=o.QQ.define({create:()=>!0,update(t,e){for(let n of e.effects)n.is(ek)&&(t=n.value);return t},provide:t=>l.mH.from(t,t=>t?eg:null)}),ev=t=>{let e=(0,l.Sd)(t,eg);if(!e){let n=[ek.of(!0)];null==t.state.field(ey,!1)&&n.push(o.Py.appendConfig.of([ey,eb])),t.dispatch({effects:n}),e=(0,l.Sd)(t,eg)}return e&&e.dom.querySelector("input").focus(),!0},eb=l.tk.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),eO={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},ex=o.r$.define({combine:t=>(0,o.BO)(t,eO,{highlightWordAroundCursor:(t,e)=>t||e,minSelectionLength:Math.min,maxMatches:Math.min})}),ew=l.p.mark({class:"cm-selectionMatch"}),eS=l.p.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function eP(t,e,n,i){return(0==n||t(e.sliceDoc(n-1,n))!=o.D0.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=o.D0.Word)}let eC=l.lg.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(ex),{state:n}=t,i=n.selection;if(i.ranges.length>1)return l.p.none;let r=i.main,s,a=null;if(r.empty){if(!e.highlightWordAroundCursor)return l.p.none;let h=n.wordAt(r.head);if(!h)return l.p.none;a=n.charCategorizer(r.head),s=n.sliceDoc(h.from,h.to)}else{let c=r.to-r.from;if(c200)return l.p.none;if(e.wholeWords){var u,f,d;if(s=n.sliceDoc(r.from,r.to),!(eP(a=n.charCategorizer(r.head),n,r.from,r.to)&&(u=a,f=r.from,d=r.to,u(n.sliceDoc(f,f+1))==o.D0.Word&&u(n.sliceDoc(d-1,d))==o.D0.Word)))return l.p.none}else if(!(s=n.sliceDoc(r.from,r.to).trim()))return l.p.none}let p=[];for(let m of t.visibleRanges){let g=new ea(n.doc,s,m.from,m.to);for(;!g.next().done;){let{from:k,to:y}=g.value;if((!a||eP(a,n,k,y))&&(r.empty&&k<=r.from&&y>=r.to?p.push(eS.range(k,y)):(k>=r.to||y<=r.from)&&p.push(ew.range(k,y)),p.length>e.maxMatches))return l.p.none}}return l.p.set(p)}},{decorations:t=>t.decorations}),eA=l.tk.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),eQ=({state:t,dispatch:e})=>{let{selection:n}=t,i=o.jT.create(n.ranges.map(e=>t.wordAt(e.head)||o.jT.cursor(e.head)),n.mainIndex);return!i.eq(n)&&(e(t.update({selection:i})),!0)},eT=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(t=>t.from===t.to))return eQ({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(e=>t.sliceDoc(e.from,e.to)!=i))return!1;let r=function(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),s=r&&r.from==n.from&&r.to==n.to;for(let o=!1,l=new ea(t.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new ea(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(t=>t.from==l.value.from))continue;if(s){let a=t.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}(t,i);return!!r&&(e(t.update({selection:t.selection.addRange(o.jT.range(r.from,r.to),!1),effects:l.tk.scrollIntoView(r.to)})),!0)},eI=o.r$.define({combine:t=>(0,o.BO)(t,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:t=>new e3(t)})});class eD{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return RegExp(t,ec),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,(t,e)=>"n"==e?"\n":"r"==e?"\r":"t"==e?" ":"\\")}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new eB(this):new e$(this)}getCursor(t,e=0,n){let i=t.doc?t:o.yy.create({doc:t});return null==n&&(n=i.doc.length),this.regexp?eN(this,i,e,n):eM(this,i,e,n)}}class eR{constructor(t){this.spec=t}}function eM(t,e,n,i){var r,s;return new ea(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:t=>t.toLowerCase(),t.wholeWord?(r=e.doc,s=e.charCategorizer(e.selection.main.head),(t,e,n,i)=>((i>t||i+n.length=e)return null;i.push(n.value)}return i}highlight(t,e,n,i){let r=eM(this.spec,t,Math.max(0,e-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,t.doc.length));for(;!r.next().done;)i(r.value.from,r.value.to)}}function eN(t,e,n,i){var r;return new eu(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(r=e.charCategorizer(e.selection.main.head),(t,e,n)=>!n[0].length||(r(eE(n.input,n.index))!=o.D0.Word||r(ez(n.input,n.index))!=o.D0.Word)&&(r(ez(n.input,n.index+n[0].length))!=o.D0.Word||r(eE(n.input,n.index+n[0].length))!=o.D0.Word)):void 0},n,i)}function eE(t,e){return t.slice((0,o.cp)(t,e,!1),e)}function ez(t,e){return t.slice(e,(0,o.cp)(t,e))}class eB extends eR{nextMatch(t,e,n){let i=eN(this.spec,t,n,t.doc.length).next();return i.done&&(i=eN(this.spec,t,0,e).next()),i.done?null:i.value}prevMatchInRange(t,e,n){for(let i=1;;i++){let r=Math.max(e,n-1e4*i),s=eN(this.spec,t,r,n),o=null;for(;!s.next().done;)o=s.value;if(o&&(r==e||o.from>r+10))return o;if(r==e)return null}}prevMatch(t,e,n){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,n,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(e,n)=>"$"==n?"$":"&"==n?t.match[0]:"0"!=n&&+n=e)return null;i.push(n.value)}return i}highlight(t,e,n,i){let r=eN(this.spec,t,Math.max(0,e-250),Math.min(n+250,t.doc.length));for(;!r.next().done;)i(r.value.from,r.value.to)}}let eW=o.Py.define(),eJ=o.Py.define(),eL=o.QQ.define({create:t=>new ej(e0(t).create(),null),update(t,e){for(let n of e.effects)n.is(eW)?t=new ej(n.value.create(),t.panel):n.is(eJ)&&(t=new ej(t.query,n.value?eH:null));return t},provide:t=>l.mH.from(t,t=>t.panel)});class ej{constructor(t,e){this.query=t,this.panel=e}}let eF=l.p.mark({class:"cm-searchMatch"}),e_=l.p.mark({class:"cm-searchMatch cm-searchMatch-selected"}),eU=l.lg.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(eL))}update(t){let e=t.state.field(eL);(e!=t.startState.field(eL)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return l.p.none;let{view:n}=this,i=new o.f_;for(let r=0,s=n.visibleRanges,a=s.length;rs[r+1].from-500;)c=s[++r].to;t.highlight(n.state,h,c,(t,e)=>{let r=n.state.selection.ranges.some(n=>n.from==t&&n.to==e);i.add(t,e,r?e_:eF)})}return i.finish()}},{decorations:t=>t.decorations});function eX(t){return e=>{let n=e.state.field(eL,!1);return n&&n.query.spec.valid?t(e,n):e1(e)}}let eq=eX((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);return!!i&&(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:e6(t,i),userEvent:"select.search"}),!0)}),eV=eX((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);return!!r&&(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:e6(t,r),userEvent:"select.search"}),!0)}),eG=eX((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!!n&&!!n.length&&(t.dispatch({selection:o.jT.create(n.map(t=>o.jT.range(t.from,t.to))),userEvent:"select.search.matches"}),!0)}),eZ=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,s=[],l=0;for(let a=new ea(t.doc,t.sliceDoc(i,r));!a.next().done;){if(s.length>1e3)return!1;a.value.from==i&&(l=s.length),s.push(o.jT.range(a.value.from,a.value.to))}return e(t.update({selection:o.jT.create(s,l),userEvent:"select.search.matches"})),!0},eY=eX((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,i,i);if(!s)return!1;let o=[],a,h,c=[];if(s.from==i&&s.to==r&&(h=n.toText(e.getReplacement(s)),o.push({from:s.from,to:s.to,insert:h}),s=e.nextMatch(n,s.from,s.to),c.push(l.tk.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+"."))),s){let u=0==o.length||o[0].from>=s.to?0:s.to-s.from-h.length;a={anchor:s.from-u,head:s.to-u},c.push(e6(t,s))}return t.dispatch({changes:o,selection:a,scrollIntoView:!!a,effects:c,userEvent:"input.replace"}),!0}),eK=eX((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(t=>{let{from:n,to:i}=t;return{from:n,to:i,insert:e.getReplacement(t)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:l.tk.announce.of(i),userEvent:"input.replace.all"}),!0});function eH(t){return t.state.facet(eI).createPanel(t)}function e0(t,e){var n,i,r,s;let o=t.selection.main,l=o.empty||o.to>o.from+100?"":t.sliceDoc(o.from,o.to);if(e&&!l)return e;let a=t.facet(eI);return new eD({search:(null!==(n=null==e?void 0:e.literal)&&void 0!==n?n:a.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(i=null==e?void 0:e.caseSensitive)&&void 0!==i?i:a.caseSensitive,literal:null!==(r=null==e?void 0:e.literal)&&void 0!==r?r:a.literal,wholeWord:null!==(s=null==e?void 0:e.wholeWord)&&void 0!==s?s:a.wholeWord})}let e1=t=>{let e=t.state.field(eL,!1);if(e&&e.panel){let n=(0,l.Sd)(t,eH);if(!n)return!1;let i=n.dom.querySelector("[main-field]");if(i&&i!=t.root.activeElement){let r=e0(t.state,e.query.spec);r.valid&&t.dispatch({effects:eW.of(r)}),i.focus(),i.select()}}else t.dispatch({effects:[eJ.of(!0),e?eW.of(e0(t.state,e.query.spec)):o.Py.appendConfig.of(e7)]});return!0},e2=t=>{let e=t.state.field(eL,!1);if(!e||!e.panel)return!1;let n=(0,l.Sd)(t,eH);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:eJ.of(!1)}),!0},e5=[{key:"Mod-f",run:e1,scope:"editor search-panel"},{key:"F3",run:eq,shift:eV,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:eq,shift:eV,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:e2,scope:"editor search-panel"},{key:"Mod-Shift-l",run:eZ},{key:"Alt-g",run:ev},{key:"Mod-d",run:eT,preventDefault:!0}];class e3{constructor(t){this.view=t;let e=this.query=t.state.field(eL).query.spec;function n(t,e,n){return eo("button",{class:"cm-button",name:t,onclick:e,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=eo("input",{value:e.search,placeholder:e4(t,"Find"),"aria-label":e4(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=eo("input",{value:e.replace,placeholder:e4(t,"Replace"),"aria-label":e4(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=eo("input",{type:"checkbox",name:"case",form:"",checked:e.caseSensitive,onchange:this.commit}),this.reField=eo("input",{type:"checkbox",name:"re",form:"",checked:e.regexp,onchange:this.commit}),this.wordField=eo("input",{type:"checkbox",name:"word",form:"",checked:e.wholeWord,onchange:this.commit}),this.dom=eo("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,n("next",()=>eq(t),[e4(t,"next")]),n("prev",()=>eV(t),[e4(t,"previous")]),n("select",()=>eG(t),[e4(t,"all")]),eo("label",null,[this.caseField,e4(t,"match case")]),eo("label",null,[this.reField,e4(t,"regexp")]),eo("label",null,[this.wordField,e4(t,"by word")]),...t.state.readOnly?[]:[eo("br"),this.replaceField,n("replace",()=>eY(t),[e4(t,"replace")]),n("replaceAll",()=>eK(t),[e4(t,"replace all")])],eo("button",{name:"close",onclick:()=>e2(t),"aria-label":e4(t,"close"),type:"button"},["\xd7"])])}commit(){let t=new eD({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:eW.of(t)}))}keydown(t){(0,l.$1)(this.view,t,"search-panel")?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?eV:eq)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),eY(this.view))}update(t){for(let e of t.transactions)for(let n of e.effects)n.is(eW)&&!n.value.eq(this.query)&&this.setQuery(n.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(eI).top}}function e4(t,e){return t.state.phrase(e)}let e9=/[\s\.,:;?!]/;function e6(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,s=Math.max(i.from,e-30),o=Math.min(r,n+30),a=t.state.sliceDoc(s,o);if(s!=i.from){for(let h=0;h<30;h++)if(!e9.test(a[h+1])&&e9.test(a[h])){a=a.slice(h);break}}if(o!=r){for(let c=a.length-1;c>a.length-30;c--)if(!e9.test(a[c-1])&&e9.test(a[c])){a=a.slice(0,c);break}}return l.tk.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${i.number}.`)}let e8=l.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"}}),e7=[eL,o.Wl.lowest(eU),e8];var nt=n(34790);class ne{constructor(t,e,n){this.from=t,this.to=e,this.diagnostic=n}}class nn{constructor(t,e,n){this.diagnostics=t,this.panel=e,this.selected=n}static init(t,e,n){let i=t,r=n.facet(nk).markerFilter;r&&(i=r(i));let s=l.p.set(i.map(t=>t.from==t.to||t.from==t.to-1&&n.doc.lineAt(t.from).to==t.from?l.p.widget({widget:new nb(t),diagnostic:t}).range(t.from):l.p.mark({attributes:{class:"cm-lintRange cm-lintRange-"+t.severity},diagnostic:t}).range(t.from,t.to)),!0);return new nn(s,e,ni(s))}}function ni(t,e=null,n=0){let i=null;return t.between(n,1e9,(t,n,{spec:r})=>{if(!e||r.diagnostic==e)return i=new ne(t,n,r.diagnostic),!1}),i}function nr(t,e){return!!(t.effects.some(t=>t.is(no))||t.changes.touchesRange(e.pos))}function ns(t,e){return t.field(nh,!1)?e:e.concat(o.Py.appendConfig.of([nh,l.tk.decorations.compute([nh],t=>{let{selected:e,panel:n}=t.field(nh);return e&&n&&e.from!=e.to?l.p.set([nc.range(e.from,e.to)]):l.p.none}),(0,l.bF)(nu,{hideOn:nr}),nS]))}let no=o.Py.define(),nl=o.Py.define(),na=o.Py.define(),nh=o.QQ.define({create:()=>new nn(l.p.none,null,null),update(t,e){if(e.docChanged){let n=t.diagnostics.map(e.changes),i=null;if(t.selected){let r=e.changes.mapPos(t.selected.from,1);i=ni(n,t.selected.diagnostic,r)||ni(n,null,r)}t=new nn(n,t.panel,i)}for(let s of e.effects)s.is(no)?t=nn.init(s.value,t.panel,e.state):s.is(nl)?t=new nn(t.diagnostics,s.value?nx.open:null,t.selected):s.is(na)&&(t=new nn(t.diagnostics,t.panel,s.value));return t},provide:t=>[l.mH.from(t,t=>t.panel),l.tk.decorations.from(t,t=>t.diagnostics)]}),nc=l.p.mark({class:"cm-lintRange cm-lintRange-active"});function nu(t,e,n){let{diagnostics:i}=t.state.field(nh),r=[],s=2e8,o=0;i.between(e-(n<0?1:0),e+(n>0?1:0),(t,i,{spec:l})=>{e>=t&&e<=i&&(t==i||(e>t||n>0)&&(e({dom:function(t,e){return eo("ul",{class:"cm-tooltip-lint"},e.map(e=>nv(t,e,!1)))}(t,r)})}:null}let nf=t=>{let e=t.state.field(nh,!1);e&&e.panel||t.dispatch({effects:ns(t.state,[nl.of(!0)])});let n=(0,l.Sd)(t,nx.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},nd=t=>{let e=t.state.field(nh,!1);return!!e&&!!e.panel&&(t.dispatch({effects:nl.of(!1)}),!0)},np=t=>{let e=t.state.field(nh,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return(!!i.value||!!(i=e.diagnostics.iter(0)).value&&(i.from!=n.from||i.to!=n.to))&&(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},nm=[{key:"Mod-Shift-m",run:nf,preventDefault:!0},{key:"F8",run:np}],ng=l.lg.fromClass(class{constructor(t){this.view=t,this.timeout=-1,this.set=!0;let{delay:e}=t.state.facet(nk);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){let t=Date.now();if(tPromise.resolve(t(this.view)))).then(t=>{let n=t.reduce((t,e)=>t.concat(e));this.view.state.doc==e.doc&&this.view.dispatch({effects:ns(this.view.state,[no.of(n)])})},t=>{(0,l.OO)(this.view.state,t)})}}update(t){let e=t.state.facet(nk);(t.docChanged||e!=t.startState.facet(nk))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),nk=o.r$.define({combine:t=>Object.assign({sources:t.map(t=>t.source)},(0,o.BO)(t.map(t=>t.config),{delay:750,markerFilter:null,tooltipFilter:null})),enables:ng});function ny(t){let e=[];if(t)t:for(let{name:n}of t){for(let i=0;it.toLowerCase()==r.toLowerCase())){e.push(r);continue t}}e.push("")}return e}function nv(t,e,n){var i;let r=n?ny(e.actions):[];return eo("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},eo("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),null===(i=e.actions)||void 0===i?void 0:i.map((n,i)=>{let s=i=>{i.preventDefault();let r=ni(t.state.field(nh).diagnostics,e);r&&n.apply(t,r.from,r.to)},{name:o}=n,l=r[i]?o.indexOf(r[i]):-1,a=l<0?o:[o.slice(0,l),eo("u",o.slice(l,l+1)),o.slice(l+1)];return eo("button",{type:"button",class:"cm-diagnosticAction",onclick:s,onmousedown:s,"aria-label":` Action: ${o}${l<0?"":` (access key "${r[i]})"`}.`},a)}),e.source&&eo("div",{class:"cm-diagnosticSource"},e.source))}class nb extends l.l9{constructor(t){super(),this.diagnostic=t}eq(t){return t.diagnostic==this.diagnostic}toDOM(){return eo("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class nO{constructor(t,e){this.diagnostic=e,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=nv(t,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class nx{constructor(t){this.view=t,this.items=[];let e=e=>{if(27==e.keyCode)nd(this.view),this.view.focus();else if(38==e.keyCode||33==e.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==e.keyCode||34==e.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==e.keyCode)this.moveSelection(0);else if(35==e.keyCode)this.moveSelection(this.items.length-1);else if(13==e.keyCode)this.view.focus();else{if(!(e.keyCode>=65)||!(e.keyCode<=90)||!(this.selectedIndex>=0))return;let{diagnostic:n}=this.items[this.selectedIndex],i=ny(n.actions);for(let r=0;r{for(let e=0;end(this.view)},"\xd7")),this.update()}get selectedIndex(){let t=this.view.state.field(nh).selected;if(!t)return -1;for(let e=0;e{let l=-1,a;for(let h=n;hn&&(this.items.splice(n,l-n),i=!0)),e&&a.diagnostic==e.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),r=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),n++});n({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:t,panel:e})=>{t.tope.bottom&&(this.list.scrollTop+=t.bottom-e.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let t=this.list.firstChild;function e(){let e=t;t=e.nextSibling,e.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;t!=n.dom;)e();t=n.dom.nextSibling}else this.list.insertBefore(n.dom,t);for(;t;)e()}moveSelection(t){if(this.selectedIndex<0)return;let e=ni(this.view.state.field(nh).diagnostics,this.items[t].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:na.of(e)})}static open(t){return new nx(t)}}function nw(t){return function(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}(``,'width="6" height="3"')}let nS=l.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-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:nw("#d11")},".cm-lintRange-warning":{backgroundImage:nw("orange")},".cm-lintRange-info":{backgroundImage:nw("#999")},".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-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}}});l.SJ;let nP=o.Py.define();var nC=function(t){void 0===t&&(t={});var e,n=[];!1!==t.closeBracketsKeymap&&(n=n.concat(nt.GA)),!1!==t.defaultKeymap&&(n=n.concat(er)),!1!==t.searchKeymap&&(n=n.concat(e5)),!1!==t.historyKeymap&&(n=n.concat(N)),!1!==t.foldKeymap&&(n=n.concat(a.e7)),!1!==t.completionKeymap&&(n=n.concat(nt.B1)),!1!==t.lintKeymap&&(n=n.concat(nm));var i=[];if(!1!==t.lineNumbers&&i.push((0,l.Eu)()),!1!==t.highlightActiveLineGutter&&i.push((0,l.HQ)()),!1!==t.highlightSpecialChars&&i.push((0,l.AE)()),!1!==t.history&&i.push(function(t={}){return[O,b.of(t),l.tk.domEventHandlers({beforeinput(t,e){let n="historyUndo"==t.inputType?w:"historyRedo"==t.inputType?S:null;return!!n&&(t.preventDefault(),n(e))}})]}()),!1!==t.foldGutter&&i.push((0,a.mi)()),!1!==t.drawSelection&&i.push((0,l.Uw)()),!1!==t.dropCursor&&i.push((0,l.qr)()),!1!==t.allowMultipleSelections&&i.push(o.yy.allowMultipleSelections.of(!0)),!1!==t.indentOnInput&&i.push((0,a.nY)()),!1!==t.syntaxHighlighting&&i.push((0,a.nF)(a.R_,{fallback:!0})),!1!==t.bracketMatching&&i.push((0,a.n$)()),!1!==t.closeBrackets&&i.push((0,nt.vQ)()),!1!==t.autocompletion&&i.push((0,nt.ys)()),!1!==t.rectangularSelection&&i.push((0,l.Zs)()),!1!==t.crosshairCursor&&i.push((0,l.S2)()),!1!==t.highlightActiveLine&&i.push((0,l.ZO)()),!1!==t.highlightSelectionMatches){let r;i.push((r=[eA,eC],e&&r.push(ex.of(e)),r))}return t.tabSize&&"number"==typeof t.tabSize&&i.push(a.c.of(" ".repeat(t.tabSize))),i.concat([l.$f.of(n.flat())]).filter(Boolean)},nA=n(35524);let nQ="#e06c75",nT="#abb2bf",nI="#7d8799",nD="#d19a66",nR="#2c313a",nM="#282c34",n$="#353a42",nN="#528bff",nE=l.tk.theme({"&":{color:nT,backgroundColor:nM},".cm-content":{caretColor:nN},".cm-cursor, .cm-dropCursor":{borderLeftColor:nN},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:nT},".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",outline:"1px solid #515a6b"},".cm-gutters":{backgroundColor:nM,color:nI,border:"none"},".cm-activeLineGutter":{backgroundColor:nR},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:n$},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:n$,borderBottomColor:n$},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:nR,color:nT}}},{dark:!0}),nz=a.Qf.define([{tag:nA.pJ.keyword,color:"#c678dd"},{tag:[nA.pJ.name,nA.pJ.deleted,nA.pJ.character,nA.pJ.propertyName,nA.pJ.macroName],color:nQ},{tag:[nA.pJ.function(nA.pJ.variableName),nA.pJ.labelName],color:"#61afef"},{tag:[nA.pJ.color,nA.pJ.constant(nA.pJ.name),nA.pJ.standard(nA.pJ.name)],color:nD},{tag:[nA.pJ.definition(nA.pJ.name),nA.pJ.separator],color:nT},{tag:[nA.pJ.typeName,nA.pJ.className,nA.pJ.number,nA.pJ.changed,nA.pJ.annotation,nA.pJ.modifier,nA.pJ.self,nA.pJ.namespace],color:"#e5c07b"},{tag:[nA.pJ.operator,nA.pJ.operatorKeyword,nA.pJ.url,nA.pJ.escape,nA.pJ.regexp,nA.pJ.link,nA.pJ.special(nA.pJ.string)],color:"#56b6c2"},{tag:[nA.pJ.meta,nA.pJ.comment],color:nI},{tag:nA.pJ.strong,fontWeight:"bold"},{tag:nA.pJ.emphasis,fontStyle:"italic"},{tag:nA.pJ.strikethrough,textDecoration:"line-through"},{tag:nA.pJ.link,color:nI,textDecoration:"underline"},{tag:nA.pJ.heading,fontWeight:"bold",color:nQ},{tag:[nA.pJ.atom,nA.pJ.bool,nA.pJ.special(nA.pJ.variableName)],color:nD},{tag:[nA.pJ.processingInstruction,nA.pJ.string,nA.pJ.inserted],color:"#98c379"},{tag:nA.pJ.invalid,color:"#ffffff"}]),nB=[nE,(0,a.nF)(nz)];var nW=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(t=>!t.empty)}),nJ=n(85893),nL=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],nj=(0,s.forwardRef)((t,e)=>{var{className:n,value:a="",selection:h,extensions:c=[],onChange:u,onStatistics:f,onCreateEditor:d,onUpdate:p,autoFocus:m,theme:g="light",height:k,minHeight:y,maxHeight:v,width:b,minWidth:O,maxWidth:x,basicSetup:w,placeholder:S,indentWithTab:P,editable:C,readOnly:A,root:Q,initialState:T}=t,I=(0,r.Z)(t,nL),D=(0,s.useRef)(null),{state:R,view:M,container:$,setContainer:N}=function(t){var{value:e,selection:n,onChange:i,onStatistics:r,onCreateEditor:a,onUpdate:h,extensions:c=[],autoFocus:u,theme:f="light",height:d="",minHeight:p="",maxHeight:m="",placeholder:g="",width:k="",minWidth:y="",maxWidth:v="",editable:b=!0,readOnly:O=!1,indentWithTab:x=!0,basicSetup:w=!0,root:S,initialState:P}=t,[C,A]=(0,s.useState)(),[Q,T]=(0,s.useState)(),[I,D]=(0,s.useState)(),R=l.tk.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),M=l.tk.theme({"&":{height:d,minHeight:p,maxHeight:m,width:k,minWidth:y,maxWidth:v}}),$=[l.tk.updateListener.of(t=>{t.docChanged&&"function"==typeof i&&i(t.state.doc.toString(),t),r&&r(nW(t))}),M];switch(x&&$.unshift(l.$f.of([es])),w&&("boolean"==typeof w?$.unshift(nC()):$.unshift(nC(w))),g&&$.unshift((0,l.W$)(g)),f){case"light":$.push(R);break;case"dark":$.push(nB);break;case"none":break;default:$.push(f)}return!1===b&&$.push(l.tk.editable.of(!1)),O&&$.push(o.yy.readOnly.of(!0)),h&&"function"==typeof h&&$.push(l.tk.updateListener.of(h)),$=$.concat(c),(0,s.useEffect)(()=>{if(C&&!I){var t={doc:e,selection:n,extensions:$},i=P?o.yy.fromJSON(P.json,t,P.fields):o.yy.create(t);if(D(i),!Q){var r=new l.tk({state:i,parent:C,root:S});T(r),a&&a(r,i)}}return()=>{Q&&(D(void 0),T(void 0))}},[C,I]),(0,s.useEffect)(()=>A(t.container),[t.container]),(0,s.useEffect)(()=>()=>{Q&&(Q.destroy(),T(void 0))},[Q]),(0,s.useEffect)(()=>{u&&Q&&Q.focus()},[u,Q]),(0,s.useEffect)(()=>{Q&&Q.dispatch({effects:o.Py.reconfigure.of($)})},[f,c,d,p,m,k,y,v,g,b,O,x,w,i,h]),(0,s.useEffect)(()=>{var t=Q?Q.state.doc.toString():"";Q&&e!==t&&Q.dispatch({changes:{from:0,to:t.length,insert:e||""}})},[e,Q]),{state:I,setState:D,view:Q,setView:T,container:C,setContainer:A}}({container:D.current,root:Q,value:a,autoFocus:m,theme:g,height:k,minHeight:y,maxHeight:v,width:b,minWidth:O,maxWidth:x,basicSetup:w,placeholder:S,indentWithTab:P,editable:C,readOnly:A,selection:h,onChange:u,onStatistics:f,onCreateEditor:d,onUpdate:p,extensions:c,initialState:T});if((0,s.useImperativeHandle)(e,()=>({editor:D.current,state:R,view:M}),[D,$,R,M]),"string"!=typeof a)throw Error("value must be typeof string but got "+typeof a);return(0,nJ.jsx)("div",(0,i.Z)({ref:D,className:("string"==typeof g?"cm-theme-"+g:"cm-theme")+(n?" "+n:"")},I))});nj.displayName="CodeMirror";var nF=nj},34790:function(t,e,n){n.d(e,{B1:function(){return tC},GA:function(){return tb},Gn:function(){return to},Mb:function(){return a},eC:function(){return h},vQ:function(){return td},ys:function(){return tP}});var i=n(78120),r=n(47421),s=n(59119);class o{constructor(t,e,n){this.state=t,this.pos=e,this.explicit=n,this.abortListeners=[]}tokenBefore(t){let e=(0,s.qz)(this.state).resolveInner(this.pos,-1);for(;e&&0>t.indexOf(e.name);)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),n=Math.max(e.from,this.pos-250),i=e.text.slice(n-e.from,this.pos-e.from),r=i.search(f(t,!1));return r<0?null:{from:n+r,to:this.pos,text:i.slice(r)}}get aborted(){return null==this.abortListeners}addEventListener(t,e){"abort"==t&&this.abortListeners&&this.abortListeners.push(e)}}function l(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function a(t){let e=t.map(t=>"string"==typeof t?{label:t}:t),[n,i]=e.every(t=>/^\w+$/.test(t.label))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let r=1;r{let r=t.matchBefore(i);return r||t.explicit?{from:r?r.from:t.pos,options:e,validFor:n}:null}}function h(t,e){return n=>{for(let i=(0,s.qz)(n.state).resolveInner(n.pos,-1);i;i=i.parent)if(t.indexOf(i.name)>-1)return null;return e(n)}}class c{constructor(t,e,n){this.completion=t,this.source=e,this.match=n}}function u(t){return t.selection.main.head}function f(t,e){var n;let{source:i}=t,r=e&&"^"!=i[0],s="$"!=i[i.length-1];return r||s?RegExp(`${r?"^":""}(?:${i})${s?"$":""}`,null!==(n=t.flags)&&void 0!==n?n:t.ignoreCase?"i":""):t}let d=i.q6.define();function p(t,e){let n=e.completion.apply||e.completion.label,r=e.source;if("string"==typeof n){var s,o,l;t.dispatch(Object.assign(Object.assign({},(s=t.state,o=r.from,l=r.to,Object.assign(Object.assign({},s.changeByRange(t=>{if(t==s.selection.main)return{changes:{from:o,to:l,insert:n},range:i.jT.cursor(o+n.length)};let e=l-o;return!t.empty||e&&s.sliceDoc(t.from-e,t.from)!=s.sliceDoc(o,l)?{range:t}:{changes:{from:t.from-e,to:t.from,insert:n},range:i.jT.cursor(t.from-e+n.length)}})),{userEvent:"input.complete"}))),{annotations:d.of(e.completion)}))}else n(t,e.completion,r.from,r.to)}let m=new WeakMap;function g(t){if(!Array.isArray(t))return t;let e=m.get(t);return e||m.set(t,e=a(t)),e}class k{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let e=0;e=48&&P<=57||P>=97&&P<=122?2:P>=65&&P<=90?1:0:(C=(0,i.bg)(P))!=C.toLowerCase()?1:C!=C.toUpperCase()?2:0;(!x||1==A&&b||0==S&&0!=A)&&(e[m]==P||n[m]==P&&(g=!0)?o[m++]=x:o.length&&(O=!1)),S=A,x+=(0,i.nZ)(P)}return m==h&&0==o[0]&&O?this.result(-100+(g?-200:0),o,t):k==h&&0==y?[-200-t.length,0,v]:a>-1?[-700-t.length,a,a+this.pattern.length]:k==h?[-900-t.length,y,v]:m==h?this.result(-100+(g?-200:0)+-700+(O?0:-1100),o,t):2==e.length?null:this.result((r[0]?-700:0)+-200+-1100,r,t)}result(t,e,n){let r=[t-n.length],s=1;for(let o of e){let l=o+(this.astral?(0,i.nZ)((0,i.gm)(n,o)):1);s>1&&r[s-1]==o?r[s-1]=l:(r[s++]=o,r[s++]=l)}return r}}let y=i.r$.define({combine:t=>(0,i.BO)(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:(t,e)=>t.label.localeCompare(e.label),interactionDelay:75},{defaultKeymap:(t,e)=>t&&e,closeOnBlur:(t,e)=>t&&e,icons:(t,e)=>t&&e,tooltipClass:(t,e)=>n=>v(t(n),e(n)),optionClass:(t,e)=>n=>v(t(n),e(n)),addToOptions:(t,e)=>t.concat(e)})});function v(t,e){return t?e?t+" "+e:t:e}function b(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class O{constructor(t,e){let n;this.view=t,this.stateField=e,this.info=null,this.placeInfo={read:()=>this.measureInfo(),write:t=>this.positionInfo(t),key:this},this.space=null,this.currentClass="";let i=t.state.field(e),{options:r,selected:s}=i.open,o=t.state.facet(y);this.optionContent=(n=o.addToOptions.slice(),o.icons&&n.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map(t=>"cm-completionIcon-"+t)),e.setAttribute("aria-hidden","true"),e},position:20}),n.push({render(t,e,n){let i=document.createElement("span");i.className="cm-completionLabel";let{label:r}=t,s=0;for(let o=1;os&&i.appendChild(document.createTextNode(r.slice(s,l)));let h=i.appendChild(document.createElement("span"));h.appendChild(document.createTextNode(r.slice(l,a))),h.className="cm-completionMatchedText",s=a}return st.position-e.position).map(t=>t.render)),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=b(r.length,s,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",e=>{for(let n=e.target,i;n&&n!=this.dom;n=n.parentNode)if("LI"==n.nodeName&&(i=/-(\d+)$/.exec(n.id))&&+i[1]{this.info&&this.view.requestMeasure(this.placeInfo)})}mount(){this.updateSel()}update(t){var e,n,i;let r=t.state.field(this.stateField),s=t.startState.field(this.stateField);this.updateTooltipClass(t.state),r!=s&&(this.updateSel(),(null===(e=r.open)||void 0===e?void 0:e.disabled)!=(null===(n=s.open)||void 0===n?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(null===(i=r.open)||void 0===i?void 0:i.disabled)))}updateTooltipClass(t){let e=this.tooltipClass(t);if(e!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let i of e.split(" "))i&&this.dom.classList.add(i);this.currentClass=e}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfo)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected>-1&&e.selected=this.range.to)&&(this.range=b(e.options.length,e.selected,this.view.state.facet(y).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e.options,t.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfo)})),this.updateSelectedOption(e.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:n}=e.options[e.selected],{info:i}=n;if(!i)return;let s="string"==typeof i?document.createTextNode(i):i(n);if(!s)return;"then"in s?s.then(e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e)}).catch(t=>(0,r.OO)(this.view.state,t,"completion info")):this.addInfoPane(s)}}addInfoPane(t){let e=this.info=document.createElement("div");e.className="cm-tooltip cm-completionInfo",e.appendChild(t),this.dom.appendChild(e),this.view.requestMeasure(this.placeInfo)}updateSelectedOption(t){var e,n;let i,r,s=null;for(let o=this.list.firstChild,l=this.range.from;o;o=o.nextSibling,l++)l==t?o.hasAttribute("aria-selected")||(o.setAttribute("aria-selected","true"),s=o):o.hasAttribute("aria-selected")&&o.removeAttribute("aria-selected");return s&&(e=this.list,n=s,i=e.getBoundingClientRect(),(r=n.getBoundingClientRect()).topi.bottom&&(e.scrollTop+=r.bottom-i.bottom)),s}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),i=t.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.defaultView||window;s={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}if(i.top>Math.min(s.bottom,e.bottom)-10||i.bottom=n.height||m>e.top?u=i.bottom-e.top+"px":f=e.bottom-i.top+"px"}return{top:u,bottom:f,maxWidth:c,class:h?l?"left-narrow":"right-narrow":a?"left":"right"}}positionInfo(t){this.info&&(t?(this.info.style.top=t.top,this.info.style.bottom=t.bottom,this.info.style.maxWidth=t.maxWidth,this.info.className="cm-tooltip cm-completionInfo cm-completionInfo-"+t.class):this.info.style.top="-1e6px")}createListBox(t,e,n){let i=document.createElement("ul");i.id=e,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions"));for(let r=n.from;r=this.options.length?this:new w(this.options,C(e,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,e,n,i,r){let s=function(t,e){let n=[],i=0;for(let r of t)if(r.hasResult()){if(!1===r.result.filter){let s=r.result.getMatch;for(let o of r.result.options){let l=[1e9-i++];if(s)for(let a of s(o))l.push(a);n.push(new c(o,r,l))}}else{let h=new k(e.sliceDoc(r.from,r.to)),u;for(let f of r.result.options)(u=h.match(f.label))&&(null!=f.boost&&(u[0]+=f.boost),n.push(new c(f,r,u)))}}let d=[],p=null,m=e.facet(y).compareCompletions;for(let g of n.sort((t,e)=>e.match[0]-t.match[0]||m(t.completion,e.completion)))p&&p.label==g.completion.label&&p.detail==g.completion.detail&&(null==p.type||null==g.completion.type||p.type==g.completion.type)&&p.apply==g.completion.apply?x(g.completion)>x(p)&&(d[d.length-1]=g):d.push(g),p=g.completion;return d}(t,e);if(!s.length)return i&&t.some(t=>1==t.state)?new w(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let o=e.facet(y).selectOnOpen?0:-1;if(i&&i.selected!=o&&-1!=i.selected){let l=i.options[i.selected].completion;for(let a=0;ae.hasResult()?Math.min(t,e.from):t,1e8),create:t=>new O(t,N),above:r.aboveCursor},i?i.timestamp:Date.now(),o,!1)}map(t){return new w(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class S{constructor(t,e,n){this.active=t,this.id=e,this.open=n}static start(){return new S(A,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,n=e.facet(y),i=(n.override||e.languageDataAt("autocomplete",u(e)).map(g)).map(e=>(this.active.find(t=>t.source==e)||new T(e,this.active.some(t=>0!=t.state)?1:0)).update(t,n));i.length==this.active.length&&i.every((t,e)=>t==this.active[e])&&(i=this.active);let r=this.open;for(let s of(r&&t.docChanged&&(r=r.map(t.changes)),t.selection||i.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!function(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n1==t.state)&&(r=null),!r&&i.every(t=>1!=t.state)&&i.some(t=>t.hasResult())&&(i=i.map(t=>t.hasResult()?new T(t.source,0):t)),t.effects))s.is($)&&(r=r&&r.setSelected(s.value,this.id));return i==this.active&&r==this.open?this:new S(i,this.id,r)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:P}}let P={"aria-autocomplete":"list"};function C(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}let A=[];function Q(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class T{constructor(t,e,n=-1){this.source=t,this.state=e,this.explicitPos=n}hasResult(){return!1}update(t,e){let n=Q(t),i=this;for(let r of(n?i=i.handleUserEvent(t,n,e):t.docChanged?i=i.handleChange(t):t.selection&&0!=i.state&&(i=new T(i.source,0)),t.effects))if(r.is(D))i=new T(i.source,1,r.value?u(t.state):-1);else if(r.is(R))i=new T(i.source,0);else if(r.is(M))for(let s of r.value)s.source==i.source&&(i=s);return i}handleUserEvent(t,e,n){return"delete"!=e&&n.activateOnTyping?new T(this.source,1):this.map(t.changes)}handleChange(t){return t.changes.touchesRange(u(t.startState))?new T(this.source,0):this.map(t.changes)}map(t){return t.empty||this.explicitPos<0?this:new T(this.source,this.state,t.mapPos(this.explicitPos))}}class I extends T{constructor(t,e,n,i,r){super(t,2,e),this.result=n,this.from=i,this.to=r}hasResult(){return!0}handleUserEvent(t,e,n){var i;let r=t.changes.mapPos(this.from),s=t.changes.mapPos(this.to,1),l=u(t.state);if((this.explicitPos<0?l<=r:ls||"delete"==e&&u(t.startState)==this.from)return new T(this.source,"input"==e&&n.activateOnTyping?1:0);let a=this.explicitPos<0?-1:t.changes.mapPos(this.explicitPos),h;return!function(t,e,n,i){if(!t)return!1;let r=e.sliceDoc(n,i);return"function"==typeof t?t(r,n,i,e):f(t,!0).test(r)}(this.result.validFor,t.state,r,s)?this.result.update&&(h=this.result.update(this.result,r,s,new o(t.state,l,a>=0)))?new I(this.source,a,h,h.from,null!==(i=h.to)&&void 0!==i?i:u(t.state)):new T(this.source,1,a):new I(this.source,a,this.result,r,s)}handleChange(t){return t.changes.touchesRange(this.from,this.to)?new T(this.source,0):this.map(t.changes)}map(t){return t.empty?this:new I(this.source,this.explicitPos<0?-1:t.mapPos(this.explicitPos),this.result,t.mapPos(this.from),t.mapPos(this.to,1))}}let D=i.Py.define(),R=i.Py.define(),M=i.Py.define({map:(t,e)=>t.map(t=>t.map(e))}),$=i.Py.define(),N=i.QQ.define({create:()=>S.start(),update:(t,e)=>t.update(e),provide:t=>[r.hJ.from(t,t=>t.tooltip),r.tk.contentAttributes.from(t,t=>t.attrs)]});function E(t,e="option"){return n=>{let i=n.state.field(N,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+s*(t?1:-1):t?0:l-1;return a<0?a="page"==e?0:l-1:a>=l&&(a="page"==e?l-1:0),n.dispatch({effects:$.of(a)}),!0}}let z=t=>{let e=t.state.field(N,!1);return!(t.state.readOnly||!e||!e.open||e.open.selected<0||Date.now()-e.open.timestamp!!t.state.field(N,!1)&&(t.dispatch({effects:D.of(!0)}),!0),W=t=>{let e=t.state.field(N,!1);return!!(e&&e.active.some(t=>0!=t.state))&&(t.dispatch({effects:R.of(null)}),!0)};class J{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}let L=r.lg.fromClass(class{constructor(t){for(let e of(this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0,t.state.field(N).active))1==e.state&&this.startQuery(e)}update(t){let e=t.state.field(N);if(!t.selectionSet&&!t.docChanged&&t.startState.field(N)==e)return;let n=t.transactions.some(t=>(t.selection||t.docChanged)&&!Q(t));for(let i=0;i50&&Date.now()-s.time>1e3){for(let o of s.context.abortListeners)try{o()}catch(l){(0,r.OO)(this.view.state,l)}s.context.abortListeners=null,this.running.splice(i--,1)}else s.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(t=>1==t.state&&!this.running.some(e=>e.active.source==t.source))?setTimeout(()=>this.startUpdate(),50):-1,0!=this.composing)for(let a of t.transactions)"input"==Q(a)?this.composing=2:2==this.composing&&a.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view;for(let e of t.field(N).active)1!=e.state||this.running.some(t=>t.active.source==e.source)||this.startQuery(e)}startQuery(t){let{state:e}=this.view,n=u(e),i=new o(e,n,t.explicitPos==n),s=new J(t,i);this.running.push(s),Promise.resolve(t.source(i)).then(t=>{s.context.aborted||(s.done=t||null,this.scheduleAccept())},t=>{this.view.dispatch({effects:R.of(null)}),(0,r.OO)(this.view.state,t)})}scheduleAccept(){this.running.every(t=>void 0!==t.done)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),50))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(y);for(let i=0;it.source==r.active.source);if(l&&1==l.state){if(null==r.done){let a=new T(r.active.source,0);for(let h of r.updates)a=a.update(h,n);1!=a.state&&e.push(a)}else this.startQuery(l)}}e.length&&this.view.dispatch({effects:M.of(e)})}},{eventHandlers:{blur(){let t=this.view.state.field(N,!1);t&&t.tooltip&&this.view.state.facet(y).closeOnBlur&&this.view.dispatch({effects:R.of(null)})},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:D.of(!1)}),20),this.composing=0}}}),j=r.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":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&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"}}});class F{constructor(t,e,n,i){this.field=t,this.line=e,this.from=n,this.to=i}}class _{constructor(t,e,n){this.field=t,this.from=e,this.to=n}map(t){let e=t.mapPos(this.from,-1,i.gc.TrackDel),n=t.mapPos(this.to,1,i.gc.TrackDel);return null==e||null==n?null:new _(this.field,e,n)}}class U{constructor(t,e){this.lines=t,this.fieldPositions=e}instantiate(t,e){let n=[],i=[e],r=t.doc.lineAt(e),o=/^\s*/.exec(r.text)[0];for(let l of this.lines){if(n.length){let a=o,h=/^\t*/.exec(l)[0].length;for(let c=0;cnew _(t.field,i[t.line]+t.from,i[t.line]+t.to));return{text:n,ranges:u}}static parse(t){let e=[],n=[],i=[],r;for(let s of t.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(s);){let o=r[1]?+r[1]:null,l=r[2]||r[3]||"",a=-1;for(let h=0;h=a&&u.field++}i.push(new F(a,n.length,r.index,r.index+l.length)),s=s.slice(0,r.index)+l+s.slice(r.index+r[0].length)}for(let f;f=/\\([{}])/.exec(s);)for(let d of(s=s.slice(0,f.index)+f[1]+s.slice(f.index+f[0].length),i))d.line==n.length&&d.from>f.index&&(d.from--,d.to--);n.push(s)}return new U(n,i)}}let X=r.p.widget({widget:new class extends r.l9{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),q=r.p.mark({class:"cm-snippetField"});class V{constructor(t,e){this.ranges=t,this.active=e,this.deco=r.p.set(t.map(t=>(t.from==t.to?X:q).range(t.from,t.to)))}map(t){let e=[];for(let n of this.ranges){let i=n.map(t);if(!i)return null;e.push(i)}return new V(e,this.active)}selectionInsideField(t){return t.ranges.every(t=>this.ranges.some(e=>e.field==this.active&&e.from<=t.from&&e.to>=t.to))}}let G=i.Py.define({map:(t,e)=>t&&t.map(e)}),Z=i.Py.define(),Y=i.QQ.define({create:()=>null,update(t,e){for(let n of e.effects){if(n.is(G))return n.value;if(n.is(Z)&&t)return new V(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>r.tk.decorations.from(t,t=>t?t.deco:r.p.none)});function K(t,e){return i.jT.create(t.filter(t=>t.field==e).map(t=>i.jT.range(t.from,t.to)))}function H(t){return({state:e,dispatch:n})=>{let i=e.field(Y,!1);if(!i||t<0&&0==i.active)return!1;let r=i.active+t,s=t>0&&!i.ranges.some(e=>e.field==r+t);return n(e.update({selection:K(i.ranges,r),effects:G.of(s?null:new V(i.ranges,r))})),!0}}let tt=({state:t,dispatch:e})=>!!t.field(Y,!1)&&(e(t.update({effects:G.of(null)})),!0),te=H(1),tn=H(-1),ti=[{key:"Tab",run:te,shift:tn},{key:"Escape",run:tt}],tr=i.r$.define({combine:t=>t.length?t[0]:ti}),ts=i.Wl.highest(r.$f.compute([tr],t=>t.facet(tr)));function to(t,e){let n;return Object.assign(Object.assign({},e),{apply:(n=U.parse(t),(t,e,r,s)=>{let{text:o,ranges:l}=n.instantiate(t.state,r),a={changes:{from:r,to:s,insert:i.xv.of(o)},scrollIntoView:!0};if(l.length&&(a.selection=K(l,0)),l.length>1){let h=new V(l,0),c=a.effects=[G.of(h)];void 0===t.state.field(Y,!1)&&c.push(i.Py.appendConfig.of([Y,ts,tl,j]))}t.dispatch(t.state.update(a))})})}let tl=r.tk.domEventHandlers({mousedown(t,e){let n=e.state.field(Y,!1),i;if(!n||null==(i=e.posAtCoords({x:t.clientX,y:t.clientY})))return!1;let r=n.ranges.find(t=>t.from<=i&&t.to>=i);return!!r&&r.field!=n.active&&(e.dispatch({selection:K(n.ranges,r.field),effects:G.of(n.ranges.some(t=>t.field>r.field)?new V(n.ranges,r.field):null)}),!0)}}),ta={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},th=i.Py.define({map(t,e){let n=e.mapPos(t,-1,i.gc.TrackAfter);return null==n?void 0:n}}),tc=i.Py.define({map:(t,e)=>e.mapPos(t)}),tu=new class extends i.uU{};tu.startSide=1,tu.endSide=-1;let tf=i.QQ.define({create:()=>i.Xs.empty,update(t,e){if(e.selection){let n=e.state.doc.lineAt(e.selection.main.head).from,r=e.startState.doc.lineAt(e.startState.selection.main.head).from;n!=e.changes.mapPos(r,-1)&&(t=i.Xs.empty)}for(let s of(t=t.map(e.changes),e.effects))s.is(th)?t=t.update({add:[tu.range(s.value,s.value+1)]}):s.is(tc)&&(t=t.update({filter:t=>t!=s.value}));return t}});function td(){return[ty,tf]}let tp="()[]{}<>";function tm(t){for(let e=0;e{if((tk?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let o=t.state.selection.main;if(r.length>2||2==r.length&&1==(0,i.nZ)((0,i.gm)(r,0))||e!=o.from||n!=o.to)return!1;let l=function(t,e){let n=tg(t,t.selection.main.head),r=n.brackets||ta.brackets;for(let o of r){let l=tm((0,i.gm)(o,0));if(e==o)return l==o?function(t,e,n,r){let o=r.stringPrefixes||ta.stringPrefixes,l=null,a=t.changeByRange(r=>{if(!r.empty)return{changes:[{insert:e,from:r.from},{insert:e,from:r.to}],effects:th.of(r.to+e.length),range:i.jT.range(r.anchor+e.length,r.head+e.length)};let a=r.head,h=tx(t.doc,a),c;if(h==e){if(tw(t,a))return{changes:{insert:e+e,from:a},effects:th.of(a+e.length),range:i.jT.cursor(a+e.length)};if(tO(t,a)){let u=n&&t.sliceDoc(a,a+3*e.length)==e+e+e;return{range:i.jT.cursor(a+e.length*(u?3:1)),effects:tc.of(a)}}}else if(n&&t.sliceDoc(a-2*e.length,a)==e+e&&(c=tS(t,a-2*e.length,o))>-1&&tw(t,c))return{changes:{insert:e+e+e+e,from:a},effects:th.of(a+e.length),range:i.jT.cursor(a+e.length)};else if(t.charCategorizer(a)(h)!=i.D0.Word&&tS(t,a,o)>-1&&!function(t,e,n,i){let r=(0,s.qz)(t).resolveInner(e,-1),o=i.reduce((t,e)=>Math.max(t,e.length),0);for(let l=0;l<5;l++){let a=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+o)),h=a.indexOf(n);if(!h||h>-1&&i.indexOf(a.slice(0,h))>-1){let c=r.firstChild;for(;c&&c.from==r.from&&c.to-c.from>n.length+h;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=r.to==e&&r.parent;if(!u)break;r=u}return!1}(t,a,e,o))return{changes:{insert:e+e,from:a},effects:th.of(a+e.length),range:i.jT.cursor(a+e.length)};return{range:l=r}});return l?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}(t,o,r.indexOf(o+o+o)>-1,n):function(t,e,n,r){let s=null,o=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:th.of(o.to+e.length),range:i.jT.range(o.anchor+e.length,o.head+e.length)};let l=tx(t.doc,o.head);return!l||/\s/.test(l)||r.indexOf(l)>-1?{changes:{insert:e+n,from:o.head},effects:th.of(o.head+e.length),range:i.jT.cursor(o.head+e.length)}:{range:s=o}});return s?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}(t,o,l,n.before||ta.before);if(e==l&&tO(t,t.selection.main.from))return function(t,e,n){let r=null,s=t.selection.ranges.map(e=>e.empty&&tx(t.doc,e.head)==n?i.jT.cursor(e.head+n.length):r=e);return r?null:t.update({selection:i.jT.create(s,t.selection.mainIndex),scrollIntoView:!0,effects:t.selection.ranges.map(({from:t})=>tc.of(t))})}(t,0,l)}return null}(t.state,r);return!!l&&(t.dispatch(l),!0)}),tv=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=tg(t,t.selection.main.head).brackets||ta.brackets,r=null,s=t.changeByRange(e=>{if(e.empty){var s,o;let l;let a=(s=t.doc,o=e.head,l=s.sliceString(o-2,o),(0,i.nZ)((0,i.gm)(l,0))==l.length?l:l.slice(1));for(let h of n)if(h==a&&tx(t.doc,e.head)==tm((0,i.gm)(h,0)))return{changes:{from:e.head-h.length,to:e.head+h.length},range:i.jT.cursor(e.head-h.length)}}return{range:r=e}});return r||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},tb=[{key:"Backspace",run:tv}];function tO(t,e){let n=!1;return t.field(tf).between(0,t.doc.length,t=>{t==e&&(n=!0)}),n}function tx(t,e){let n=t.sliceString(e,e+2);return n.slice(0,(0,i.nZ)((0,i.gm)(n,0)))}function tw(t,e){let n=(0,s.qz)(t).resolveInner(e+1);return n.parent&&n.from==e}function tS(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=i.D0.Word)return e;for(let s of n){let o=e-s.length;if(t.sliceDoc(o,e)==s&&r(t.sliceDoc(o-1,o))!=i.D0.Word)return o}return -1}function tP(t={}){return[N,y.of(t),L,tA,j]}let tC=[{key:"Ctrl-Space",run:B},{key:"Escape",run:W},{key:"ArrowDown",run:E(!0)},{key:"ArrowUp",run:E(!1)},{key:"PageDown",run:E(!0,"page")},{key:"PageUp",run:E(!1,"page")},{key:"Enter",run:z}],tA=i.Wl.highest(r.$f.computeN([y],t=>t.facet(y).defaultKeymap?[tC]:[]))},61426:function(t,e,n){n.r(e),n.d(e,{css:function(){return S},cssCompletionSource:function(){return x},cssLanguage:function(){return w}});var i=n(53105),r=n(35524);let s=[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 o(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}let l=new i.Jq((t,e)=>{for(let n=!1,i=0,r=0;;r++){var s;let{next:l}=t;if(o(l)||45==l||95==l||n&&(s=l)>=48&&s<=57)!n&&(45!=l||r>0)&&(n=!0),i===r&&45==l&&i++,t.advance();else{n&&t.acceptToken(40==l?95:2==i&&e.canShift(2)?2:96);break}}}),a=new i.Jq(t=>{if(s.includes(t.peek(-1))){let{next:e}=t;(o(e)||95==e||35==e||46==e||91==e||58==e||45==e)&&t.acceptToken(94)}}),h=new i.Jq(t=>{if(!s.includes(t.peek(-1))){let{next:e}=t;if(37==e&&(t.advance(),t.acceptToken(1)),o(e)){do t.advance();while(o(t.next));t.acceptToken(1)}}}),c=(0,r.Gv)({"AtKeyword import charset namespace keyframes media supports":r.pJ.definitionKeyword,"from to selector":r.pJ.keyword,NamespaceName:r.pJ.namespace,KeyframeName:r.pJ.labelName,TagName:r.pJ.tagName,ClassName:r.pJ.className,PseudoClassName:r.pJ.constant(r.pJ.className),IdName:r.pJ.labelName,"FeatureName PropertyName":r.pJ.propertyName,AttributeName:r.pJ.attributeName,NumberLiteral:r.pJ.number,KeywordQuery:r.pJ.keyword,UnaryQueryOp:r.pJ.operatorKeyword,"CallTag ValueName":r.pJ.atom,VariableName:r.pJ.variableName,Callee:r.pJ.operatorKeyword,Unit:r.pJ.unit,"UniversalSelector NestingSelector":r.pJ.definitionOperator,MatchOp:r.pJ.compareOperator,"ChildOp SiblingOp, LogicOp":r.pJ.logicOperator,BinOp:r.pJ.arithmeticOperator,Important:r.pJ.modifier,Comment:r.pJ.blockComment,ParenthesizedContent:r.pJ.special(r.pJ.name),ColorLiteral:r.pJ.color,StringLiteral:r.pJ.string,":":r.pJ.punctuation,"PseudoOp #":r.pJ.derefOperator,"; ,":r.pJ.separator,"( )":r.pJ.paren,"[ ]":r.pJ.squareBracket,"{ }":r.pJ.brace}),u={__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},f={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},d={__proto__:null,not:128,only:128,from:158,to:160},p=i.WQ.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO.ZQ`O1G/ZO.tQXO1G/_O/[QXO1G/aO/rQXO1G/bO0YQWO,59zO0_Q[O'#DOO0fQdO'#CoOOQP1G/Z1G/ZO$vQdO1G/ZO0mQpO,59]OOQS,59_,59_O$vQdO,59aO0uQWO1G/kOOQS,59c,59cO0zQ!bO,59eO1SQWO'#DhO1_QWO,5:TO1dQWO,5:ZO&TQ[O,5:VO&TQ[O'#EZO1lQWO,5;VO1wQWO,5:XO'yQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2YQWO1G/|O2_QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2mQtO1G/gOOQO,5:t,5:tO3TQ[O,5:tOOQO-E8W-E8WO3bQWO1G0pOOQP7+$Y7+$YOOQP7+$u7+$uO$vQdO7+$uOOQS1G/f1G/fO3mQXO'#EiO3tQWO,59jO3yQtO'#EUO4nQdO'#EfO4xQWO,59ZO4}QpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5VQWO1G/PO$vQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5[QWO,5:uOOQO-E8X-E8XO5jQXO1G/vOOQS7+%h7+%hO5qQYO'#CsO(hQWO'#E[O5yQdO,5:hOOQS,5:h,5:hO6XQtO'#EXO$vQdO'#EXO7VQdO7+%ROOQO7+%R7+%ROOQO1G0`1G0`O7jQpO<T![;'S%^;'S;=`%o<%lO%^^;TUoWOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^^;nYoW#[UOy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^^[[oW#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^_?VSpVOy%^z;'S%^;'S;=`%o<%lO%^^?hWjSOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^_@VU#XPOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjSOy%^z{@}{;'S%^;'S;=`%o<%lO%^~ASUoWOy@}yzAfz{Bm{;'S@};'S;=`Co<%lO@}~AiTOzAfz{Ax{;'SAf;'S;=`Bg<%lOAf~A{VOzAfz{Ax{!PAf!P!QBb!Q;'SAf;'S;=`Bg<%lOAf~BgOR~~BjP;=`<%lAf~BrWoWOy@}yzAfz{Bm{!P@}!P!QC[!Q;'S@};'S;=`Co<%lO@}~CcSoWR~Oy%^z;'S%^;'S;=`%o<%lO%^~CrP;=`<%l@}^Cz[#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^XDuU]POy%^z![%^![!]EX!];'S%^;'S;=`%o<%lO%^XE`S^PoWOy%^z;'S%^;'S;=`%o<%lO%^_EqS!WVOy%^z;'S%^;'S;=`%o<%lO%^YFSSzQOy%^z;'S%^;'S;=`%o<%lO%^XFeU|POy%^z!`%^!`!aFw!a;'S%^;'S;=`%o<%lO%^XGOS|PoWOy%^z;'S%^;'S;=`%o<%lO%^XG_WOy%^z!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHO[!YPoWOy%^z}%^}!OGw!O!Q%^!Q![Gw![!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHySxPOy%^z;'S%^;'S;=`%o<%lO%^^I[SvUOy%^z;'S%^;'S;=`%o<%lO%^XIkUOy%^z#b%^#b#cI}#c;'S%^;'S;=`%o<%lO%^XJSUoWOy%^z#W%^#W#XJf#X;'S%^;'S;=`%o<%lO%^XJmS!`PoWOy%^z;'S%^;'S;=`%o<%lO%^XJ|UOy%^z#f%^#f#gJf#g;'S%^;'S;=`%o<%lO%^XKeS!RPOy%^z;'S%^;'S;=`%o<%lO%^_KvS!QVOy%^z;'S%^;'S;=`%o<%lO%^ZLXU!PPOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[a,h,l,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:t=>u[t]||-1},{term:56,get:t=>f[t]||-1},{term:96,get:t=>d[t]||-1}],tokenPrec:1123});var m=n(59119);let g=null;function k(){if(!g&&"object"==typeof document&&document.body){let t=[];for(let e in document.body.style)/[A-Z]|^-|^(item|length)$/.test(e)||t.push(e);g=t.sort().map(t=>({type:"property",label:t}))}return g||[]}let y=["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(t=>({type:"class",label:t})),v=["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(t=>({type:"keyword",label:t})).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(t=>({type:"constant",label:t}))),b=["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(t=>({type:"type",label:t})),O=/^[\w-]*/,x=t=>{let{state:e,pos:n}=t,i=(0,m.qz)(e).resolveInner(n,-1);if("PropertyName"==i.name)return{from:i.from,options:k(),validFor:O};if("ValueName"==i.name)return{from:i.from,options:v,validFor:O};if("PseudoClassName"==i.name)return{from:i.from,options:y,validFor:O};if("TagName"==i.name){for(let{parent:r}=i;r;r=r.parent)if("Block"==r.name)return{from:i.from,options:k(),validFor:O};return{from:i.from,options:b,validFor:O}}if(!t.explicit)return null;let s=i.resolve(n),o=s.childBefore(n);return o&&":"==o.name&&"PseudoClassSelector"==s.name?{from:n,options:y,validFor:O}:o&&":"==o.name&&"Declaration"==s.name||"ArgList"==s.name?{from:n,options:v,validFor:O}:"Block"==s.name?{from:n,options:k(),validFor:O}:null},w=m.qp.define({name:"css",parser:p.configure({props:[m.uj.add({Declaration:(0,m.tC)()}),m.x0.add({Block:m.Dv})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function S(){return new m.ri(w,w.data.of({autocomplete:x}))}},59119:function(t,e,n){n.d(e,{Be:function(){return k},Dv:function(){return F},Gn:function(){return D},K0:function(){return I},Qf:function(){return tf},R_:function(){return ty},SQ:function(){return u},SS:function(){return T},Um:function(){return tT},c:function(){return A},c6:function(){return P},e7:function(){return ti},il:function(){return tM},kU:function(){return c},mi:function(){return tc},n$:function(){return tA},nF:function(){return tg},nY:function(){return J},pp:function(){return h},qp:function(){return d},qz:function(){return p},ri:function(){return S},tC:function(){return W},uj:function(){return R},vw:function(){return E},x0:function(){return j},y1:function(){return Q},ze:function(){return B}});var i,r=n(41113),s=n(78120),o=n(47421),l=n(35524),a=n(28699);let h=new r.md;function c(t){return s.r$.define({combine:t?e=>e.concat(t):void 0})}class u{constructor(t,e,n=[],i=""){this.data=t,this.name=i,s.yy.prototype.hasOwnProperty("tree")||Object.defineProperty(s.yy.prototype,"tree",{get(){return p(this)}}),this.parser=e,this.extension=[w.of(this),s.yy.languageData.of((t,e,n)=>t.facet(f(t,e,n)))].concat(n)}isActiveAt(t,e,n=-1){return f(t,e,n)==this.data}findRegions(t){let e=t.facet(w);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let n=[],i=(t,e)=>{if(t.prop(h)==this.data){n.push({from:e,to:e+t.length});return}let s=t.prop(r.md.mounted);if(s){if(s.tree.prop(h)==this.data){if(s.overlay)for(let o of s.overlay)n.push({from:o.from+e,to:o.to+e});else n.push({from:e,to:e+t.length});return}if(s.overlay){let l=n.length;if(i(s.tree,s.overlay[0].from+e),n.length>l)return}}for(let a=0;at.isTop?e:void 0)]}),t.name)}configure(t,e){return new d(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function p(t){let e=t.field(u.state,!1);return e?e.tree:r.mp.empty}class m{constructor(t,e=t.length){this.doc=t,this.length=e,this.cursorPos=0,this.string="",this.cursor=t.iter()}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let n=this.cursorPos-this.string.length;return t=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-n,e-n)}}let g=null;class k{constructor(t,e,n=[],i,r,s,o,l){this.parser=t,this.state=e,this.fragments=n,this.tree=i,this.treeLen=r,this.viewport=s,this.skipped=o,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(t,e,n){return new k(t,e,[],r.mp.empty,0,n,[],null)}startParse(){return this.parser.startParse(new m(this.state.doc),this.fragments)}work(t,e){return(null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=r.mp.empty&&this.isDone(null!=e?e:this.state.doc.length))?(this.takeTree(),!0):this.withContext(()=>{var n;if("number"==typeof t){let i=Date.now()+t;t=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(e=this.parse.advance()););}),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(r.i9.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=g;g=this;try{return t()}finally{g=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=y(t,e.from,e.to);return t}changes(t,e){let{fragments:n,tree:i,treeLen:s,viewport:o,skipped:l}=this;if(this.takeTree(),!t.empty){let a=[];if(t.iterChangedRanges((t,e,n,i)=>a.push({fromA:t,toA:e,fromB:n,toB:i})),n=r.i9.applyChanges(n,a),i=r.mp.empty,s=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length)for(let h of(l=[],this.skipped)){let c=t.mapPos(h.from,1),u=t.mapPos(h.to,-1);ct.from&&(this.fragments=y(this.fragments,i,r),this.skipped.splice(n--,1))}return!(this.skipped.length>=e)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends r._b{createParse(e,n,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let e=g;if(e){for(let n of i)e.tempSkipped.push(n);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=o,new r.mp(r.Jq.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return g}}function y(t,e,n){return r.i9.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class v{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),n=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,n)||e.takeTree(),new v(e)}static init(t){let e=Math.min(3e3,t.doc.length),n=k.create(t.facet(w).parser,t,{from:0,to:e});return n.work(20,e)||n.takeTree(),new v(n)}}u.state=s.QQ.define({create:v.init,update(t,e){for(let n of e.effects)if(n.is(u.setState))return n.value;return e.startState.facet(w)!=e.state.facet(w)?v.init(e.state):t.apply(e)}});let b=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(b=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});let O="undefined"!=typeof navigator&&(null===(i=navigator.scheduling)||void 0===i?void 0:i.isInputPending)?()=>navigator.scheduling.isInputPending():null,x=o.lg.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(u.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),t.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(u.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=b(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEndi+1e3,l=r.context.work(()=>O&&O()||Date.now()>s,i+(o?0:1e5));this.chunkBudget-=Date.now()-e,(l||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:u.setState.of(new v(r.context))})),this.chunkBudget>0&&!(l&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(t=>(0,o.OO)(this.view.state,t)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),w=s.r$.define({combine:t=>t.length?t[0]:null,enables:t=>[u.state,x,o.tk.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class S{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}class P{constructor(t,e,n,i,r,s){this.name=t,this.alias=e,this.extensions=n,this.filename=i,this.loadFunc=r,this.support=s,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(t=>this.support=t,t=>{throw this.loading=null,t}))}static of(t){let{load:e,support:n}=t;if(!e){if(!n)throw RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");e=()=>Promise.resolve(n)}return new P(t.name,(t.alias||[]).concat(t.name).map(t=>t.toLowerCase()),t.extensions||[],t.filename,e,n)}static matchFilename(t,e){for(let n of t)if(n.filename&&n.filename.test(e))return n;let i=/\.([^.]+)$/.exec(e);if(i){for(let r of t)if(r.extensions.indexOf(i[1])>-1)return r}return null}static matchLanguageName(t,e,n=!0){for(let i of(e=e.toLowerCase(),t))if(i.alias.some(t=>t==e))return i;if(n)for(let r of t)for(let s of r.alias){let o=e.indexOf(s);if(o>-1&&(s.length>2||!/\w/.test(e[o-1])&&!/\w/.test(e[o+s.length])))return r}return null}}let C=s.r$.define(),A=s.r$.define({combine:t=>{if(!t.length)return" ";if(!/^(?: +|\t+)$/.test(t[0]))throw Error("Invalid indent unit: "+JSON.stringify(t[0]));return t[0]}});function Q(t){let e=t.facet(A);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function T(t,e){let n="",i=t.tabSize;if(9==t.facet(A).charCodeAt(0))for(;e>=i;)n+=" ",e-=i;for(let r=0;r=n.from&&i<=n.to?r&&i==t?{text:"",from:t}:(e<0?i-1&&(r+=s-this.countColumn(n,n.search(/\S|$/))),r}countColumn(t,e=t.length){return(0,s.IS)(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:n,from:i}=this.lineAt(t,e),r=this.options.overrideIndentation;if(r){let s=r(i);if(s>-1)return s}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}let R=new r.md;function M(t,e,n){for(;t;t=t.parent){let i=function(t){let e=t.type.prop(R);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(r.md.closedBy))){let s=t.lastChild,o=s&&i.indexOf(s.name)>-1;return t=>z(t,!0,1,void 0,o&&!(t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak)?s.from:void 0)}return null==t.parent?$:null}(t);if(i)return i(N.create(n,e,t))}return null}function $(){return 0}class N extends D{constructor(t,e,n){super(t.state,t.options),this.base=t,this.pos=e,this.node=n}static create(t,e,n){return new N(t,e,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let t=this.state.doc.lineAt(this.node.from);for(;;){let e=this.node.resolve(t.from);for(;e.parent&&e.parent.from==e.from;)e=e.parent;if(function(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}(e,this.node))break;t=this.state.doc.lineAt(e.from)}return this.lineIndent(t.from)}continue(){let t=this.node.parent;return t?M(t,this.pos,this.base):0}}function E({closing:t,align:e=!0,units:n=1}){return i=>z(i,e,n,t)}function z(t,e,n,i,r){let s=t.textAfter,o=s.match(/^\s*/)[0].length,l=i&&s.slice(o,o+i.length)==i||r==t.pos+o,a=e?function(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),o=null==r||r<=s.from?s.to:Math.min(s.to,r);for(let l=n.to;;){let a=e.childAfter(l);if(!a||a==i)return null;if(!a.type.isSkipped)return a.fromt.baseIndent;function W({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}function J(){return s.yy.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+200)return t;let s=n.sliceString(r.from,i);if(!e.some(t=>t.test(s)))return t;let{state:o}=t,l=-1,a=[];for(let{head:h}of o.selection.ranges){let c=o.doc.lineAt(h);if(c.from==l)continue;l=c.from;let u=I(o,c.from);if(null==u)continue;let f=/^\s*/.exec(c.text)[0],d=T(o,u);f!=d&&a.push({from:c.from,to:c.from+f.length,insert:d})}return a.length?[t,{changes:a,sequential:!0}]:t})}let L=s.r$.define(),j=new r.md;function F(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(s&&o.from=e&&a.to>n&&(s=a)}}return s}(t,e,n)}function U(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}let X=s.Py.define({map:U}),q=s.Py.define({map:U});function V(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(t=>t.from<=n&&t.to>=n)||e.push(t.lineBlockAt(n));return e}let G=s.QQ.define({create:()=>o.p.none,update(t,e){for(let n of(t=t.map(e.changes),e.effects))n.is(X)&&!function(t,e,n){let i=!1;return t.between(e,e,(t,r)=>{t==e&&r==n&&(i=!0)}),i}(t,n.value.from,n.value.to)?t=t.update({add:[tl.range(n.value.from,n.value.to)]}):n.is(q)&&(t=t.update({filter:(t,e)=>n.value.from!=t||n.value.to!=e,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let i=!1,{head:r}=e.selection.main;t.between(r,r,(t,e)=>{tr&&(i=!0)}),i&&(t=t.update({filterFrom:r,filterTo:r,filter:(t,e)=>e<=r||t>=r}))}return t},provide:t=>o.tk.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(t,e)=>{n.push(t,e)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{(!r||r.from>t)&&(r={from:t,to:e})}),r}function Y(t,e){return t.field(G,!1)?e:e.concat(s.Py.appendConfig.of(to()))}let K=t=>{for(let e of V(t)){let n=_(t.state,e.from,e.to);if(n)return t.dispatch({effects:Y(t.state,[X.of(n),tt(t,n)])}),!0}return!1},H=t=>{if(!t.state.field(G,!1))return!1;let e=[];for(let n of V(t)){let i=Z(t.state,n.from,n.to);i&&e.push(q.of(i),tt(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function tt(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return o.tk.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}let te=t=>{let{state:e}=t,n=[];for(let i=0;i{let e=t.state.field(G,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(t,e)=>{n.push(q.of({from:t,to:e}))}),t.dispatch({effects:n}),!0},ti=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:K},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:H},{key:"Ctrl-Alt-[",run:te},{key:"Ctrl-Alt-]",run:tn}],tr={placeholderDOM:null,placeholderText:"…"},ts=s.r$.define({combine:t=>(0,s.BO)(t,tr)});function to(t){let e=[G,tu];return t&&e.push(ts.of(t)),e}let tl=o.p.replace({widget:new class extends o.l9{toDOM(t){let{state:e}=t,n=e.facet(ts),i=e=>{let n=t.lineBlockAt(t.posAtDOM(e.target)),i=Z(t.state,n.from,n.to);i&&t.dispatch({effects:q.of(i)}),e.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(t,i);let r=document.createElement("span");return r.textContent=n.placeholderText,r.setAttribute("aria-label",e.phrase("folded code")),r.title=e.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=i,r}}}),ta={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class th extends o.SJ{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function tc(t={}){let e=Object.assign(Object.assign({},ta),t),n=new th(e,!0),i=new th(e,!1),r=o.lg.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(w)!=t.state.facet(w)||t.startState.field(G,!1)!=t.state.field(G,!1)||p(t.startState)!=p(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new s.f_;for(let r of t.viewportLineBlocks){let o=Z(t.state,r.from,r.to)?i:_(t.state,r.from,r.to)?n:null;o&&e.add(r.from,r.from,o)}return e.finish()}}),{domEventHandlers:l}=e;return[r,(0,o.v5)({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(r))||void 0===e?void 0:e.markers)||s.Xs.empty},initialSpacer:()=>new th(e,!1),domEventHandlers:Object.assign(Object.assign({},l),{click:(t,e,n)=>{if(l.click&&l.click(t,e,n))return!0;let i=Z(t.state,e.from,e.to);if(i)return t.dispatch({effects:q.of(i)}),!0;let r=_(t.state,e.from,e.to);return!!r&&(t.dispatch({effects:X.of(r)}),!0)}})}),to()]}let tu=o.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"}});class tf{constructor(t,e){let n;function i(t){let e=a.V.newName();return(n||(n=Object.create(null)))["."+e]=t,e}this.specs=t;let r="string"==typeof e.all?e.all:e.all?i(e.all):void 0,s=e.scope;this.scope=s instanceof u?t=>t.prop(h)==s.data:s?t=>t==s:void 0,this.style=(0,l.QR)(t.map(t=>({tag:t.tag,class:t.class||i(Object.assign({},t,{tag:null}))})),{all:r}).style,this.module=n?new a.V(n):null,this.themeType=e.themeType}static define(t,e){return new tf(t,e||{})}}let td=s.r$.define(),tp=s.r$.define({combine:t=>t.length?[t[0]]:null});function tm(t){let e=t.facet(td);return e.length?e:t.facet(tp)}function tg(t,e){let n=[tk],i;return t instanceof tf&&(t.module&&n.push(o.tk.styleModule.of(t.module)),i=t.themeType),(null==e?void 0:e.fallback)?n.push(tp.of(t)):i?n.push(td.computeN([o.tk.darkTheme],e=>e.facet(o.tk.darkTheme)==("dark"==i)?[t]:[])):n.push(td.of(t)),n}let tk=s.Wl.high(o.lg.fromClass(class{constructor(t){this.markCache=Object.create(null),this.tree=p(t.state),this.decorations=this.buildDeco(t,tm(t.state))}update(t){let e=p(t.state),n=tm(t.state),i=n!=tm(t.startState);e.length{n.add(t,e,this.markCache[i]||(this.markCache[i]=o.p.mark({class:i})))},i,r);return n.finish()}},{decorations:t=>t.decorations})),ty=tf.define([{tag:l.pJ.meta,color:"#404740"},{tag:l.pJ.link,textDecoration:"underline"},{tag:l.pJ.heading,textDecoration:"underline",fontWeight:"bold"},{tag:l.pJ.emphasis,fontStyle:"italic"},{tag:l.pJ.strong,fontWeight:"bold"},{tag:l.pJ.strikethrough,textDecoration:"line-through"},{tag:l.pJ.keyword,color:"#708"},{tag:[l.pJ.atom,l.pJ.bool,l.pJ.url,l.pJ.contentSeparator,l.pJ.labelName],color:"#219"},{tag:[l.pJ.literal,l.pJ.inserted],color:"#164"},{tag:[l.pJ.string,l.pJ.deleted],color:"#a11"},{tag:[l.pJ.regexp,l.pJ.escape,l.pJ.special(l.pJ.string)],color:"#e40"},{tag:l.pJ.definition(l.pJ.variableName),color:"#00f"},{tag:l.pJ.local(l.pJ.variableName),color:"#30a"},{tag:[l.pJ.typeName,l.pJ.namespace],color:"#085"},{tag:l.pJ.className,color:"#167"},{tag:[l.pJ.special(l.pJ.variableName),l.pJ.macroName],color:"#256"},{tag:l.pJ.definition(l.pJ.propertyName),color:"#00c"},{tag:l.pJ.comment,color:"#940"},{tag:l.pJ.invalid,color:"#f00"}]),tv=o.tk.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),tb="()[]{}",tO=s.r$.define({combine:t=>(0,s.BO)(t,{afterCursor:!0,brackets:tb,maxScanDistance:1e4,renderMatch:tS})}),tx=o.p.mark({class:"cm-matchingBracket"}),tw=o.p.mark({class:"cm-nonmatchingBracket"});function tS(t){let e=[],n=t.matched?tx:tw;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}let tP=s.QQ.define({create:()=>o.p.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(tO);for(let r of e.state.selection.ranges){if(!r.empty)continue;let s=tT(e.state,r.head,-1,i)||r.head>0&&tT(e.state,r.head-1,1,i)||i.afterCursor&&(tT(e.state,r.head,1,i)||r.heado.tk.decorations.from(t)}),tC=[tP,tv];function tA(t={}){return[tO.of(t),tC]}function tQ(t,e,n){let i=t.prop(e<0?r.md.openedBy:r.md.closedBy);if(i)return i;if(1==t.name.length){let s=n.indexOf(t.name);if(s>-1&&s%2==(e<0?1:0))return[n[s+e]]}return null}function tT(t,e,n,i={}){let r=i.maxScanDistance||1e4,s=i.brackets||tb,o=p(t),l=o.resolveInner(e,n);for(let a=l;a;a=a.parent){let h=tQ(a.type,n,s);if(h&&a.from=i.to){if(0==a&&r.indexOf(h.type.name)>-1&&h.from0)return null;let h={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),u=0;for(let f=0;!c.next().done&&f<=s;){let d=c.value;n<0&&(f+=d.length);let p=e+f*n;for(let m=n>0?0:d.length-1,g=n>0?d.length:-1;m!=g;m+=n){let k=o.indexOf(d[m]);if(!(k<0)&&i.resolveInner(p+m,1).type==r){if(k%2==0==n>0)u++;else{if(1==u)return{start:h,end:{from:p+m,to:p+m+1},matched:k>>1==a>>1};u--}}}n>0&&(f+=d.length)}return c.done?{start:h,matched:!1}:null}(t,e,n,o,l.type,r,s)}function tI(t,e,n,i=0,r=0){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);let s=r;for(let o=i;o=this.string.length}sol(){return 0==this.pos}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pose}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPosn?t.toLowerCase():t;return i(this.string.substr(this.pos,t.length))==i(t)?(!1!==e&&(this.pos+=t.length),!0):null}{let r=this.string.slice(this.pos).match(t);return r&&r.index>0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}}current(){return this.string.slice(this.start,this.pos)}}function tR(t){if("object"!=typeof t)return t;let e={};for(let n in t){let i=t[n];e[n]=i instanceof Array?i.slice():i}return e}class tM extends u{constructor(t){let e,n=c(t.languageData),i={name:t.name||"",token:t.token,blankLine:t.blankLine||(()=>{}),startState:t.startState||(()=>!0),copyState:t.copyState||tR,indent:t.indent||(()=>null),languageData:t.languageData||{},tokenTable:t.tokenTable||tz},s;super(n,new class extends r._b{createParse(t,e,n){return new tN(s,t,e,n)}},[C.of((t,e)=>this.getIndent(t,e))],t.name),this.topNode=(e=r.Jq.define({id:tB.length,name:"Document",props:[h.add(()=>n)]}),tB.push(e),e),s=this,this.streamParser=i,this.stateAfter=new r.md({perNode:!0}),this.tokenTable=t.tokenTable?new t_(i.tokenTable):tU}static define(t){return new tM(t)}getIndent(t,e){let n=p(t.state),i=n.resolve(e);for(;i&&i.type!=this.topNode;)i=i.parent;if(!i)return null;let r=t$(this,n,0,i.from,e),s,o;if(r?(o=r.state,s=r.pos+1):(o=this.streamParser.startState(t.unit),s=0),e-s>1e4)return null;for(;s=i&&n+e.length<=s&&e.prop(t.stateAfter);if(o)return{state:t.streamParser.copyState(o),pos:n+e.length};for(let l=e.children.length-1;l>=0;l--){let a=e.children[l],h=n+e.positions[l],c=a instanceof r.mp&&hn&&t$(t,s.tree,0-s.offset,n,l),h;if(a&&(h=function t(e,n,i,s,o){if(o&&i<=0&&s>=n.length)return n;o||n.type!=e.topNode||(o=!0);for(let l=n.children.length-1;l>=0;l--){let a=n.positions[l],h=n.children[l],c;if(a=e)?this.finish():t&&this.parsedPos>=t.viewport.to?(t.skipUntilInView(this.parsedPos,e),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let e=this.input.chunk(t);if(this.input.lineChunks)"\n"==e&&(e="");else{let n=e.indexOf("\n");n>-1&&(e=e.slice(0,n))}return t+e.length<=this.to?e:e.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,e=this.lineAfter(t),n=t+e.length;for(let i=this.rangeIndex;;){let r=this.ranges[i].to;if(r>=n||(e=e.slice(0,r-(n-e.length)),++i==this.ranges.length))break;let s=this.ranges[i].from,o=this.lineAfter(s);e+=o,n=s+o.length}return{line:e,end:n}}skipGapsTo(t,e,n){for(;;){let i=this.ranges[this.rangeIndex].to,r=t+e;if(n>0?i>r:i>=r)break;e+=this.ranges[++this.rangeIndex].from-i}return e}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){r=this.skipGapsTo(e,r,1),e+=r;let s=this.chunk.length;r=this.skipGapsTo(n,r,-1),n+=r,i+=this.chunk.length-s}return this.chunk.push(t,e,n,i),r}parseLine(t){let{line:e,end:n}=this.nextLine(),i=0,{streamParser:r}=this.lang,s=new tD(e,t?t.state.tabSize:4,t?Q(t.state):2);if(s.eol())r.blankLine(this.state,s.indentUnit);else for(;!s.eol();){let o=tE(r.token,s,this.state);if(o&&(i=this.emitToken(this.lang.tokenTable.resolve(o),this.parsedPos+s.start,this.parsedPos+s.pos,4,i)),s.start>1e4)break}this.parsedPos=n,this.moveRangeIndex(),this.parsedPose.start)return r}throw Error("Stream parser failed to advance stream.")}let tz=Object.create(null),tB=[r.Jq.none],tW=new r.Lj(tB),tJ=[],tL=Object.create(null);for(let[tj,tF]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"]])tL[tj]=tq(tz,tF);class t_{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),tL)}resolve(t){return t?this.table[t]||(this.table[t]=tq(this.extra,t)):0}}let tU=new t_(tz);function tX(t,e){tJ.indexOf(t)>-1||(tJ.push(t),console.warn(e))}function tq(t,e){let n=null;for(let i of e.split(".")){let s=t[i]||l.pJ[i];s?"function"==typeof s?n?n=s(n):tX(i,`Modifier ${i} used at start of tag`):n?tX(i,`Tag ${i} used as modifier`):n=s:tX(i,`Unknown highlighting tag ${i}`)}if(!n)return 0;let o=e.replace(/ /g,"_"),a=r.Jq.define({id:tB.length,name:o,props:[(0,l.Gv)({[o]:n})]});return tB.push(a),a.id}},78120:function(t,e,n){let i;n.d(e,{BO:function(){return tO},D0:function(){return tk},Gz:function(){return tW},IS:function(){return tB},Py:function(){return tu},QQ:function(){return U},Wl:function(){return V},Xs:function(){return tC},YW:function(){return tf},as:function(){return Q},bg:function(){return O},cp:function(){return m},f_:function(){return tA},gc:function(){return C},gm:function(){return b},jT:function(){return E},n0:function(){return A},nZ:function(){return x},q6:function(){return ta},r$:function(){return W},uU:function(){return tx},xv:function(){return r},yy:function(){return tb}});class r{constructor(){}lineAt(t){if(t<0||t>this.length)throw RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,n){let i=[];return this.decompose(0,t,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(e,this.length,i,1),o.from(i,this.length-(e-t)+n.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){let n=[];return this.decompose(t,e,n,0),o.from(n,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),n=this.length-this.scanIdentical(t,-1),i=new a(this),r=new a(t);for(let s=e,o=e;;){if(i.next(s),r.next(s),s=0,i.lineBreak!=r.lineBreak||i.done!=r.done||i.value!=r.value)return!1;if(o+=i.value.length,i.done||o>=n)return!0}}iter(t=1){return new a(this,t)}iterRange(t,e=this.length){return new h(this,t,e)}iterLines(t,e){let n;if(null==t)n=this.iter();else{null==e&&(e=this.lines+1);let i=this.line(t).from;n=this.iterRange(i,Math.max(i,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new c(n)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}static of(t){if(0==t.length)throw RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new s(t):o.from(s.split(t,[])):r.empty}}class s extends r{constructor(t,e=function(t){let e=-1;for(let n of t)e+=n.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,n,i){for(let r=0;;r++){let s=this.text[r],o=i+s.length;if((e?n:o)>=t)return new u(i,o,n,s);i=o+1,n++}}decompose(t,e,n,i){let r=t<=0&&e>=this.length?this:new s(l(this.text,[""],t,e),Math.min(e,this.length)-Math.max(0,t));if(1&i){let o=n.pop(),a=l(r.text,o.text.slice(),0,r.length);if(a.length<=32)n.push(new s(a,o.length+r.length));else{let h=a.length>>1;n.push(new s(a.slice(0,h)),new s(a.slice(h)))}}else n.push(r)}replace(t,e,n){if(!(n instanceof s))return super.replace(t,e,n);let i=l(this.text,l(n.text,l(this.text,[""],0,t)),e),r=this.length+n.length-(e-t);return i.length<=32?new s(i,r):o.from(s.split(i,[]),r)}sliceString(t,e=this.length,n="\n"){let i="";for(let r=0,s=0;r<=e&&st&&s&&(i+=n),tr&&(i+=o.slice(Math.max(0,t-r),e-r)),r=l+1}return i}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let n=[],i=-1;for(let r of t)n.push(r),i+=r.length+1,32==n.length&&(e.push(new s(n,i)),n=[],i=-1);return i>-1&&e.push(new s(n,i)),e}}class o extends r{constructor(t,e){for(let n of(super(),this.children=t,this.length=e,this.lines=0,t))this.lines+=n.lines}lineInner(t,e,n,i){for(let r=0;;r++){let s=this.children[r],o=i+s.length,l=n+s.lines-1;if((e?l:o)>=t)return s.lineInner(t,e,n,i);i=o+1,n=l+1}}decompose(t,e,n,i){for(let r=0,s=0;s<=e&&r=s){let a=i&((s<=t?1:0)|(l>=e?2:0));s>=t&&l<=e&&!a?n.push(o):o.decompose(t-s,e-s,n,a)}s=l+1}}replace(t,e,n){if(n.lines=r&&e<=l){let a=s.replace(t-r,e-r,n),h=this.lines-s.lines+a.lines;if(a.lines>4&&a.lines>h>>6){let c=this.children.slice();return c[i]=a,new o(c,this.length-(e-t)+n.length)}return super.replace(r,l,a)}r=l+1}return super.replace(t,e,n)}sliceString(t,e=this.length,n="\n"){let i="";for(let r=0,s=0;rt&&r&&(i+=n),ts&&(i+=o.sliceString(t-s,e-s,n)),s=l+1}return i}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof o))return 0;let n=0,[i,r,s,l]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=e,r+=e){if(i==s||r==l)return n;let a=this.children[i],h=t.children[r];if(a!=h)return n+a.scanIdentical(h,e);n+=a.length+1}}static from(t,e=t.reduce((t,e)=>t+e.length+1,-1)){let n=0;for(let i of t)n+=i.lines;if(n<32){let r=[];for(let l of t)l.flatten(r);return new s(r,e)}let a=Math.max(32,n>>5),h=a<<1,c=a>>1,u=[],f=0,d=-1,p=[];function m(){0!=f&&(u.push(1==p.length?p[0]:o.from(p,d)),d=-1,f=p.length=0)}for(let g of t)!function t(e){let n;if(e.lines>h&&e instanceof o)for(let i of e.children)t(i);else e.lines>c&&(f>c||!f)?(m(),u.push(e)):e instanceof s&&f&&(n=p[p.length-1])instanceof s&&e.lines+n.lines<=32?(f+=e.lines,d+=e.length+1,p[p.length-1]=new s(n.text.concat(e.text),n.length+1+e.length)):(f+e.lines>a&&m(),f+=e.lines,d+=e.length+1,p.push(e))}(g);return m(),1==u.length?u[0]:new o(u,e)}}function l(t,e,n=0,i=1e9){for(let r=0,s=0,o=!0;s=n&&(a>i&&(l=l.slice(0,i-r)),r0?1:(t instanceof s?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],r=this.offsets[n],o=r>>1,l=i instanceof s?i.text.length:i.children.length;if(o==(e>0?l:0)){if(0==n)return this.done=!0,this.value="",this;e>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&r)==(e>0?0:1)){if(this.offsets[n]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(i instanceof s){let a=i.text[o+(e<0?-1:0)];if(this.offsets[n]+=e,a.length>Math.max(0,t))return this.value=0==t?a:e>0?a.slice(t):a.slice(0,a.length-t),this;t-=a.length}else{let h=i.children[o+(e<0?-1:0)];t>h.length?(t-=h.length,this.offsets[n]+=e):(e<0&&this.offsets[n]--,this.nodes.push(h),this.offsets.push(e>0?1:(h instanceof s?h.text.length:h.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class h{constructor(t,e,n){this.value="",this.done=!1,this.cursor=new a(t,e>n?-1:1),this.pos=e>n?t.length:0,this.from=Math.min(e,n),this.to=Math.max(e,n)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let n=e<0?this.pos-this.from:this.to-this.pos;t>n&&(t=n),n-=t;let{value:i}=this.cursor.next(t);return this.pos+=(i.length+t)*e,this.value=i.length<=n?i:e<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class c{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:n,value:i}=this.inner.next(t);return e?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(r.prototype[Symbol.iterator]=function(){return this.iter()},a.prototype[Symbol.iterator]=h.prototype[Symbol.iterator]=c.prototype[Symbol.iterator]=function(){return this});class u{constructor(t,e,n,i){this.from=t,this.to=e,this.number=n,this.text=i}get length(){return this.to-this.from}}let f="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,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let d=1;d=127462&&t<=127487}function m(t,e,n=!0,i=!0){return(n?g:k)(t,e,i)}function g(t,e,n){if(e==t.length)return e;e&&y(t.charCodeAt(e))&&v(t.charCodeAt(e-1))&&e--;let i=b(t,e);for(e+=x(i);et)return f[e-1]<=t;return!1}(r))e+=x(r),i=r;else if(p(r)){let s=0,o=e-2;for(;o>=0&&p(b(t,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function k(t,e,n){for(;e>0;){let i=g(t,e-2,n);if(i=56320&&t<57344}function v(t){return t>=55296&&t<56320}function b(t,e){let n=t.charCodeAt(e);if(!v(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return y(i)?(n-55296<<10)+(i-56320)+65536:n}function O(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(((t-=65536)>>10)+55296,(1023&t)+56320)}function x(t){return t<65536?1:2}let w=/\r\n?|\n/;var S,P,C=((S=C||(C={}))[S.Simple=0]="Simple",S[S.TrackDel=1]="TrackDel",S[S.TrackBefore=2]="TrackBefore",S[S.TrackAfter=3]="TrackAfter",S);class A{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;et)return r+(t-i);r+=o}else{if(n!=C.Simple&&a>=t&&(n==C.TrackDel&&it||n==C.TrackBefore&&it))return null;if(a>t||a==t&&e<0&&!o)return t==i||e<0?r:r+l;r+=l}i=a}if(t>i)throw RangeError(`Position ${t} is out of range for changeset of length ${i}`);return r}touchesRange(t,e=t){for(let n=0,i=0;n=0&&i<=e&&o>=t)return!(ie)||"cover";i=o}return!1}toString(){let t="";for(let e=0;e=0?":"+i:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(t=>"number"!=typeof t))throw RangeError("Invalid JSON representation of ChangeDesc");return new A(t)}static create(t){return new A(t)}}class Q extends A{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw RangeError("Applying change set to a document with the wrong length");return D(this,(e,n,i,r,s)=>t=t.replace(i,i+(n-e),s),!1),t}mapDesc(t,e=!1){return R(this,t,e,!0)}invert(t){let e=this.sections.slice(),n=[];for(let i=0,s=0;i=0){e[i]=l,e[i+1]=o;let a=i>>1;for(;n.length0&&I(n,e,r.text),r.forward(a),o+=a}let c=t[s++];for(;o>1].toJSON()))}return t}static of(t,e,n){let i=[],s=[],o=0,l=null;function a(t=!1){if(!t&&!i.length)return;of||u<0||f>e)throw RangeError(`Invalid change range ${u} to ${f} (in doc of length ${e})`);let p=d?"string"==typeof d?r.of(d.split(n||w)):d:r.empty,m=p.length;if(u==f&&0==m)return;uo&&T(i,u-o,-1),T(i,f-u,m),I(s,i,p),o=f}}(t),a(!l),l}static empty(t){return new Q(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError("Invalid JSON representation of ChangeSet");let e=[],n=[];for(let i=0;ie&&"string"!=typeof t))throw RangeError("Invalid JSON representation of ChangeSet");else if(1==s.length)e.push(s[0],0);else{for(;n.length=0&&n<=0&&n==t[r+1]?t[r]+=e:0==e&&0==t[r]?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function I(t,e,n){if(0==n.length)return;let i=e.length-2>>1;if(i>1])),!n&&l!=t.sections.length&&!(t.sections[l+1]<0);)a=t.sections[l++],h=t.sections[l++];e(s,c,o,u,f),s=c,o=u}}}function R(t,e,n,i=!1){let r=[],s=i?[]:null,o=new $(t),l=new $(e);for(let a=-1;;)if(-1==o.ins&&-1==l.ins){let h=Math.min(o.len,l.len);T(r,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||0==o.off&&(l.len=0&&a=0){let f=0,d=o.len;for(;d;)if(-1==l.ins){let p=Math.min(d,l.len);f+=p,d-=p,l.forward(p)}else if(0==l.ins&&l.lena||o.ins>=0&&o.len>a)&&(l||i.length>h),s.forward2(a),o.forward(a)}}else T(i,0,o.ins,l),r&&I(r,i,o.text),o.next()}}class ${constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i>1;return e>=t.length?r.empty:t[e]}textBit(t){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length&&!t?r.empty:e[n].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class N{constructor(t,e,n){this.from=t,this.to=e,this.flags=n}get anchor(){return 16&this.flags?this.to:this.from}get head(){return 16&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 4&this.flags?-1:8&this.flags?1:0}get bidiLevel(){let t=3&this.flags;return 3==t?null:t}get goalColumn(){let t=this.flags>>5;return 33554431==t?void 0:t}map(t,e=-1){let n,i;return this.empty?n=i=t.mapPos(this.from,e):(n=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new N(n,i,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return E.range(t,e);let n=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return E.range(this.anchor,n)}eq(t){return this.anchor==t.anchor&&this.head==t.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid JSON representation for SelectionRange");return E.range(t.anchor,t.head)}static create(t,e,n){return new N(t,e,n)}}class E{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:E.create(this.ranges.map(n=>n.map(t,e)),this.mainIndex)}eq(t){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let e=0;et.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw RangeError("Invalid JSON representation for EditorSelection");return new E(t.ranges.map(t=>N.fromJSON(t)),t.main)}static single(t,e=t){return new E([E.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw RangeError("A selection needs at least one range");for(let n=0,i=0;it?4:0)|r)}static normalized(t,e=0){let n=t[e];t.sort((t,e)=>t.from-e.from),e=t.indexOf(n);for(let i=1;ir.head?E.range(l,o):E.range(o,l))}}return new E(t,e)}}function z(t,e){for(let n of t.ranges)if(n.to>e)throw RangeError("Selection points outside of document")}let B=0;class W{constructor(t,e,n,i,r){this.combine=t,this.compareInput=e,this.compare=n,this.isStatic=i,this.id=B++,this.default=t([]),this.extensions="function"==typeof r?r(this):r}static define(t={}){return new W(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:J),!!t.static,t.enables)}of(t){return new L([],this,0,t)}compute(t,e){if(this.isStatic)throw Error("Can't compute a static facet");return new L(t,this,1,e)}computeN(t,e){if(this.isStatic)throw Error("Can't compute a static facet");return new L(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],n=>e(n.field(t)))}}function J(t,e){return t==e||t.length==e.length&&t.every((t,n)=>t===e[n])}class L{constructor(t,e,n,i){this.dependencies=t,this.facet=e,this.type=n,this.value=i,this.id=B++}dynamicSlot(t){var e;let n=this.value,i=this.facet.compareInput,r=this.id,s=t[r]>>1,o=2==this.type,l=!1,a=!1,h=[];for(let c of this.dependencies)"doc"==c?l=!0:"selection"==c?a=!0:((null!==(e=t[c.id])&&void 0!==e?e:1)&1)==0&&h.push(t[c.id]);return{create:t=>(t.values[s]=n(t),1),update(t,e){if(l&&e.docChanged||a&&(e.docChanged||e.selection)||F(t,h)){let r=n(t);if(o?!j(r,t.values[s],i):!i(r,t.values[s]))return t.values[s]=r,1}return 0},reconfigure:(t,e)=>{let l,a=e.config.address[r];if(null!=a){let h=tt(e,a);if(this.dependencies.every(n=>n instanceof W?e.facet(n)===t.facet(n):!(n instanceof U)||e.field(n,!1)==t.field(n,!1))||(o?j(l=n(t),h,i):i(l=n(t),h)))return t.values[s]=h,0}else l=n(t);return t.values[s]=l,1}}}}function j(t,e,n){if(t.length!=e.length)return!1;for(let i=0;it===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(_).find(t=>t.field==this);return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,n)=>{let i=t.values[e],r=this.updateF(i,n);return this.compareF(i,r)?0:(t.values[e]=r,1)},reconfigure:(t,n)=>null!=n.config.address[this.id]?(t.values[e]=n.field(this),0):(t.values[e]=this.create(t),1)}}init(t){return[this,_.of({field:this,create:t})]}get extension(){return this}}let X={lowest:4,low:3,default:2,high:1,highest:0};function q(t){return e=>new G(e,t)}let V={highest:q(X.highest),high:q(X.high),default:q(X.default),low:q(X.low),lowest:q(X.lowest)};class G{constructor(t,e){this.inner=t,this.prec=e}}class Z{of(t){return new Y(this,t)}reconfigure(t){return Z.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Y{constructor(t,e){this.compartment=t,this.inner=e}}class K{constructor(t,e,n,i,r,s){for(this.base=t,this.compartments=e,this.dynamicSlots=n,this.address=i,this.staticValues=r,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(t,e,n){let i,r,s=[],o=Object.create(null),l=new Map;for(let a of(i=[[],[],[],[],[]],r=new Map,!function t(n,s){let o=r.get(n);if(null!=o){if(o<=s)return;let a=i[o].indexOf(n);a>-1&&i[o].splice(a,1),n instanceof Y&&l.delete(n.compartment)}if(r.set(n,s),Array.isArray(n))for(let h of n)t(h,s);else if(n instanceof Y){if(l.has(n.compartment))throw RangeError("Duplicate use of compartment in extensions");let c=e.get(n.compartment)||n.inner;l.set(n.compartment,c),t(c,s)}else if(n instanceof G)t(n.inner,n.prec);else if(n instanceof U)i[s].push(n),n.provides&&t(n.provides,s);else if(n instanceof L)i[s].push(n),n.facet.extensions&&t(n.facet.extensions,X.default);else{let u=n.extension;if(!u)throw Error(`Unrecognized extension value in extension set (${n}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);t(u,s)}}(t,X.default),i.reduce((t,e)=>t.concat(e))))a instanceof U?s.push(a):(o[a.facet.id]||(o[a.facet.id]=[])).push(a);let h=Object.create(null),c=[],u=[];for(let f of s)h[f.id]=u.length<<1,u.push(t=>f.slot(t));let d=null==n?void 0:n.config.facets;for(let p in o){let m=o[p],g=m[0].facet,k=d&&d[p]||[];if(m.every(t=>0==t.type)){if(h[g.id]=c.length<<1|1,J(k,m))c.push(n.facet(g));else{let y=g.combine(m.map(t=>t.value));c.push(n&&g.compare(y,n.facet(g))?n.facet(g):y)}}else{for(let v of m)0==v.type?(h[v.id]=c.length<<1|1,c.push(v.value)):(h[v.id]=u.length<<1,u.push(t=>v.dynamicSlot(t)));h[g.id]=u.length<<1,u.push(t=>(function(t,e,n){let i=n.map(e=>t[e.id]),r=n.map(t=>t.type),s=i.filter(t=>!(1&t)),o=t[e.id]>>1;function l(t){let n=[];for(let s=0;st(h));return new K(t,l,b,h,c,o)}}function H(t,e){if(1&e)return 2;let n=e>>1,i=t.status[n];if(4==i)throw Error("Cyclic dependency between fields and/or facets");if(2&i)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function tt(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}let te=W.define(),tn=W.define({combine:t=>t.some(t=>t),static:!0}),ti=W.define({combine:t=>t.length?t[0]:void 0,static:!0}),tr=W.define(),ts=W.define(),to=W.define(),tl=W.define({combine:t=>!!t.length&&t[0]});class ta{constructor(t,e){this.type=t,this.value=e}static define(){return new th}}class th{of(t){return new ta(this,t)}}class tc{constructor(t){this.map=t}of(t){return new tu(this,t)}}class tu{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new tu(this.type,e)}is(t){return this.type==t}static define(t={}){return new tc(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let n=[];for(let i of t){let r=i.map(e);r&&n.push(r)}return n}}tu.reconfigure=tu.define(),tu.appendConfig=tu.define();class tf{constructor(t,e,n,i,r,s){this.startState=t,this.changes=e,this.selection=n,this.effects=i,this.annotations=r,this.scrollIntoView=s,this._doc=null,this._state=null,n&&z(n,e.newLength),r.some(t=>t.type==tf.time)||(this.annotations=r.concat(tf.time.of(Date.now())))}static create(t,e,n,i,r,s){return new tf(t,e,n,i,r,s)}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(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(tf.userEvent);return!!(e&&(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function td(t,e,n){var i;let r,s,o;return n?(r=e.changes,s=Q.empty(e.changes.length),o=t.changes.compose(e.changes)):(r=e.changes.map(t.changes),s=t.changes.mapDesc(e.changes,!0),o=t.changes.compose(r)),{changes:o,selection:e.selection?e.selection.map(s):null===(i=t.selection)||void 0===i?void 0:i.map(r),effects:tu.mapEffects(t.effects,r).concat(tu.mapEffects(e.effects,s)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function tp(t,e,n){let i=e.selection,r=tg(e.annotations);return e.userEvent&&(r=r.concat(tf.userEvent.of(e.userEvent))),{changes:e.changes instanceof Q?e.changes:Q.of(e.changes||[],n,t.facet(ti)),selection:i&&(i instanceof E?i:E.single(i.anchor,i.head)),effects:tg(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}tf.time=ta.define(),tf.userEvent=ta.define(),tf.addToHistory=ta.define(),tf.remote=ta.define();let tm=[];function tg(t){return null==t?tm:Array.isArray(t)?t:[t]}var tk=((P=tk||(tk={}))[P.Word=0]="Word",P[P.Space=1]="Space",P[P.Other=2]="Other",P);let ty=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{i=RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(tv){}class tb{constructor(t,e,n,i,r,s){this.config=t,this.doc=e,this.selection=n,this.values=i,this.status=t.statusTemplate.slice(),this.computeSlot=r,s&&(s._state=this);for(let o=0;o=0;r--){let s=n[r](t);s&&Object.keys(s).length&&(i=td(i,tp(e,s,t.changes.newLength),!0))}return i==t?t:tf.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}(i?function(e){let n=e.startState,i=!0;for(let r of n.facet(tr)){let s=r(e);if(!1===s){i=!1;break}Array.isArray(s)&&(i=!0===i?s:function(t,e){let n=[];for(let i=0,r=0;;){let s,o;if(i=t[i]))s=t[i++],o=t[i++];else{if(!(r=0;c--){let u=h[c](e);e=u instanceof tf?u:Array.isArray(u)&&1==u.length&&u[0]instanceof tf?u[0]:t(n,tg(u),!1)}return e}(l):l)}(this,t,!0)}applyTransaction(t){let e,n=this.config,{base:i,compartments:r}=n;for(let s of t.effects)s.is(Z.reconfigure)?(n&&(r=new Map,n.compartments.forEach((t,e)=>r.set(e,t)),n=null),r.set(s.value.compartment,s.value.extension)):s.is(tu.reconfigure)?(n=null,i=s.value):s.is(tu.appendConfig)&&(n=null,i=tg(i).concat(s.value));n?e=t.startState.values.slice():(n=K.resolve(i,r,this),e=new tb(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(t,e)=>e.reconfigure(t,this),null).values),new tb(n,t.newDoc,t.newSelection,e,(e,n)=>n.update(e,t),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:t},range:E.cursor(e.from+t.length)}))}changeByRange(t){let e=this.selection,n=t(e.ranges[0]),i=this.changes(n.changes),r=[n.range],s=tg(n.effects);for(let o=1;os.spec.fromJSON(o,t)))}}return tb.create({doc:t.doc,selection:E.fromJSON(t.selection),extensions:e.extensions?i.concat([e.extensions]):i})}static create(t={}){let e=K.resolve(t.extensions||[],new Map),n=t.doc instanceof r?t.doc:r.of((t.doc||"").split(e.staticFacet(tb.lineSeparator)||w)),i=t.selection?t.selection instanceof E?t.selection:E.single(t.selection.anchor,t.selection.head):E.single(0);return z(i,n.length),e.staticFacet(tn)||(i=i.asSingle()),new tb(e,n,i,e.dynamicSlots.map(()=>null),(t,e)=>e.create(t),null)}get tabSize(){return this.facet(tb.tabSize)}get lineBreak(){return this.facet(tb.lineSeparator)||"\n"}get readOnly(){return this.facet(tl)}phrase(t,...e){for(let n of this.facet(tb.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,(t,n)=>{if("$"==n)return"$";let i=+(n||1);return!i||i>e.length?t:e[i-1]})),t}languageDataAt(t,e,n=-1){let i=[];for(let r of this.facet(te))for(let s of r(this,e,n))Object.prototype.hasOwnProperty.call(s,t)&&i.push(s[t]);return i}charCategorizer(t){var e;return e=this.languageDataAt("wordChars",t).join(""),t=>{if(!/\S/.test(t))return tk.Space;if(function(t){if(i)return i.test(t);for(let e=0;e"\x80"&&(n.toUpperCase()!=n.toLowerCase()||ty.test(n)))return!0}return!1}(t))return tk.Word;for(let n=0;n-1)return tk.Word;return tk.Other}}wordAt(t){let{text:e,from:n,length:i}=this.doc.lineAt(t),r=this.charCategorizer(t),s=t-n,o=t-n;for(;s>0;){let l=m(e,s,!1);if(r(e.slice(l,s))!=tk.Word)break;s=l}for(;ot.length?t[0]:4}),tb.lineSeparator=ti,tb.readOnly=tl,tb.phrases=W.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(n=>t[n]==e[n])}}),tb.languageData=te,tb.changeFilter=tr,tb.transactionFilter=ts,tb.transactionExtender=to,Z.reconfigure=tu.define();class tx{eq(t){return this==t}range(t,e=t){return tw.create(t,e,this)}}tx.prototype.startSide=tx.prototype.endSide=0,tx.prototype.point=!1,tx.prototype.mapMode=C.TrackDel;class tw{constructor(t,e,n){this.from=t,this.to=e,this.value=n}static create(t,e,n){return new tw(t,e,n)}}function tS(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class tP{constructor(t,e,n,i){this.from=t,this.to=e,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(t,e,n,i=0){let r=n?this.to:this.from;for(let s=i,o=r.length;;){if(s==o)return s;let l=s+o>>1,a=r[l]-t||(n?this.value[l].endSide:this.value[l].startSide)-e;if(l==s)return a>=0?s:o;a>=0?o=l:s=l+1}}between(t,e,n,i){for(let r=this.findIndex(e,-1e9,!0),s=this.findIndex(n,1e9,!1,r);r(f=e.mapPos(c,a.endSide))||u==f&&a.startSide>0&&a.endSide<=0)continue;0>(f-u||a.endSide-a.startSide)||(s<0&&(s=u),a.point&&(o=Math.max(o,f-u)),n.push(a),i.push(u-s),r.push(f-s))}return{mapped:n.length?new tP(i,r,n,o):null,pos:s}}}class tC{constructor(t,e,n,i){this.chunkPos=t,this.chunk=e,this.nextLayer=n,this.maxPoint=i}static create(t,e,n,i){return new tC(t,e,n,i)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:n=!1,filterFrom:i=0,filterTo:r=this.length}=t,s=t.filter;if(0==e.length&&!s)return this;if(n&&(e=e.slice().sort(tS)),this.isEmpty)return e.length?tC.of(e):this;let o=new tT(this,null,-1).goto(0),l=0,a=[],h=new tA;for(;o.value||l=0){let c=e[l++];h.addInner(c.from,c.to,c.value)||a.push(c)}else 1==o.rangeIndex&&o.chunkIndexthis.chunkEnd(o.chunkIndex)||ro.to||r=r&&t<=r+s.length&&!1===s.between(r,t-r,e-r,n))return}this.nextLayer.between(t,e,n)}}iter(t=0){return tI.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return tI.from(t).goto(e)}static compare(t,e,n,i,r=-1){let s=t.filter(t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=r),o=e.filter(t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=r),l=tQ(s,o,n),a=new tR(s,l,r),h=new tR(o,l,r);n.iterGaps((t,e,n)=>tM(a,t,h,e,n,i)),n.empty&&0==n.length&&tM(a,0,h,0,0,i)}static eq(t,e,n=0,i){null==i&&(i=999999999);let r=t.filter(t=>!t.isEmpty&&0>e.indexOf(t)),s=e.filter(e=>!e.isEmpty&&0>t.indexOf(e));if(r.length!=s.length)return!1;if(!r.length)return!0;let o=tQ(r,s),l=new tR(r,o,0).goto(n),a=new tR(s,o,0).goto(n);for(;;){if(l.to!=a.to||!t$(l.active,a.active)||l.point&&(!a.point||!l.point.eq(a.point)))return!1;if(l.to>i)return!0;l.next(),a.next()}}static spans(t,e,n,i,r=-1){let s=new tR(t,null,r).goto(e),o=e,l=s.openStart;for(;;){let a=Math.min(s.to,n);if(s.point){let h=s.activeForPoint(s.to),c=s.pointFromo&&(i.span(o,a,s.active,l),l=s.openEnd(a));if(s.to>n)return l+(s.point&&s.to>n?1:0);o=s.to,s.next()}}static of(t,e=!1){let n=new tA;for(let i of t instanceof tw?[t]:e?function(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(tS);e=i}return t}(t):t)n.add(i.from,i.to,i.value);return n.finish()}}tC.empty=new tC([],[],null,-1),tC.empty.nextLayer=tC.empty;class tA{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}finishChunk(t){this.chunks.push(new tP(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,t&&(this.from=[],this.to=[],this.value=[])}add(t,e,n){this.addInner(t,e,n)||(this.nextLayer||(this.nextLayer=new tA)).add(t,e,n)}addInner(t,e,n){let i=t-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&0>(t-this.lastFrom||n.startSide-this.last.startSide))throw Error("Ranges must be added sorted by `from` position and `startSide`");return!(i<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=n,this.lastFrom=t,this.lastTo=e,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}addChunk(t,e){if(0>(t-this.lastTo||e.value[0].startSide-this.last.endSide))return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let n=e.value.length-1;return this.last=e.value[n],this.lastFrom=e.from[n]+t,this.lastTo=e.to[n]+t,!0}finish(){return this.finishInner(tC.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=tC.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function tQ(t,e,n){let i=new Map;for(let r of t)for(let s=0;s(this.to-t||this.endSide-e)&&this.gotoInner(t,e,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex],n=t+e.from[this.rangeIndex];if(this.from=n,this.to=t+e.to[this.rangeIndex],this.value=e.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=n&&i.push(new tT(s,e,n,r));return 1==i.length?i[0]:new tI(i)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let n of this.heap)n.goto(t,e);for(let i=this.heap.length>>1;i>=0;i--)tD(this.heap,i);return this.next(),this}forward(t,e){for(let n of this.heap)n.forward(t,e);for(let i=this.heap.length>>1;i>=0;i--)tD(this.heap,i);0>(this.to-t||this.value.endSide-e)&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),tD(this.heap,0)}}}function tD(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1=0&&(r=t[i+1],i++),0>n.compare(r))break;t[i]=n,t[e]=r,e=i}}class tR{constructor(t,e,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=tI.from(t,e,n)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&0>(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e);)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){tN(this.active,t),tN(this.activeTo,t),tN(this.activeRank,t),this.minActive=tz(this.active,this.activeTo)}addActive(t){let e=0,{value:n,to:i,rank:r}=this.cursor;for(;e-1&&0>(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)){if(this.activeTo[i]>t){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&tN(n,i)}else if(this.cursor.value){if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let r=this.cursor.value;if(r.point){if(e&&this.cursor.to==this.to&&this.cursor.from=0&&n[s]=0&&!(this.activeRank[n]t||this.activeTo[n]==t&&this.active[n].endSide>=this.point.endSide)&&e.push(this.active[n]);return e.reverse()}openEnd(t){let e=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>t;n--)e++;return e}}function tM(t,e,n,i,r,s){t.goto(e),n.goto(i);let o=i+r,l=i,a=i-e;for(;;){let h=t.to+a-n.to||t.endSide-n.endSide,c=h<0?t.to+a:n.to,u=Math.min(c,o);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&t$(t.activeForPoint(t.to+a),n.activeForPoint(n.to))||s.comparePoint(l,u,t.point,n.point):u>l&&!t$(t.active,n.active)&&s.compareRange(l,u,t.active,n.active),c>o)break;l=c,h<=0&&t.next(),h>=0&&n.next()}}function t$(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;i--)t[i+1]=t[i];t[e]=n}function tz(t,e){let n=-1,i=1e9;for(let r=0;r(e[r]-i||t[r].endSide-t[n].endSide)&&(n=r,i=e[r]);return n}function tB(t,e,n=t.length){let i=0;for(let r=0;r=e)return r;if(r==t.length)break;s+=9==t.charCodeAt(r)?n-s%n:1,r=m(t,r)}return!0===i?-1:t.length}},41113:function(t,e,n){var i,r;n.d(e,{FE:function(){return N},Jq:function(){return u},L3:function(){return s},Lj:function(){return f},_b:function(){return M},hr:function(){return D},i9:function(){return R},md:function(){return a},mp:function(){return m},vj:function(){return i}});let s=1024,o=0;class l{constructor(t,e){this.from=t,this.to=e}}class a{constructor(t={}){this.id=o++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=u.match(t)),e=>{let n=t(e);return void 0===n?null:[this,n]}}}a.closedBy=new a({deserialize:t=>t.split(" ")}),a.openedBy=new a({deserialize:t=>t.split(" ")}),a.group=new a({deserialize:t=>t.split(" ")}),a.contextHash=new a({perNode:!0}),a.lookAhead=new a({perNode:!0}),a.mounted=new a({perNode:!0});class h{constructor(t,e,n){this.tree=t,this.overlay=e,this.parser=n}}let c=Object.create(null);class u{constructor(t,e,n,i=0){this.name=t,this.props=e,this.id=n,this.flags=i}static define(t){let e=t.props&&t.props.length?Object.create(null):c,n=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),i=new u(t.name||"",e,t.id,n);if(t.props){for(let r of t.props)if(Array.isArray(r)||(r=r(i)),r){if(r[0].perNode)throw RangeError("Can't store a per-node prop on a node type");e[r[0].id]=r[1]}}return i}prop(t){return this.props[t.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(t){if("string"==typeof t){if(this.name==t)return!0;let e=this.prop(a.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let n in t)for(let i of n.split(" "))e[i]=t[n];return t=>{for(let n=t.prop(a.group),i=-1;i<(n?n.length:0);i++){let r=e[i<0?t.name:n[i]];if(r)return r}}}}u.none=new u("",Object.create(null),0,8);class f{constructor(t){this.types=t;for(let e=0;e=r&&(o.type.isAnonymous||!1!==e(o))){if(o.firstChild())continue;l=!0}for(;l&&n&&!o.type.isAnonymous&&n(o),!o.nextSibling();){if(!o.parent())return;l=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:I(u.none,this.children,this.positions,0,this.children.length,0,this.length,(t,e,n)=>new m(this.type,t,e,n,this.propValues),t.makeTree||((t,e,n)=>new m(u.none,t,e,n)))}static build(t){return function(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=s,reused:o=[],minRepeatType:l=i.types.length}=t,h=Array.isArray(n)?new g(n,n.length):n,c=i.types,u=0,f=0;function d(t,e,n,r,s,o,l,a){let h=[],c=[];for(;t.length>r;)h.push(t.pop()),c.push(e.pop()+n-s);t.push(p(i.types[l],h,c,o-s,a-o)),e.push(s-n)}function p(t,e,n,i,r=0,s){if(u){let o=[a.contextHash,u];s=s?[o].concat(s):[o]}if(r>25){let l=[a.lookAhead,r];s=s?[l].concat(s):[l]}return new m(t,e,n,i,s)}let y=[],v=[];for(;h.pos>0;)!function t(e,n,s,g,y){let{id:v,start:b,end:O,size:x}=h,w=f;for(;x<0;){if(h.next(),-1==x){let S=o[v];s.push(S),g.push(b-e);return}if(-3==x){u=v;return}if(-4==x){f=v;return}throw RangeError(`Unrecognized record size: ${x}`)}let P=c[v],C,A,Q=b-e;if(O-b<=r&&(A=function(t,e){let n=h.fork(),i=0,s=0,o=0,a=n.end-r,c={size:0,start:0,skip:0};n:for(let u=n.pos-t;n.pos>u;){let f=n.size;if(n.id==e&&f>=0){c.size=i,c.start=s,c.skip=o,o+=4,i+=4,n.next();continue}let d=n.pos-f;if(f<0||d=l?4:0,m=n.start;for(n.next();n.pos>d;){if(n.size<0){if(-3==n.size)p+=4;else break n}else n.id>=l&&(p+=4);n.next()}s=m,i+=f,o+=p}return(e<0||i==t)&&(c.size=i,c.start=s,c.skip=o),c.size>4?c:void 0}(h.pos-n,y))){let T=new Uint16Array(A.size-A.skip),D=h.pos-A.size,R=T.length;for(;h.pos>D;)R=function t(e,n,i){let{id:r,start:s,end:o,size:a}=h;if(h.next(),a>=0&&r4){let d=h.pos-(a-4);for(;h.pos>d;)i=t(e,n,i)}n[--i]=c,n[--i]=o-e,n[--i]=s-e,n[--i]=r}else -3==a?u=r:-4==a&&(f=r);return i}(A.start,T,R);C=new k(T,O-A.start,i),Q=A.start-e}else{let M=h.pos-x;h.next();let $=[],N=[],E=v>=l?v:-1,z=0,B=O;for(;h.pos>M;)E>=0&&h.id==E&&h.size>=0?(h.end<=B-r&&(d($,N,b,z,h.end,B,E,w),z=$.length,B=h.end),h.next()):t(b,M,$,N,E);if(E>=0&&z>0&&z<$.length&&d($,N,b,z,b,B,E,w),$.reverse(),N.reverse(),E>-1&&z>0){let W=function(t){return(e,n,i)=>{let r=0,s=e.length-1,o,l;if(s>=0&&(o=e[s])instanceof m){if(!s&&o.type==t&&o.length==i)return o;(l=o.prop(a.lookAhead))&&(r=n[s]+o.length+l)}return p(t,e,n,i,r)}}(P);C=I(P,$,N,0,$.length,0,O-b,W,W)}else C=p(P,$,N,O-b,w-O)}s.push(C),g.push(Q)}(t.start||0,t.bufferStart||0,y,v,-1);let b=null!==(e=t.length)&&void 0!==e?e:y.length?v[0]+y[0].length:0;return new m(c[t.topID],y.reverse(),v.reverse(),b)}(t)}}m.empty=new m(u.none,[],[],0);class g{constructor(t,e){this.buffer=t,this.index=e}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 g(this.buffer,this.index)}}class k{constructor(t,e,n){this.buffer=t,this.length=e,this.set=n}get type(){return u.none}toString(){let t=[];for(let e=0;e0)));l=s[l+3]);return o}slice(t,e,n){let i=this.buffer,r=new Uint16Array(e-t),s=0;for(let o=t,l=0;o=e&&ne;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function v(t,e){let n=t.childBefore(e);for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(t=n,n=i.prevSibling):n=i}return t}function b(t,e,n,r){for(var s;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?l.length:-1;t!=c;t+=e){let u=l[t],f=h[t]+o.from;if(y(r,n,f,f+u.length)){if(u instanceof k){if(s&i.ExcludeBuffers)continue;let d=u.findChild(0,u.buffer.length,e,n-f,r);if(d>-1)return new P(new S(o,u,t,f),null,d)}else if(s&i.IncludeAnonymous||!u.type.isAnonymous||A(u)){let p;if(!(s&i.IgnoreMounts)&&u.props&&(p=u.prop(a.mounted))&&!p.overlay)return new O(p.tree,f,t,o);let m=new O(u,f,t,o);return s&i.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(e<0?u.children.length-1:0,e,n,r)}}}if(s&i.IncludeAnonymous||!o.type.isAnonymous||(t=o.index>=0?o.index+e:e<0?-1:o._parent._tree.children.length,!(o=o._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(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,e,n=0){let r;if(!(n&i.IgnoreOverlays)&&(r=this._tree.prop(a.mounted))&&r.overlay){let s=t-this.from;for(let{from:o,to:l}of r.overlay)if((e>0?o<=s:o=s:l>s))return new O(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,n)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}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}cursor(t=0){return new C(this,t)}get tree(){return this._tree}toTree(){return this._tree}resolve(t,e=0){return b(this,t,e,!1)}resolveInner(t,e=0){return b(this,t,e,!0)}enterUnfinishedNodesBefore(t){return v(this,t)}getChild(t,e=null,n=null){let i=x(this,t,e,n);return i.length?i[0]:null}getChildren(t,e=null,n=null){return x(this,t,e,n)}toString(){return this._tree.toString()}get node(){return this}matchContext(t){return w(this,t)}}function x(t,e,n,i){let r=t.cursor(),s=[];if(!r.firstChild())return s;if(null!=n){for(;!r.type.is(n);)if(!r.nextSibling())return s}for(;;){if(null!=i&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return null==i?s:[]}}function w(t,e,n=e.length-1){for(let i=t.parent;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class S{constructor(t,e,n,i){this.parent=t,this.buffer=e,this.index=n,this.start=i}}class P{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(t,e,n){this.context=t,this._parent=e,this.index=n,this.type=t.buffer.set.types[t.buffer.buffer[n]]}child(t,e,n){let{buffer:i}=this.context,r=i.findChild(this.index+4,i.buffer[this.index+3],t,e-this.context.start,n);return r<0?null:new P(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,e,n=0){if(n&i.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return s<0?null:new P(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new P(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new P(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}cursor(t=0){return new C(this,t)}get tree(){return null}toTree(){let t=[],e=[],{buffer:n}=this.context,i=this.index+4,r=n.buffer[this.index+3];if(r>i){let s=n.buffer[this.index+1];t.push(n.slice(i,r,s)),e.push(0)}return new m(this.type,t,e,this.to-this.from)}resolve(t,e=0){return b(this,t,e,!1)}resolveInner(t,e=0){return b(this,t,e,!0)}enterUnfinishedNodesBefore(t){return v(this,t)}toString(){return this.context.buffer.childString(this.index)}getChild(t,e=null,n=null){let i=x(this,t,e,n);return i.length?i[0]:null}getChildren(t,e=null,n=null){return x(this,t,e,n)}get node(){return this}matchContext(t){return w(this,t)}}class C{get name(){return this.type.name}constructor(t,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof O)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let n=t._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}yieldBuf(t,e){this.index=t;let{start:n,buffer:i}=this.buffer;return this.type=e||i.set.types[i.buffer[t]],this.from=n+i.buffer[t+1],this.to=n+i.buffer[t+2],!0}yield(t){return!!t&&(t instanceof O?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,e,n){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,e,n,this.mode));let{buffer:i}=this.buffer,r=i.findChild(this.index+4,i.buffer[this.index+3],t,e-this.buffer.start,n);return!(r<0)&&(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,e,n=this.mode){return this.buffer?!(n&i.ExcludeBuffers)&&this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&i.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&i.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));let{buffer:e}=this.buffer,n=this.stack.length-1;if(t<0){let i=n<0?0:this.stack[n]+4;if(this.index!=i)return this.yieldBuf(e.findChild(i,this.index,-1,0,4))}else{let r=e.buffer[this.index+3];if(r<(n<0?e.buffer.length:e.buffer[this.stack[n]+3]))return this.yieldBuf(r)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let e,n,{buffer:r}=this;if(r){if(t>0){if(this.index-1)for(let o=e+t,l=t<0?-1:n._tree.children.length;o!=l;o+=t){let a=n._tree.children[o];if(this.mode&i.IncludeAnonymous||a instanceof k||!a.type.isAnonymous||A(a))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to=0;){for(let s=t;s;s=s._parent)if(s.index==i){if(i==this.index)return s;e=s,n=r+1;break n}i=this.stack[--r]}for(let o=n;o=0;r--){if(r<0)return w(this.node,t,i);let s=n[e.buffer[this.stack[r]]];if(!s.isAnonymous){if(t[i]&&t[i]!=s.name)return!1;i--}}return!0}}function A(t){return t.children.some(t=>t instanceof k||!t.type.isAnonymous||A(t))}let Q=new WeakMap;function T(t,e){if(!t.isAnonymous||e instanceof k||e.type!=t)return 1;let n=Q.get(e);if(null==n){for(let i of(n=1,e.children)){if(i.type!=t||!(i instanceof m)){n=1;break}n+=T(t,i)}Q.set(e,n)}return n}function I(t,e,n,i,r,s,o,l,a){let h=0;for(let c=i;c=u)break;m+=g}if(h==c+1){if(m>u){let k=n[c];e(k.children,k.positions,0,k.children.length,i[c]+l);continue}f.push(n[c])}else{let y=i[h-1]+n[h-1].length-p;f.push(I(t,n,i,c,h,p,y,null,a))}d.push(p+l-s)}}(e,n,i,r,0),(l||a)(f,d,o)}class D{constructor(){this.map=new WeakMap}setBuffer(t,e,n){let i=this.map.get(t);i||this.map.set(t,i=new Map),i.set(e,n)}getBuffer(t,e){let n=this.map.get(t);return n&&n.get(e)}set(t,e){t instanceof P?this.setBuffer(t.context.buffer,t.index,e):t instanceof O&&this.map.set(t.tree,e)}get(t){return t instanceof P?this.getBuffer(t.context.buffer,t.index):t instanceof O?this.map.get(t.tree):void 0}cursorSet(t,e){t.buffer?this.setBuffer(t.buffer.buffer,t.index,e):this.map.set(t.tree,e)}cursorGet(t){return t.buffer?this.getBuffer(t.buffer.buffer,t.index):this.map.get(t.tree)}}class R{constructor(t,e,n,i,r=!1,s=!1){this.from=t,this.to=e,this.tree=n,this.offset=i,this.open=(r?1:0)|(s?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,e=[],n=!1){let i=[new R(0,t.length,t,0,!1,n)];for(let r of e)r.to>t.length&&i.push(r);return i}static applyChanges(t,e,n=128){if(!e.length)return t;let i=[],r=1,s=t.length?t[0]:null;for(let o=0,l=0,a=0;;o++){let h=o=n)for(;s&&s.from=u.from||c<=u.to||a){let f=Math.max(u.from,l)-a,d=Math.min(u.to,c)-a;u=f>=d?null:new R(f,d,u.tree,u.offset+a,o>0,!!h)}if(u&&i.push(u),s.to>c)break;s=rnew l(t.from,t.to)):[new l(0,0)]:[new l(0,t.length)],this.createParse(t,e||[],n)}parse(t,e,n){let i=this.startParse(t,e,n);for(;;){let r=i.advance();if(r)return r}}}class ${constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}function N(t){return(e,n,i,r)=>new W(e,t,n,i,r)}class E{constructor(t,e,n,i,r){this.parser=t,this.parse=e,this.overlay=n,this.target=i,this.ranges=r}}class z{constructor(t,e,n,i,r,s,o){this.parser=t,this.predicate=e,this.mounts=n,this.index=i,this.start=r,this.target=s,this.prev=o,this.depth=0,this.ranges=[]}}let B=new a({perNode:!0});class W{constructor(t,e,n,i,r){this.nest=e,this.input=n,this.fragments=i,this.ranges=r,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=t}advance(){if(this.baseParse){let t=this.baseParse.advance();if(!t)return null;if(this.baseParse=null,this.baseTree=t,this.startInner(),null!=this.stoppedAt)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let n=this.baseTree;return null!=this.stoppedAt&&(n=new m(n.type,n.children,n.positions,n.length,n.propValues.concat([[B,this.stoppedAt]]))),n}let i=this.inner[this.innerDone],r=i.parse.advance();if(r){this.innerDone++;let s=Object.assign(Object.create(null),i.target.props);s[a.mounted.id]=new h(r,i.overlay,i.parser),i.target.props=s}return null}get parsedPos(){if(this.baseParse)return 0;let t=this.input.length;for(let e=this.innerDone;et.frag.from<=r.from&&t.frag.to>=r.to&&t.mount.overlay);if(c)for(let f of c.mount.overlay){let d=f.from+c.pos,p=f.to+c.pos;d>=r.from&&p<=r.to&&!e.ranges.some(t=>t.fromd)&&e.ranges.push({from:d,to:p})}}a=!1}else if(n&&(o=function(t,e,n){for(let i of t){if(i.from>=n)break;if(i.to>e)return i.from<=e&&i.to>=n?2:1}return 0}(n.ranges,r.from,r.to)))a=2!=o;else if(!r.type.isAnonymous&&r.from=e.to);i++);let o=r.children[i],l=o.buffer;r.children[i]=function t(n,i,r,a,h){let c=n;for(;l[c+2]+s<=e.from;)c=l[c+3];let u=[],f=[];J(o,n,c,u,f,a);let d=l[c+1],p=l[c+2],g=d+s==e.from&&p+s==e.to&&l[c]==e.type.id;return u.push(g?e.toTree():t(c+4,l[c+3],o.set.types[l[c]],d,p-d)),f.push(d-a),J(o,l[c+3],i,u,f,a),new m(r,u,f,h)}(0,l.length,u.none,0,o.length);for(let a=0;a<=n;a++)t.childAfter(e.from)}(r);let g=t.findMounts(r.from,s.parser);if("function"==typeof s.overlay)e=new z(s.parser,s.overlay,g,this.inner.length,r.from,r.tree,e);else{let k=F(this.ranges,s.overlay||[new l(r.from,r.to)]);k.length&&this.inner.push(new E(s.parser,s.parser.startParse(this.input,_(g,k),k),s.overlay?s.overlay.map(t=>new l(t.from-r.from,t.to-r.from)):null,r.tree,k)),s.overlay?k.length&&(n={ranges:k,depth:0,prev:n}):a=!1}}else e&&(h=e.predicate(r))&&(!0===h&&(h=new l(r.from,r.to)),h.fromnew l(t.from-e.start,t.to-e.start)),e.target,y)),e=e.prev}!n||--n.depth||(n=n.prev)}}}}function J(t,e,n,i,r,s){if(e=t&&e.enter(n,1,i.IgnoreOverlays|i.ExcludeBuffers)||e.next(!1)||(this.done=!0)}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let e=this.cursor.tree;;){if(e==t.tree)return!0;if(e.children.length&&0==e.positions[0]&&e.children[0]instanceof m)e=e.children[0];else break}return!1}}class j{constructor(t){var e;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let n=this.curFrag=t[0];this.curTo=null!==(e=n.tree.prop(B))&&void 0!==e?e:n.to,this.inner=new L(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(t=e.tree.prop(B))&&void 0!==t?t:e.to,this.inner=new L(e.tree,-e.offset)}}findMounts(t,e){var n;let i=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let r=this.inner.cursor.node;r;r=r.parent){let s=null===(n=r.tree)||void 0===n?void 0:n.prop(a.mounted);if(s&&s.parser==e)for(let o=this.fragI;o=r.to)break;l.tree==this.curFrag.tree&&i.push({frag:l,pos:r.from-l.offset,mount:s})}}}return i}}function F(t,e){let n=null,i=e;for(let r=1,s=0;r=a)break;!(h.to<=o)&&(n||(i=n=e.slice()),h.froma&&n.splice(s+1,0,new l(a,h.to))):h.to>a?n[s--]=new l(a,h.to):n.splice(s--,1))}}return i}function _(t,e){let n=[];for(let{pos:i,mount:r,frag:s}of t){let o=i+(r.overlay?r.overlay[0].from:0),a=o+r.tree.length,h=Math.max(s.from,o),c=Math.min(s.to,a);if(r.overlay){let u=function(t,e,n,i){let r=0,s=0,o=!1,a=!1,h=-1e9,c=[];for(;;){let u=r==t.length?1e9:o?t[r].to:t[r].from,f=s==e.length?1e9:a?e[s].to:e[s].from;if(o!=a){let d=Math.max(h,n),p=Math.min(u,f,i);dnew l(t.from+i,t.to+i)),h,c);for(let f=0,d=h;;f++){let p=f==u.length,m=p?c:u[f].from;if(m>d&&n.push(new R(d,m,r.tree,-o,s.from>=d||s.openStart,s.to<=m||s.openEnd)),p)break;d=u[f].to}}else n.push(new R(h,c,r.tree,-o,s.from>=o||s.openStart,s.to<=a||s.openEnd))}return n}},35524:function(t,e,n){n.d(e,{Gv:function(){return a},QR:function(){return u},Vp:function(){return s},bW:function(){return f},pJ:function(){return T}});var i=n(41113);let r=0;class s{constructor(t,e,n){this.set=t,this.base=e,this.modified=n,this.id=r++}static define(t){if(null==t?void 0:t.base)throw Error("Can not derive from a modified tag");let e=new s([],null,[]);if(e.set.push(e),t)for(let n of t.set)e.set.push(n);return e}static defineModifier(){let t=new l;return e=>e.modified.indexOf(t)>-1?e:l.get(e.base||e,e.modified.concat(t).sort((t,e)=>t.id-e.id))}}let o=0;class l{constructor(){this.instances=[],this.id=o++}static get(t,e){if(!e.length)return t;let n=e[0].instances.find(n=>{var i;return n.base==t&&(i=n.modified,e.length==i.length&&e.every((t,e)=>t==i[e]))});if(n)return n;let i=[],r=new s(i,t,e);for(let o of e)o.instances.push(r);let a=function(t){let e=[[]];for(let n=0;ne.length-t.length)}(e);for(let h of t.set)if(!h.modified.length)for(let c of a)i.push(l.get(h,c));return r}}function a(t){let e=Object.create(null);for(let n in t){let i=t[n];for(let r of(Array.isArray(i)||(i=[i]),n.split(" ")))if(r){let s=[],o=2,l=r;for(let a=0;;){if("..."==l&&a>0&&a+3==r.length){o=1;break}let u=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!u)throw RangeError("Invalid path: "+r);if(s.push("*"==u[0]?"":'"'==u[0][0]?JSON.parse(u[0]):u[0]),(a+=u[0].length)==r.length)break;let f=r[a++];if(a==r.length&&"!"==f){o=0;break}if("/"!=f)throw RangeError("Invalid path: "+r);l=r.slice(a)}let d=s.length-1,p=s[d];if(!p)throw RangeError("Invalid path: "+r);let m=new c(i,o,d>0?s.slice(0,d):null);e[p]=m.sort(e[p])}}return h.add(e)}let h=new i.md;class c{constructor(t,e,n,i){this.tags=t,this.mode=e,this.context=n,this.next=i}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(t){return!t||t.depth{let e=o;for(let i of t)for(let r of i.set){let s=n[r.id];if(s){e=e?e+" "+s:s;break}}return e},scope:s}}function f(t,e,n,i=0,r=t.length){let s=new d(i,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),i,r,"",s.highlighters),s.flush(r)}c.empty=new c([],2,null);class d{constructor(t,e,n){this.at=t,this.highlighters=e,this.span=n,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,n,r,s){let{type:o,from:l,to:a}=t;if(l>=n||a<=e)return;o.isTop&&(s=this.highlighters.filter(t=>!t.scope||t.scope(o)));let u=r,f=function(t){let e=t.type.prop(h);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}(t)||c.empty,d=function(t,e){let n=null;for(let i of t){let r=i.style(e);r&&(n=n?n+" "+r:r)}return n}(s,f.tags);if(d&&(u&&(u+=" "),u+=d,1==f.mode&&(r+=(r?" ":"")+d)),this.startSpan(t.from,u),f.opaque)return;let p=t.tree&&t.tree.prop(i.md.mounted);if(p&&p.overlay){let m=t.node.enter(p.overlay[0].from+l,1),g=this.highlighters.filter(t=>!t.scope||t.scope(p.tree.type)),k=t.firstChild();for(let y=0,v=l;;y++){let b=y=O)&&t.nextSibling()););if(!b||O>n)break;(v=b.to+l)>e&&(this.highlightRange(m.cursor(),Math.max(e,b.from+l),Math.min(n,v),r,g),this.startSpan(v,u))}k&&t.parent()}else if(t.firstChild()){do{if(t.to<=e)continue;if(t.from>=n)break;this.highlightRange(t,e,n,r,s),this.startSpan(Math.min(n,t.to),u)}while(t.nextSibling());t.parent()}}}let p=s.define,m=p(),g=p(),k=p(g),y=p(g),v=p(),b=p(v),O=p(v),x=p(),w=p(x),S=p(),P=p(),C=p(),A=p(C),Q=p(),T={comment:m,lineComment:p(m),blockComment:p(m),docComment:p(m),name:g,variableName:p(g),typeName:k,tagName:p(k),propertyName:y,attributeName:p(y),className:p(g),labelName:p(g),namespace:p(g),macroName:p(g),literal:v,string:b,docString:p(b),character:p(b),attributeValue:p(b),number:O,integer:p(O),float:p(O),bool:p(v),regexp:p(v),escape:p(v),color:p(v),url:p(v),keyword:S,self:p(S),null:p(S),atom:p(S),unit:p(S),modifier:p(S),operatorKeyword:p(S),controlKeyword:p(S),definitionKeyword:p(S),moduleKeyword:p(S),operator:P,derefOperator:p(P),arithmeticOperator:p(P),logicOperator:p(P),bitwiseOperator:p(P),compareOperator:p(P),updateOperator:p(P),definitionOperator:p(P),typeOperator:p(P),controlOperator:p(P),punctuation:C,separator:p(C),bracket:A,angleBracket:p(A),squareBracket:p(A),paren:p(A),brace:p(A),content:x,heading:w,heading1:p(w),heading2:p(w),heading3:p(w),heading4:p(w),heading5:p(w),heading6:p(w),contentSeparator:p(x),list:p(x),quote:p(x),emphasis:p(x),strong:p(x),link:p(x),monospace:p(x),strikethrough:p(x),inserted:p(),deleted:p(),changed:p(),invalid:p(),meta:Q,documentMeta:p(Q),annotation:p(Q),processingInstruction:p(Q),definition:s.defineModifier(),constant:s.defineModifier(),function:s.defineModifier(),standard:s.defineModifier(),local:s.defineModifier(),special:s.defineModifier()};u([{tag:T.link,class:"tok-link"},{tag:T.heading,class:"tok-heading"},{tag:T.emphasis,class:"tok-emphasis"},{tag:T.strong,class:"tok-strong"},{tag:T.keyword,class:"tok-keyword"},{tag:T.atom,class:"tok-atom"},{tag:T.bool,class:"tok-bool"},{tag:T.url,class:"tok-url"},{tag:T.labelName,class:"tok-labelName"},{tag:T.inserted,class:"tok-inserted"},{tag:T.deleted,class:"tok-deleted"},{tag:T.literal,class:"tok-literal"},{tag:T.string,class:"tok-string"},{tag:T.number,class:"tok-number"},{tag:[T.regexp,T.escape,T.special(T.string)],class:"tok-string2"},{tag:T.variableName,class:"tok-variableName"},{tag:T.local(T.variableName),class:"tok-variableName tok-local"},{tag:T.definition(T.variableName),class:"tok-variableName tok-definition"},{tag:T.special(T.variableName),class:"tok-variableName2"},{tag:T.definition(T.propertyName),class:"tok-propertyName tok-definition"},{tag:T.typeName,class:"tok-typeName"},{tag:T.namespace,class:"tok-namespace"},{tag:T.className,class:"tok-className"},{tag:T.macroName,class:"tok-macroName"},{tag:T.propertyName,class:"tok-propertyName"},{tag:T.operator,class:"tok-operator"},{tag:T.comment,class:"tok-comment"},{tag:T.meta,class:"tok-meta"},{tag:T.invalid,class:"tok-invalid"},{tag:T.punctuation,class:"tok-punctuation"}])},53105:function(t,e,n){n.d(e,{IK:function(){return I},Jq:function(){return v},WQ:function(){return D}});var i,r,s,o,l,a,h=n(41113),c=n(34155);class u{constructor(t,e,n,i,r,s,o,l,a,h=0,c){this.p=t,this.stack=e,this.state=n,this.reducePos=i,this.pos=r,this.score=s,this.buffer=o,this.bufferBase=l,this.curContext=a,this.lookAhead=h,this.parent=c}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,n=0){let i=t.parser.context;return new u(t,[],e,n,n,0,[],0,i?new f(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){let e=t>>19,n=65535&t,{parser:i}=this.p,r=i.dynamicPrecedence(n);if(r&&(this.score+=r),0==e){this.pushState(i.getGoto(this.state,n,!0),this.reducePos),ns;)this.stack.pop();this.reduceContext(n,o)}storeNode(t,e,n,i=4,r=!1){if(0==t&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==s.buffer[o-4]&&s.buffer[o-1]>-1){if(e==n)return;if(s.buffer[o-2]>=e){s.buffer[o-2]=n;return}}}if(r&&this.pos!=n){let l=this.buffer.length;if(l>0&&0!=this.buffer[l-4])for(;l>0&&this.buffer[l-2]>n;)this.buffer[l]=this.buffer[l-4],this.buffer[l+1]=this.buffer[l-3],this.buffer[l+2]=this.buffer[l-2],this.buffer[l+3]=this.buffer[l-1],l-=4,i>4&&(i-=4);this.buffer[l]=t,this.buffer[l+1]=e,this.buffer[l+2]=n,this.buffer[l+3]=i}else this.buffer.push(t,e,n,i)}shift(t,e,n){let i=this.pos;if(131072&t)this.pushState(65535&t,this.pos);else if((262144&t)==0){let{parser:r}=this.p;(n>this.pos||e<=r.maxNode)&&(this.pos=n,r.stateFlag(t,1)||(this.reducePos=n)),this.pushState(t,i),this.shiftContext(e,i),e<=r.maxNode&&this.buffer.push(e,i,n,4)}else this.pos=n,this.shiftContext(e,i),e<=this.p.parser.maxNode&&this.buffer.push(e,i,n,4)}apply(t,e,n){65536&t?this.reduce(t):this.shift(t,e,n)}useNode(t,e){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=t)&&(this.p.reused.push(t),n++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(e,i),this.buffer.push(n,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let n=t.buffer.slice(e),i=t.bufferBase+e;for(;t&&i==t.bufferBase;)t=t.parent;return new u(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let n=t<=this.p.parser.maxNode;n&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,n?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new d(this);;){let n=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==n)return!1;if((65536&n)==0)return!0;e.reduce(n)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let n=[];for(let i=0,r;i1&e&&t==o)||n.push(e[s],o)}e=n}let l=[];for(let a=0;a>19);if(n<0||0>e.getGoto(this.stack[n],65535&t,!1))return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!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:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class f{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}(i=o||(o={}))[i.Insert=200]="Insert",i[i.Delete=190]="Delete",i[i.Reduce=100]="Reduce",i[i.MaxNext=4]="MaxNext",i[i.MaxInsertStackDepth=300]="MaxInsertStackDepth",i[i.DampenInsertStackDepth=120]="DampenInsertStackDepth";class d{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=t>>19;0==e?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(e-1)*3;let n=this.start.p.parser.getGoto(this.stack[this.base-3],65535&t,!0);this.state=n}}class p{constructor(t,e,n){this.stack=t,this.pos=e,this.index=n,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new p(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.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 p(this.stack,this.pos,this.index)}}class m{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}let g=new m;class k{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=g,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let n=this.range,i=this.rangeIndex,r=this.pos+t;for(;rn.to:r>=n.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];r+=o.from-n.to,n=o}return r}clipPos(t){if(t>=this.range.from&&tt)return Math.max(t,e.from);return this.end}peek(t){let e=this.chunkOff+t,n,i;if(e>=0&&e=this.chunk2Pos&&no.to&&(this.chunk2=this.chunk2.slice(0,o.to-n)),i=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),i}acceptToken(t,e=0){let n=e?this.resolveOffset(e,-1):this.pos;if(null==n||n=this.chunk2Pos&&this.posthis.range.to?n.slice(0,this.range.to-this.pos):n,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(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,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(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=g,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let n="";for(let i of this.ranges){if(i.from>=e)break;i.to>t&&(n+=this.input.read(Math.max(i.from,t),Math.min(i.to,e)))}return n}}class y{constructor(t,e){this.data=t,this.id=e}token(t,e){!function(t,e,n,i){let r=0,s=1<0){let c=t[h];if(l.allows(c)&&(-1==e.token.value||e.token.value==c||o.overrides(c,e.token.value))){e.acceptToken(c);break}}let u=e.next,f=0,d=t[r+2];if(e.next<0&&d>f&&65535==t[a+3*d-3]&&65535==t[a+3*d-3]){r=t[a+3*d-1];continue n}for(;f>1,m=a+p+(p<<1),g=t[m],k=t[m+1]||65536;if(u=k)f=p+1;else{r=t[m+2],e.advance();continue n}}break}}(this.data,t,e,this.id)}}y.prototype.contextual=y.prototype.fallback=y.prototype.extend=!1;class v{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function b(t,e=Uint16Array){if("string"!=typeof t)return t;let n=null;for(let i=0,r=0;i=92&&o--,o>=34&&o--;let a=o-32;if(a>=46&&(a-=46,l=!0),s+=a,l)break;s*=46}n?n[r++]=s:n=new e(s)}return n}let O=void 0!==c&&c.env&&/\bparse\b/.test(c.env.LOG),x=null;function w(t,e,n){let i=t.cursor(h.vj.IncludeAnonymous);for(i.moveTo(e);;)if(!(n<0?i.childBefore(e):i.childAfter(e)))for(;;){if((n<0?i.toe)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}(r=l||(l={}))[r.Margin=25]="Margin";class S{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?w(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?w(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(tt)return this.nextStart=s,null;if(r instanceof h.mp){if(s==t){if(s=Math.max(this.safeFrom,t)&&(this.trees.push(r),this.start.push(s),this.index.push(0))}else this.index[e]++,this.nextStart=s+r.length}}}class P{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(t=>new m)}getActions(t){let e=0,n=null,{parser:i}=t.p,{tokenizers:r}=i,s=i.stateSlot(t.state,3),o=t.curContext?t.curContext.hash:0,l=0;for(let a=0;ac.end+25&&(l=Math.max(c.lookAhead,l)),0!=c.value)){let u=e;if(c.extended>-1&&(e=this.addActions(t,c.extended,c.end,e)),e=this.addActions(t,c.value,c.end,e),!h.extend&&(n=c,e>u))break}}for(;this.actions.length>e;)this.actions.pop();return l&&t.setLookAhead(l),n||t.pos!=this.stream.end||((n=new m).value=t.p.parser.eofTerm,n.start=n.end=t.pos,e=this.addActions(t,n.value,n.end,e)),this.mainToken=n,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new m,{pos:n,p:i}=t;return e.start=n,e.end=Math.min(n+1,i.stream.end),e.value=n==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(t,e,n){let i=this.stream.clipPos(n.pos);if(e.token(this.stream.reset(i,t),n),t.value>-1){let{parser:r}=n.p;for(let s=0;s=0&&n.p.parser.dialect.allows(o>>1)){(1&o)==0?t.value=o>>1:t.extended=o>>1;break}}}else t.value=0,t.end=this.stream.clipPos(i+1)}putAction(t,e,n,i){for(let r=0;r4*t.bufferLength?new S(n,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,n=this.stacks,i=this.minStackPos,r=this.stacks=[];for(let s=0;si)r.push(o);else{if(this.advanceStack(o,r,n))continue;t||(t=[],e=[]),t.push(o);let l=this.tokens.getMainToken(o);e.push(l.value,l.end)}break}}if(!r.length){let a=t&&function(t){let e=null;for(let n of t){let i=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=i&&n.pos>i)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scorethis.stoppedAt?t[0]:this.runRecovery(t,e,r);if(h)return this.stackToTree(h.forceAll())}if(this.recovering){let c=1==this.recovering?1:3*this.recovering;if(r.length>c)for(r.sort((t,e)=>e.score-t.score);r.length>c;)r.pop();r.some(t=>t.reducePos>i)&&this.recovering--}else if(r.length>1)i:for(let u=0;u500&&p.buffer.length>500){if((f.score-p.score||f.buffer.length-p.buffer.length)>0)r.splice(d--,1);else{r.splice(u--,1);continue i}}}}this.minStackPos=r[0].pos;for(let m=1;m ":"";if(null!=this.stoppedAt&&i>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let o=t.curContext&&t.curContext.tracker.strict,l=o?t.curContext.hash:0;for(let a=this.fragments.nodeAt(i);a;){let c=this.parser.nodeSet.types[a.type.id]==a.type?r.getGoto(t.state,a.type.id):-1;if(c>-1&&a.length&&(!o||(a.prop(h.md.contextHash)||0)==l))return t.useNode(a,c),O&&console.log(s+this.stackID(t)+` (via reuse of ${r.getName(a.type.id)})`),!0;if(!(a instanceof h.mp)||0==a.children.length||a.positions[0]>0)break;let u=a.children[0];if(u instanceof h.mp&&0==a.positions[0])a=u;else break}}let f=r.stateSlot(t.state,4);if(f>0)return t.reduce(f),O&&console.log(s+this.stackID(t)+` (via always-reduce ${r.getName(65535&f)})`),!0;if(t.stack.length>=15e3)for(;t.stack.length>9e3&&t.forceReduce(););let d=this.tokens.getActions(t);for(let p=0;pi?e.push(v):n.push(v)}return!1}advanceFully(t,e){let n=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>n)return A(t,e),!0}}runRecovery(t,e,n){let i=null,r=!1;for(let s=0;s ":"";if(o.deadEnd&&(r||(r=!0,o.restart(),O&&console.log(h+this.stackID(o)+" (restarted)"),this.advanceFully(o,n))))continue;let c=o.split(),u=h;for(let f=0;c.forceReduce()&&f<10&&(O&&console.log(u+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,n));f++)O&&(u=this.stackID(c)+" -> ");for(let d of o.recoverByInsert(l))O&&console.log(h+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,n);this.stream.end>o.pos?(a==o.pos&&(a++,l=0),o.recoverByDelete(l,a),O&&console.log(h+this.stackID(o)+` (via recover-delete ${this.parser.getName(l)})`),A(o,n)):(!i||i.scoret;class I{constructor(t){this.start=t.start,this.shift=t.shift||T,this.reduce=t.reduce||T,this.reuse=t.reuse||T,this.hash=t.hash||(()=>0),this.strict=!1!==t.strict}}class D extends h._b{constructor(t){if(super(),this.wrappers=[],14!=t.version)throw RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let n=0;nt.topRules[e][1]),r=[];for(let s=0;s=0)o(u,a,l[c++]);else{let f=l[c+-u];for(let d=-u;d>0;d--)o(l[c++],a,f);c++}}}this.nodeSet=new h.Lj(e.map((e,n)=>h.Jq.define({name:n>=this.minRepeatTerm?void 0:e,id:n,props:r[n],top:i.indexOf(n)>-1,error:0==n,skipped:t.skippedNodes&&t.skippedNodes.indexOf(n)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=h.L3;let p=b(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let m=0;m"number"==typeof t?new y(p,t):t),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,n){let i=new C(this,t,e,n);for(let r of this.wrappers)i=r(i,t,e,n);return i}getGoto(t,e,n=!1){let i=this.goto;if(e>=i[0])return -1;for(let r=i[e+1];;){let s=i[r++],o=1&s,l=i[r++];if(o&&n)return l;for(let a=r+(s>>1);r0}validAction(t,e){if(e==this.stateSlot(t,4))return!0;for(let n=this.stateSlot(t,1);;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])return!1;n=R(this.data,n+2)}if(e==R(this.data,n+1))return!0}}nextStates(t){let e=[];for(let n=this.stateSlot(t,1);;n+=3){if(65535==this.data[n]){if(1==this.data[n+1])n=R(this.data,n+2);else break}if((1&this.data[n+2])==0){let i=this.data[n+1];e.some((t,e)=>1&e&&t==i)||e.push(this.data[n],i)}}return e}overrides(t,e){let n=M(this.data,this.tokenPrecTable,e);return n<0||M(this.data,this.tokenPrecTable,t){let n=t.tokenizers.find(t=>t.from==e);return n?n.to:e})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((n,i)=>{let r=t.specializers.find(t=>t.from==n.external);if(!r)return n;let s=Object.assign(Object.assign({},n),{external:r.to});return e.specializers[i]=$(s),s})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),n=e.map(()=>!1);if(t)for(let i of t.split(" ")){let r=e.indexOf(i);r>=0&&(n[r]=!0)}let s=null;for(let o=0;ot.external(n,i)<<1|e}return t.get}},28699:function(t,e,n){n.d(e,{V:function(){return o}});let i="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),r="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class o{constructor(t,e){this.rules=[];let{finish:n}=e||{};function i(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}for(let r in t)!function t(e,r,s,o){let l=[],a=/^@(\w+)\b/.exec(e[0]),h=a&&"keyframes"==a[1];if(a&&null==r)return s.push(e[0]+";");for(let c in r){let u=r[c];if(/&/.test(c))t(c.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((t,e)=>t.concat(e)),u,s);else if(u&&"object"==typeof u){if(!a)throw RangeError("The value of a property ("+c+") should be a primitive value.");t(i(c),u,l,h)}else null!=u&&l.push(c.replace(/_.*/,"").replace(/[A-Z]/g,t=>"-"+t.toLowerCase())+": "+u+";")}(l.length||h)&&s.push((!n||a||o?e:e.map(n)).join(", ")+" {"+l.join(" ")+"}")}(i(r),t[r],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=s[i]||1;return s[i]=t+1,"ͼ"+t.toString(36)}static mount(t,e){(t[r]||new a(t)).mount(Array.isArray(e)?e:[e])}}let l=null;class a{constructor(t){if(!t.head&&t.adoptedStyleSheets&&"undefined"!=typeof CSSStyleSheet){if(l)return t.adoptedStyleSheets=[l.sheet].concat(t.adoptedStyleSheets),t[r]=l;this.sheet=new CSSStyleSheet,t.adoptedStyleSheets=[this.sheet].concat(t.adoptedStyleSheets),l=this}else{this.styleTag=(t.ownerDocument||t).createElement("style");let e=t.head||t;e.insertBefore(this.styleTag,e.firstChild)}this.modules=[],t[r]=this}mount(t){let e=this.sheet,n=0,i=0;for(let r=0;r-1&&(this.modules.splice(o,1),i--,o=-1),-1==o){if(this.modules.splice(i++,0,s),e)for(let l=0;l",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},s="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent);"undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent);for(var o="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),l="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),a=o||s&&57>+s[1],h=0;h<10;h++)i[48+h]=i[96+h]=String(h);for(var h=1;h<=24;h++)i[h+111]="F"+h;for(var h=65;h<=90;h++)i[h]=String.fromCharCode(h+32),r[h]=String.fromCharCode(h);for(var c in i)r.hasOwnProperty(c)||(r[c]=i[c]);function u(t){var e=!(a&&(t.ctrlKey||t.altKey||t.metaKey)||l&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?r:i)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}}}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/1943-909ccbe5b3c551bb.js b/static/web/_next/static/chunks/1943-909ccbe5b3c551bb.js new file mode 100644 index 000000000..5502c59e0 --- /dev/null +++ b/static/web/_next/static/chunks/1943-909ccbe5b3c551bb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1943],{58909:function(t,e,n){n.d(e,{F:function(){return a}});var i=n(87462),r=n(35524),s=n(47421),o=n(59119),l=t=>{var{theme:e,settings:n,styles:i}=t,r={"&":{backgroundColor:n.background,color:n.foreground},".cm-gutters":{}};n.fontFamily&&(r["&.cm-editor .cm-scroller"]={fontFamily:n.fontFamily}),n.gutterBackground&&(r[".cm-gutters"].backgroundColor=n.gutterBackground),n.gutterForeground&&(r[".cm-gutters"].color=n.gutterForeground),n.gutterBorder&&(r[".cm-gutters"].borderRightColor=n.gutterBorder),n.caret&&(r[".cm-content"]={caretColor:n.caret},r[".cm-cursor, .cm-dropCursor"]={borderLeftColor:n.caret});var l={};n.gutterActiveForeground&&(l.color=n.gutterActiveForeground),n.lineHighlight&&(r[".cm-activeLine"]={backgroundColor:n.lineHighlight},l.backgroundColor=n.lineHighlight),r[".cm-activeLineGutter"]=l,n.selection&&(r["&.cm-focused .cm-selectionBackground, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={backgroundColor:n.selection}),n.selectionMatch&&(r["& .cm-selectionMatch"]={backgroundColor:n.selectionMatch});var a=s.tk.theme(r,{dark:"dark"===e}),h=o.Qf.define(i);return[a,(0,o.nF)(h)]},a=(t=>{var{theme:e="light",settings:n={},styles:s=[]}={};return l({theme:e,settings:(0,i.Z)({background:"#FFFFFF",foreground:"#000000",caret:"#FBAC52",selection:"#FFD420",selectionMatch:"#FFD420",gutterBackground:"#f5f5f5",gutterForeground:"#4D4D4C",gutterBorder:"transparent",lineHighlight:"#00000012"},n),styles:[{tag:[r.pJ.meta,r.pJ.comment],color:"#804000"},{tag:[r.pJ.keyword,r.pJ.strong],color:"#0000FF"},{tag:[r.pJ.number],color:"#FF0080"},{tag:[r.pJ.string],color:"#FF0080"},{tag:[r.pJ.variableName],color:"#006600"},{tag:[r.pJ.escape],color:"#33CC33"},{tag:[r.pJ.tagName],color:"#1C02FF"},{tag:[r.pJ.heading],color:"#0C07FF"},{tag:[r.pJ.quote],color:"#000000"},{tag:[r.pJ.list],color:"#B90690"},{tag:[r.pJ.documentMeta],color:"#888888"},{tag:[r.pJ.function(r.pJ.variableName)],color:"#0000A2"},{tag:[r.pJ.definition(r.pJ.typeName),r.pJ.typeName],color:"#6D79DE"},...s]})})()},87685:function(t,e,n){n.d(e,{ZP:function(){return nF}});var i=n(87462),r=n(63366),s=n(67294),o=n(78120),l=n(47421),a=n(59119),h=n(41113);let c=t=>{let e=m(t.state);return e.line?f(t):!!e.block&&p(t)};function u(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return!!r&&(i(n.update(r)),!0)}}let f=u(function(t,e,n=e.selection.ranges){let i=[],r=-1;for(let{from:s,to:o}of n){let l=i.length,a=1e9;for(let h=s;h<=o;){let c=e.doc.lineAt(h);if(c.from>r&&(s==o||o>c.from)){r=c.from;let u=m(e,h).line;if(!u)continue;let f=/^\s*/.exec(c.text)[0].length,d=f==c.length,p=c.text.slice(f,f+u.length)==u?f:-1;ft.comment<0&&(!t.empty||t.single))){let k=[];for(let{line:y,token:v,indent:b,empty:O,single:x}of i)(x||!O)&&k.push({from:y.from+b,insert:v+" "});let w=e.changes(k);return{changes:w,selection:e.selection.map(w,1)}}if(1!=t&&i.some(t=>t.comment>=0)){let S=[];for(let{line:P,comment:C,token:A}of i)if(C>=0){let Q=P.from+C,T=Q+A.length;" "==P.text[T-P.from]&&T++,S.push({from:Q,to:T})}return{changes:S}}return null},0),d=u(g,0),p=u((t,e)=>g(t,e,function(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to),s=e.length-1;s>=0&&e[s].to>i.from?e[s].to=r.to:e.push({from:i.from,to:r.to})}return e}(e)),0);function m(t,e=t.selection.main.head){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}function g(t,e,n=e.selection.ranges){let i=n.map(t=>m(e,t.from).block);if(!i.every(t=>t))return null;let r=n.map((t,n)=>(function(t,{open:e,close:n},i,r){let s,o,l=t.sliceDoc(i-50,i),a=t.sliceDoc(r,r+50),h=/\s*$/.exec(l)[0].length,c=/^\s*/.exec(a)[0].length,u=l.length-h;if(l.slice(u-e.length,u)==e&&a.slice(c,c+n.length)==n)return{open:{pos:i-h,margin:h&&1},close:{pos:r+c,margin:c&&1}};r-i<=100?s=o=t.sliceDoc(i,r):(s=t.sliceDoc(i,i+50),o=t.sliceDoc(r-50,r));let f=/^\s*/.exec(s)[0].length,d=/\s*$/.exec(o)[0].length,p=o.length-d-n.length;return s.slice(f,f+e.length)==e&&o.slice(p,p+n.length)==n?{open:{pos:i+f+e.length,margin:/\s/.test(s.charAt(f+e.length))?1:0},close:{pos:r-d-n.length,margin:/\s/.test(o.charAt(p-1))?1:0}}:null})(e,i[n],t.from,t.to));if(2!=t&&!r.every(t=>t))return{changes:e.changes(n.map((t,e)=>r[e]?[]:[{from:t.from,insert:i[e].open+" "},{from:t.to,insert:" "+i[e].close}]))};if(1!=t&&r.some(t=>t)){let s=[];for(let o=0,l;o(0,o.BO)(t,{minDepth:100,newGroupDelay:500},{minDepth:Math.max,newGroupDelay:Math.min})}),O=o.QQ.define({create:()=>$.empty,update(t,e){let n=e.state.facet(b),i=e.annotation(k);if(i){var r;let s;let l=e.docChanged?o.jT.single((r=e.changes,s=0,r.iterChangedRanges((t,e)=>s=e),s)):void 0,a=A.fromTransaction(e,l),h=i.side,c=0==h?t.undone:t.done;return c=a?Q(c,c.length,n.minDepth,a):D(c,e.startState.selection),new $(0==h?i.rest:c,0==h?c:i.rest)}let u=e.annotation(y);if(("full"==u||"before"==u)&&(t=t.isolate()),!1===e.annotation(o.YW.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let f=A.fromTransaction(e),d=e.annotation(o.YW.time),p=e.annotation(o.YW.userEvent);return f?t=t.addChanges(f,d,p,n.newGroupDelay,n.minDepth):e.selection&&(t=t.addSelection(e.startState.selection,d,p,n.newGroupDelay)),("full"==u||"after"==u)&&(t=t.isolate()),t},toJSON:t=>({done:t.done.map(t=>t.toJSON()),undone:t.undone.map(t=>t.toJSON())}),fromJSON:t=>new $(t.done.map(A.fromJSON),t.undone.map(A.fromJSON))});function x(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(O,!1);if(!r)return!1;let s=r.pop(t,n,e);return!!s&&(i(s),!0)}}let w=x(0,!1),S=x(1,!1),P=x(0,!0),C=x(1,!0);class A{constructor(t,e,n,i,r){this.changes=t,this.effects=e,this.mapped=n,this.startSelection=i,this.selectionsAfter=r}setSelAfter(t){return new A(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,n;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(t=>t.toJSON())}}static fromJSON(t){return new A(t.changes&&o.as.fromJSON(t.changes),[],t.mapped&&o.n0.fromJSON(t.mapped),t.startSelection&&o.jT.fromJSON(t.startSelection),t.selectionsAfter.map(o.jT.fromJSON))}static fromTransaction(t,e){let n=I;for(let i of t.startState.facet(v)){let r=i(t);r.length&&(n=n.concat(r))}return!n.length&&t.changes.empty?null:new A(t.changes.invert(t.startState.doc),n,void 0,e||t.startState.selection,I)}static selection(t){return new A(void 0,I,void 0,void 0,t)}}function Q(t,e,n,i){let r=t.slice(e+1>n+20?e-n-1:0,e);return r.push(i),r}function T(t,e){return t.length?e.length?t.concat(e):t:e}let I=[];function D(t,e){if(!t.length)return[A.selection([e])];{let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-200));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),Q(t,t.length-1,1e9,n.setSelAfter(i)))}}function R(t,e){if(!t.length)return t;let n=t.length,i=I;for(;n;){let r=function(t,e,n){let i=T(t.selectionsAfter.length?t.selectionsAfter.map(t=>t.map(e)):I,n);if(!t.changes)return A.selection(i);let r=t.changes.map(e),s=e.mapDesc(t.changes,!0),l=t.mapped?t.mapped.composeDesc(s):s;return new A(r,o.Py.mapEffects(t.effects,e),l,t.startSelection.map(s),i)}(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let s=t.slice(0,n);return s[n-1]=r,s}e=r.mapped,n--,i=r.selectionsAfter}return i.length?[A.selection(i)]:I}let M=/^(input\.type|delete)($|\.)/;class ${constructor(t,e,n=0,i){this.done=t,this.undone=e,this.prevTime=n,this.prevUserEvent=i}isolate(){return this.prevTime?new $(this.done,this.undone):this}addChanges(t,e,n,i,r){var s,o;let l,a,h=this.done,c=h[h.length-1];return h=c&&c.changes&&!c.changes.empty&&t.changes&&(!n||M.test(n))&&(!c.selectionsAfter.length&&e-this.prevTimel.push(t,e)),o.iterChangedRanges((t,e,n,i)=>{for(let r=0;r=s&&n<=o&&(a=!0)}}),a)||"input.type.compose"==n)?Q(h,h.length-1,r,new A(t.changes.compose(c.changes),T(t.effects,c.effects),c.mapped,c.startSelection,I)):Q(h,h.length,r,t),new $(h,I,e,n)}addSelection(t,e,n,i){var r;let s=this.done.length?this.done[this.done.length-1].selectionsAfter:I;return s.length>0&&e-this.prevTimee.empty!=t.ranges[n].empty).length?this:new $(D(this.done,t),this.undone,e,n)}addMapping(t){return new $(R(this.done,t),R(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,n){let i=0==t?this.done:this.undone;if(0==i.length)return null;let r=i[i.length-1];if(n&&r.selectionsAfter.length){var s;let o,l;return e.update({selection:r.selectionsAfter[r.selectionsAfter.length-1],annotations:k.of({side:t,rest:(o=(s=i)[s.length-1],(l=s.slice())[s.length-1]=o.setSelAfter(o.selectionsAfter.slice(0,o.selectionsAfter.length-1)),l)}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0})}if(!r.changes)return null;{let a=1==i.length?I:i.slice(0,i.length-1);return r.mapped&&(a=R(a,r.mapped)),e.update({changes:r.changes,selection:r.startSelection,effects:r.effects,annotations:k.of({side:t,rest:a}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}}}$.empty=new $(I,I);let N=[{key:"Mod-z",run:w,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:S,preventDefault:!0},{linux:"Ctrl-Shift-z",run:S,preventDefault:!0},{key:"Mod-u",run:P,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:C,preventDefault:!0}];function E(t,e){return o.jT.create(t.ranges.map(e),t.mainIndex)}function z(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function B({state:t,dispatch:e},n){let i=E(t.selection,n);return!i.eq(t.selection)&&(e(z(t,i)),!0)}function W(t,e){return o.jT.cursor(e?t.to:t.from)}function J(t,e){return B(t,n=>n.empty?t.moveByChar(n,e):W(n,e))}function L(t){return t.textDirectionAt(t.state.selection.main.head)==l.Nm.LTR}let j=t=>J(t,!L(t)),F=t=>J(t,L(t));function _(t,e){return B(t,n=>n.empty?t.moveByGroup(n,e):W(n,e))}let U=t=>_(t,!L(t)),X=t=>_(t,L(t));function q(t,e,n){let i,r,s=(0,a.qz)(t).resolveInner(e.head),l=n?h.md.closedBy:h.md.openedBy;for(let c=e.head;;){let u=n?s.childAfter(c):s.childBefore(c);if(!u)break;!function(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}(t,u,l)?c=n?u.to:u.from:s=u}return r=s.type.prop(l)&&(i=n?(0,a.Um)(t,s.from,1):(0,a.Um)(t,s.to,-1))&&i.matched?n?i.end.to:i.end.from:n?s.to:s.from,o.jT.cursor(r,n?-1:1)}let V=t=>B(t,e=>q(t.state,e,!L(t))),G=t=>B(t,e=>q(t.state,e,L(t)));function Z(t,e){return B(t,n=>{if(!n.empty)return W(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}let Y=t=>Z(t,!1),K=t=>Z(t,!0);function H(t){return Math.max(t.defaultLineHeight,Math.min(t.dom.clientHeight,innerHeight)-5)}function tt(t,e){let n,{state:i}=t,r=E(i.selection,n=>n.empty?t.moveVertically(n,e,H(t)):W(n,e));if(r.eq(i.selection))return!1;let s=t.coordsAtPos(i.selection.main.head),o=t.scrollDOM.getBoundingClientRect();return s&&s.top>o.top&&s.bottomtt(t,!1),tn=t=>tt(t,!0);function ti(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let s=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&e.head!=i.from+s&&(r=o.jT.cursor(i.from+s))}return r}let tr=t=>B(t,e=>ti(t,e,!0)),ts=t=>B(t,e=>ti(t,e,!1)),to=t=>B(t,e=>ti(t,e,!L(t))),tl=t=>B(t,e=>ti(t,e,L(t))),ta=t=>B(t,e=>o.jT.cursor(t.lineBlockAt(e.head).from,1)),th=t=>B(t,e=>o.jT.cursor(t.lineBlockAt(e.head).to,-1)),tc=({state:t,dispatch:e})=>{let n,i;return n=!1,i=E(t.selection,e=>{let i=(0,a.Um)(t,e.head,-1)||(0,a.Um)(t,e.head,1)||e.head>0&&(0,a.Um)(t,e.head-1,1)||e.head{let n=e(t);return o.jT.range(t.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)});return!n.eq(t.state.selection)&&(t.dispatch(z(t.state,n)),!0)}function tf(t,e){return tu(t,n=>t.moveByChar(n,e))}let td=t=>tf(t,!L(t)),tp=t=>tf(t,L(t));function tm(t,e){return tu(t,n=>t.moveByGroup(n,e))}let tg=t=>tm(t,!L(t)),tk=t=>tm(t,L(t)),ty=t=>tu(t,e=>q(t.state,e,!L(t))),tv=t=>tu(t,e=>q(t.state,e,L(t)));function tb(t,e){return tu(t,n=>t.moveVertically(n,e))}let tO=t=>tb(t,!1),tx=t=>tb(t,!0);function tw(t,e){return tu(t,n=>t.moveVertically(n,e,H(t)))}let tS=t=>tw(t,!1),tP=t=>tw(t,!0),tC=t=>tu(t,e=>ti(t,e,!0)),tA=t=>tu(t,e=>ti(t,e,!1)),tQ=t=>tu(t,e=>ti(t,e,!L(t))),tT=t=>tu(t,e=>ti(t,e,L(t))),tI=t=>tu(t,e=>o.jT.cursor(t.lineBlockAt(e.head).from)),tD=t=>tu(t,e=>o.jT.cursor(t.lineBlockAt(e.head).to)),tR=({state:t,dispatch:e})=>(e(z(t,{anchor:0})),!0),tM=({state:t,dispatch:e})=>(e(z(t,{anchor:t.doc.length})),!0),t$=({state:t,dispatch:e})=>(e(z(t,{anchor:t.selection.main.anchor,head:0})),!0),tN=({state:t,dispatch:e})=>(e(z(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),tE=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),tz=({state:t,dispatch:e})=>{let n=tK(t).map(({from:e,to:n})=>o.jT.range(e,Math.min(n+1,t.doc.length)));return e(t.update({selection:o.jT.create(n),userEvent:"select"})),!0},tB=({state:t,dispatch:e})=>{let n=E(t.selection,e=>{var n;let i=(0,a.qz)(t).resolveInner(e.head,1);for(;!(i.from=e.to||i.to>e.to&&i.from<=e.from||!(null===(n=i.parent)||void 0===n?void 0:n.parent));)i=i.parent;return o.jT.range(i.to,i.from)});return e(z(t,n)),!0},tW=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=o.jT.create([n.main]):n.main.empty||(i=o.jT.create([o.jT.cursor(n.main.head)])),!!i&&(e(z(t,i)),!0)};function tJ(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange(i=>{let{from:r,to:s}=i;if(r==s){let l=e(r);lr&&(n="delete.forward",l=tL(t,l,!0)),r=Math.min(r,l),s=Math.max(s,l)}else r=tL(t,r,!1),s=tL(t,s,!0);return r==s?{range:i}:{changes:{from:r,to:s},range:o.jT.cursor(r)}});return!r.changes.empty&&(t.dispatch(i.update(r,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?l.tk.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function tL(t,e,n){if(t instanceof l.tk)for(let i of t.state.facet(l.tk.atomicRanges).map(e=>e(t)))i.between(e,e,(t,i)=>{te&&(e=n?i:t)});return e}let tj=(t,e)=>tJ(t,n=>{let{state:i}=t,r=i.doc.lineAt(n),s,l;if(!e&&n>r.from&&ntj(t,!1),t_=t=>tj(t,!0),tU=(t,e)=>tJ(t,n=>{let i=n,{state:r}=t,s=r.doc.lineAt(i),l=r.charCategorizer(i);for(let a=null;;){if(i==(e?s.to:s.from)){i==n&&s.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let h=(0,o.cp)(s.text,i-s.from,e)+s.from,c=s.text.slice(Math.min(i,h)-s.from,Math.max(i,h)-s.from),u=l(c);if(null!=a&&u!=a)break;(" "!=c||i!=n)&&(a=u),i=h}return i}),tX=t=>tU(t,!1),tq=t=>tU(t,!0),tV=t=>tJ(t,e=>{let n=t.lineBlockAt(e).to;return etJ(t,e=>{let n=t.lineBlockAt(e).from;return e>n?n:Math.max(0,e-1)}),tZ=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:o.xv.of(["",""])},range:o.jT.cursor(t.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},tY=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let n=e.from,i=t.doc.lineAt(n),r=n==i.from?n-1:(0,o.cp)(i.text,n-i.from,!1)+i.from,s=n==i.to?n+1:(0,o.cp)(i.text,n-i.from,!0)+i.from;return{changes:{from:r,to:s,insert:t.doc.slice(n,s).append(t.doc.slice(r,n))},range:o.jT.cursor(s)}});return!n.changes.empty&&(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function tK(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),s=t.doc.lineAt(i.to);if(i.empty||i.to!=s.from||(s=t.doc.lineAt(i.to-1)),n>=r.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(i)}else e.push({from:r.from,to:s.to,ranges:[i]});n=s.number+1}return e}function tH(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let s of tK(t)){if(n?s.to==t.doc.length:0==s.from)continue;let l=t.doc.lineAt(n?s.to+1:s.from-1),a=l.length+1;if(n)for(let h of(i.push({from:s.to,to:l.to},{from:s.from,insert:l.text+t.lineBreak}),s.ranges))r.push(o.jT.range(Math.min(t.doc.length,h.anchor+a),Math.min(t.doc.length,h.head+a)));else for(let c of(i.push({from:l.from,to:s.from},{from:s.to,insert:t.lineBreak+l.text}),s.ranges))r.push(o.jT.range(c.anchor-a,c.head-a))}return!!i.length&&(e(t.update({changes:i,scrollIntoView:!0,selection:o.jT.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0)}let t0=({state:t,dispatch:e})=>tH(t,e,!1),t1=({state:t,dispatch:e})=>tH(t,e,!0);function t2(t,e,n){if(t.readOnly)return!1;let i=[];for(let r of tK(t))n?i.push({from:r.from,insert:t.doc.slice(r.from,r.to)+t.lineBreak}):i.push({from:r.to,insert:t.lineBreak+t.doc.slice(r.from,r.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}let t5=({state:t,dispatch:e})=>t2(t,e,!1),t3=({state:t,dispatch:e})=>t2(t,e,!0),t4=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(tK(e).map(({from:t,to:n})=>(t>0?t--:nt.moveVertically(e,!0)).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0},t9=t8(!1),t6=t8(!0);function t8(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(n=>{let{from:i,to:r}=n,s=e.doc.lineAt(i),l=!t&&i==r&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=(0,a.qz)(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),s;return i&&r&&i.to<=e&&r.from>=e&&(s=i.type.prop(h.md.closedBy))&&s.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from?{from:i.to,to:r.from}:null}(e,i);t&&(i=r=(r<=s.to?s:e.doc.lineAt(r)).to);let c=new a.Gn(e,{simulateBreak:i,simulateDoubleBreak:!!l}),u=(0,a.K0)(c,i);for(null==u&&(u=/^\s*/.exec(e.doc.lineAt(i).text)[0].length);rs.from&&i{let r=[];for(let s=i.from;s<=i.to;){let l=t.doc.lineAt(s);l.number>n&&(i.empty||i.to>l.from)&&(e(l,r,i),n=l.number),s=l.to+1}let a=t.changes(r);return{changes:r,range:o.jT.range(a.mapPos(i.anchor,1),a.mapPos(i.head,1))}})}let et=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new a.Gn(t,{overrideIndentation:t=>{let e=n[t];return null==e?-1:e}}),r=t7(t,(e,r,s)=>{let o=(0,a.K0)(i,e.from);if(null==o)return;/\S/.test(e.text)||(o=0);let l=/^\s*/.exec(e.text)[0],h=(0,a.SS)(t,o);(l!=h||s.from!t.readOnly&&(e(t.update(t7(t,(e,n)=>{n.push({from:e.from,insert:t.facet(a.c)})}),{userEvent:"input.indent"})),!0),en=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(t7(t,(e,n)=>{let i=/^\s*/.exec(e.text)[0];if(!i)return;let r=(0,o.IS)(i,t.tabSize),s=0,l=(0,a.SS)(t,Math.max(0,r-(0,a.y1)(t)));for(;s({mac:t.key,run:t.run,shift:t.shift}))),er=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:V,shift:ty},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:G,shift:tv},{key:"Alt-ArrowUp",run:t0},{key:"Shift-Alt-ArrowUp",run:t5},{key:"Alt-ArrowDown",run:t1},{key:"Shift-Alt-ArrowDown",run:t3},{key:"Escape",run:tW},{key:"Mod-Enter",run:t6},{key:"Alt-l",mac:"Ctrl-l",run:tz},{key:"Mod-i",run:tB,preventDefault:!0},{key:"Mod-[",run:en},{key:"Mod-]",run:ee},{key:"Mod-Alt-\\",run:et},{key:"Shift-Mod-k",run:t4},{key:"Shift-Mod-\\",run:tc},{key:"Mod-/",run:c},{key:"Alt-A",run:d}].concat(ei),es={key:"Tab",run:ee,shift:en};function eo(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];"string"==typeof r?t.setAttribute(i,r):null!=r&&(t[i]=r)}e++}for(;et.normalize("NFKD"):t=>t;class ea{constructor(t,e,n=0,i=t.length,r,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(n,i),this.bufferStart=n,this.normalize=r?t=>r(el(t)):el,this.query=this.normalize(e)}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,o.gm)(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=(0,o.bg)(t),n=this.bufferStart+this.bufferPos;this.bufferPos+=(0,o.nZ)(t);let i=this.normalize(e);for(let r=0,s=n;;r++){let l=i.charCodeAt(r),a=this.match(l,s);if(a)return this.value=a,this;if(r==i.length-1)break;s==n&&rthis.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 t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let n=this.curLineStart+e.index,i=n+e[0].length;if(this.matchPos=em(this.text,i+(n==i?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,i,e)))return this.value={from:n,to:i,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=n||i.to<=e){let r=new ed(e,t.sliceString(e,n));return ef.set(t,r),r}if(i.from==e&&i.to==n)return i;let{text:s,from:o}=i;return o>e&&(s=t.sliceString(e,o)+s,o=e),i.to=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e){let n=this.flat.from+e.index,i=n+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,i,e)))return this.value={from:n,to:i,match:e},this.matchPos=em(this.text,i+(n==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=ed.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function em(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function eg(t){let e=eo("input",{class:"cm-textfield",name:"line"}),n=eo("form",{class:"cm-gotoLine",onkeydown:e=>{27==e.keyCode?(e.preventDefault(),t.dispatch({effects:ek.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),i())},onsubmit:t=>{t.preventDefault(),i()}},eo("label",t.state.phrase("Go to line"),": ",e)," ",eo("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function i(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!n)return;let{state:i}=t,r=i.doc.lineAt(i.selection.main.head),[,s,l,a,h]=n,c=a?+a.slice(1):0,u=l?+l:r.number;if(l&&h){let f=u/100;s&&(f=f*("-"==s?-1:1)+r.number/i.doc.lines),u=Math.round(i.doc.lines*f)}else l&&s&&(u=u*("-"==s?-1:1)+r.number);let d=i.doc.line(Math.max(1,Math.min(i.doc.lines,u)));t.dispatch({effects:ek.of(!1),selection:o.jT.cursor(d.from+Math.max(0,Math.min(c,d.length))),scrollIntoView:!0}),t.focus()}return{dom:n}}"undefined"!=typeof Symbol&&(eu.prototype[Symbol.iterator]=ep.prototype[Symbol.iterator]=function(){return this});let ek=o.Py.define(),ey=o.QQ.define({create:()=>!0,update(t,e){for(let n of e.effects)n.is(ek)&&(t=n.value);return t},provide:t=>l.mH.from(t,t=>t?eg:null)}),ev=t=>{let e=(0,l.Sd)(t,eg);if(!e){let n=[ek.of(!0)];null==t.state.field(ey,!1)&&n.push(o.Py.appendConfig.of([ey,eb])),t.dispatch({effects:n}),e=(0,l.Sd)(t,eg)}return e&&e.dom.querySelector("input").focus(),!0},eb=l.tk.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),eO={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},ex=o.r$.define({combine:t=>(0,o.BO)(t,eO,{highlightWordAroundCursor:(t,e)=>t||e,minSelectionLength:Math.min,maxMatches:Math.min})}),ew=l.p.mark({class:"cm-selectionMatch"}),eS=l.p.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function eP(t,e,n,i){return(0==n||t(e.sliceDoc(n-1,n))!=o.D0.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=o.D0.Word)}let eC=l.lg.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(ex),{state:n}=t,i=n.selection;if(i.ranges.length>1)return l.p.none;let r=i.main,s,a=null;if(r.empty){if(!e.highlightWordAroundCursor)return l.p.none;let h=n.wordAt(r.head);if(!h)return l.p.none;a=n.charCategorizer(r.head),s=n.sliceDoc(h.from,h.to)}else{let c=r.to-r.from;if(c200)return l.p.none;if(e.wholeWords){var u,f,d;if(s=n.sliceDoc(r.from,r.to),!(eP(a=n.charCategorizer(r.head),n,r.from,r.to)&&(u=a,f=r.from,d=r.to,u(n.sliceDoc(f,f+1))==o.D0.Word&&u(n.sliceDoc(d-1,d))==o.D0.Word)))return l.p.none}else if(!(s=n.sliceDoc(r.from,r.to).trim()))return l.p.none}let p=[];for(let m of t.visibleRanges){let g=new ea(n.doc,s,m.from,m.to);for(;!g.next().done;){let{from:k,to:y}=g.value;if((!a||eP(a,n,k,y))&&(r.empty&&k<=r.from&&y>=r.to?p.push(eS.range(k,y)):(k>=r.to||y<=r.from)&&p.push(ew.range(k,y)),p.length>e.maxMatches))return l.p.none}}return l.p.set(p)}},{decorations:t=>t.decorations}),eA=l.tk.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),eQ=({state:t,dispatch:e})=>{let{selection:n}=t,i=o.jT.create(n.ranges.map(e=>t.wordAt(e.head)||o.jT.cursor(e.head)),n.mainIndex);return!i.eq(n)&&(e(t.update({selection:i})),!0)},eT=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(t=>t.from===t.to))return eQ({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(e=>t.sliceDoc(e.from,e.to)!=i))return!1;let r=function(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),s=r&&r.from==n.from&&r.to==n.to;for(let o=!1,l=new ea(t.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new ea(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(t=>t.from==l.value.from))continue;if(s){let a=t.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}(t,i);return!!r&&(e(t.update({selection:t.selection.addRange(o.jT.range(r.from,r.to),!1),effects:l.tk.scrollIntoView(r.to)})),!0)},eI=o.r$.define({combine:t=>(0,o.BO)(t,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:t=>new e3(t)})});class eD{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return RegExp(t,ec),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,(t,e)=>"n"==e?"\n":"r"==e?"\r":"t"==e?" ":"\\")}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new eB(this):new e$(this)}getCursor(t,e=0,n){let i=t.doc?t:o.yy.create({doc:t});return null==n&&(n=i.doc.length),this.regexp?eN(this,i,e,n):eM(this,i,e,n)}}class eR{constructor(t){this.spec=t}}function eM(t,e,n,i){var r,s;return new ea(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:t=>t.toLowerCase(),t.wholeWord?(r=e.doc,s=e.charCategorizer(e.selection.main.head),(t,e,n,i)=>((i>t||i+n.length=e)return null;i.push(n.value)}return i}highlight(t,e,n,i){let r=eM(this.spec,t,Math.max(0,e-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,t.doc.length));for(;!r.next().done;)i(r.value.from,r.value.to)}}function eN(t,e,n,i){var r;return new eu(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(r=e.charCategorizer(e.selection.main.head),(t,e,n)=>!n[0].length||(r(eE(n.input,n.index))!=o.D0.Word||r(ez(n.input,n.index))!=o.D0.Word)&&(r(ez(n.input,n.index+n[0].length))!=o.D0.Word||r(eE(n.input,n.index+n[0].length))!=o.D0.Word)):void 0},n,i)}function eE(t,e){return t.slice((0,o.cp)(t,e,!1),e)}function ez(t,e){return t.slice(e,(0,o.cp)(t,e))}class eB extends eR{nextMatch(t,e,n){let i=eN(this.spec,t,n,t.doc.length).next();return i.done&&(i=eN(this.spec,t,0,e).next()),i.done?null:i.value}prevMatchInRange(t,e,n){for(let i=1;;i++){let r=Math.max(e,n-1e4*i),s=eN(this.spec,t,r,n),o=null;for(;!s.next().done;)o=s.value;if(o&&(r==e||o.from>r+10))return o;if(r==e)return null}}prevMatch(t,e,n){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,n,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(e,n)=>"$"==n?"$":"&"==n?t.match[0]:"0"!=n&&+n=e)return null;i.push(n.value)}return i}highlight(t,e,n,i){let r=eN(this.spec,t,Math.max(0,e-250),Math.min(n+250,t.doc.length));for(;!r.next().done;)i(r.value.from,r.value.to)}}let eW=o.Py.define(),eJ=o.Py.define(),eL=o.QQ.define({create:t=>new ej(e0(t).create(),null),update(t,e){for(let n of e.effects)n.is(eW)?t=new ej(n.value.create(),t.panel):n.is(eJ)&&(t=new ej(t.query,n.value?eH:null));return t},provide:t=>l.mH.from(t,t=>t.panel)});class ej{constructor(t,e){this.query=t,this.panel=e}}let eF=l.p.mark({class:"cm-searchMatch"}),e_=l.p.mark({class:"cm-searchMatch cm-searchMatch-selected"}),eU=l.lg.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(eL))}update(t){let e=t.state.field(eL);(e!=t.startState.field(eL)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return l.p.none;let{view:n}=this,i=new o.f_;for(let r=0,s=n.visibleRanges,a=s.length;rs[r+1].from-500;)c=s[++r].to;t.highlight(n.state,h,c,(t,e)=>{let r=n.state.selection.ranges.some(n=>n.from==t&&n.to==e);i.add(t,e,r?e_:eF)})}return i.finish()}},{decorations:t=>t.decorations});function eX(t){return e=>{let n=e.state.field(eL,!1);return n&&n.query.spec.valid?t(e,n):e1(e)}}let eq=eX((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);return!!i&&(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:e6(t,i),userEvent:"select.search"}),!0)}),eV=eX((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);return!!r&&(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:e6(t,r),userEvent:"select.search"}),!0)}),eG=eX((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!!n&&!!n.length&&(t.dispatch({selection:o.jT.create(n.map(t=>o.jT.range(t.from,t.to))),userEvent:"select.search.matches"}),!0)}),eZ=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,s=[],l=0;for(let a=new ea(t.doc,t.sliceDoc(i,r));!a.next().done;){if(s.length>1e3)return!1;a.value.from==i&&(l=s.length),s.push(o.jT.range(a.value.from,a.value.to))}return e(t.update({selection:o.jT.create(s,l),userEvent:"select.search.matches"})),!0},eY=eX((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,i,i);if(!s)return!1;let o=[],a,h,c=[];if(s.from==i&&s.to==r&&(h=n.toText(e.getReplacement(s)),o.push({from:s.from,to:s.to,insert:h}),s=e.nextMatch(n,s.from,s.to),c.push(l.tk.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+"."))),s){let u=0==o.length||o[0].from>=s.to?0:s.to-s.from-h.length;a={anchor:s.from-u,head:s.to-u},c.push(e6(t,s))}return t.dispatch({changes:o,selection:a,scrollIntoView:!!a,effects:c,userEvent:"input.replace"}),!0}),eK=eX((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(t=>{let{from:n,to:i}=t;return{from:n,to:i,insert:e.getReplacement(t)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:l.tk.announce.of(i),userEvent:"input.replace.all"}),!0});function eH(t){return t.state.facet(eI).createPanel(t)}function e0(t,e){var n,i,r,s;let o=t.selection.main,l=o.empty||o.to>o.from+100?"":t.sliceDoc(o.from,o.to);if(e&&!l)return e;let a=t.facet(eI);return new eD({search:(null!==(n=null==e?void 0:e.literal)&&void 0!==n?n:a.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(i=null==e?void 0:e.caseSensitive)&&void 0!==i?i:a.caseSensitive,literal:null!==(r=null==e?void 0:e.literal)&&void 0!==r?r:a.literal,wholeWord:null!==(s=null==e?void 0:e.wholeWord)&&void 0!==s?s:a.wholeWord})}let e1=t=>{let e=t.state.field(eL,!1);if(e&&e.panel){let n=(0,l.Sd)(t,eH);if(!n)return!1;let i=n.dom.querySelector("[main-field]");if(i&&i!=t.root.activeElement){let r=e0(t.state,e.query.spec);r.valid&&t.dispatch({effects:eW.of(r)}),i.focus(),i.select()}}else t.dispatch({effects:[eJ.of(!0),e?eW.of(e0(t.state,e.query.spec)):o.Py.appendConfig.of(e7)]});return!0},e2=t=>{let e=t.state.field(eL,!1);if(!e||!e.panel)return!1;let n=(0,l.Sd)(t,eH);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:eJ.of(!1)}),!0},e5=[{key:"Mod-f",run:e1,scope:"editor search-panel"},{key:"F3",run:eq,shift:eV,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:eq,shift:eV,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:e2,scope:"editor search-panel"},{key:"Mod-Shift-l",run:eZ},{key:"Alt-g",run:ev},{key:"Mod-d",run:eT,preventDefault:!0}];class e3{constructor(t){this.view=t;let e=this.query=t.state.field(eL).query.spec;function n(t,e,n){return eo("button",{class:"cm-button",name:t,onclick:e,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=eo("input",{value:e.search,placeholder:e4(t,"Find"),"aria-label":e4(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=eo("input",{value:e.replace,placeholder:e4(t,"Replace"),"aria-label":e4(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=eo("input",{type:"checkbox",name:"case",form:"",checked:e.caseSensitive,onchange:this.commit}),this.reField=eo("input",{type:"checkbox",name:"re",form:"",checked:e.regexp,onchange:this.commit}),this.wordField=eo("input",{type:"checkbox",name:"word",form:"",checked:e.wholeWord,onchange:this.commit}),this.dom=eo("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,n("next",()=>eq(t),[e4(t,"next")]),n("prev",()=>eV(t),[e4(t,"previous")]),n("select",()=>eG(t),[e4(t,"all")]),eo("label",null,[this.caseField,e4(t,"match case")]),eo("label",null,[this.reField,e4(t,"regexp")]),eo("label",null,[this.wordField,e4(t,"by word")]),...t.state.readOnly?[]:[eo("br"),this.replaceField,n("replace",()=>eY(t),[e4(t,"replace")]),n("replaceAll",()=>eK(t),[e4(t,"replace all")])],eo("button",{name:"close",onclick:()=>e2(t),"aria-label":e4(t,"close"),type:"button"},["\xd7"])])}commit(){let t=new eD({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:eW.of(t)}))}keydown(t){(0,l.$1)(this.view,t,"search-panel")?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?eV:eq)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),eY(this.view))}update(t){for(let e of t.transactions)for(let n of e.effects)n.is(eW)&&!n.value.eq(this.query)&&this.setQuery(n.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(eI).top}}function e4(t,e){return t.state.phrase(e)}let e9=/[\s\.,:;?!]/;function e6(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,s=Math.max(i.from,e-30),o=Math.min(r,n+30),a=t.state.sliceDoc(s,o);if(s!=i.from){for(let h=0;h<30;h++)if(!e9.test(a[h+1])&&e9.test(a[h])){a=a.slice(h);break}}if(o!=r){for(let c=a.length-1;c>a.length-30;c--)if(!e9.test(a[c-1])&&e9.test(a[c])){a=a.slice(0,c);break}}return l.tk.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${i.number}.`)}let e8=l.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"}}),e7=[eL,o.Wl.lowest(eU),e8];var nt=n(34790);class ne{constructor(t,e,n){this.from=t,this.to=e,this.diagnostic=n}}class nn{constructor(t,e,n){this.diagnostics=t,this.panel=e,this.selected=n}static init(t,e,n){let i=t,r=n.facet(nk).markerFilter;r&&(i=r(i));let s=l.p.set(i.map(t=>t.from==t.to||t.from==t.to-1&&n.doc.lineAt(t.from).to==t.from?l.p.widget({widget:new nb(t),diagnostic:t}).range(t.from):l.p.mark({attributes:{class:"cm-lintRange cm-lintRange-"+t.severity},diagnostic:t}).range(t.from,t.to)),!0);return new nn(s,e,ni(s))}}function ni(t,e=null,n=0){let i=null;return t.between(n,1e9,(t,n,{spec:r})=>{if(!e||r.diagnostic==e)return i=new ne(t,n,r.diagnostic),!1}),i}function nr(t,e){return!!(t.effects.some(t=>t.is(no))||t.changes.touchesRange(e.pos))}function ns(t,e){return t.field(nh,!1)?e:e.concat(o.Py.appendConfig.of([nh,l.tk.decorations.compute([nh],t=>{let{selected:e,panel:n}=t.field(nh);return e&&n&&e.from!=e.to?l.p.set([nc.range(e.from,e.to)]):l.p.none}),(0,l.bF)(nu,{hideOn:nr}),nS]))}let no=o.Py.define(),nl=o.Py.define(),na=o.Py.define(),nh=o.QQ.define({create:()=>new nn(l.p.none,null,null),update(t,e){if(e.docChanged){let n=t.diagnostics.map(e.changes),i=null;if(t.selected){let r=e.changes.mapPos(t.selected.from,1);i=ni(n,t.selected.diagnostic,r)||ni(n,null,r)}t=new nn(n,t.panel,i)}for(let s of e.effects)s.is(no)?t=nn.init(s.value,t.panel,e.state):s.is(nl)?t=new nn(t.diagnostics,s.value?nx.open:null,t.selected):s.is(na)&&(t=new nn(t.diagnostics,t.panel,s.value));return t},provide:t=>[l.mH.from(t,t=>t.panel),l.tk.decorations.from(t,t=>t.diagnostics)]}),nc=l.p.mark({class:"cm-lintRange cm-lintRange-active"});function nu(t,e,n){let{diagnostics:i}=t.state.field(nh),r=[],s=2e8,o=0;i.between(e-(n<0?1:0),e+(n>0?1:0),(t,i,{spec:l})=>{e>=t&&e<=i&&(t==i||(e>t||n>0)&&(e({dom:function(t,e){return eo("ul",{class:"cm-tooltip-lint"},e.map(e=>nv(t,e,!1)))}(t,r)})}:null}let nf=t=>{let e=t.state.field(nh,!1);e&&e.panel||t.dispatch({effects:ns(t.state,[nl.of(!0)])});let n=(0,l.Sd)(t,nx.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},nd=t=>{let e=t.state.field(nh,!1);return!!e&&!!e.panel&&(t.dispatch({effects:nl.of(!1)}),!0)},np=t=>{let e=t.state.field(nh,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return(!!i.value||!!(i=e.diagnostics.iter(0)).value&&(i.from!=n.from||i.to!=n.to))&&(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},nm=[{key:"Mod-Shift-m",run:nf,preventDefault:!0},{key:"F8",run:np}],ng=l.lg.fromClass(class{constructor(t){this.view=t,this.timeout=-1,this.set=!0;let{delay:e}=t.state.facet(nk);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){let t=Date.now();if(tPromise.resolve(t(this.view)))).then(t=>{let n=t.reduce((t,e)=>t.concat(e));this.view.state.doc==e.doc&&this.view.dispatch({effects:ns(this.view.state,[no.of(n)])})},t=>{(0,l.OO)(this.view.state,t)})}}update(t){let e=t.state.facet(nk);(t.docChanged||e!=t.startState.facet(nk))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),nk=o.r$.define({combine:t=>Object.assign({sources:t.map(t=>t.source)},(0,o.BO)(t.map(t=>t.config),{delay:750,markerFilter:null,tooltipFilter:null})),enables:ng});function ny(t){let e=[];if(t)t:for(let{name:n}of t){for(let i=0;it.toLowerCase()==r.toLowerCase())){e.push(r);continue t}}e.push("")}return e}function nv(t,e,n){var i;let r=n?ny(e.actions):[];return eo("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},eo("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),null===(i=e.actions)||void 0===i?void 0:i.map((n,i)=>{let s=i=>{i.preventDefault();let r=ni(t.state.field(nh).diagnostics,e);r&&n.apply(t,r.from,r.to)},{name:o}=n,l=r[i]?o.indexOf(r[i]):-1,a=l<0?o:[o.slice(0,l),eo("u",o.slice(l,l+1)),o.slice(l+1)];return eo("button",{type:"button",class:"cm-diagnosticAction",onclick:s,onmousedown:s,"aria-label":` Action: ${o}${l<0?"":` (access key "${r[i]})"`}.`},a)}),e.source&&eo("div",{class:"cm-diagnosticSource"},e.source))}class nb extends l.l9{constructor(t){super(),this.diagnostic=t}eq(t){return t.diagnostic==this.diagnostic}toDOM(){return eo("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class nO{constructor(t,e){this.diagnostic=e,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=nv(t,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class nx{constructor(t){this.view=t,this.items=[];let e=e=>{if(27==e.keyCode)nd(this.view),this.view.focus();else if(38==e.keyCode||33==e.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==e.keyCode||34==e.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==e.keyCode)this.moveSelection(0);else if(35==e.keyCode)this.moveSelection(this.items.length-1);else if(13==e.keyCode)this.view.focus();else{if(!(e.keyCode>=65)||!(e.keyCode<=90)||!(this.selectedIndex>=0))return;let{diagnostic:n}=this.items[this.selectedIndex],i=ny(n.actions);for(let r=0;r{for(let e=0;end(this.view)},"\xd7")),this.update()}get selectedIndex(){let t=this.view.state.field(nh).selected;if(!t)return -1;for(let e=0;e{let l=-1,a;for(let h=n;hn&&(this.items.splice(n,l-n),i=!0)),e&&a.diagnostic==e.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),r=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),n++});n({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:t,panel:e})=>{t.tope.bottom&&(this.list.scrollTop+=t.bottom-e.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let t=this.list.firstChild;function e(){let e=t;t=e.nextSibling,e.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;t!=n.dom;)e();t=n.dom.nextSibling}else this.list.insertBefore(n.dom,t);for(;t;)e()}moveSelection(t){if(this.selectedIndex<0)return;let e=ni(this.view.state.field(nh).diagnostics,this.items[t].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:na.of(e)})}static open(t){return new nx(t)}}function nw(t){return function(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}(``,'width="6" height="3"')}let nS=l.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-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:nw("#d11")},".cm-lintRange-warning":{backgroundImage:nw("orange")},".cm-lintRange-info":{backgroundImage:nw("#999")},".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-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}}});l.SJ;let nP=o.Py.define();var nC=function(t){void 0===t&&(t={});var e,n=[];!1!==t.closeBracketsKeymap&&(n=n.concat(nt.GA)),!1!==t.defaultKeymap&&(n=n.concat(er)),!1!==t.searchKeymap&&(n=n.concat(e5)),!1!==t.historyKeymap&&(n=n.concat(N)),!1!==t.foldKeymap&&(n=n.concat(a.e7)),!1!==t.completionKeymap&&(n=n.concat(nt.B1)),!1!==t.lintKeymap&&(n=n.concat(nm));var i=[];if(!1!==t.lineNumbers&&i.push((0,l.Eu)()),!1!==t.highlightActiveLineGutter&&i.push((0,l.HQ)()),!1!==t.highlightSpecialChars&&i.push((0,l.AE)()),!1!==t.history&&i.push(function(t={}){return[O,b.of(t),l.tk.domEventHandlers({beforeinput(t,e){let n="historyUndo"==t.inputType?w:"historyRedo"==t.inputType?S:null;return!!n&&(t.preventDefault(),n(e))}})]}()),!1!==t.foldGutter&&i.push((0,a.mi)()),!1!==t.drawSelection&&i.push((0,l.Uw)()),!1!==t.dropCursor&&i.push((0,l.qr)()),!1!==t.allowMultipleSelections&&i.push(o.yy.allowMultipleSelections.of(!0)),!1!==t.indentOnInput&&i.push((0,a.nY)()),!1!==t.syntaxHighlighting&&i.push((0,a.nF)(a.R_,{fallback:!0})),!1!==t.bracketMatching&&i.push((0,a.n$)()),!1!==t.closeBrackets&&i.push((0,nt.vQ)()),!1!==t.autocompletion&&i.push((0,nt.ys)()),!1!==t.rectangularSelection&&i.push((0,l.Zs)()),!1!==t.crosshairCursor&&i.push((0,l.S2)()),!1!==t.highlightActiveLine&&i.push((0,l.ZO)()),!1!==t.highlightSelectionMatches){let r;i.push((r=[eA,eC],e&&r.push(ex.of(e)),r))}return t.tabSize&&"number"==typeof t.tabSize&&i.push(a.c.of(" ".repeat(t.tabSize))),i.concat([l.$f.of(n.flat())]).filter(Boolean)},nA=n(35524);let nQ="#e06c75",nT="#abb2bf",nI="#7d8799",nD="#d19a66",nR="#2c313a",nM="#282c34",n$="#353a42",nN="#528bff",nE=l.tk.theme({"&":{color:nT,backgroundColor:nM},".cm-content":{caretColor:nN},".cm-cursor, .cm-dropCursor":{borderLeftColor:nN},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:nT},".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",outline:"1px solid #515a6b"},".cm-gutters":{backgroundColor:nM,color:nI,border:"none"},".cm-activeLineGutter":{backgroundColor:nR},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:n$},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:n$,borderBottomColor:n$},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:nR,color:nT}}},{dark:!0}),nz=a.Qf.define([{tag:nA.pJ.keyword,color:"#c678dd"},{tag:[nA.pJ.name,nA.pJ.deleted,nA.pJ.character,nA.pJ.propertyName,nA.pJ.macroName],color:nQ},{tag:[nA.pJ.function(nA.pJ.variableName),nA.pJ.labelName],color:"#61afef"},{tag:[nA.pJ.color,nA.pJ.constant(nA.pJ.name),nA.pJ.standard(nA.pJ.name)],color:nD},{tag:[nA.pJ.definition(nA.pJ.name),nA.pJ.separator],color:nT},{tag:[nA.pJ.typeName,nA.pJ.className,nA.pJ.number,nA.pJ.changed,nA.pJ.annotation,nA.pJ.modifier,nA.pJ.self,nA.pJ.namespace],color:"#e5c07b"},{tag:[nA.pJ.operator,nA.pJ.operatorKeyword,nA.pJ.url,nA.pJ.escape,nA.pJ.regexp,nA.pJ.link,nA.pJ.special(nA.pJ.string)],color:"#56b6c2"},{tag:[nA.pJ.meta,nA.pJ.comment],color:nI},{tag:nA.pJ.strong,fontWeight:"bold"},{tag:nA.pJ.emphasis,fontStyle:"italic"},{tag:nA.pJ.strikethrough,textDecoration:"line-through"},{tag:nA.pJ.link,color:nI,textDecoration:"underline"},{tag:nA.pJ.heading,fontWeight:"bold",color:nQ},{tag:[nA.pJ.atom,nA.pJ.bool,nA.pJ.special(nA.pJ.variableName)],color:nD},{tag:[nA.pJ.processingInstruction,nA.pJ.string,nA.pJ.inserted],color:"#98c379"},{tag:nA.pJ.invalid,color:"#ffffff"}]),nB=[nE,(0,a.nF)(nz)];var nW=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(t=>!t.empty)}),nJ=n(85893),nL=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],nj=(0,s.forwardRef)((t,e)=>{var{className:n,value:a="",selection:h,extensions:c=[],onChange:u,onStatistics:f,onCreateEditor:d,onUpdate:p,autoFocus:m,theme:g="light",height:k,minHeight:y,maxHeight:v,width:b,minWidth:O,maxWidth:x,basicSetup:w,placeholder:S,indentWithTab:P,editable:C,readOnly:A,root:Q,initialState:T}=t,I=(0,r.Z)(t,nL),D=(0,s.useRef)(null),{state:R,view:M,container:$,setContainer:N}=function(t){var{value:e,selection:n,onChange:i,onStatistics:r,onCreateEditor:a,onUpdate:h,extensions:c=[],autoFocus:u,theme:f="light",height:d="",minHeight:p="",maxHeight:m="",placeholder:g="",width:k="",minWidth:y="",maxWidth:v="",editable:b=!0,readOnly:O=!1,indentWithTab:x=!0,basicSetup:w=!0,root:S,initialState:P}=t,[C,A]=(0,s.useState)(),[Q,T]=(0,s.useState)(),[I,D]=(0,s.useState)(),R=l.tk.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),M=l.tk.theme({"&":{height:d,minHeight:p,maxHeight:m,width:k,minWidth:y,maxWidth:v}}),$=[l.tk.updateListener.of(t=>{t.docChanged&&"function"==typeof i&&i(t.state.doc.toString(),t),r&&r(nW(t))}),M];switch(x&&$.unshift(l.$f.of([es])),w&&("boolean"==typeof w?$.unshift(nC()):$.unshift(nC(w))),g&&$.unshift((0,l.W$)(g)),f){case"light":$.push(R);break;case"dark":$.push(nB);break;case"none":break;default:$.push(f)}return!1===b&&$.push(l.tk.editable.of(!1)),O&&$.push(o.yy.readOnly.of(!0)),h&&"function"==typeof h&&$.push(l.tk.updateListener.of(h)),$=$.concat(c),(0,s.useEffect)(()=>{if(C&&!I){var t={doc:e,selection:n,extensions:$},i=P?o.yy.fromJSON(P.json,t,P.fields):o.yy.create(t);if(D(i),!Q){var r=new l.tk({state:i,parent:C,root:S});T(r),a&&a(r,i)}}return()=>{Q&&(D(void 0),T(void 0))}},[C,I]),(0,s.useEffect)(()=>A(t.container),[t.container]),(0,s.useEffect)(()=>()=>{Q&&(Q.destroy(),T(void 0))},[Q]),(0,s.useEffect)(()=>{u&&Q&&Q.focus()},[u,Q]),(0,s.useEffect)(()=>{Q&&Q.dispatch({effects:o.Py.reconfigure.of($)})},[f,c,d,p,m,k,y,v,g,b,O,x,w,i,h]),(0,s.useEffect)(()=>{if(void 0!==e){var t=Q?Q.state.doc.toString():"";Q&&e!==t&&Q.dispatch({changes:{from:0,to:t.length,insert:e||""}})}},[e,Q]),{state:I,setState:D,view:Q,setView:T,container:C,setContainer:A}}({container:D.current,root:Q,value:a,autoFocus:m,theme:g,height:k,minHeight:y,maxHeight:v,width:b,minWidth:O,maxWidth:x,basicSetup:w,placeholder:S,indentWithTab:P,editable:C,readOnly:A,selection:h,onChange:u,onStatistics:f,onCreateEditor:d,onUpdate:p,extensions:c,initialState:T});if((0,s.useImperativeHandle)(e,()=>({editor:D.current,state:R,view:M}),[D,$,R,M]),"string"!=typeof a)throw Error("value must be typeof string but got "+typeof a);return(0,nJ.jsx)("div",(0,i.Z)({ref:D,className:("string"==typeof g?"cm-theme-"+g:"cm-theme")+(n?" "+n:"")},I))});nj.displayName="CodeMirror";var nF=nj},34790:function(t,e,n){n.d(e,{B1:function(){return tC},GA:function(){return tb},Gn:function(){return to},Mb:function(){return a},eC:function(){return h},vQ:function(){return td},ys:function(){return tP}});var i=n(78120),r=n(47421),s=n(59119);class o{constructor(t,e,n){this.state=t,this.pos=e,this.explicit=n,this.abortListeners=[]}tokenBefore(t){let e=(0,s.qz)(this.state).resolveInner(this.pos,-1);for(;e&&0>t.indexOf(e.name);)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),n=Math.max(e.from,this.pos-250),i=e.text.slice(n-e.from,this.pos-e.from),r=i.search(f(t,!1));return r<0?null:{from:n+r,to:this.pos,text:i.slice(r)}}get aborted(){return null==this.abortListeners}addEventListener(t,e){"abort"==t&&this.abortListeners&&this.abortListeners.push(e)}}function l(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function a(t){let e=t.map(t=>"string"==typeof t?{label:t}:t),[n,i]=e.every(t=>/^\w+$/.test(t.label))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let r=1;r{let r=t.matchBefore(i);return r||t.explicit?{from:r?r.from:t.pos,options:e,validFor:n}:null}}function h(t,e){return n=>{for(let i=(0,s.qz)(n.state).resolveInner(n.pos,-1);i;i=i.parent)if(t.indexOf(i.name)>-1)return null;return e(n)}}class c{constructor(t,e,n){this.completion=t,this.source=e,this.match=n}}function u(t){return t.selection.main.head}function f(t,e){var n;let{source:i}=t,r=e&&"^"!=i[0],s="$"!=i[i.length-1];return r||s?RegExp(`${r?"^":""}(?:${i})${s?"$":""}`,null!==(n=t.flags)&&void 0!==n?n:t.ignoreCase?"i":""):t}let d=i.q6.define();function p(t,e){let n=e.completion.apply||e.completion.label,r=e.source;if("string"==typeof n){var s,o,l;t.dispatch(Object.assign(Object.assign({},(s=t.state,o=r.from,l=r.to,Object.assign(Object.assign({},s.changeByRange(t=>{if(t==s.selection.main)return{changes:{from:o,to:l,insert:n},range:i.jT.cursor(o+n.length)};let e=l-o;return!t.empty||e&&s.sliceDoc(t.from-e,t.from)!=s.sliceDoc(o,l)?{range:t}:{changes:{from:t.from-e,to:t.from,insert:n},range:i.jT.cursor(t.from-e+n.length)}})),{userEvent:"input.complete"}))),{annotations:d.of(e.completion)}))}else n(t,e.completion,r.from,r.to)}let m=new WeakMap;function g(t){if(!Array.isArray(t))return t;let e=m.get(t);return e||m.set(t,e=a(t)),e}class k{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let e=0;e=48&&P<=57||P>=97&&P<=122?2:P>=65&&P<=90?1:0:(C=(0,i.bg)(P))!=C.toLowerCase()?1:C!=C.toUpperCase()?2:0;(!x||1==A&&b||0==S&&0!=A)&&(e[m]==P||n[m]==P&&(g=!0)?o[m++]=x:o.length&&(O=!1)),S=A,x+=(0,i.nZ)(P)}return m==h&&0==o[0]&&O?this.result(-100+(g?-200:0),o,t):k==h&&0==y?[-200-t.length,0,v]:a>-1?[-700-t.length,a,a+this.pattern.length]:k==h?[-900-t.length,y,v]:m==h?this.result(-100+(g?-200:0)+-700+(O?0:-1100),o,t):2==e.length?null:this.result((r[0]?-700:0)+-200+-1100,r,t)}result(t,e,n){let r=[t-n.length],s=1;for(let o of e){let l=o+(this.astral?(0,i.nZ)((0,i.gm)(n,o)):1);s>1&&r[s-1]==o?r[s-1]=l:(r[s++]=o,r[s++]=l)}return r}}let y=i.r$.define({combine:t=>(0,i.BO)(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:(t,e)=>t.label.localeCompare(e.label),interactionDelay:75},{defaultKeymap:(t,e)=>t&&e,closeOnBlur:(t,e)=>t&&e,icons:(t,e)=>t&&e,tooltipClass:(t,e)=>n=>v(t(n),e(n)),optionClass:(t,e)=>n=>v(t(n),e(n)),addToOptions:(t,e)=>t.concat(e)})});function v(t,e){return t?e?t+" "+e:t:e}function b(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class O{constructor(t,e){let n;this.view=t,this.stateField=e,this.info=null,this.placeInfo={read:()=>this.measureInfo(),write:t=>this.positionInfo(t),key:this},this.space=null,this.currentClass="";let i=t.state.field(e),{options:r,selected:s}=i.open,o=t.state.facet(y);this.optionContent=(n=o.addToOptions.slice(),o.icons&&n.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map(t=>"cm-completionIcon-"+t)),e.setAttribute("aria-hidden","true"),e},position:20}),n.push({render(t,e,n){let i=document.createElement("span");i.className="cm-completionLabel";let{label:r}=t,s=0;for(let o=1;os&&i.appendChild(document.createTextNode(r.slice(s,l)));let h=i.appendChild(document.createElement("span"));h.appendChild(document.createTextNode(r.slice(l,a))),h.className="cm-completionMatchedText",s=a}return st.position-e.position).map(t=>t.render)),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=b(r.length,s,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",e=>{for(let n=e.target,i;n&&n!=this.dom;n=n.parentNode)if("LI"==n.nodeName&&(i=/-(\d+)$/.exec(n.id))&&+i[1]{this.info&&this.view.requestMeasure(this.placeInfo)})}mount(){this.updateSel()}update(t){var e,n,i;let r=t.state.field(this.stateField),s=t.startState.field(this.stateField);this.updateTooltipClass(t.state),r!=s&&(this.updateSel(),(null===(e=r.open)||void 0===e?void 0:e.disabled)!=(null===(n=s.open)||void 0===n?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(null===(i=r.open)||void 0===i?void 0:i.disabled)))}updateTooltipClass(t){let e=this.tooltipClass(t);if(e!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let i of e.split(" "))i&&this.dom.classList.add(i);this.currentClass=e}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfo)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected>-1&&e.selected=this.range.to)&&(this.range=b(e.options.length,e.selected,this.view.state.facet(y).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e.options,t.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfo)})),this.updateSelectedOption(e.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:n}=e.options[e.selected],{info:i}=n;if(!i)return;let s="string"==typeof i?document.createTextNode(i):i(n);if(!s)return;"then"in s?s.then(e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e)}).catch(t=>(0,r.OO)(this.view.state,t,"completion info")):this.addInfoPane(s)}}addInfoPane(t){let e=this.info=document.createElement("div");e.className="cm-tooltip cm-completionInfo",e.appendChild(t),this.dom.appendChild(e),this.view.requestMeasure(this.placeInfo)}updateSelectedOption(t){var e,n;let i,r,s=null;for(let o=this.list.firstChild,l=this.range.from;o;o=o.nextSibling,l++)l==t?o.hasAttribute("aria-selected")||(o.setAttribute("aria-selected","true"),s=o):o.hasAttribute("aria-selected")&&o.removeAttribute("aria-selected");return s&&(e=this.list,n=s,i=e.getBoundingClientRect(),(r=n.getBoundingClientRect()).topi.bottom&&(e.scrollTop+=r.bottom-i.bottom)),s}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),i=t.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.defaultView||window;s={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}if(i.top>Math.min(s.bottom,e.bottom)-10||i.bottom=n.height||m>e.top?u=i.bottom-e.top+"px":f=e.bottom-i.top+"px"}return{top:u,bottom:f,maxWidth:c,class:h?l?"left-narrow":"right-narrow":a?"left":"right"}}positionInfo(t){this.info&&(t?(this.info.style.top=t.top,this.info.style.bottom=t.bottom,this.info.style.maxWidth=t.maxWidth,this.info.className="cm-tooltip cm-completionInfo cm-completionInfo-"+t.class):this.info.style.top="-1e6px")}createListBox(t,e,n){let i=document.createElement("ul");i.id=e,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions"));for(let r=n.from;r=this.options.length?this:new w(this.options,C(e,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,e,n,i,r){let s=function(t,e){let n=[],i=0;for(let r of t)if(r.hasResult()){if(!1===r.result.filter){let s=r.result.getMatch;for(let o of r.result.options){let l=[1e9-i++];if(s)for(let a of s(o))l.push(a);n.push(new c(o,r,l))}}else{let h=new k(e.sliceDoc(r.from,r.to)),u;for(let f of r.result.options)(u=h.match(f.label))&&(null!=f.boost&&(u[0]+=f.boost),n.push(new c(f,r,u)))}}let d=[],p=null,m=e.facet(y).compareCompletions;for(let g of n.sort((t,e)=>e.match[0]-t.match[0]||m(t.completion,e.completion)))p&&p.label==g.completion.label&&p.detail==g.completion.detail&&(null==p.type||null==g.completion.type||p.type==g.completion.type)&&p.apply==g.completion.apply?x(g.completion)>x(p)&&(d[d.length-1]=g):d.push(g),p=g.completion;return d}(t,e);if(!s.length)return i&&t.some(t=>1==t.state)?new w(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let o=e.facet(y).selectOnOpen?0:-1;if(i&&i.selected!=o&&-1!=i.selected){let l=i.options[i.selected].completion;for(let a=0;ae.hasResult()?Math.min(t,e.from):t,1e8),create:t=>new O(t,N),above:r.aboveCursor},i?i.timestamp:Date.now(),o,!1)}map(t){return new w(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class S{constructor(t,e,n){this.active=t,this.id=e,this.open=n}static start(){return new S(A,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,n=e.facet(y),i=(n.override||e.languageDataAt("autocomplete",u(e)).map(g)).map(e=>(this.active.find(t=>t.source==e)||new T(e,this.active.some(t=>0!=t.state)?1:0)).update(t,n));i.length==this.active.length&&i.every((t,e)=>t==this.active[e])&&(i=this.active);let r=this.open;for(let s of(r&&t.docChanged&&(r=r.map(t.changes)),t.selection||i.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!function(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n1==t.state)&&(r=null),!r&&i.every(t=>1!=t.state)&&i.some(t=>t.hasResult())&&(i=i.map(t=>t.hasResult()?new T(t.source,0):t)),t.effects))s.is($)&&(r=r&&r.setSelected(s.value,this.id));return i==this.active&&r==this.open?this:new S(i,this.id,r)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:P}}let P={"aria-autocomplete":"list"};function C(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}let A=[];function Q(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class T{constructor(t,e,n=-1){this.source=t,this.state=e,this.explicitPos=n}hasResult(){return!1}update(t,e){let n=Q(t),i=this;for(let r of(n?i=i.handleUserEvent(t,n,e):t.docChanged?i=i.handleChange(t):t.selection&&0!=i.state&&(i=new T(i.source,0)),t.effects))if(r.is(D))i=new T(i.source,1,r.value?u(t.state):-1);else if(r.is(R))i=new T(i.source,0);else if(r.is(M))for(let s of r.value)s.source==i.source&&(i=s);return i}handleUserEvent(t,e,n){return"delete"!=e&&n.activateOnTyping?new T(this.source,1):this.map(t.changes)}handleChange(t){return t.changes.touchesRange(u(t.startState))?new T(this.source,0):this.map(t.changes)}map(t){return t.empty||this.explicitPos<0?this:new T(this.source,this.state,t.mapPos(this.explicitPos))}}class I extends T{constructor(t,e,n,i,r){super(t,2,e),this.result=n,this.from=i,this.to=r}hasResult(){return!0}handleUserEvent(t,e,n){var i;let r=t.changes.mapPos(this.from),s=t.changes.mapPos(this.to,1),l=u(t.state);if((this.explicitPos<0?l<=r:ls||"delete"==e&&u(t.startState)==this.from)return new T(this.source,"input"==e&&n.activateOnTyping?1:0);let a=this.explicitPos<0?-1:t.changes.mapPos(this.explicitPos),h;return!function(t,e,n,i){if(!t)return!1;let r=e.sliceDoc(n,i);return"function"==typeof t?t(r,n,i,e):f(t,!0).test(r)}(this.result.validFor,t.state,r,s)?this.result.update&&(h=this.result.update(this.result,r,s,new o(t.state,l,a>=0)))?new I(this.source,a,h,h.from,null!==(i=h.to)&&void 0!==i?i:u(t.state)):new T(this.source,1,a):new I(this.source,a,this.result,r,s)}handleChange(t){return t.changes.touchesRange(this.from,this.to)?new T(this.source,0):this.map(t.changes)}map(t){return t.empty?this:new I(this.source,this.explicitPos<0?-1:t.mapPos(this.explicitPos),this.result,t.mapPos(this.from),t.mapPos(this.to,1))}}let D=i.Py.define(),R=i.Py.define(),M=i.Py.define({map:(t,e)=>t.map(t=>t.map(e))}),$=i.Py.define(),N=i.QQ.define({create:()=>S.start(),update:(t,e)=>t.update(e),provide:t=>[r.hJ.from(t,t=>t.tooltip),r.tk.contentAttributes.from(t,t=>t.attrs)]});function E(t,e="option"){return n=>{let i=n.state.field(N,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+s*(t?1:-1):t?0:l-1;return a<0?a="page"==e?0:l-1:a>=l&&(a="page"==e?l-1:0),n.dispatch({effects:$.of(a)}),!0}}let z=t=>{let e=t.state.field(N,!1);return!(t.state.readOnly||!e||!e.open||e.open.selected<0||Date.now()-e.open.timestamp!!t.state.field(N,!1)&&(t.dispatch({effects:D.of(!0)}),!0),W=t=>{let e=t.state.field(N,!1);return!!(e&&e.active.some(t=>0!=t.state))&&(t.dispatch({effects:R.of(null)}),!0)};class J{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}let L=r.lg.fromClass(class{constructor(t){for(let e of(this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0,t.state.field(N).active))1==e.state&&this.startQuery(e)}update(t){let e=t.state.field(N);if(!t.selectionSet&&!t.docChanged&&t.startState.field(N)==e)return;let n=t.transactions.some(t=>(t.selection||t.docChanged)&&!Q(t));for(let i=0;i50&&Date.now()-s.time>1e3){for(let o of s.context.abortListeners)try{o()}catch(l){(0,r.OO)(this.view.state,l)}s.context.abortListeners=null,this.running.splice(i--,1)}else s.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(t=>1==t.state&&!this.running.some(e=>e.active.source==t.source))?setTimeout(()=>this.startUpdate(),50):-1,0!=this.composing)for(let a of t.transactions)"input"==Q(a)?this.composing=2:2==this.composing&&a.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view;for(let e of t.field(N).active)1!=e.state||this.running.some(t=>t.active.source==e.source)||this.startQuery(e)}startQuery(t){let{state:e}=this.view,n=u(e),i=new o(e,n,t.explicitPos==n),s=new J(t,i);this.running.push(s),Promise.resolve(t.source(i)).then(t=>{s.context.aborted||(s.done=t||null,this.scheduleAccept())},t=>{this.view.dispatch({effects:R.of(null)}),(0,r.OO)(this.view.state,t)})}scheduleAccept(){this.running.every(t=>void 0!==t.done)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),50))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(y);for(let i=0;it.source==r.active.source);if(l&&1==l.state){if(null==r.done){let a=new T(r.active.source,0);for(let h of r.updates)a=a.update(h,n);1!=a.state&&e.push(a)}else this.startQuery(l)}}e.length&&this.view.dispatch({effects:M.of(e)})}},{eventHandlers:{blur(){let t=this.view.state.field(N,!1);t&&t.tooltip&&this.view.state.facet(y).closeOnBlur&&this.view.dispatch({effects:R.of(null)})},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:D.of(!1)}),20),this.composing=0}}}),j=r.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":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&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"}}});class F{constructor(t,e,n,i){this.field=t,this.line=e,this.from=n,this.to=i}}class _{constructor(t,e,n){this.field=t,this.from=e,this.to=n}map(t){let e=t.mapPos(this.from,-1,i.gc.TrackDel),n=t.mapPos(this.to,1,i.gc.TrackDel);return null==e||null==n?null:new _(this.field,e,n)}}class U{constructor(t,e){this.lines=t,this.fieldPositions=e}instantiate(t,e){let n=[],i=[e],r=t.doc.lineAt(e),o=/^\s*/.exec(r.text)[0];for(let l of this.lines){if(n.length){let a=o,h=/^\t*/.exec(l)[0].length;for(let c=0;cnew _(t.field,i[t.line]+t.from,i[t.line]+t.to));return{text:n,ranges:u}}static parse(t){let e=[],n=[],i=[],r;for(let s of t.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(s);){let o=r[1]?+r[1]:null,l=r[2]||r[3]||"",a=-1;for(let h=0;h=a&&u.field++}i.push(new F(a,n.length,r.index,r.index+l.length)),s=s.slice(0,r.index)+l+s.slice(r.index+r[0].length)}for(let f;f=/\\([{}])/.exec(s);)for(let d of(s=s.slice(0,f.index)+f[1]+s.slice(f.index+f[0].length),i))d.line==n.length&&d.from>f.index&&(d.from--,d.to--);n.push(s)}return new U(n,i)}}let X=r.p.widget({widget:new class extends r.l9{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),q=r.p.mark({class:"cm-snippetField"});class V{constructor(t,e){this.ranges=t,this.active=e,this.deco=r.p.set(t.map(t=>(t.from==t.to?X:q).range(t.from,t.to)))}map(t){let e=[];for(let n of this.ranges){let i=n.map(t);if(!i)return null;e.push(i)}return new V(e,this.active)}selectionInsideField(t){return t.ranges.every(t=>this.ranges.some(e=>e.field==this.active&&e.from<=t.from&&e.to>=t.to))}}let G=i.Py.define({map:(t,e)=>t&&t.map(e)}),Z=i.Py.define(),Y=i.QQ.define({create:()=>null,update(t,e){for(let n of e.effects){if(n.is(G))return n.value;if(n.is(Z)&&t)return new V(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>r.tk.decorations.from(t,t=>t?t.deco:r.p.none)});function K(t,e){return i.jT.create(t.filter(t=>t.field==e).map(t=>i.jT.range(t.from,t.to)))}function H(t){return({state:e,dispatch:n})=>{let i=e.field(Y,!1);if(!i||t<0&&0==i.active)return!1;let r=i.active+t,s=t>0&&!i.ranges.some(e=>e.field==r+t);return n(e.update({selection:K(i.ranges,r),effects:G.of(s?null:new V(i.ranges,r))})),!0}}let tt=({state:t,dispatch:e})=>!!t.field(Y,!1)&&(e(t.update({effects:G.of(null)})),!0),te=H(1),tn=H(-1),ti=[{key:"Tab",run:te,shift:tn},{key:"Escape",run:tt}],tr=i.r$.define({combine:t=>t.length?t[0]:ti}),ts=i.Wl.highest(r.$f.compute([tr],t=>t.facet(tr)));function to(t,e){let n;return Object.assign(Object.assign({},e),{apply:(n=U.parse(t),(t,e,r,s)=>{let{text:o,ranges:l}=n.instantiate(t.state,r),a={changes:{from:r,to:s,insert:i.xv.of(o)},scrollIntoView:!0};if(l.length&&(a.selection=K(l,0)),l.length>1){let h=new V(l,0),c=a.effects=[G.of(h)];void 0===t.state.field(Y,!1)&&c.push(i.Py.appendConfig.of([Y,ts,tl,j]))}t.dispatch(t.state.update(a))})})}let tl=r.tk.domEventHandlers({mousedown(t,e){let n=e.state.field(Y,!1),i;if(!n||null==(i=e.posAtCoords({x:t.clientX,y:t.clientY})))return!1;let r=n.ranges.find(t=>t.from<=i&&t.to>=i);return!!r&&r.field!=n.active&&(e.dispatch({selection:K(n.ranges,r.field),effects:G.of(n.ranges.some(t=>t.field>r.field)?new V(n.ranges,r.field):null)}),!0)}}),ta={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},th=i.Py.define({map(t,e){let n=e.mapPos(t,-1,i.gc.TrackAfter);return null==n?void 0:n}}),tc=i.Py.define({map:(t,e)=>e.mapPos(t)}),tu=new class extends i.uU{};tu.startSide=1,tu.endSide=-1;let tf=i.QQ.define({create:()=>i.Xs.empty,update(t,e){if(e.selection){let n=e.state.doc.lineAt(e.selection.main.head).from,r=e.startState.doc.lineAt(e.startState.selection.main.head).from;n!=e.changes.mapPos(r,-1)&&(t=i.Xs.empty)}for(let s of(t=t.map(e.changes),e.effects))s.is(th)?t=t.update({add:[tu.range(s.value,s.value+1)]}):s.is(tc)&&(t=t.update({filter:t=>t!=s.value}));return t}});function td(){return[ty,tf]}let tp="()[]{}<>";function tm(t){for(let e=0;e{if((tk?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let o=t.state.selection.main;if(r.length>2||2==r.length&&1==(0,i.nZ)((0,i.gm)(r,0))||e!=o.from||n!=o.to)return!1;let l=function(t,e){let n=tg(t,t.selection.main.head),r=n.brackets||ta.brackets;for(let o of r){let l=tm((0,i.gm)(o,0));if(e==o)return l==o?function(t,e,n,r){let o=r.stringPrefixes||ta.stringPrefixes,l=null,a=t.changeByRange(r=>{if(!r.empty)return{changes:[{insert:e,from:r.from},{insert:e,from:r.to}],effects:th.of(r.to+e.length),range:i.jT.range(r.anchor+e.length,r.head+e.length)};let a=r.head,h=tx(t.doc,a),c;if(h==e){if(tw(t,a))return{changes:{insert:e+e,from:a},effects:th.of(a+e.length),range:i.jT.cursor(a+e.length)};if(tO(t,a)){let u=n&&t.sliceDoc(a,a+3*e.length)==e+e+e;return{range:i.jT.cursor(a+e.length*(u?3:1)),effects:tc.of(a)}}}else if(n&&t.sliceDoc(a-2*e.length,a)==e+e&&(c=tS(t,a-2*e.length,o))>-1&&tw(t,c))return{changes:{insert:e+e+e+e,from:a},effects:th.of(a+e.length),range:i.jT.cursor(a+e.length)};else if(t.charCategorizer(a)(h)!=i.D0.Word&&tS(t,a,o)>-1&&!function(t,e,n,i){let r=(0,s.qz)(t).resolveInner(e,-1),o=i.reduce((t,e)=>Math.max(t,e.length),0);for(let l=0;l<5;l++){let a=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+o)),h=a.indexOf(n);if(!h||h>-1&&i.indexOf(a.slice(0,h))>-1){let c=r.firstChild;for(;c&&c.from==r.from&&c.to-c.from>n.length+h;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=r.to==e&&r.parent;if(!u)break;r=u}return!1}(t,a,e,o))return{changes:{insert:e+e,from:a},effects:th.of(a+e.length),range:i.jT.cursor(a+e.length)};return{range:l=r}});return l?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}(t,o,r.indexOf(o+o+o)>-1,n):function(t,e,n,r){let s=null,o=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:th.of(o.to+e.length),range:i.jT.range(o.anchor+e.length,o.head+e.length)};let l=tx(t.doc,o.head);return!l||/\s/.test(l)||r.indexOf(l)>-1?{changes:{insert:e+n,from:o.head},effects:th.of(o.head+e.length),range:i.jT.cursor(o.head+e.length)}:{range:s=o}});return s?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}(t,o,l,n.before||ta.before);if(e==l&&tO(t,t.selection.main.from))return function(t,e,n){let r=null,s=t.selection.ranges.map(e=>e.empty&&tx(t.doc,e.head)==n?i.jT.cursor(e.head+n.length):r=e);return r?null:t.update({selection:i.jT.create(s,t.selection.mainIndex),scrollIntoView:!0,effects:t.selection.ranges.map(({from:t})=>tc.of(t))})}(t,0,l)}return null}(t.state,r);return!!l&&(t.dispatch(l),!0)}),tv=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=tg(t,t.selection.main.head).brackets||ta.brackets,r=null,s=t.changeByRange(e=>{if(e.empty){var s,o;let l;let a=(s=t.doc,o=e.head,l=s.sliceString(o-2,o),(0,i.nZ)((0,i.gm)(l,0))==l.length?l:l.slice(1));for(let h of n)if(h==a&&tx(t.doc,e.head)==tm((0,i.gm)(h,0)))return{changes:{from:e.head-h.length,to:e.head+h.length},range:i.jT.cursor(e.head-h.length)}}return{range:r=e}});return r||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},tb=[{key:"Backspace",run:tv}];function tO(t,e){let n=!1;return t.field(tf).between(0,t.doc.length,t=>{t==e&&(n=!0)}),n}function tx(t,e){let n=t.sliceString(e,e+2);return n.slice(0,(0,i.nZ)((0,i.gm)(n,0)))}function tw(t,e){let n=(0,s.qz)(t).resolveInner(e+1);return n.parent&&n.from==e}function tS(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=i.D0.Word)return e;for(let s of n){let o=e-s.length;if(t.sliceDoc(o,e)==s&&r(t.sliceDoc(o-1,o))!=i.D0.Word)return o}return -1}function tP(t={}){return[N,y.of(t),L,tA,j]}let tC=[{key:"Ctrl-Space",run:B},{key:"Escape",run:W},{key:"ArrowDown",run:E(!0)},{key:"ArrowUp",run:E(!1)},{key:"PageDown",run:E(!0,"page")},{key:"PageUp",run:E(!1,"page")},{key:"Enter",run:z}],tA=i.Wl.highest(r.$f.computeN([y],t=>t.facet(y).defaultKeymap?[tC]:[]))},61426:function(t,e,n){n.r(e),n.d(e,{css:function(){return S},cssCompletionSource:function(){return x},cssLanguage:function(){return w}});var i=n(53105),r=n(35524);let s=[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 o(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}let l=new i.Jq((t,e)=>{for(let n=!1,i=0,r=0;;r++){var s;let{next:l}=t;if(o(l)||45==l||95==l||n&&(s=l)>=48&&s<=57)!n&&(45!=l||r>0)&&(n=!0),i===r&&45==l&&i++,t.advance();else{n&&t.acceptToken(40==l?95:2==i&&e.canShift(2)?2:96);break}}}),a=new i.Jq(t=>{if(s.includes(t.peek(-1))){let{next:e}=t;(o(e)||95==e||35==e||46==e||91==e||58==e||45==e)&&t.acceptToken(94)}}),h=new i.Jq(t=>{if(!s.includes(t.peek(-1))){let{next:e}=t;if(37==e&&(t.advance(),t.acceptToken(1)),o(e)){do t.advance();while(o(t.next));t.acceptToken(1)}}}),c=(0,r.Gv)({"AtKeyword import charset namespace keyframes media supports":r.pJ.definitionKeyword,"from to selector":r.pJ.keyword,NamespaceName:r.pJ.namespace,KeyframeName:r.pJ.labelName,TagName:r.pJ.tagName,ClassName:r.pJ.className,PseudoClassName:r.pJ.constant(r.pJ.className),IdName:r.pJ.labelName,"FeatureName PropertyName":r.pJ.propertyName,AttributeName:r.pJ.attributeName,NumberLiteral:r.pJ.number,KeywordQuery:r.pJ.keyword,UnaryQueryOp:r.pJ.operatorKeyword,"CallTag ValueName":r.pJ.atom,VariableName:r.pJ.variableName,Callee:r.pJ.operatorKeyword,Unit:r.pJ.unit,"UniversalSelector NestingSelector":r.pJ.definitionOperator,MatchOp:r.pJ.compareOperator,"ChildOp SiblingOp, LogicOp":r.pJ.logicOperator,BinOp:r.pJ.arithmeticOperator,Important:r.pJ.modifier,Comment:r.pJ.blockComment,ParenthesizedContent:r.pJ.special(r.pJ.name),ColorLiteral:r.pJ.color,StringLiteral:r.pJ.string,":":r.pJ.punctuation,"PseudoOp #":r.pJ.derefOperator,"; ,":r.pJ.separator,"( )":r.pJ.paren,"[ ]":r.pJ.squareBracket,"{ }":r.pJ.brace}),u={__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},f={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},d={__proto__:null,not:128,only:128,from:158,to:160},p=i.WQ.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO.ZQ`O1G/ZO.tQXO1G/_O/[QXO1G/aO/rQXO1G/bO0YQWO,59zO0_Q[O'#DOO0fQdO'#CoOOQP1G/Z1G/ZO$vQdO1G/ZO0mQpO,59]OOQS,59_,59_O$vQdO,59aO0uQWO1G/kOOQS,59c,59cO0zQ!bO,59eO1SQWO'#DhO1_QWO,5:TO1dQWO,5:ZO&TQ[O,5:VO&TQ[O'#EZO1lQWO,5;VO1wQWO,5:XO'yQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2YQWO1G/|O2_QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2mQtO1G/gOOQO,5:t,5:tO3TQ[O,5:tOOQO-E8W-E8WO3bQWO1G0pOOQP7+$Y7+$YOOQP7+$u7+$uO$vQdO7+$uOOQS1G/f1G/fO3mQXO'#EiO3tQWO,59jO3yQtO'#EUO4nQdO'#EfO4xQWO,59ZO4}QpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5VQWO1G/PO$vQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5[QWO,5:uOOQO-E8X-E8XO5jQXO1G/vOOQS7+%h7+%hO5qQYO'#CsO(hQWO'#E[O5yQdO,5:hOOQS,5:h,5:hO6XQtO'#EXO$vQdO'#EXO7VQdO7+%ROOQO7+%R7+%ROOQO1G0`1G0`O7jQpO<T![;'S%^;'S;=`%o<%lO%^^;TUoWOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^^;nYoW#[UOy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^^[[oW#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^_?VSpVOy%^z;'S%^;'S;=`%o<%lO%^^?hWjSOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^_@VU#XPOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjSOy%^z{@}{;'S%^;'S;=`%o<%lO%^~ASUoWOy@}yzAfz{Bm{;'S@};'S;=`Co<%lO@}~AiTOzAfz{Ax{;'SAf;'S;=`Bg<%lOAf~A{VOzAfz{Ax{!PAf!P!QBb!Q;'SAf;'S;=`Bg<%lOAf~BgOR~~BjP;=`<%lAf~BrWoWOy@}yzAfz{Bm{!P@}!P!QC[!Q;'S@};'S;=`Co<%lO@}~CcSoWR~Oy%^z;'S%^;'S;=`%o<%lO%^~CrP;=`<%l@}^Cz[#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^XDuU]POy%^z![%^![!]EX!];'S%^;'S;=`%o<%lO%^XE`S^PoWOy%^z;'S%^;'S;=`%o<%lO%^_EqS!WVOy%^z;'S%^;'S;=`%o<%lO%^YFSSzQOy%^z;'S%^;'S;=`%o<%lO%^XFeU|POy%^z!`%^!`!aFw!a;'S%^;'S;=`%o<%lO%^XGOS|PoWOy%^z;'S%^;'S;=`%o<%lO%^XG_WOy%^z!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHO[!YPoWOy%^z}%^}!OGw!O!Q%^!Q![Gw![!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHySxPOy%^z;'S%^;'S;=`%o<%lO%^^I[SvUOy%^z;'S%^;'S;=`%o<%lO%^XIkUOy%^z#b%^#b#cI}#c;'S%^;'S;=`%o<%lO%^XJSUoWOy%^z#W%^#W#XJf#X;'S%^;'S;=`%o<%lO%^XJmS!`PoWOy%^z;'S%^;'S;=`%o<%lO%^XJ|UOy%^z#f%^#f#gJf#g;'S%^;'S;=`%o<%lO%^XKeS!RPOy%^z;'S%^;'S;=`%o<%lO%^_KvS!QVOy%^z;'S%^;'S;=`%o<%lO%^ZLXU!PPOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[a,h,l,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:t=>u[t]||-1},{term:56,get:t=>f[t]||-1},{term:96,get:t=>d[t]||-1}],tokenPrec:1123});var m=n(59119);let g=null;function k(){if(!g&&"object"==typeof document&&document.body){let t=[];for(let e in document.body.style)/[A-Z]|^-|^(item|length)$/.test(e)||t.push(e);g=t.sort().map(t=>({type:"property",label:t}))}return g||[]}let y=["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(t=>({type:"class",label:t})),v=["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(t=>({type:"keyword",label:t})).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(t=>({type:"constant",label:t}))),b=["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(t=>({type:"type",label:t})),O=/^[\w-]*/,x=t=>{let{state:e,pos:n}=t,i=(0,m.qz)(e).resolveInner(n,-1);if("PropertyName"==i.name)return{from:i.from,options:k(),validFor:O};if("ValueName"==i.name)return{from:i.from,options:v,validFor:O};if("PseudoClassName"==i.name)return{from:i.from,options:y,validFor:O};if("TagName"==i.name){for(let{parent:r}=i;r;r=r.parent)if("Block"==r.name)return{from:i.from,options:k(),validFor:O};return{from:i.from,options:b,validFor:O}}if(!t.explicit)return null;let s=i.resolve(n),o=s.childBefore(n);return o&&":"==o.name&&"PseudoClassSelector"==s.name?{from:n,options:y,validFor:O}:o&&":"==o.name&&"Declaration"==s.name||"ArgList"==s.name?{from:n,options:v,validFor:O}:"Block"==s.name?{from:n,options:k(),validFor:O}:null},w=m.qp.define({name:"css",parser:p.configure({props:[m.uj.add({Declaration:(0,m.tC)()}),m.x0.add({Block:m.Dv})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function S(){return new m.ri(w,w.data.of({autocomplete:x}))}},59119:function(t,e,n){n.d(e,{Be:function(){return k},Dv:function(){return F},Gn:function(){return D},K0:function(){return I},Qf:function(){return tf},R_:function(){return ty},SQ:function(){return u},SS:function(){return T},Um:function(){return tT},c:function(){return A},c6:function(){return P},e7:function(){return ti},il:function(){return tM},kU:function(){return c},mi:function(){return tc},n$:function(){return tA},nF:function(){return tg},nY:function(){return J},pp:function(){return h},qp:function(){return d},qz:function(){return p},ri:function(){return S},tC:function(){return W},uj:function(){return R},vw:function(){return E},x0:function(){return j},y1:function(){return Q},ze:function(){return B}});var i,r=n(41113),s=n(78120),o=n(47421),l=n(35524),a=n(28699);let h=new r.md;function c(t){return s.r$.define({combine:t?e=>e.concat(t):void 0})}class u{constructor(t,e,n=[],i=""){this.data=t,this.name=i,s.yy.prototype.hasOwnProperty("tree")||Object.defineProperty(s.yy.prototype,"tree",{get(){return p(this)}}),this.parser=e,this.extension=[w.of(this),s.yy.languageData.of((t,e,n)=>t.facet(f(t,e,n)))].concat(n)}isActiveAt(t,e,n=-1){return f(t,e,n)==this.data}findRegions(t){let e=t.facet(w);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let n=[],i=(t,e)=>{if(t.prop(h)==this.data){n.push({from:e,to:e+t.length});return}let s=t.prop(r.md.mounted);if(s){if(s.tree.prop(h)==this.data){if(s.overlay)for(let o of s.overlay)n.push({from:o.from+e,to:o.to+e});else n.push({from:e,to:e+t.length});return}if(s.overlay){let l=n.length;if(i(s.tree,s.overlay[0].from+e),n.length>l)return}}for(let a=0;at.isTop?e:void 0)]}),t.name)}configure(t,e){return new d(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function p(t){let e=t.field(u.state,!1);return e?e.tree:r.mp.empty}class m{constructor(t,e=t.length){this.doc=t,this.length=e,this.cursorPos=0,this.string="",this.cursor=t.iter()}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let n=this.cursorPos-this.string.length;return t=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-n,e-n)}}let g=null;class k{constructor(t,e,n=[],i,r,s,o,l){this.parser=t,this.state=e,this.fragments=n,this.tree=i,this.treeLen=r,this.viewport=s,this.skipped=o,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(t,e,n){return new k(t,e,[],r.mp.empty,0,n,[],null)}startParse(){return this.parser.startParse(new m(this.state.doc),this.fragments)}work(t,e){return(null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=r.mp.empty&&this.isDone(null!=e?e:this.state.doc.length))?(this.takeTree(),!0):this.withContext(()=>{var n;if("number"==typeof t){let i=Date.now()+t;t=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(e=this.parse.advance()););}),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(r.i9.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=g;g=this;try{return t()}finally{g=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=y(t,e.from,e.to);return t}changes(t,e){let{fragments:n,tree:i,treeLen:s,viewport:o,skipped:l}=this;if(this.takeTree(),!t.empty){let a=[];if(t.iterChangedRanges((t,e,n,i)=>a.push({fromA:t,toA:e,fromB:n,toB:i})),n=r.i9.applyChanges(n,a),i=r.mp.empty,s=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length)for(let h of(l=[],this.skipped)){let c=t.mapPos(h.from,1),u=t.mapPos(h.to,-1);ct.from&&(this.fragments=y(this.fragments,i,r),this.skipped.splice(n--,1))}return!(this.skipped.length>=e)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends r._b{createParse(e,n,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let e=g;if(e){for(let n of i)e.tempSkipped.push(n);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=o,new r.mp(r.Jq.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return g}}function y(t,e,n){return r.i9.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class v{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),n=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,n)||e.takeTree(),new v(e)}static init(t){let e=Math.min(3e3,t.doc.length),n=k.create(t.facet(w).parser,t,{from:0,to:e});return n.work(20,e)||n.takeTree(),new v(n)}}u.state=s.QQ.define({create:v.init,update(t,e){for(let n of e.effects)if(n.is(u.setState))return n.value;return e.startState.facet(w)!=e.state.facet(w)?v.init(e.state):t.apply(e)}});let b=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(b=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});let O="undefined"!=typeof navigator&&(null===(i=navigator.scheduling)||void 0===i?void 0:i.isInputPending)?()=>navigator.scheduling.isInputPending():null,x=o.lg.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(u.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),t.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(u.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=b(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEndi+1e3,l=r.context.work(()=>O&&O()||Date.now()>s,i+(o?0:1e5));this.chunkBudget-=Date.now()-e,(l||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:u.setState.of(new v(r.context))})),this.chunkBudget>0&&!(l&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(t=>(0,o.OO)(this.view.state,t)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),w=s.r$.define({combine:t=>t.length?t[0]:null,enables:t=>[u.state,x,o.tk.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class S{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}class P{constructor(t,e,n,i,r,s){this.name=t,this.alias=e,this.extensions=n,this.filename=i,this.loadFunc=r,this.support=s,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(t=>this.support=t,t=>{throw this.loading=null,t}))}static of(t){let{load:e,support:n}=t;if(!e){if(!n)throw RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");e=()=>Promise.resolve(n)}return new P(t.name,(t.alias||[]).concat(t.name).map(t=>t.toLowerCase()),t.extensions||[],t.filename,e,n)}static matchFilename(t,e){for(let n of t)if(n.filename&&n.filename.test(e))return n;let i=/\.([^.]+)$/.exec(e);if(i){for(let r of t)if(r.extensions.indexOf(i[1])>-1)return r}return null}static matchLanguageName(t,e,n=!0){for(let i of(e=e.toLowerCase(),t))if(i.alias.some(t=>t==e))return i;if(n)for(let r of t)for(let s of r.alias){let o=e.indexOf(s);if(o>-1&&(s.length>2||!/\w/.test(e[o-1])&&!/\w/.test(e[o+s.length])))return r}return null}}let C=s.r$.define(),A=s.r$.define({combine:t=>{if(!t.length)return" ";if(!/^(?: +|\t+)$/.test(t[0]))throw Error("Invalid indent unit: "+JSON.stringify(t[0]));return t[0]}});function Q(t){let e=t.facet(A);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function T(t,e){let n="",i=t.tabSize;if(9==t.facet(A).charCodeAt(0))for(;e>=i;)n+=" ",e-=i;for(let r=0;r=n.from&&i<=n.to?r&&i==t?{text:"",from:t}:(e<0?i-1&&(r+=s-this.countColumn(n,n.search(/\S|$/))),r}countColumn(t,e=t.length){return(0,s.IS)(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:n,from:i}=this.lineAt(t,e),r=this.options.overrideIndentation;if(r){let s=r(i);if(s>-1)return s}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}let R=new r.md;function M(t,e,n){for(;t;t=t.parent){let i=function(t){let e=t.type.prop(R);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(r.md.closedBy))){let s=t.lastChild,o=s&&i.indexOf(s.name)>-1;return t=>z(t,!0,1,void 0,o&&!(t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak)?s.from:void 0)}return null==t.parent?$:null}(t);if(i)return i(N.create(n,e,t))}return null}function $(){return 0}class N extends D{constructor(t,e,n){super(t.state,t.options),this.base=t,this.pos=e,this.node=n}static create(t,e,n){return new N(t,e,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let t=this.state.doc.lineAt(this.node.from);for(;;){let e=this.node.resolve(t.from);for(;e.parent&&e.parent.from==e.from;)e=e.parent;if(function(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}(e,this.node))break;t=this.state.doc.lineAt(e.from)}return this.lineIndent(t.from)}continue(){let t=this.node.parent;return t?M(t,this.pos,this.base):0}}function E({closing:t,align:e=!0,units:n=1}){return i=>z(i,e,n,t)}function z(t,e,n,i,r){let s=t.textAfter,o=s.match(/^\s*/)[0].length,l=i&&s.slice(o,o+i.length)==i||r==t.pos+o,a=e?function(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),o=null==r||r<=s.from?s.to:Math.min(s.to,r);for(let l=n.to;;){let a=e.childAfter(l);if(!a||a==i)return null;if(!a.type.isSkipped)return a.fromt.baseIndent;function W({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}function J(){return s.yy.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+200)return t;let s=n.sliceString(r.from,i);if(!e.some(t=>t.test(s)))return t;let{state:o}=t,l=-1,a=[];for(let{head:h}of o.selection.ranges){let c=o.doc.lineAt(h);if(c.from==l)continue;l=c.from;let u=I(o,c.from);if(null==u)continue;let f=/^\s*/.exec(c.text)[0],d=T(o,u);f!=d&&a.push({from:c.from,to:c.from+f.length,insert:d})}return a.length?[t,{changes:a,sequential:!0}]:t})}let L=s.r$.define(),j=new r.md;function F(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(s&&o.from=e&&a.to>n&&(s=a)}}return s}(t,e,n)}function U(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}let X=s.Py.define({map:U}),q=s.Py.define({map:U});function V(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(t=>t.from<=n&&t.to>=n)||e.push(t.lineBlockAt(n));return e}let G=s.QQ.define({create:()=>o.p.none,update(t,e){for(let n of(t=t.map(e.changes),e.effects))n.is(X)&&!function(t,e,n){let i=!1;return t.between(e,e,(t,r)=>{t==e&&r==n&&(i=!0)}),i}(t,n.value.from,n.value.to)?t=t.update({add:[tl.range(n.value.from,n.value.to)]}):n.is(q)&&(t=t.update({filter:(t,e)=>n.value.from!=t||n.value.to!=e,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let i=!1,{head:r}=e.selection.main;t.between(r,r,(t,e)=>{tr&&(i=!0)}),i&&(t=t.update({filterFrom:r,filterTo:r,filter:(t,e)=>e<=r||t>=r}))}return t},provide:t=>o.tk.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(t,e)=>{n.push(t,e)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{(!r||r.from>t)&&(r={from:t,to:e})}),r}function Y(t,e){return t.field(G,!1)?e:e.concat(s.Py.appendConfig.of(to()))}let K=t=>{for(let e of V(t)){let n=_(t.state,e.from,e.to);if(n)return t.dispatch({effects:Y(t.state,[X.of(n),tt(t,n)])}),!0}return!1},H=t=>{if(!t.state.field(G,!1))return!1;let e=[];for(let n of V(t)){let i=Z(t.state,n.from,n.to);i&&e.push(q.of(i),tt(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function tt(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return o.tk.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}let te=t=>{let{state:e}=t,n=[];for(let i=0;i{let e=t.state.field(G,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(t,e)=>{n.push(q.of({from:t,to:e}))}),t.dispatch({effects:n}),!0},ti=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:K},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:H},{key:"Ctrl-Alt-[",run:te},{key:"Ctrl-Alt-]",run:tn}],tr={placeholderDOM:null,placeholderText:"…"},ts=s.r$.define({combine:t=>(0,s.BO)(t,tr)});function to(t){let e=[G,tu];return t&&e.push(ts.of(t)),e}let tl=o.p.replace({widget:new class extends o.l9{toDOM(t){let{state:e}=t,n=e.facet(ts),i=e=>{let n=t.lineBlockAt(t.posAtDOM(e.target)),i=Z(t.state,n.from,n.to);i&&t.dispatch({effects:q.of(i)}),e.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(t,i);let r=document.createElement("span");return r.textContent=n.placeholderText,r.setAttribute("aria-label",e.phrase("folded code")),r.title=e.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=i,r}}}),ta={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class th extends o.SJ{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function tc(t={}){let e=Object.assign(Object.assign({},ta),t),n=new th(e,!0),i=new th(e,!1),r=o.lg.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(w)!=t.state.facet(w)||t.startState.field(G,!1)!=t.state.field(G,!1)||p(t.startState)!=p(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new s.f_;for(let r of t.viewportLineBlocks){let o=Z(t.state,r.from,r.to)?i:_(t.state,r.from,r.to)?n:null;o&&e.add(r.from,r.from,o)}return e.finish()}}),{domEventHandlers:l}=e;return[r,(0,o.v5)({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(r))||void 0===e?void 0:e.markers)||s.Xs.empty},initialSpacer:()=>new th(e,!1),domEventHandlers:Object.assign(Object.assign({},l),{click:(t,e,n)=>{if(l.click&&l.click(t,e,n))return!0;let i=Z(t.state,e.from,e.to);if(i)return t.dispatch({effects:q.of(i)}),!0;let r=_(t.state,e.from,e.to);return!!r&&(t.dispatch({effects:X.of(r)}),!0)}})}),to()]}let tu=o.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"}});class tf{constructor(t,e){let n;function i(t){let e=a.V.newName();return(n||(n=Object.create(null)))["."+e]=t,e}this.specs=t;let r="string"==typeof e.all?e.all:e.all?i(e.all):void 0,s=e.scope;this.scope=s instanceof u?t=>t.prop(h)==s.data:s?t=>t==s:void 0,this.style=(0,l.QR)(t.map(t=>({tag:t.tag,class:t.class||i(Object.assign({},t,{tag:null}))})),{all:r}).style,this.module=n?new a.V(n):null,this.themeType=e.themeType}static define(t,e){return new tf(t,e||{})}}let td=s.r$.define(),tp=s.r$.define({combine:t=>t.length?[t[0]]:null});function tm(t){let e=t.facet(td);return e.length?e:t.facet(tp)}function tg(t,e){let n=[tk],i;return t instanceof tf&&(t.module&&n.push(o.tk.styleModule.of(t.module)),i=t.themeType),(null==e?void 0:e.fallback)?n.push(tp.of(t)):i?n.push(td.computeN([o.tk.darkTheme],e=>e.facet(o.tk.darkTheme)==("dark"==i)?[t]:[])):n.push(td.of(t)),n}let tk=s.Wl.high(o.lg.fromClass(class{constructor(t){this.markCache=Object.create(null),this.tree=p(t.state),this.decorations=this.buildDeco(t,tm(t.state))}update(t){let e=p(t.state),n=tm(t.state),i=n!=tm(t.startState);e.length{n.add(t,e,this.markCache[i]||(this.markCache[i]=o.p.mark({class:i})))},i,r);return n.finish()}},{decorations:t=>t.decorations})),ty=tf.define([{tag:l.pJ.meta,color:"#404740"},{tag:l.pJ.link,textDecoration:"underline"},{tag:l.pJ.heading,textDecoration:"underline",fontWeight:"bold"},{tag:l.pJ.emphasis,fontStyle:"italic"},{tag:l.pJ.strong,fontWeight:"bold"},{tag:l.pJ.strikethrough,textDecoration:"line-through"},{tag:l.pJ.keyword,color:"#708"},{tag:[l.pJ.atom,l.pJ.bool,l.pJ.url,l.pJ.contentSeparator,l.pJ.labelName],color:"#219"},{tag:[l.pJ.literal,l.pJ.inserted],color:"#164"},{tag:[l.pJ.string,l.pJ.deleted],color:"#a11"},{tag:[l.pJ.regexp,l.pJ.escape,l.pJ.special(l.pJ.string)],color:"#e40"},{tag:l.pJ.definition(l.pJ.variableName),color:"#00f"},{tag:l.pJ.local(l.pJ.variableName),color:"#30a"},{tag:[l.pJ.typeName,l.pJ.namespace],color:"#085"},{tag:l.pJ.className,color:"#167"},{tag:[l.pJ.special(l.pJ.variableName),l.pJ.macroName],color:"#256"},{tag:l.pJ.definition(l.pJ.propertyName),color:"#00c"},{tag:l.pJ.comment,color:"#940"},{tag:l.pJ.invalid,color:"#f00"}]),tv=o.tk.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),tb="()[]{}",tO=s.r$.define({combine:t=>(0,s.BO)(t,{afterCursor:!0,brackets:tb,maxScanDistance:1e4,renderMatch:tS})}),tx=o.p.mark({class:"cm-matchingBracket"}),tw=o.p.mark({class:"cm-nonmatchingBracket"});function tS(t){let e=[],n=t.matched?tx:tw;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}let tP=s.QQ.define({create:()=>o.p.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(tO);for(let r of e.state.selection.ranges){if(!r.empty)continue;let s=tT(e.state,r.head,-1,i)||r.head>0&&tT(e.state,r.head-1,1,i)||i.afterCursor&&(tT(e.state,r.head,1,i)||r.heado.tk.decorations.from(t)}),tC=[tP,tv];function tA(t={}){return[tO.of(t),tC]}function tQ(t,e,n){let i=t.prop(e<0?r.md.openedBy:r.md.closedBy);if(i)return i;if(1==t.name.length){let s=n.indexOf(t.name);if(s>-1&&s%2==(e<0?1:0))return[n[s+e]]}return null}function tT(t,e,n,i={}){let r=i.maxScanDistance||1e4,s=i.brackets||tb,o=p(t),l=o.resolveInner(e,n);for(let a=l;a;a=a.parent){let h=tQ(a.type,n,s);if(h&&a.from=i.to){if(0==a&&r.indexOf(h.type.name)>-1&&h.from0)return null;let h={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),u=0;for(let f=0;!c.next().done&&f<=s;){let d=c.value;n<0&&(f+=d.length);let p=e+f*n;for(let m=n>0?0:d.length-1,g=n>0?d.length:-1;m!=g;m+=n){let k=o.indexOf(d[m]);if(!(k<0)&&i.resolveInner(p+m,1).type==r){if(k%2==0==n>0)u++;else{if(1==u)return{start:h,end:{from:p+m,to:p+m+1},matched:k>>1==a>>1};u--}}}n>0&&(f+=d.length)}return c.done?{start:h,matched:!1}:null}(t,e,n,o,l.type,r,s)}function tI(t,e,n,i=0,r=0){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);let s=r;for(let o=i;o=this.string.length}sol(){return 0==this.pos}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pose}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPosn?t.toLowerCase():t;return i(this.string.substr(this.pos,t.length))==i(t)?(!1!==e&&(this.pos+=t.length),!0):null}{let r=this.string.slice(this.pos).match(t);return r&&r.index>0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}}current(){return this.string.slice(this.start,this.pos)}}function tR(t){if("object"!=typeof t)return t;let e={};for(let n in t){let i=t[n];e[n]=i instanceof Array?i.slice():i}return e}class tM extends u{constructor(t){let e,n=c(t.languageData),i={name:t.name||"",token:t.token,blankLine:t.blankLine||(()=>{}),startState:t.startState||(()=>!0),copyState:t.copyState||tR,indent:t.indent||(()=>null),languageData:t.languageData||{},tokenTable:t.tokenTable||tz},s;super(n,new class extends r._b{createParse(t,e,n){return new tN(s,t,e,n)}},[C.of((t,e)=>this.getIndent(t,e))],t.name),this.topNode=(e=r.Jq.define({id:tB.length,name:"Document",props:[h.add(()=>n)]}),tB.push(e),e),s=this,this.streamParser=i,this.stateAfter=new r.md({perNode:!0}),this.tokenTable=t.tokenTable?new t_(i.tokenTable):tU}static define(t){return new tM(t)}getIndent(t,e){let n=p(t.state),i=n.resolve(e);for(;i&&i.type!=this.topNode;)i=i.parent;if(!i)return null;let r=t$(this,n,0,i.from,e),s,o;if(r?(o=r.state,s=r.pos+1):(o=this.streamParser.startState(t.unit),s=0),e-s>1e4)return null;for(;s=i&&n+e.length<=s&&e.prop(t.stateAfter);if(o)return{state:t.streamParser.copyState(o),pos:n+e.length};for(let l=e.children.length-1;l>=0;l--){let a=e.children[l],h=n+e.positions[l],c=a instanceof r.mp&&hn&&t$(t,s.tree,0-s.offset,n,l),h;if(a&&(h=function t(e,n,i,s,o){if(o&&i<=0&&s>=n.length)return n;o||n.type!=e.topNode||(o=!0);for(let l=n.children.length-1;l>=0;l--){let a=n.positions[l],h=n.children[l],c;if(a=e)?this.finish():t&&this.parsedPos>=t.viewport.to?(t.skipUntilInView(this.parsedPos,e),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let e=this.input.chunk(t);if(this.input.lineChunks)"\n"==e&&(e="");else{let n=e.indexOf("\n");n>-1&&(e=e.slice(0,n))}return t+e.length<=this.to?e:e.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,e=this.lineAfter(t),n=t+e.length;for(let i=this.rangeIndex;;){let r=this.ranges[i].to;if(r>=n||(e=e.slice(0,r-(n-e.length)),++i==this.ranges.length))break;let s=this.ranges[i].from,o=this.lineAfter(s);e+=o,n=s+o.length}return{line:e,end:n}}skipGapsTo(t,e,n){for(;;){let i=this.ranges[this.rangeIndex].to,r=t+e;if(n>0?i>r:i>=r)break;e+=this.ranges[++this.rangeIndex].from-i}return e}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){r=this.skipGapsTo(e,r,1),e+=r;let s=this.chunk.length;r=this.skipGapsTo(n,r,-1),n+=r,i+=this.chunk.length-s}return this.chunk.push(t,e,n,i),r}parseLine(t){let{line:e,end:n}=this.nextLine(),i=0,{streamParser:r}=this.lang,s=new tD(e,t?t.state.tabSize:4,t?Q(t.state):2);if(s.eol())r.blankLine(this.state,s.indentUnit);else for(;!s.eol();){let o=tE(r.token,s,this.state);if(o&&(i=this.emitToken(this.lang.tokenTable.resolve(o),this.parsedPos+s.start,this.parsedPos+s.pos,4,i)),s.start>1e4)break}this.parsedPos=n,this.moveRangeIndex(),this.parsedPose.start)return r}throw Error("Stream parser failed to advance stream.")}let tz=Object.create(null),tB=[r.Jq.none],tW=new r.Lj(tB),tJ=[],tL=Object.create(null);for(let[tj,tF]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"]])tL[tj]=tq(tz,tF);class t_{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),tL)}resolve(t){return t?this.table[t]||(this.table[t]=tq(this.extra,t)):0}}let tU=new t_(tz);function tX(t,e){tJ.indexOf(t)>-1||(tJ.push(t),console.warn(e))}function tq(t,e){let n=null;for(let i of e.split(".")){let s=t[i]||l.pJ[i];s?"function"==typeof s?n?n=s(n):tX(i,`Modifier ${i} used at start of tag`):n?tX(i,`Tag ${i} used as modifier`):n=s:tX(i,`Unknown highlighting tag ${i}`)}if(!n)return 0;let o=e.replace(/ /g,"_"),a=r.Jq.define({id:tB.length,name:o,props:[(0,l.Gv)({[o]:n})]});return tB.push(a),a.id}},78120:function(t,e,n){let i;n.d(e,{BO:function(){return tO},D0:function(){return tk},Gz:function(){return tW},IS:function(){return tB},Py:function(){return tu},QQ:function(){return U},Wl:function(){return V},Xs:function(){return tC},YW:function(){return tf},as:function(){return Q},bg:function(){return O},cp:function(){return m},f_:function(){return tA},gc:function(){return C},gm:function(){return b},jT:function(){return E},n0:function(){return A},nZ:function(){return x},q6:function(){return ta},r$:function(){return W},uU:function(){return tx},xv:function(){return r},yy:function(){return tb}});class r{constructor(){}lineAt(t){if(t<0||t>this.length)throw RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,n){let i=[];return this.decompose(0,t,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(e,this.length,i,1),o.from(i,this.length-(e-t)+n.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){let n=[];return this.decompose(t,e,n,0),o.from(n,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),n=this.length-this.scanIdentical(t,-1),i=new a(this),r=new a(t);for(let s=e,o=e;;){if(i.next(s),r.next(s),s=0,i.lineBreak!=r.lineBreak||i.done!=r.done||i.value!=r.value)return!1;if(o+=i.value.length,i.done||o>=n)return!0}}iter(t=1){return new a(this,t)}iterRange(t,e=this.length){return new h(this,t,e)}iterLines(t,e){let n;if(null==t)n=this.iter();else{null==e&&(e=this.lines+1);let i=this.line(t).from;n=this.iterRange(i,Math.max(i,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new c(n)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}static of(t){if(0==t.length)throw RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new s(t):o.from(s.split(t,[])):r.empty}}class s extends r{constructor(t,e=function(t){let e=-1;for(let n of t)e+=n.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,n,i){for(let r=0;;r++){let s=this.text[r],o=i+s.length;if((e?n:o)>=t)return new u(i,o,n,s);i=o+1,n++}}decompose(t,e,n,i){let r=t<=0&&e>=this.length?this:new s(l(this.text,[""],t,e),Math.min(e,this.length)-Math.max(0,t));if(1&i){let o=n.pop(),a=l(r.text,o.text.slice(),0,r.length);if(a.length<=32)n.push(new s(a,o.length+r.length));else{let h=a.length>>1;n.push(new s(a.slice(0,h)),new s(a.slice(h)))}}else n.push(r)}replace(t,e,n){if(!(n instanceof s))return super.replace(t,e,n);let i=l(this.text,l(n.text,l(this.text,[""],0,t)),e),r=this.length+n.length-(e-t);return i.length<=32?new s(i,r):o.from(s.split(i,[]),r)}sliceString(t,e=this.length,n="\n"){let i="";for(let r=0,s=0;r<=e&&st&&s&&(i+=n),tr&&(i+=o.slice(Math.max(0,t-r),e-r)),r=l+1}return i}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let n=[],i=-1;for(let r of t)n.push(r),i+=r.length+1,32==n.length&&(e.push(new s(n,i)),n=[],i=-1);return i>-1&&e.push(new s(n,i)),e}}class o extends r{constructor(t,e){for(let n of(super(),this.children=t,this.length=e,this.lines=0,t))this.lines+=n.lines}lineInner(t,e,n,i){for(let r=0;;r++){let s=this.children[r],o=i+s.length,l=n+s.lines-1;if((e?l:o)>=t)return s.lineInner(t,e,n,i);i=o+1,n=l+1}}decompose(t,e,n,i){for(let r=0,s=0;s<=e&&r=s){let a=i&((s<=t?1:0)|(l>=e?2:0));s>=t&&l<=e&&!a?n.push(o):o.decompose(t-s,e-s,n,a)}s=l+1}}replace(t,e,n){if(n.lines=r&&e<=l){let a=s.replace(t-r,e-r,n),h=this.lines-s.lines+a.lines;if(a.lines>4&&a.lines>h>>6){let c=this.children.slice();return c[i]=a,new o(c,this.length-(e-t)+n.length)}return super.replace(r,l,a)}r=l+1}return super.replace(t,e,n)}sliceString(t,e=this.length,n="\n"){let i="";for(let r=0,s=0;rt&&r&&(i+=n),ts&&(i+=o.sliceString(t-s,e-s,n)),s=l+1}return i}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof o))return 0;let n=0,[i,r,s,l]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=e,r+=e){if(i==s||r==l)return n;let a=this.children[i],h=t.children[r];if(a!=h)return n+a.scanIdentical(h,e);n+=a.length+1}}static from(t,e=t.reduce((t,e)=>t+e.length+1,-1)){let n=0;for(let i of t)n+=i.lines;if(n<32){let r=[];for(let l of t)l.flatten(r);return new s(r,e)}let a=Math.max(32,n>>5),h=a<<1,c=a>>1,u=[],f=0,d=-1,p=[];function m(){0!=f&&(u.push(1==p.length?p[0]:o.from(p,d)),d=-1,f=p.length=0)}for(let g of t)!function t(e){let n;if(e.lines>h&&e instanceof o)for(let i of e.children)t(i);else e.lines>c&&(f>c||!f)?(m(),u.push(e)):e instanceof s&&f&&(n=p[p.length-1])instanceof s&&e.lines+n.lines<=32?(f+=e.lines,d+=e.length+1,p[p.length-1]=new s(n.text.concat(e.text),n.length+1+e.length)):(f+e.lines>a&&m(),f+=e.lines,d+=e.length+1,p.push(e))}(g);return m(),1==u.length?u[0]:new o(u,e)}}function l(t,e,n=0,i=1e9){for(let r=0,s=0,o=!0;s=n&&(a>i&&(l=l.slice(0,i-r)),r0?1:(t instanceof s?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],r=this.offsets[n],o=r>>1,l=i instanceof s?i.text.length:i.children.length;if(o==(e>0?l:0)){if(0==n)return this.done=!0,this.value="",this;e>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&r)==(e>0?0:1)){if(this.offsets[n]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(i instanceof s){let a=i.text[o+(e<0?-1:0)];if(this.offsets[n]+=e,a.length>Math.max(0,t))return this.value=0==t?a:e>0?a.slice(t):a.slice(0,a.length-t),this;t-=a.length}else{let h=i.children[o+(e<0?-1:0)];t>h.length?(t-=h.length,this.offsets[n]+=e):(e<0&&this.offsets[n]--,this.nodes.push(h),this.offsets.push(e>0?1:(h instanceof s?h.text.length:h.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class h{constructor(t,e,n){this.value="",this.done=!1,this.cursor=new a(t,e>n?-1:1),this.pos=e>n?t.length:0,this.from=Math.min(e,n),this.to=Math.max(e,n)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let n=e<0?this.pos-this.from:this.to-this.pos;t>n&&(t=n),n-=t;let{value:i}=this.cursor.next(t);return this.pos+=(i.length+t)*e,this.value=i.length<=n?i:e<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class c{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:n,value:i}=this.inner.next(t);return e?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(r.prototype[Symbol.iterator]=function(){return this.iter()},a.prototype[Symbol.iterator]=h.prototype[Symbol.iterator]=c.prototype[Symbol.iterator]=function(){return this});class u{constructor(t,e,n,i){this.from=t,this.to=e,this.number=n,this.text=i}get length(){return this.to-this.from}}let f="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,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let d=1;d=127462&&t<=127487}function m(t,e,n=!0,i=!0){return(n?g:k)(t,e,i)}function g(t,e,n){if(e==t.length)return e;e&&y(t.charCodeAt(e))&&v(t.charCodeAt(e-1))&&e--;let i=b(t,e);for(e+=x(i);et)return f[e-1]<=t;return!1}(r))e+=x(r),i=r;else if(p(r)){let s=0,o=e-2;for(;o>=0&&p(b(t,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function k(t,e,n){for(;e>0;){let i=g(t,e-2,n);if(i=56320&&t<57344}function v(t){return t>=55296&&t<56320}function b(t,e){let n=t.charCodeAt(e);if(!v(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return y(i)?(n-55296<<10)+(i-56320)+65536:n}function O(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(((t-=65536)>>10)+55296,(1023&t)+56320)}function x(t){return t<65536?1:2}let w=/\r\n?|\n/;var S,P,C=((S=C||(C={}))[S.Simple=0]="Simple",S[S.TrackDel=1]="TrackDel",S[S.TrackBefore=2]="TrackBefore",S[S.TrackAfter=3]="TrackAfter",S);class A{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;et)return r+(t-i);r+=o}else{if(n!=C.Simple&&a>=t&&(n==C.TrackDel&&it||n==C.TrackBefore&&it))return null;if(a>t||a==t&&e<0&&!o)return t==i||e<0?r:r+l;r+=l}i=a}if(t>i)throw RangeError(`Position ${t} is out of range for changeset of length ${i}`);return r}touchesRange(t,e=t){for(let n=0,i=0;n=0&&i<=e&&o>=t)return!(ie)||"cover";i=o}return!1}toString(){let t="";for(let e=0;e=0?":"+i:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(t=>"number"!=typeof t))throw RangeError("Invalid JSON representation of ChangeDesc");return new A(t)}static create(t){return new A(t)}}class Q extends A{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw RangeError("Applying change set to a document with the wrong length");return D(this,(e,n,i,r,s)=>t=t.replace(i,i+(n-e),s),!1),t}mapDesc(t,e=!1){return R(this,t,e,!0)}invert(t){let e=this.sections.slice(),n=[];for(let i=0,s=0;i=0){e[i]=l,e[i+1]=o;let a=i>>1;for(;n.length0&&I(n,e,r.text),r.forward(a),o+=a}let c=t[s++];for(;o>1].toJSON()))}return t}static of(t,e,n){let i=[],s=[],o=0,l=null;function a(t=!1){if(!t&&!i.length)return;of||u<0||f>e)throw RangeError(`Invalid change range ${u} to ${f} (in doc of length ${e})`);let p=d?"string"==typeof d?r.of(d.split(n||w)):d:r.empty,m=p.length;if(u==f&&0==m)return;uo&&T(i,u-o,-1),T(i,f-u,m),I(s,i,p),o=f}}(t),a(!l),l}static empty(t){return new Q(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError("Invalid JSON representation of ChangeSet");let e=[],n=[];for(let i=0;ie&&"string"!=typeof t))throw RangeError("Invalid JSON representation of ChangeSet");else if(1==s.length)e.push(s[0],0);else{for(;n.length=0&&n<=0&&n==t[r+1]?t[r]+=e:0==e&&0==t[r]?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function I(t,e,n){if(0==n.length)return;let i=e.length-2>>1;if(i>1])),!n&&l!=t.sections.length&&!(t.sections[l+1]<0);)a=t.sections[l++],h=t.sections[l++];e(s,c,o,u,f),s=c,o=u}}}function R(t,e,n,i=!1){let r=[],s=i?[]:null,o=new $(t),l=new $(e);for(let a=-1;;)if(-1==o.ins&&-1==l.ins){let h=Math.min(o.len,l.len);T(r,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||0==o.off&&(l.len=0&&a=0){let f=0,d=o.len;for(;d;)if(-1==l.ins){let p=Math.min(d,l.len);f+=p,d-=p,l.forward(p)}else if(0==l.ins&&l.lena||o.ins>=0&&o.len>a)&&(l||i.length>h),s.forward2(a),o.forward(a)}}else T(i,0,o.ins,l),r&&I(r,i,o.text),o.next()}}class ${constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i>1;return e>=t.length?r.empty:t[e]}textBit(t){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length&&!t?r.empty:e[n].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class N{constructor(t,e,n){this.from=t,this.to=e,this.flags=n}get anchor(){return 16&this.flags?this.to:this.from}get head(){return 16&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 4&this.flags?-1:8&this.flags?1:0}get bidiLevel(){let t=3&this.flags;return 3==t?null:t}get goalColumn(){let t=this.flags>>5;return 33554431==t?void 0:t}map(t,e=-1){let n,i;return this.empty?n=i=t.mapPos(this.from,e):(n=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new N(n,i,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return E.range(t,e);let n=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return E.range(this.anchor,n)}eq(t){return this.anchor==t.anchor&&this.head==t.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid JSON representation for SelectionRange");return E.range(t.anchor,t.head)}static create(t,e,n){return new N(t,e,n)}}class E{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:E.create(this.ranges.map(n=>n.map(t,e)),this.mainIndex)}eq(t){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let e=0;et.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw RangeError("Invalid JSON representation for EditorSelection");return new E(t.ranges.map(t=>N.fromJSON(t)),t.main)}static single(t,e=t){return new E([E.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw RangeError("A selection needs at least one range");for(let n=0,i=0;it?4:0)|r)}static normalized(t,e=0){let n=t[e];t.sort((t,e)=>t.from-e.from),e=t.indexOf(n);for(let i=1;ir.head?E.range(l,o):E.range(o,l))}}return new E(t,e)}}function z(t,e){for(let n of t.ranges)if(n.to>e)throw RangeError("Selection points outside of document")}let B=0;class W{constructor(t,e,n,i,r){this.combine=t,this.compareInput=e,this.compare=n,this.isStatic=i,this.id=B++,this.default=t([]),this.extensions="function"==typeof r?r(this):r}static define(t={}){return new W(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:J),!!t.static,t.enables)}of(t){return new L([],this,0,t)}compute(t,e){if(this.isStatic)throw Error("Can't compute a static facet");return new L(t,this,1,e)}computeN(t,e){if(this.isStatic)throw Error("Can't compute a static facet");return new L(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],n=>e(n.field(t)))}}function J(t,e){return t==e||t.length==e.length&&t.every((t,n)=>t===e[n])}class L{constructor(t,e,n,i){this.dependencies=t,this.facet=e,this.type=n,this.value=i,this.id=B++}dynamicSlot(t){var e;let n=this.value,i=this.facet.compareInput,r=this.id,s=t[r]>>1,o=2==this.type,l=!1,a=!1,h=[];for(let c of this.dependencies)"doc"==c?l=!0:"selection"==c?a=!0:((null!==(e=t[c.id])&&void 0!==e?e:1)&1)==0&&h.push(t[c.id]);return{create:t=>(t.values[s]=n(t),1),update(t,e){if(l&&e.docChanged||a&&(e.docChanged||e.selection)||F(t,h)){let r=n(t);if(o?!j(r,t.values[s],i):!i(r,t.values[s]))return t.values[s]=r,1}return 0},reconfigure:(t,e)=>{let l,a=e.config.address[r];if(null!=a){let h=tt(e,a);if(this.dependencies.every(n=>n instanceof W?e.facet(n)===t.facet(n):!(n instanceof U)||e.field(n,!1)==t.field(n,!1))||(o?j(l=n(t),h,i):i(l=n(t),h)))return t.values[s]=h,0}else l=n(t);return t.values[s]=l,1}}}}function j(t,e,n){if(t.length!=e.length)return!1;for(let i=0;it===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(_).find(t=>t.field==this);return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,n)=>{let i=t.values[e],r=this.updateF(i,n);return this.compareF(i,r)?0:(t.values[e]=r,1)},reconfigure:(t,n)=>null!=n.config.address[this.id]?(t.values[e]=n.field(this),0):(t.values[e]=this.create(t),1)}}init(t){return[this,_.of({field:this,create:t})]}get extension(){return this}}let X={lowest:4,low:3,default:2,high:1,highest:0};function q(t){return e=>new G(e,t)}let V={highest:q(X.highest),high:q(X.high),default:q(X.default),low:q(X.low),lowest:q(X.lowest)};class G{constructor(t,e){this.inner=t,this.prec=e}}class Z{of(t){return new Y(this,t)}reconfigure(t){return Z.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Y{constructor(t,e){this.compartment=t,this.inner=e}}class K{constructor(t,e,n,i,r,s){for(this.base=t,this.compartments=e,this.dynamicSlots=n,this.address=i,this.staticValues=r,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(t,e,n){let i,r,s=[],o=Object.create(null),l=new Map;for(let a of(i=[[],[],[],[],[]],r=new Map,!function t(n,s){let o=r.get(n);if(null!=o){if(o<=s)return;let a=i[o].indexOf(n);a>-1&&i[o].splice(a,1),n instanceof Y&&l.delete(n.compartment)}if(r.set(n,s),Array.isArray(n))for(let h of n)t(h,s);else if(n instanceof Y){if(l.has(n.compartment))throw RangeError("Duplicate use of compartment in extensions");let c=e.get(n.compartment)||n.inner;l.set(n.compartment,c),t(c,s)}else if(n instanceof G)t(n.inner,n.prec);else if(n instanceof U)i[s].push(n),n.provides&&t(n.provides,s);else if(n instanceof L)i[s].push(n),n.facet.extensions&&t(n.facet.extensions,X.default);else{let u=n.extension;if(!u)throw Error(`Unrecognized extension value in extension set (${n}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);t(u,s)}}(t,X.default),i.reduce((t,e)=>t.concat(e))))a instanceof U?s.push(a):(o[a.facet.id]||(o[a.facet.id]=[])).push(a);let h=Object.create(null),c=[],u=[];for(let f of s)h[f.id]=u.length<<1,u.push(t=>f.slot(t));let d=null==n?void 0:n.config.facets;for(let p in o){let m=o[p],g=m[0].facet,k=d&&d[p]||[];if(m.every(t=>0==t.type)){if(h[g.id]=c.length<<1|1,J(k,m))c.push(n.facet(g));else{let y=g.combine(m.map(t=>t.value));c.push(n&&g.compare(y,n.facet(g))?n.facet(g):y)}}else{for(let v of m)0==v.type?(h[v.id]=c.length<<1|1,c.push(v.value)):(h[v.id]=u.length<<1,u.push(t=>v.dynamicSlot(t)));h[g.id]=u.length<<1,u.push(t=>(function(t,e,n){let i=n.map(e=>t[e.id]),r=n.map(t=>t.type),s=i.filter(t=>!(1&t)),o=t[e.id]>>1;function l(t){let n=[];for(let s=0;st(h));return new K(t,l,b,h,c,o)}}function H(t,e){if(1&e)return 2;let n=e>>1,i=t.status[n];if(4==i)throw Error("Cyclic dependency between fields and/or facets");if(2&i)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function tt(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}let te=W.define(),tn=W.define({combine:t=>t.some(t=>t),static:!0}),ti=W.define({combine:t=>t.length?t[0]:void 0,static:!0}),tr=W.define(),ts=W.define(),to=W.define(),tl=W.define({combine:t=>!!t.length&&t[0]});class ta{constructor(t,e){this.type=t,this.value=e}static define(){return new th}}class th{of(t){return new ta(this,t)}}class tc{constructor(t){this.map=t}of(t){return new tu(this,t)}}class tu{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new tu(this.type,e)}is(t){return this.type==t}static define(t={}){return new tc(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let n=[];for(let i of t){let r=i.map(e);r&&n.push(r)}return n}}tu.reconfigure=tu.define(),tu.appendConfig=tu.define();class tf{constructor(t,e,n,i,r,s){this.startState=t,this.changes=e,this.selection=n,this.effects=i,this.annotations=r,this.scrollIntoView=s,this._doc=null,this._state=null,n&&z(n,e.newLength),r.some(t=>t.type==tf.time)||(this.annotations=r.concat(tf.time.of(Date.now())))}static create(t,e,n,i,r,s){return new tf(t,e,n,i,r,s)}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(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(tf.userEvent);return!!(e&&(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function td(t,e,n){var i;let r,s,o;return n?(r=e.changes,s=Q.empty(e.changes.length),o=t.changes.compose(e.changes)):(r=e.changes.map(t.changes),s=t.changes.mapDesc(e.changes,!0),o=t.changes.compose(r)),{changes:o,selection:e.selection?e.selection.map(s):null===(i=t.selection)||void 0===i?void 0:i.map(r),effects:tu.mapEffects(t.effects,r).concat(tu.mapEffects(e.effects,s)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function tp(t,e,n){let i=e.selection,r=tg(e.annotations);return e.userEvent&&(r=r.concat(tf.userEvent.of(e.userEvent))),{changes:e.changes instanceof Q?e.changes:Q.of(e.changes||[],n,t.facet(ti)),selection:i&&(i instanceof E?i:E.single(i.anchor,i.head)),effects:tg(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}tf.time=ta.define(),tf.userEvent=ta.define(),tf.addToHistory=ta.define(),tf.remote=ta.define();let tm=[];function tg(t){return null==t?tm:Array.isArray(t)?t:[t]}var tk=((P=tk||(tk={}))[P.Word=0]="Word",P[P.Space=1]="Space",P[P.Other=2]="Other",P);let ty=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{i=RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(tv){}class tb{constructor(t,e,n,i,r,s){this.config=t,this.doc=e,this.selection=n,this.values=i,this.status=t.statusTemplate.slice(),this.computeSlot=r,s&&(s._state=this);for(let o=0;o=0;r--){let s=n[r](t);s&&Object.keys(s).length&&(i=td(i,tp(e,s,t.changes.newLength),!0))}return i==t?t:tf.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}(i?function(e){let n=e.startState,i=!0;for(let r of n.facet(tr)){let s=r(e);if(!1===s){i=!1;break}Array.isArray(s)&&(i=!0===i?s:function(t,e){let n=[];for(let i=0,r=0;;){let s,o;if(i=t[i]))s=t[i++],o=t[i++];else{if(!(r=0;c--){let u=h[c](e);e=u instanceof tf?u:Array.isArray(u)&&1==u.length&&u[0]instanceof tf?u[0]:t(n,tg(u),!1)}return e}(l):l)}(this,t,!0)}applyTransaction(t){let e,n=this.config,{base:i,compartments:r}=n;for(let s of t.effects)s.is(Z.reconfigure)?(n&&(r=new Map,n.compartments.forEach((t,e)=>r.set(e,t)),n=null),r.set(s.value.compartment,s.value.extension)):s.is(tu.reconfigure)?(n=null,i=s.value):s.is(tu.appendConfig)&&(n=null,i=tg(i).concat(s.value));n?e=t.startState.values.slice():(n=K.resolve(i,r,this),e=new tb(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(t,e)=>e.reconfigure(t,this),null).values),new tb(n,t.newDoc,t.newSelection,e,(e,n)=>n.update(e,t),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:t},range:E.cursor(e.from+t.length)}))}changeByRange(t){let e=this.selection,n=t(e.ranges[0]),i=this.changes(n.changes),r=[n.range],s=tg(n.effects);for(let o=1;os.spec.fromJSON(o,t)))}}return tb.create({doc:t.doc,selection:E.fromJSON(t.selection),extensions:e.extensions?i.concat([e.extensions]):i})}static create(t={}){let e=K.resolve(t.extensions||[],new Map),n=t.doc instanceof r?t.doc:r.of((t.doc||"").split(e.staticFacet(tb.lineSeparator)||w)),i=t.selection?t.selection instanceof E?t.selection:E.single(t.selection.anchor,t.selection.head):E.single(0);return z(i,n.length),e.staticFacet(tn)||(i=i.asSingle()),new tb(e,n,i,e.dynamicSlots.map(()=>null),(t,e)=>e.create(t),null)}get tabSize(){return this.facet(tb.tabSize)}get lineBreak(){return this.facet(tb.lineSeparator)||"\n"}get readOnly(){return this.facet(tl)}phrase(t,...e){for(let n of this.facet(tb.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,(t,n)=>{if("$"==n)return"$";let i=+(n||1);return!i||i>e.length?t:e[i-1]})),t}languageDataAt(t,e,n=-1){let i=[];for(let r of this.facet(te))for(let s of r(this,e,n))Object.prototype.hasOwnProperty.call(s,t)&&i.push(s[t]);return i}charCategorizer(t){var e;return e=this.languageDataAt("wordChars",t).join(""),t=>{if(!/\S/.test(t))return tk.Space;if(function(t){if(i)return i.test(t);for(let e=0;e"\x80"&&(n.toUpperCase()!=n.toLowerCase()||ty.test(n)))return!0}return!1}(t))return tk.Word;for(let n=0;n-1)return tk.Word;return tk.Other}}wordAt(t){let{text:e,from:n,length:i}=this.doc.lineAt(t),r=this.charCategorizer(t),s=t-n,o=t-n;for(;s>0;){let l=m(e,s,!1);if(r(e.slice(l,s))!=tk.Word)break;s=l}for(;ot.length?t[0]:4}),tb.lineSeparator=ti,tb.readOnly=tl,tb.phrases=W.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(n=>t[n]==e[n])}}),tb.languageData=te,tb.changeFilter=tr,tb.transactionFilter=ts,tb.transactionExtender=to,Z.reconfigure=tu.define();class tx{eq(t){return this==t}range(t,e=t){return tw.create(t,e,this)}}tx.prototype.startSide=tx.prototype.endSide=0,tx.prototype.point=!1,tx.prototype.mapMode=C.TrackDel;class tw{constructor(t,e,n){this.from=t,this.to=e,this.value=n}static create(t,e,n){return new tw(t,e,n)}}function tS(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class tP{constructor(t,e,n,i){this.from=t,this.to=e,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(t,e,n,i=0){let r=n?this.to:this.from;for(let s=i,o=r.length;;){if(s==o)return s;let l=s+o>>1,a=r[l]-t||(n?this.value[l].endSide:this.value[l].startSide)-e;if(l==s)return a>=0?s:o;a>=0?o=l:s=l+1}}between(t,e,n,i){for(let r=this.findIndex(e,-1e9,!0),s=this.findIndex(n,1e9,!1,r);r(f=e.mapPos(c,a.endSide))||u==f&&a.startSide>0&&a.endSide<=0)continue;0>(f-u||a.endSide-a.startSide)||(s<0&&(s=u),a.point&&(o=Math.max(o,f-u)),n.push(a),i.push(u-s),r.push(f-s))}return{mapped:n.length?new tP(i,r,n,o):null,pos:s}}}class tC{constructor(t,e,n,i){this.chunkPos=t,this.chunk=e,this.nextLayer=n,this.maxPoint=i}static create(t,e,n,i){return new tC(t,e,n,i)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:n=!1,filterFrom:i=0,filterTo:r=this.length}=t,s=t.filter;if(0==e.length&&!s)return this;if(n&&(e=e.slice().sort(tS)),this.isEmpty)return e.length?tC.of(e):this;let o=new tT(this,null,-1).goto(0),l=0,a=[],h=new tA;for(;o.value||l=0){let c=e[l++];h.addInner(c.from,c.to,c.value)||a.push(c)}else 1==o.rangeIndex&&o.chunkIndexthis.chunkEnd(o.chunkIndex)||ro.to||r=r&&t<=r+s.length&&!1===s.between(r,t-r,e-r,n))return}this.nextLayer.between(t,e,n)}}iter(t=0){return tI.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return tI.from(t).goto(e)}static compare(t,e,n,i,r=-1){let s=t.filter(t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=r),o=e.filter(t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=r),l=tQ(s,o,n),a=new tR(s,l,r),h=new tR(o,l,r);n.iterGaps((t,e,n)=>tM(a,t,h,e,n,i)),n.empty&&0==n.length&&tM(a,0,h,0,0,i)}static eq(t,e,n=0,i){null==i&&(i=999999999);let r=t.filter(t=>!t.isEmpty&&0>e.indexOf(t)),s=e.filter(e=>!e.isEmpty&&0>t.indexOf(e));if(r.length!=s.length)return!1;if(!r.length)return!0;let o=tQ(r,s),l=new tR(r,o,0).goto(n),a=new tR(s,o,0).goto(n);for(;;){if(l.to!=a.to||!t$(l.active,a.active)||l.point&&(!a.point||!l.point.eq(a.point)))return!1;if(l.to>i)return!0;l.next(),a.next()}}static spans(t,e,n,i,r=-1){let s=new tR(t,null,r).goto(e),o=e,l=s.openStart;for(;;){let a=Math.min(s.to,n);if(s.point){let h=s.activeForPoint(s.to),c=s.pointFromo&&(i.span(o,a,s.active,l),l=s.openEnd(a));if(s.to>n)return l+(s.point&&s.to>n?1:0);o=s.to,s.next()}}static of(t,e=!1){let n=new tA;for(let i of t instanceof tw?[t]:e?function(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(tS);e=i}return t}(t):t)n.add(i.from,i.to,i.value);return n.finish()}}tC.empty=new tC([],[],null,-1),tC.empty.nextLayer=tC.empty;class tA{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}finishChunk(t){this.chunks.push(new tP(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,t&&(this.from=[],this.to=[],this.value=[])}add(t,e,n){this.addInner(t,e,n)||(this.nextLayer||(this.nextLayer=new tA)).add(t,e,n)}addInner(t,e,n){let i=t-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&0>(t-this.lastFrom||n.startSide-this.last.startSide))throw Error("Ranges must be added sorted by `from` position and `startSide`");return!(i<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=n,this.lastFrom=t,this.lastTo=e,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}addChunk(t,e){if(0>(t-this.lastTo||e.value[0].startSide-this.last.endSide))return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let n=e.value.length-1;return this.last=e.value[n],this.lastFrom=e.from[n]+t,this.lastTo=e.to[n]+t,!0}finish(){return this.finishInner(tC.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=tC.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function tQ(t,e,n){let i=new Map;for(let r of t)for(let s=0;s(this.to-t||this.endSide-e)&&this.gotoInner(t,e,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex],n=t+e.from[this.rangeIndex];if(this.from=n,this.to=t+e.to[this.rangeIndex],this.value=e.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=n&&i.push(new tT(s,e,n,r));return 1==i.length?i[0]:new tI(i)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let n of this.heap)n.goto(t,e);for(let i=this.heap.length>>1;i>=0;i--)tD(this.heap,i);return this.next(),this}forward(t,e){for(let n of this.heap)n.forward(t,e);for(let i=this.heap.length>>1;i>=0;i--)tD(this.heap,i);0>(this.to-t||this.value.endSide-e)&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),tD(this.heap,0)}}}function tD(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1=0&&(r=t[i+1],i++),0>n.compare(r))break;t[i]=n,t[e]=r,e=i}}class tR{constructor(t,e,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=tI.from(t,e,n)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&0>(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e);)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){tN(this.active,t),tN(this.activeTo,t),tN(this.activeRank,t),this.minActive=tz(this.active,this.activeTo)}addActive(t){let e=0,{value:n,to:i,rank:r}=this.cursor;for(;e-1&&0>(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)){if(this.activeTo[i]>t){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&tN(n,i)}else if(this.cursor.value){if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let r=this.cursor.value;if(r.point){if(e&&this.cursor.to==this.to&&this.cursor.from=0&&n[s]=0&&!(this.activeRank[n]t||this.activeTo[n]==t&&this.active[n].endSide>=this.point.endSide)&&e.push(this.active[n]);return e.reverse()}openEnd(t){let e=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>t;n--)e++;return e}}function tM(t,e,n,i,r,s){t.goto(e),n.goto(i);let o=i+r,l=i,a=i-e;for(;;){let h=t.to+a-n.to||t.endSide-n.endSide,c=h<0?t.to+a:n.to,u=Math.min(c,o);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&t$(t.activeForPoint(t.to+a),n.activeForPoint(n.to))||s.comparePoint(l,u,t.point,n.point):u>l&&!t$(t.active,n.active)&&s.compareRange(l,u,t.active,n.active),c>o)break;l=c,h<=0&&t.next(),h>=0&&n.next()}}function t$(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;i--)t[i+1]=t[i];t[e]=n}function tz(t,e){let n=-1,i=1e9;for(let r=0;r(e[r]-i||t[r].endSide-t[n].endSide)&&(n=r,i=e[r]);return n}function tB(t,e,n=t.length){let i=0;for(let r=0;r=e)return r;if(r==t.length)break;s+=9==t.charCodeAt(r)?n-s%n:1,r=m(t,r)}return!0===i?-1:t.length}},41113:function(t,e,n){var i,r;n.d(e,{FE:function(){return N},Jq:function(){return u},L3:function(){return s},Lj:function(){return f},_b:function(){return M},hr:function(){return D},i9:function(){return R},md:function(){return a},mp:function(){return m},vj:function(){return i}});let s=1024,o=0;class l{constructor(t,e){this.from=t,this.to=e}}class a{constructor(t={}){this.id=o++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=u.match(t)),e=>{let n=t(e);return void 0===n?null:[this,n]}}}a.closedBy=new a({deserialize:t=>t.split(" ")}),a.openedBy=new a({deserialize:t=>t.split(" ")}),a.group=new a({deserialize:t=>t.split(" ")}),a.contextHash=new a({perNode:!0}),a.lookAhead=new a({perNode:!0}),a.mounted=new a({perNode:!0});class h{constructor(t,e,n){this.tree=t,this.overlay=e,this.parser=n}}let c=Object.create(null);class u{constructor(t,e,n,i=0){this.name=t,this.props=e,this.id=n,this.flags=i}static define(t){let e=t.props&&t.props.length?Object.create(null):c,n=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),i=new u(t.name||"",e,t.id,n);if(t.props){for(let r of t.props)if(Array.isArray(r)||(r=r(i)),r){if(r[0].perNode)throw RangeError("Can't store a per-node prop on a node type");e[r[0].id]=r[1]}}return i}prop(t){return this.props[t.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(t){if("string"==typeof t){if(this.name==t)return!0;let e=this.prop(a.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let n in t)for(let i of n.split(" "))e[i]=t[n];return t=>{for(let n=t.prop(a.group),i=-1;i<(n?n.length:0);i++){let r=e[i<0?t.name:n[i]];if(r)return r}}}}u.none=new u("",Object.create(null),0,8);class f{constructor(t){this.types=t;for(let e=0;e=r&&(o.type.isAnonymous||!1!==e(o))){if(o.firstChild())continue;l=!0}for(;l&&n&&!o.type.isAnonymous&&n(o),!o.nextSibling();){if(!o.parent())return;l=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:I(u.none,this.children,this.positions,0,this.children.length,0,this.length,(t,e,n)=>new m(this.type,t,e,n,this.propValues),t.makeTree||((t,e,n)=>new m(u.none,t,e,n)))}static build(t){return function(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=s,reused:o=[],minRepeatType:l=i.types.length}=t,h=Array.isArray(n)?new g(n,n.length):n,c=i.types,u=0,f=0;function d(t,e,n,r,s,o,l,a){let h=[],c=[];for(;t.length>r;)h.push(t.pop()),c.push(e.pop()+n-s);t.push(p(i.types[l],h,c,o-s,a-o)),e.push(s-n)}function p(t,e,n,i,r=0,s){if(u){let o=[a.contextHash,u];s=s?[o].concat(s):[o]}if(r>25){let l=[a.lookAhead,r];s=s?[l].concat(s):[l]}return new m(t,e,n,i,s)}let y=[],v=[];for(;h.pos>0;)!function t(e,n,s,g,y){let{id:v,start:b,end:O,size:x}=h,w=f;for(;x<0;){if(h.next(),-1==x){let S=o[v];s.push(S),g.push(b-e);return}if(-3==x){u=v;return}if(-4==x){f=v;return}throw RangeError(`Unrecognized record size: ${x}`)}let P=c[v],C,A,Q=b-e;if(O-b<=r&&(A=function(t,e){let n=h.fork(),i=0,s=0,o=0,a=n.end-r,c={size:0,start:0,skip:0};n:for(let u=n.pos-t;n.pos>u;){let f=n.size;if(n.id==e&&f>=0){c.size=i,c.start=s,c.skip=o,o+=4,i+=4,n.next();continue}let d=n.pos-f;if(f<0||d=l?4:0,m=n.start;for(n.next();n.pos>d;){if(n.size<0){if(-3==n.size)p+=4;else break n}else n.id>=l&&(p+=4);n.next()}s=m,i+=f,o+=p}return(e<0||i==t)&&(c.size=i,c.start=s,c.skip=o),c.size>4?c:void 0}(h.pos-n,y))){let T=new Uint16Array(A.size-A.skip),D=h.pos-A.size,R=T.length;for(;h.pos>D;)R=function t(e,n,i){let{id:r,start:s,end:o,size:a}=h;if(h.next(),a>=0&&r4){let d=h.pos-(a-4);for(;h.pos>d;)i=t(e,n,i)}n[--i]=c,n[--i]=o-e,n[--i]=s-e,n[--i]=r}else -3==a?u=r:-4==a&&(f=r);return i}(A.start,T,R);C=new k(T,O-A.start,i),Q=A.start-e}else{let M=h.pos-x;h.next();let $=[],N=[],E=v>=l?v:-1,z=0,B=O;for(;h.pos>M;)E>=0&&h.id==E&&h.size>=0?(h.end<=B-r&&(d($,N,b,z,h.end,B,E,w),z=$.length,B=h.end),h.next()):t(b,M,$,N,E);if(E>=0&&z>0&&z<$.length&&d($,N,b,z,b,B,E,w),$.reverse(),N.reverse(),E>-1&&z>0){let W=function(t){return(e,n,i)=>{let r=0,s=e.length-1,o,l;if(s>=0&&(o=e[s])instanceof m){if(!s&&o.type==t&&o.length==i)return o;(l=o.prop(a.lookAhead))&&(r=n[s]+o.length+l)}return p(t,e,n,i,r)}}(P);C=I(P,$,N,0,$.length,0,O-b,W,W)}else C=p(P,$,N,O-b,w-O)}s.push(C),g.push(Q)}(t.start||0,t.bufferStart||0,y,v,-1);let b=null!==(e=t.length)&&void 0!==e?e:y.length?v[0]+y[0].length:0;return new m(c[t.topID],y.reverse(),v.reverse(),b)}(t)}}m.empty=new m(u.none,[],[],0);class g{constructor(t,e){this.buffer=t,this.index=e}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 g(this.buffer,this.index)}}class k{constructor(t,e,n){this.buffer=t,this.length=e,this.set=n}get type(){return u.none}toString(){let t=[];for(let e=0;e0)));l=s[l+3]);return o}slice(t,e,n){let i=this.buffer,r=new Uint16Array(e-t),s=0;for(let o=t,l=0;o=e&&ne;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function v(t,e){let n=t.childBefore(e);for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(t=n,n=i.prevSibling):n=i}return t}function b(t,e,n,r){for(var s;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?l.length:-1;t!=c;t+=e){let u=l[t],f=h[t]+o.from;if(y(r,n,f,f+u.length)){if(u instanceof k){if(s&i.ExcludeBuffers)continue;let d=u.findChild(0,u.buffer.length,e,n-f,r);if(d>-1)return new P(new S(o,u,t,f),null,d)}else if(s&i.IncludeAnonymous||!u.type.isAnonymous||A(u)){let p;if(!(s&i.IgnoreMounts)&&u.props&&(p=u.prop(a.mounted))&&!p.overlay)return new O(p.tree,f,t,o);let m=new O(u,f,t,o);return s&i.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(e<0?u.children.length-1:0,e,n,r)}}}if(s&i.IncludeAnonymous||!o.type.isAnonymous||(t=o.index>=0?o.index+e:e<0?-1:o._parent._tree.children.length,!(o=o._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(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,e,n=0){let r;if(!(n&i.IgnoreOverlays)&&(r=this._tree.prop(a.mounted))&&r.overlay){let s=t-this.from;for(let{from:o,to:l}of r.overlay)if((e>0?o<=s:o=s:l>s))return new O(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,n)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}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}cursor(t=0){return new C(this,t)}get tree(){return this._tree}toTree(){return this._tree}resolve(t,e=0){return b(this,t,e,!1)}resolveInner(t,e=0){return b(this,t,e,!0)}enterUnfinishedNodesBefore(t){return v(this,t)}getChild(t,e=null,n=null){let i=x(this,t,e,n);return i.length?i[0]:null}getChildren(t,e=null,n=null){return x(this,t,e,n)}toString(){return this._tree.toString()}get node(){return this}matchContext(t){return w(this,t)}}function x(t,e,n,i){let r=t.cursor(),s=[];if(!r.firstChild())return s;if(null!=n){for(;!r.type.is(n);)if(!r.nextSibling())return s}for(;;){if(null!=i&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return null==i?s:[]}}function w(t,e,n=e.length-1){for(let i=t.parent;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class S{constructor(t,e,n,i){this.parent=t,this.buffer=e,this.index=n,this.start=i}}class P{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(t,e,n){this.context=t,this._parent=e,this.index=n,this.type=t.buffer.set.types[t.buffer.buffer[n]]}child(t,e,n){let{buffer:i}=this.context,r=i.findChild(this.index+4,i.buffer[this.index+3],t,e-this.context.start,n);return r<0?null:new P(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,e,n=0){if(n&i.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return s<0?null:new P(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new P(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new P(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}cursor(t=0){return new C(this,t)}get tree(){return null}toTree(){let t=[],e=[],{buffer:n}=this.context,i=this.index+4,r=n.buffer[this.index+3];if(r>i){let s=n.buffer[this.index+1];t.push(n.slice(i,r,s)),e.push(0)}return new m(this.type,t,e,this.to-this.from)}resolve(t,e=0){return b(this,t,e,!1)}resolveInner(t,e=0){return b(this,t,e,!0)}enterUnfinishedNodesBefore(t){return v(this,t)}toString(){return this.context.buffer.childString(this.index)}getChild(t,e=null,n=null){let i=x(this,t,e,n);return i.length?i[0]:null}getChildren(t,e=null,n=null){return x(this,t,e,n)}get node(){return this}matchContext(t){return w(this,t)}}class C{get name(){return this.type.name}constructor(t,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof O)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let n=t._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}yieldBuf(t,e){this.index=t;let{start:n,buffer:i}=this.buffer;return this.type=e||i.set.types[i.buffer[t]],this.from=n+i.buffer[t+1],this.to=n+i.buffer[t+2],!0}yield(t){return!!t&&(t instanceof O?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,e,n){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,e,n,this.mode));let{buffer:i}=this.buffer,r=i.findChild(this.index+4,i.buffer[this.index+3],t,e-this.buffer.start,n);return!(r<0)&&(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,e,n=this.mode){return this.buffer?!(n&i.ExcludeBuffers)&&this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&i.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&i.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));let{buffer:e}=this.buffer,n=this.stack.length-1;if(t<0){let i=n<0?0:this.stack[n]+4;if(this.index!=i)return this.yieldBuf(e.findChild(i,this.index,-1,0,4))}else{let r=e.buffer[this.index+3];if(r<(n<0?e.buffer.length:e.buffer[this.stack[n]+3]))return this.yieldBuf(r)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let e,n,{buffer:r}=this;if(r){if(t>0){if(this.index-1)for(let o=e+t,l=t<0?-1:n._tree.children.length;o!=l;o+=t){let a=n._tree.children[o];if(this.mode&i.IncludeAnonymous||a instanceof k||!a.type.isAnonymous||A(a))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to=0;){for(let s=t;s;s=s._parent)if(s.index==i){if(i==this.index)return s;e=s,n=r+1;break n}i=this.stack[--r]}for(let o=n;o=0;r--){if(r<0)return w(this.node,t,i);let s=n[e.buffer[this.stack[r]]];if(!s.isAnonymous){if(t[i]&&t[i]!=s.name)return!1;i--}}return!0}}function A(t){return t.children.some(t=>t instanceof k||!t.type.isAnonymous||A(t))}let Q=new WeakMap;function T(t,e){if(!t.isAnonymous||e instanceof k||e.type!=t)return 1;let n=Q.get(e);if(null==n){for(let i of(n=1,e.children)){if(i.type!=t||!(i instanceof m)){n=1;break}n+=T(t,i)}Q.set(e,n)}return n}function I(t,e,n,i,r,s,o,l,a){let h=0;for(let c=i;c=u)break;m+=g}if(h==c+1){if(m>u){let k=n[c];e(k.children,k.positions,0,k.children.length,i[c]+l);continue}f.push(n[c])}else{let y=i[h-1]+n[h-1].length-p;f.push(I(t,n,i,c,h,p,y,null,a))}d.push(p+l-s)}}(e,n,i,r,0),(l||a)(f,d,o)}class D{constructor(){this.map=new WeakMap}setBuffer(t,e,n){let i=this.map.get(t);i||this.map.set(t,i=new Map),i.set(e,n)}getBuffer(t,e){let n=this.map.get(t);return n&&n.get(e)}set(t,e){t instanceof P?this.setBuffer(t.context.buffer,t.index,e):t instanceof O&&this.map.set(t.tree,e)}get(t){return t instanceof P?this.getBuffer(t.context.buffer,t.index):t instanceof O?this.map.get(t.tree):void 0}cursorSet(t,e){t.buffer?this.setBuffer(t.buffer.buffer,t.index,e):this.map.set(t.tree,e)}cursorGet(t){return t.buffer?this.getBuffer(t.buffer.buffer,t.index):this.map.get(t.tree)}}class R{constructor(t,e,n,i,r=!1,s=!1){this.from=t,this.to=e,this.tree=n,this.offset=i,this.open=(r?1:0)|(s?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,e=[],n=!1){let i=[new R(0,t.length,t,0,!1,n)];for(let r of e)r.to>t.length&&i.push(r);return i}static applyChanges(t,e,n=128){if(!e.length)return t;let i=[],r=1,s=t.length?t[0]:null;for(let o=0,l=0,a=0;;o++){let h=o=n)for(;s&&s.from=u.from||c<=u.to||a){let f=Math.max(u.from,l)-a,d=Math.min(u.to,c)-a;u=f>=d?null:new R(f,d,u.tree,u.offset+a,o>0,!!h)}if(u&&i.push(u),s.to>c)break;s=rnew l(t.from,t.to)):[new l(0,0)]:[new l(0,t.length)],this.createParse(t,e||[],n)}parse(t,e,n){let i=this.startParse(t,e,n);for(;;){let r=i.advance();if(r)return r}}}class ${constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}function N(t){return(e,n,i,r)=>new W(e,t,n,i,r)}class E{constructor(t,e,n,i,r){this.parser=t,this.parse=e,this.overlay=n,this.target=i,this.ranges=r}}class z{constructor(t,e,n,i,r,s,o){this.parser=t,this.predicate=e,this.mounts=n,this.index=i,this.start=r,this.target=s,this.prev=o,this.depth=0,this.ranges=[]}}let B=new a({perNode:!0});class W{constructor(t,e,n,i,r){this.nest=e,this.input=n,this.fragments=i,this.ranges=r,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=t}advance(){if(this.baseParse){let t=this.baseParse.advance();if(!t)return null;if(this.baseParse=null,this.baseTree=t,this.startInner(),null!=this.stoppedAt)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let n=this.baseTree;return null!=this.stoppedAt&&(n=new m(n.type,n.children,n.positions,n.length,n.propValues.concat([[B,this.stoppedAt]]))),n}let i=this.inner[this.innerDone],r=i.parse.advance();if(r){this.innerDone++;let s=Object.assign(Object.create(null),i.target.props);s[a.mounted.id]=new h(r,i.overlay,i.parser),i.target.props=s}return null}get parsedPos(){if(this.baseParse)return 0;let t=this.input.length;for(let e=this.innerDone;et.frag.from<=r.from&&t.frag.to>=r.to&&t.mount.overlay);if(c)for(let f of c.mount.overlay){let d=f.from+c.pos,p=f.to+c.pos;d>=r.from&&p<=r.to&&!e.ranges.some(t=>t.fromd)&&e.ranges.push({from:d,to:p})}}a=!1}else if(n&&(o=function(t,e,n){for(let i of t){if(i.from>=n)break;if(i.to>e)return i.from<=e&&i.to>=n?2:1}return 0}(n.ranges,r.from,r.to)))a=2!=o;else if(!r.type.isAnonymous&&r.from=e.to);i++);let o=r.children[i],l=o.buffer;r.children[i]=function t(n,i,r,a,h){let c=n;for(;l[c+2]+s<=e.from;)c=l[c+3];let u=[],f=[];J(o,n,c,u,f,a);let d=l[c+1],p=l[c+2],g=d+s==e.from&&p+s==e.to&&l[c]==e.type.id;return u.push(g?e.toTree():t(c+4,l[c+3],o.set.types[l[c]],d,p-d)),f.push(d-a),J(o,l[c+3],i,u,f,a),new m(r,u,f,h)}(0,l.length,u.none,0,o.length);for(let a=0;a<=n;a++)t.childAfter(e.from)}(r);let g=t.findMounts(r.from,s.parser);if("function"==typeof s.overlay)e=new z(s.parser,s.overlay,g,this.inner.length,r.from,r.tree,e);else{let k=F(this.ranges,s.overlay||[new l(r.from,r.to)]);k.length&&this.inner.push(new E(s.parser,s.parser.startParse(this.input,_(g,k),k),s.overlay?s.overlay.map(t=>new l(t.from-r.from,t.to-r.from)):null,r.tree,k)),s.overlay?k.length&&(n={ranges:k,depth:0,prev:n}):a=!1}}else e&&(h=e.predicate(r))&&(!0===h&&(h=new l(r.from,r.to)),h.fromnew l(t.from-e.start,t.to-e.start)),e.target,y)),e=e.prev}!n||--n.depth||(n=n.prev)}}}}function J(t,e,n,i,r,s){if(e=t&&e.enter(n,1,i.IgnoreOverlays|i.ExcludeBuffers)||e.next(!1)||(this.done=!0)}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let e=this.cursor.tree;;){if(e==t.tree)return!0;if(e.children.length&&0==e.positions[0]&&e.children[0]instanceof m)e=e.children[0];else break}return!1}}class j{constructor(t){var e;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let n=this.curFrag=t[0];this.curTo=null!==(e=n.tree.prop(B))&&void 0!==e?e:n.to,this.inner=new L(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(t=e.tree.prop(B))&&void 0!==t?t:e.to,this.inner=new L(e.tree,-e.offset)}}findMounts(t,e){var n;let i=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let r=this.inner.cursor.node;r;r=r.parent){let s=null===(n=r.tree)||void 0===n?void 0:n.prop(a.mounted);if(s&&s.parser==e)for(let o=this.fragI;o=r.to)break;l.tree==this.curFrag.tree&&i.push({frag:l,pos:r.from-l.offset,mount:s})}}}return i}}function F(t,e){let n=null,i=e;for(let r=1,s=0;r=a)break;!(h.to<=o)&&(n||(i=n=e.slice()),h.froma&&n.splice(s+1,0,new l(a,h.to))):h.to>a?n[s--]=new l(a,h.to):n.splice(s--,1))}}return i}function _(t,e){let n=[];for(let{pos:i,mount:r,frag:s}of t){let o=i+(r.overlay?r.overlay[0].from:0),a=o+r.tree.length,h=Math.max(s.from,o),c=Math.min(s.to,a);if(r.overlay){let u=function(t,e,n,i){let r=0,s=0,o=!1,a=!1,h=-1e9,c=[];for(;;){let u=r==t.length?1e9:o?t[r].to:t[r].from,f=s==e.length?1e9:a?e[s].to:e[s].from;if(o!=a){let d=Math.max(h,n),p=Math.min(u,f,i);dnew l(t.from+i,t.to+i)),h,c);for(let f=0,d=h;;f++){let p=f==u.length,m=p?c:u[f].from;if(m>d&&n.push(new R(d,m,r.tree,-o,s.from>=d||s.openStart,s.to<=m||s.openEnd)),p)break;d=u[f].to}}else n.push(new R(h,c,r.tree,-o,s.from>=o||s.openStart,s.to<=a||s.openEnd))}return n}},35524:function(t,e,n){n.d(e,{Gv:function(){return a},QR:function(){return u},Vp:function(){return s},bW:function(){return f},pJ:function(){return T}});var i=n(41113);let r=0;class s{constructor(t,e,n){this.set=t,this.base=e,this.modified=n,this.id=r++}static define(t){if(null==t?void 0:t.base)throw Error("Can not derive from a modified tag");let e=new s([],null,[]);if(e.set.push(e),t)for(let n of t.set)e.set.push(n);return e}static defineModifier(){let t=new l;return e=>e.modified.indexOf(t)>-1?e:l.get(e.base||e,e.modified.concat(t).sort((t,e)=>t.id-e.id))}}let o=0;class l{constructor(){this.instances=[],this.id=o++}static get(t,e){if(!e.length)return t;let n=e[0].instances.find(n=>{var i;return n.base==t&&(i=n.modified,e.length==i.length&&e.every((t,e)=>t==i[e]))});if(n)return n;let i=[],r=new s(i,t,e);for(let o of e)o.instances.push(r);let a=function(t){let e=[[]];for(let n=0;ne.length-t.length)}(e);for(let h of t.set)if(!h.modified.length)for(let c of a)i.push(l.get(h,c));return r}}function a(t){let e=Object.create(null);for(let n in t){let i=t[n];for(let r of(Array.isArray(i)||(i=[i]),n.split(" ")))if(r){let s=[],o=2,l=r;for(let a=0;;){if("..."==l&&a>0&&a+3==r.length){o=1;break}let u=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!u)throw RangeError("Invalid path: "+r);if(s.push("*"==u[0]?"":'"'==u[0][0]?JSON.parse(u[0]):u[0]),(a+=u[0].length)==r.length)break;let f=r[a++];if(a==r.length&&"!"==f){o=0;break}if("/"!=f)throw RangeError("Invalid path: "+r);l=r.slice(a)}let d=s.length-1,p=s[d];if(!p)throw RangeError("Invalid path: "+r);let m=new c(i,o,d>0?s.slice(0,d):null);e[p]=m.sort(e[p])}}return h.add(e)}let h=new i.md;class c{constructor(t,e,n,i){this.tags=t,this.mode=e,this.context=n,this.next=i}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(t){return!t||t.depth{let e=o;for(let i of t)for(let r of i.set){let s=n[r.id];if(s){e=e?e+" "+s:s;break}}return e},scope:s}}function f(t,e,n,i=0,r=t.length){let s=new d(i,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),i,r,"",s.highlighters),s.flush(r)}c.empty=new c([],2,null);class d{constructor(t,e,n){this.at=t,this.highlighters=e,this.span=n,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,n,r,s){let{type:o,from:l,to:a}=t;if(l>=n||a<=e)return;o.isTop&&(s=this.highlighters.filter(t=>!t.scope||t.scope(o)));let u=r,f=function(t){let e=t.type.prop(h);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}(t)||c.empty,d=function(t,e){let n=null;for(let i of t){let r=i.style(e);r&&(n=n?n+" "+r:r)}return n}(s,f.tags);if(d&&(u&&(u+=" "),u+=d,1==f.mode&&(r+=(r?" ":"")+d)),this.startSpan(t.from,u),f.opaque)return;let p=t.tree&&t.tree.prop(i.md.mounted);if(p&&p.overlay){let m=t.node.enter(p.overlay[0].from+l,1),g=this.highlighters.filter(t=>!t.scope||t.scope(p.tree.type)),k=t.firstChild();for(let y=0,v=l;;y++){let b=y=O)&&t.nextSibling()););if(!b||O>n)break;(v=b.to+l)>e&&(this.highlightRange(m.cursor(),Math.max(e,b.from+l),Math.min(n,v),r,g),this.startSpan(v,u))}k&&t.parent()}else if(t.firstChild()){do{if(t.to<=e)continue;if(t.from>=n)break;this.highlightRange(t,e,n,r,s),this.startSpan(Math.min(n,t.to),u)}while(t.nextSibling());t.parent()}}}let p=s.define,m=p(),g=p(),k=p(g),y=p(g),v=p(),b=p(v),O=p(v),x=p(),w=p(x),S=p(),P=p(),C=p(),A=p(C),Q=p(),T={comment:m,lineComment:p(m),blockComment:p(m),docComment:p(m),name:g,variableName:p(g),typeName:k,tagName:p(k),propertyName:y,attributeName:p(y),className:p(g),labelName:p(g),namespace:p(g),macroName:p(g),literal:v,string:b,docString:p(b),character:p(b),attributeValue:p(b),number:O,integer:p(O),float:p(O),bool:p(v),regexp:p(v),escape:p(v),color:p(v),url:p(v),keyword:S,self:p(S),null:p(S),atom:p(S),unit:p(S),modifier:p(S),operatorKeyword:p(S),controlKeyword:p(S),definitionKeyword:p(S),moduleKeyword:p(S),operator:P,derefOperator:p(P),arithmeticOperator:p(P),logicOperator:p(P),bitwiseOperator:p(P),compareOperator:p(P),updateOperator:p(P),definitionOperator:p(P),typeOperator:p(P),controlOperator:p(P),punctuation:C,separator:p(C),bracket:A,angleBracket:p(A),squareBracket:p(A),paren:p(A),brace:p(A),content:x,heading:w,heading1:p(w),heading2:p(w),heading3:p(w),heading4:p(w),heading5:p(w),heading6:p(w),contentSeparator:p(x),list:p(x),quote:p(x),emphasis:p(x),strong:p(x),link:p(x),monospace:p(x),strikethrough:p(x),inserted:p(),deleted:p(),changed:p(),invalid:p(),meta:Q,documentMeta:p(Q),annotation:p(Q),processingInstruction:p(Q),definition:s.defineModifier(),constant:s.defineModifier(),function:s.defineModifier(),standard:s.defineModifier(),local:s.defineModifier(),special:s.defineModifier()};u([{tag:T.link,class:"tok-link"},{tag:T.heading,class:"tok-heading"},{tag:T.emphasis,class:"tok-emphasis"},{tag:T.strong,class:"tok-strong"},{tag:T.keyword,class:"tok-keyword"},{tag:T.atom,class:"tok-atom"},{tag:T.bool,class:"tok-bool"},{tag:T.url,class:"tok-url"},{tag:T.labelName,class:"tok-labelName"},{tag:T.inserted,class:"tok-inserted"},{tag:T.deleted,class:"tok-deleted"},{tag:T.literal,class:"tok-literal"},{tag:T.string,class:"tok-string"},{tag:T.number,class:"tok-number"},{tag:[T.regexp,T.escape,T.special(T.string)],class:"tok-string2"},{tag:T.variableName,class:"tok-variableName"},{tag:T.local(T.variableName),class:"tok-variableName tok-local"},{tag:T.definition(T.variableName),class:"tok-variableName tok-definition"},{tag:T.special(T.variableName),class:"tok-variableName2"},{tag:T.definition(T.propertyName),class:"tok-propertyName tok-definition"},{tag:T.typeName,class:"tok-typeName"},{tag:T.namespace,class:"tok-namespace"},{tag:T.className,class:"tok-className"},{tag:T.macroName,class:"tok-macroName"},{tag:T.propertyName,class:"tok-propertyName"},{tag:T.operator,class:"tok-operator"},{tag:T.comment,class:"tok-comment"},{tag:T.meta,class:"tok-meta"},{tag:T.invalid,class:"tok-invalid"},{tag:T.punctuation,class:"tok-punctuation"}])},53105:function(t,e,n){n.d(e,{IK:function(){return I},Jq:function(){return v},WQ:function(){return D}});var i,r,s,o,l,a,h=n(41113),c=n(34155);class u{constructor(t,e,n,i,r,s,o,l,a,h=0,c){this.p=t,this.stack=e,this.state=n,this.reducePos=i,this.pos=r,this.score=s,this.buffer=o,this.bufferBase=l,this.curContext=a,this.lookAhead=h,this.parent=c}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,n=0){let i=t.parser.context;return new u(t,[],e,n,n,0,[],0,i?new f(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){let e=t>>19,n=65535&t,{parser:i}=this.p,r=i.dynamicPrecedence(n);if(r&&(this.score+=r),0==e){this.pushState(i.getGoto(this.state,n,!0),this.reducePos),ns;)this.stack.pop();this.reduceContext(n,o)}storeNode(t,e,n,i=4,r=!1){if(0==t&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==s.buffer[o-4]&&s.buffer[o-1]>-1){if(e==n)return;if(s.buffer[o-2]>=e){s.buffer[o-2]=n;return}}}if(r&&this.pos!=n){let l=this.buffer.length;if(l>0&&0!=this.buffer[l-4])for(;l>0&&this.buffer[l-2]>n;)this.buffer[l]=this.buffer[l-4],this.buffer[l+1]=this.buffer[l-3],this.buffer[l+2]=this.buffer[l-2],this.buffer[l+3]=this.buffer[l-1],l-=4,i>4&&(i-=4);this.buffer[l]=t,this.buffer[l+1]=e,this.buffer[l+2]=n,this.buffer[l+3]=i}else this.buffer.push(t,e,n,i)}shift(t,e,n){let i=this.pos;if(131072&t)this.pushState(65535&t,this.pos);else if((262144&t)==0){let{parser:r}=this.p;(n>this.pos||e<=r.maxNode)&&(this.pos=n,r.stateFlag(t,1)||(this.reducePos=n)),this.pushState(t,i),this.shiftContext(e,i),e<=r.maxNode&&this.buffer.push(e,i,n,4)}else this.pos=n,this.shiftContext(e,i),e<=this.p.parser.maxNode&&this.buffer.push(e,i,n,4)}apply(t,e,n){65536&t?this.reduce(t):this.shift(t,e,n)}useNode(t,e){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=t)&&(this.p.reused.push(t),n++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(e,i),this.buffer.push(n,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let n=t.buffer.slice(e),i=t.bufferBase+e;for(;t&&i==t.bufferBase;)t=t.parent;return new u(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let n=t<=this.p.parser.maxNode;n&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,n?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new d(this);;){let n=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==n)return!1;if((65536&n)==0)return!0;e.reduce(n)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let n=[];for(let i=0,r;i1&e&&t==o)||n.push(e[s],o)}e=n}let l=[];for(let a=0;a>19);if(n<0||0>e.getGoto(this.stack[n],65535&t,!1))return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!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:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class f{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}(i=o||(o={}))[i.Insert=200]="Insert",i[i.Delete=190]="Delete",i[i.Reduce=100]="Reduce",i[i.MaxNext=4]="MaxNext",i[i.MaxInsertStackDepth=300]="MaxInsertStackDepth",i[i.DampenInsertStackDepth=120]="DampenInsertStackDepth";class d{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=t>>19;0==e?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(e-1)*3;let n=this.start.p.parser.getGoto(this.stack[this.base-3],65535&t,!0);this.state=n}}class p{constructor(t,e,n){this.stack=t,this.pos=e,this.index=n,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new p(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.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 p(this.stack,this.pos,this.index)}}class m{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}let g=new m;class k{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=g,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let n=this.range,i=this.rangeIndex,r=this.pos+t;for(;rn.to:r>=n.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];r+=o.from-n.to,n=o}return r}clipPos(t){if(t>=this.range.from&&tt)return Math.max(t,e.from);return this.end}peek(t){let e=this.chunkOff+t,n,i;if(e>=0&&e=this.chunk2Pos&&no.to&&(this.chunk2=this.chunk2.slice(0,o.to-n)),i=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),i}acceptToken(t,e=0){let n=e?this.resolveOffset(e,-1):this.pos;if(null==n||n=this.chunk2Pos&&this.posthis.range.to?n.slice(0,this.range.to-this.pos):n,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(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,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(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=g,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let n="";for(let i of this.ranges){if(i.from>=e)break;i.to>t&&(n+=this.input.read(Math.max(i.from,t),Math.min(i.to,e)))}return n}}class y{constructor(t,e){this.data=t,this.id=e}token(t,e){!function(t,e,n,i){let r=0,s=1<0){let c=t[h];if(l.allows(c)&&(-1==e.token.value||e.token.value==c||o.overrides(c,e.token.value))){e.acceptToken(c);break}}let u=e.next,f=0,d=t[r+2];if(e.next<0&&d>f&&65535==t[a+3*d-3]&&65535==t[a+3*d-3]){r=t[a+3*d-1];continue n}for(;f>1,m=a+p+(p<<1),g=t[m],k=t[m+1]||65536;if(u=k)f=p+1;else{r=t[m+2],e.advance();continue n}}break}}(this.data,t,e,this.id)}}y.prototype.contextual=y.prototype.fallback=y.prototype.extend=!1;class v{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function b(t,e=Uint16Array){if("string"!=typeof t)return t;let n=null;for(let i=0,r=0;i=92&&o--,o>=34&&o--;let a=o-32;if(a>=46&&(a-=46,l=!0),s+=a,l)break;s*=46}n?n[r++]=s:n=new e(s)}return n}let O=void 0!==c&&c.env&&/\bparse\b/.test(c.env.LOG),x=null;function w(t,e,n){let i=t.cursor(h.vj.IncludeAnonymous);for(i.moveTo(e);;)if(!(n<0?i.childBefore(e):i.childAfter(e)))for(;;){if((n<0?i.toe)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}(r=l||(l={}))[r.Margin=25]="Margin";class S{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?w(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?w(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(tt)return this.nextStart=s,null;if(r instanceof h.mp){if(s==t){if(s=Math.max(this.safeFrom,t)&&(this.trees.push(r),this.start.push(s),this.index.push(0))}else this.index[e]++,this.nextStart=s+r.length}}}class P{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(t=>new m)}getActions(t){let e=0,n=null,{parser:i}=t.p,{tokenizers:r}=i,s=i.stateSlot(t.state,3),o=t.curContext?t.curContext.hash:0,l=0;for(let a=0;ac.end+25&&(l=Math.max(c.lookAhead,l)),0!=c.value)){let u=e;if(c.extended>-1&&(e=this.addActions(t,c.extended,c.end,e)),e=this.addActions(t,c.value,c.end,e),!h.extend&&(n=c,e>u))break}}for(;this.actions.length>e;)this.actions.pop();return l&&t.setLookAhead(l),n||t.pos!=this.stream.end||((n=new m).value=t.p.parser.eofTerm,n.start=n.end=t.pos,e=this.addActions(t,n.value,n.end,e)),this.mainToken=n,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new m,{pos:n,p:i}=t;return e.start=n,e.end=Math.min(n+1,i.stream.end),e.value=n==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(t,e,n){let i=this.stream.clipPos(n.pos);if(e.token(this.stream.reset(i,t),n),t.value>-1){let{parser:r}=n.p;for(let s=0;s=0&&n.p.parser.dialect.allows(o>>1)){(1&o)==0?t.value=o>>1:t.extended=o>>1;break}}}else t.value=0,t.end=this.stream.clipPos(i+1)}putAction(t,e,n,i){for(let r=0;r4*t.bufferLength?new S(n,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,n=this.stacks,i=this.minStackPos,r=this.stacks=[];for(let s=0;si)r.push(o);else{if(this.advanceStack(o,r,n))continue;t||(t=[],e=[]),t.push(o);let l=this.tokens.getMainToken(o);e.push(l.value,l.end)}break}}if(!r.length){let a=t&&function(t){let e=null;for(let n of t){let i=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=i&&n.pos>i)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scorethis.stoppedAt?t[0]:this.runRecovery(t,e,r);if(h)return this.stackToTree(h.forceAll())}if(this.recovering){let c=1==this.recovering?1:3*this.recovering;if(r.length>c)for(r.sort((t,e)=>e.score-t.score);r.length>c;)r.pop();r.some(t=>t.reducePos>i)&&this.recovering--}else if(r.length>1)i:for(let u=0;u500&&p.buffer.length>500){if((f.score-p.score||f.buffer.length-p.buffer.length)>0)r.splice(d--,1);else{r.splice(u--,1);continue i}}}}this.minStackPos=r[0].pos;for(let m=1;m ":"";if(null!=this.stoppedAt&&i>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let o=t.curContext&&t.curContext.tracker.strict,l=o?t.curContext.hash:0;for(let a=this.fragments.nodeAt(i);a;){let c=this.parser.nodeSet.types[a.type.id]==a.type?r.getGoto(t.state,a.type.id):-1;if(c>-1&&a.length&&(!o||(a.prop(h.md.contextHash)||0)==l))return t.useNode(a,c),O&&console.log(s+this.stackID(t)+` (via reuse of ${r.getName(a.type.id)})`),!0;if(!(a instanceof h.mp)||0==a.children.length||a.positions[0]>0)break;let u=a.children[0];if(u instanceof h.mp&&0==a.positions[0])a=u;else break}}let f=r.stateSlot(t.state,4);if(f>0)return t.reduce(f),O&&console.log(s+this.stackID(t)+` (via always-reduce ${r.getName(65535&f)})`),!0;if(t.stack.length>=15e3)for(;t.stack.length>9e3&&t.forceReduce(););let d=this.tokens.getActions(t);for(let p=0;pi?e.push(v):n.push(v)}return!1}advanceFully(t,e){let n=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>n)return A(t,e),!0}}runRecovery(t,e,n){let i=null,r=!1;for(let s=0;s ":"";if(o.deadEnd&&(r||(r=!0,o.restart(),O&&console.log(h+this.stackID(o)+" (restarted)"),this.advanceFully(o,n))))continue;let c=o.split(),u=h;for(let f=0;c.forceReduce()&&f<10&&(O&&console.log(u+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,n));f++)O&&(u=this.stackID(c)+" -> ");for(let d of o.recoverByInsert(l))O&&console.log(h+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,n);this.stream.end>o.pos?(a==o.pos&&(a++,l=0),o.recoverByDelete(l,a),O&&console.log(h+this.stackID(o)+` (via recover-delete ${this.parser.getName(l)})`),A(o,n)):(!i||i.scoret;class I{constructor(t){this.start=t.start,this.shift=t.shift||T,this.reduce=t.reduce||T,this.reuse=t.reuse||T,this.hash=t.hash||(()=>0),this.strict=!1!==t.strict}}class D extends h._b{constructor(t){if(super(),this.wrappers=[],14!=t.version)throw RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let n=0;nt.topRules[e][1]),r=[];for(let s=0;s=0)o(u,a,l[c++]);else{let f=l[c+-u];for(let d=-u;d>0;d--)o(l[c++],a,f);c++}}}this.nodeSet=new h.Lj(e.map((e,n)=>h.Jq.define({name:n>=this.minRepeatTerm?void 0:e,id:n,props:r[n],top:i.indexOf(n)>-1,error:0==n,skipped:t.skippedNodes&&t.skippedNodes.indexOf(n)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=h.L3;let p=b(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let m=0;m"number"==typeof t?new y(p,t):t),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,n){let i=new C(this,t,e,n);for(let r of this.wrappers)i=r(i,t,e,n);return i}getGoto(t,e,n=!1){let i=this.goto;if(e>=i[0])return -1;for(let r=i[e+1];;){let s=i[r++],o=1&s,l=i[r++];if(o&&n)return l;for(let a=r+(s>>1);r0}validAction(t,e){if(e==this.stateSlot(t,4))return!0;for(let n=this.stateSlot(t,1);;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])return!1;n=R(this.data,n+2)}if(e==R(this.data,n+1))return!0}}nextStates(t){let e=[];for(let n=this.stateSlot(t,1);;n+=3){if(65535==this.data[n]){if(1==this.data[n+1])n=R(this.data,n+2);else break}if((1&this.data[n+2])==0){let i=this.data[n+1];e.some((t,e)=>1&e&&t==i)||e.push(this.data[n],i)}}return e}overrides(t,e){let n=M(this.data,this.tokenPrecTable,e);return n<0||M(this.data,this.tokenPrecTable,t){let n=t.tokenizers.find(t=>t.from==e);return n?n.to:e})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((n,i)=>{let r=t.specializers.find(t=>t.from==n.external);if(!r)return n;let s=Object.assign(Object.assign({},n),{external:r.to});return e.specializers[i]=$(s),s})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),n=e.map(()=>!1);if(t)for(let i of t.split(" ")){let r=e.indexOf(i);r>=0&&(n[r]=!0)}let s=null;for(let o=0;ot.external(n,i)<<1|e}return t.get}},28699:function(t,e,n){n.d(e,{V:function(){return o}});let i="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),r="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class o{constructor(t,e){this.rules=[];let{finish:n}=e||{};function i(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}for(let r in t)!function t(e,r,s,o){let l=[],a=/^@(\w+)\b/.exec(e[0]),h=a&&"keyframes"==a[1];if(a&&null==r)return s.push(e[0]+";");for(let c in r){let u=r[c];if(/&/.test(c))t(c.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((t,e)=>t.concat(e)),u,s);else if(u&&"object"==typeof u){if(!a)throw RangeError("The value of a property ("+c+") should be a primitive value.");t(i(c),u,l,h)}else null!=u&&l.push(c.replace(/_.*/,"").replace(/[A-Z]/g,t=>"-"+t.toLowerCase())+": "+u+";")}(l.length||h)&&s.push((!n||a||o?e:e.map(n)).join(", ")+" {"+l.join(" ")+"}")}(i(r),t[r],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=s[i]||1;return s[i]=t+1,"ͼ"+t.toString(36)}static mount(t,e){(t[r]||new a(t)).mount(Array.isArray(e)?e:[e])}}let l=null;class a{constructor(t){if(!t.head&&t.adoptedStyleSheets&&"undefined"!=typeof CSSStyleSheet){if(l)return t.adoptedStyleSheets=[l.sheet].concat(t.adoptedStyleSheets),t[r]=l;this.sheet=new CSSStyleSheet,t.adoptedStyleSheets=[this.sheet].concat(t.adoptedStyleSheets),l=this}else{this.styleTag=(t.ownerDocument||t).createElement("style");let e=t.head||t;e.insertBefore(this.styleTag,e.firstChild)}this.modules=[],t[r]=this}mount(t){let e=this.sheet,n=0,i=0;for(let r=0;r-1&&(this.modules.splice(o,1),i--,o=-1),-1==o){if(this.modules.splice(i++,0,s),e)for(let l=0;l",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},s="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent);"undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent);for(var o="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),l="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),a=o||s&&57>+s[1],h=0;h<10;h++)i[48+h]=i[96+h]=String(h);for(var h=1;h<=24;h++)i[h+111]="F"+h;for(var h=65;h<=90;h++)i[h]=String.fromCharCode(h+32),r[h]=String.fromCharCode(h);for(var c in i)r.hasOwnProperty(c)||(r[c]=i[c]);function u(t){var e=!(a&&(t.ctrlKey||t.altKey||t.metaKey)||l&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?r:i)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}}}]); \ No newline at end of file diff --git a/static/web/_next/static/dhEf29X9QvzQBRpv9fJ6_/_buildManifest.js b/static/web/_next/static/yn8vCZyLTcmFNqxQd-p0p/_buildManifest.js similarity index 98% rename from static/web/_next/static/dhEf29X9QvzQBRpv9fJ6_/_buildManifest.js rename to static/web/_next/static/yn8vCZyLTcmFNqxQd-p0p/_buildManifest.js index aedf34608..757fbbda0 100644 --- a/static/web/_next/static/dhEf29X9QvzQBRpv9fJ6_/_buildManifest.js +++ b/static/web/_next/static/yn8vCZyLTcmFNqxQd-p0p/_buildManifest.js @@ -1 +1 @@ -self.__BUILD_MANIFEST=function(a,s,c,e,i,n,t,d,f,g,o,r,h,m,b,u,k,j,l,p,v,E,S,C,_,w,I,y,A,D,L,T,B,F,P,G,K){return{__rewrites:{beforeFiles:[],afterFiles:[{source:"/api/:path*"},{source:"/hls/:path*"},{source:"/img/:path*"},{source:"/logo"},{source:"/thumbnail.jpg"}],fallback:[]},"/":[c,s,e,n,d,o,r,j,l,y,"static/chunks/4151-18d4a002259d7e13.js",h,"static/css/e82abbe448afa768.css","static/chunks/pages/index-2d0ac74e62e61ae9.js"],"/_error":["static/chunks/pages/_error-02cc11fd74b4e5ff.js"],"/admin":[a,c,s,e,i,t,n,d,g,m,j,"static/chunks/8676-c38bd41883242e8e.js","static/chunks/pages/admin-eed3a21bd8288e92.js"],"/admin/access-tokens":[a,c,s,e,i,t,"static/chunks/pages/admin/access-tokens-6b6b4a50f8c89853.js"],"/admin/actions":[p,a,c,s,e,i,v,"static/chunks/pages/admin/actions-d066fe7e1f6e663e.js"],"/admin/chat/emojis":[a,c,s,e,i,f,b,"static/chunks/pages/admin/chat/emojis-9274294b9a191b7a.js"],"/admin/chat/messages":[p,a,c,s,e,i,t,d,A,"static/chunks/pages/admin/chat/messages-fb728b2cb96aa4aa.js"],"/admin/chat/users":[p,a,c,s,e,i,t,n,d,A,"static/chunks/pages/admin/chat/users-cf2126e0c3882d46.js"],"/admin/config/general":[u,a,c,s,e,i,n,f,k,r,b,E,S,C,D,L,T,B,"static/chunks/pages/admin/config/general-2e540455daa23d73.js"],"/admin/config/general/AppearanceConfig":[u,a,k,r,S,C,T,B,"static/chunks/pages/admin/config/general/AppearanceConfig-3d2379bb7f097424.js"],"/admin/config/general/EditInstanceDetails":[a,f,b,"static/chunks/pages/admin/config/general/EditInstanceDetails-bd31512552a76af8.js"],"/admin/config/general/EditInstanceTags":[a,"static/chunks/pages/admin/config/general/EditInstanceTags-a68ea49bc9cdf5af.js"],"/admin/config/general/EditPageContent":[u,a,k,E,"static/chunks/pages/admin/config/general/EditPageContent-a70b8bec7dc07339.js"],"/admin/config/general/EditSocialLinks":[a,c,s,e,i,"static/chunks/pages/admin/config/general/EditSocialLinks-6b0538ad7a834195.js"],"/admin/config/general/GeneralConfig":[u,a,c,s,e,i,f,k,b,E,D,L,"static/chunks/pages/admin/config/general/GeneralConfig-b931adbf2293fcf6.js"],"/admin/config/server":[a,c,s,e,i,n,v,_,"static/chunks/3053-f889bb9e40cef295.js","static/chunks/pages/admin/config/server-5776a34e0d8368e7.js"],"/admin/config/server/EditStorage":[_,"static/chunks/pages/admin/config/server/EditStorage-ef01d0f6a0714788.js"],"/admin/config/server/ServerConfig":[a,"static/chunks/pages/admin/config/server/ServerConfig-616671cf6111873e.js"],"/admin/config/server/StorageConfig":[_,"static/chunks/pages/admin/config/server/StorageConfig-1821158a8eb006a2.js"],"/admin/config/server/StreamKeys":[a,c,s,e,i,v,"static/chunks/pages/admin/config/server/StreamKeys-767ee163c1c4200d.js"],"/admin/config-chat":[a,"static/chunks/pages/admin/config-chat-e60e1d4adcc00b0e.js"],"/admin/config-federation":[a,"static/chunks/8995-2163bbfbcf40237a.js","static/chunks/pages/admin/config-federation-56389bcdb6f238ec.js"],"/admin/config-notify":[a,"static/chunks/7187-1eb4e0029ced6d6f.js","static/chunks/pages/admin/config-notify-3bcb042243f6bd05.js"],"/admin/config-social-items":[a,c,s,e,i,"static/chunks/pages/admin/config-social-items-4a50ec5bda42d750.js"],"/admin/config-video":[a,c,s,e,i,C,"static/chunks/2729-1c5084eb645c9eab.js","static/chunks/pages/admin/config-video-81c3f6f792432fca.js"],"/admin/federation/actions":[a,c,s,e,i,t,"static/chunks/pages/admin/federation/actions-fc78b0a990de26b8.js"],"/admin/federation/followers":[c,s,e,i,t,n,"static/chunks/pages/admin/federation/followers-066d2786bd0e7028.js"],"/admin/hardware-info":[w,a,t,n,f,g,m,I,"static/chunks/pages/admin/hardware-info-d11303541299769a.js"],"/admin/help":[n,g,r,S,"static/chunks/7489-91919409cf4b77e3.js","static/chunks/pages/admin/help-fbff8a2a1b5bf08a.js"],"/admin/logs":[a,c,s,e,i,t,j,"static/chunks/pages/admin/logs-1190b6d76d7450c2.js"],"/admin/stream-health":[w,a,t,n,g,m,I,"static/chunks/7731-d5fe01dab1371c4e.js","static/chunks/pages/admin/stream-health-1a0b9804bb7e2b81.js"],"/admin/upgrade":[a,c,s,e,i,"static/chunks/2069-adb358898adcf95c.js","static/chunks/pages/admin/upgrade-0ddabcb9157be8ec.js"],"/admin/viewer-info":[w,a,c,s,e,i,t,n,f,d,g,m,I,"static/chunks/pages/admin/viewer-info-4f547dca5d68024e.js"],"/admin/webhooks":[a,c,s,e,i,"static/chunks/pages/admin/webhooks-e8966ce2d3b8efca.js"],"/embed/chat/readonly":[F,P,o,G,l,h,K,"static/css/a49791b44feb7f30.css","static/chunks/pages/embed/chat/readonly-cb4490b31a64cd75.js"],"/embed/chat/readwrite":[F,P,s,o,G,l,h,K,"static/css/5d951a67116735a9.css","static/chunks/pages/embed/chat/readwrite-354e75dfae993857.js"],"/embed/video":["static/chunks/d6e1aeb5-d7082cd8806a5835.js",d,o,"static/css/7c735c05af084bb2.css","static/chunks/7902-522e54232e4e108b.js",y,h,"static/chunks/2239-7875466ac1c30111.js","static/css/f065863129f648da.css","static/chunks/pages/embed/video-3471451594a48655.js"],sortedPages:["/","/_app","/_error","/admin","/admin/access-tokens","/admin/actions","/admin/chat/emojis","/admin/chat/messages","/admin/chat/users","/admin/config/general","/admin/config/general/AppearanceConfig","/admin/config/general/EditInstanceDetails","/admin/config/general/EditInstanceTags","/admin/config/general/EditPageContent","/admin/config/general/EditSocialLinks","/admin/config/general/GeneralConfig","/admin/config/server","/admin/config/server/EditStorage","/admin/config/server/ServerConfig","/admin/config/server/StorageConfig","/admin/config/server/StreamKeys","/admin/config-chat","/admin/config-federation","/admin/config-notify","/admin/config-social-items","/admin/config-video","/admin/federation/actions","/admin/federation/followers","/admin/hardware-info","/admin/help","/admin/logs","/admin/stream-health","/admin/upgrade","/admin/viewer-info","/admin/webhooks","/embed/chat/readonly","/embed/chat/readwrite","/embed/video"]}}("static/chunks/4485-1a6d1dff2c7e9712.js","static/chunks/3903-40ef42f3e9eb46b5.js","static/chunks/8909-a55c2326f65c0475.js","static/chunks/4267-cfe0f573c442773c.js","static/chunks/2206-af1def5073377327.js","static/chunks/575-77ed8f28a60fd81f.js","static/chunks/8091-5d2e0cdb05cd1ef7.js","static/chunks/5938-b5bac17e4fa31c49.js","static/chunks/7910-44b63d030e4b1767.js","static/chunks/5101-e2c6238798b20535.js","static/chunks/6395-ef10a8778483ac88.js","static/chunks/1082-29aebf20809e875c.js","static/chunks/7466-125ef82341d66105.js","static/chunks/4763-5757756084a7030f.js","static/chunks/7916-e38ed2fa52bf263a.js","static/chunks/4ad82c5e-e8a0b009f1f18bb1.js","static/chunks/1943-701e08920ac663be.js","static/chunks/5360-dda91f1e1413b52a.js","static/chunks/7076-a4d7b80d601464e4.js","static/chunks/29107295-1453a3860b50f70e.js","static/chunks/8119-57984c2c349ea105.js","static/chunks/6538-d41bb29006638db8.js","static/chunks/1700-92b04edbce34d1e2.js","static/chunks/7661-9773fc2a51b7e27d.js","static/chunks/5473-3b17a2863117f4d3.js","static/chunks/ee8b1517-6f0130e9d41fa162.js","static/chunks/8245-a5fe4c6585111786.js","static/chunks/7066-524305b22bfbc967.js","static/chunks/9550-1a77c14173cd266e.js","static/chunks/7291-22e2f9b1d0dcca39.js","static/chunks/8645-1e2ae1c48a452fb2.js","static/chunks/3522-7799b33ec8e12766.js","static/css/92e768f7d359a80f.css","static/chunks/d3048c20-5ff314987ce2bf57.js","static/chunks/d2094a0f-c2013de6dbc53323.js","static/chunks/3729-505fb6d311751b3c.js","static/chunks/4977-39bc115cc68eebaf.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file +self.__BUILD_MANIFEST=function(a,s,c,e,i,n,t,d,f,g,o,r,h,m,b,u,k,j,l,p,v,E,S,C,_,w,I,y,A,D,L,T,B,F,P,G,K){return{__rewrites:{beforeFiles:[],afterFiles:[{source:"/api/:path*"},{source:"/hls/:path*"},{source:"/img/:path*"},{source:"/logo"},{source:"/thumbnail.jpg"}],fallback:[]},"/":[c,s,e,n,d,o,r,j,l,y,"static/chunks/4151-18d4a002259d7e13.js",h,"static/css/e82abbe448afa768.css","static/chunks/pages/index-2d0ac74e62e61ae9.js"],"/_error":["static/chunks/pages/_error-02cc11fd74b4e5ff.js"],"/admin":[a,c,s,e,i,t,n,d,g,m,j,"static/chunks/8676-c38bd41883242e8e.js","static/chunks/pages/admin-eed3a21bd8288e92.js"],"/admin/access-tokens":[a,c,s,e,i,t,"static/chunks/pages/admin/access-tokens-6b6b4a50f8c89853.js"],"/admin/actions":[p,a,c,s,e,i,v,"static/chunks/pages/admin/actions-d066fe7e1f6e663e.js"],"/admin/chat/emojis":[a,c,s,e,i,f,b,"static/chunks/pages/admin/chat/emojis-9274294b9a191b7a.js"],"/admin/chat/messages":[p,a,c,s,e,i,t,d,A,"static/chunks/pages/admin/chat/messages-fb728b2cb96aa4aa.js"],"/admin/chat/users":[p,a,c,s,e,i,t,n,d,A,"static/chunks/pages/admin/chat/users-cf2126e0c3882d46.js"],"/admin/config/general":[u,a,c,s,e,i,n,f,k,r,b,E,S,C,D,L,T,B,"static/chunks/pages/admin/config/general-2e540455daa23d73.js"],"/admin/config/general/AppearanceConfig":[u,a,k,r,S,C,T,B,"static/chunks/pages/admin/config/general/AppearanceConfig-3d2379bb7f097424.js"],"/admin/config/general/EditInstanceDetails":[a,f,b,"static/chunks/pages/admin/config/general/EditInstanceDetails-bd31512552a76af8.js"],"/admin/config/general/EditInstanceTags":[a,"static/chunks/pages/admin/config/general/EditInstanceTags-a68ea49bc9cdf5af.js"],"/admin/config/general/EditPageContent":[u,a,k,E,"static/chunks/pages/admin/config/general/EditPageContent-a70b8bec7dc07339.js"],"/admin/config/general/EditSocialLinks":[a,c,s,e,i,"static/chunks/pages/admin/config/general/EditSocialLinks-6b0538ad7a834195.js"],"/admin/config/general/GeneralConfig":[u,a,c,s,e,i,f,k,b,E,D,L,"static/chunks/pages/admin/config/general/GeneralConfig-b931adbf2293fcf6.js"],"/admin/config/server":[a,c,s,e,i,n,v,_,"static/chunks/3053-f889bb9e40cef295.js","static/chunks/pages/admin/config/server-5776a34e0d8368e7.js"],"/admin/config/server/EditStorage":[_,"static/chunks/pages/admin/config/server/EditStorage-ef01d0f6a0714788.js"],"/admin/config/server/ServerConfig":[a,"static/chunks/pages/admin/config/server/ServerConfig-616671cf6111873e.js"],"/admin/config/server/StorageConfig":[_,"static/chunks/pages/admin/config/server/StorageConfig-1821158a8eb006a2.js"],"/admin/config/server/StreamKeys":[a,c,s,e,i,v,"static/chunks/pages/admin/config/server/StreamKeys-767ee163c1c4200d.js"],"/admin/config-chat":[a,"static/chunks/pages/admin/config-chat-e60e1d4adcc00b0e.js"],"/admin/config-federation":[a,"static/chunks/8995-2163bbfbcf40237a.js","static/chunks/pages/admin/config-federation-56389bcdb6f238ec.js"],"/admin/config-notify":[a,"static/chunks/7187-1eb4e0029ced6d6f.js","static/chunks/pages/admin/config-notify-3bcb042243f6bd05.js"],"/admin/config-social-items":[a,c,s,e,i,"static/chunks/pages/admin/config-social-items-4a50ec5bda42d750.js"],"/admin/config-video":[a,c,s,e,i,C,"static/chunks/2729-1c5084eb645c9eab.js","static/chunks/pages/admin/config-video-81c3f6f792432fca.js"],"/admin/federation/actions":[a,c,s,e,i,t,"static/chunks/pages/admin/federation/actions-fc78b0a990de26b8.js"],"/admin/federation/followers":[c,s,e,i,t,n,"static/chunks/pages/admin/federation/followers-066d2786bd0e7028.js"],"/admin/hardware-info":[w,a,t,n,f,g,m,I,"static/chunks/pages/admin/hardware-info-d11303541299769a.js"],"/admin/help":[n,g,r,S,"static/chunks/7489-91919409cf4b77e3.js","static/chunks/pages/admin/help-fbff8a2a1b5bf08a.js"],"/admin/logs":[a,c,s,e,i,t,j,"static/chunks/pages/admin/logs-1190b6d76d7450c2.js"],"/admin/stream-health":[w,a,t,n,g,m,I,"static/chunks/7731-d5fe01dab1371c4e.js","static/chunks/pages/admin/stream-health-1a0b9804bb7e2b81.js"],"/admin/upgrade":[a,c,s,e,i,"static/chunks/2069-adb358898adcf95c.js","static/chunks/pages/admin/upgrade-0ddabcb9157be8ec.js"],"/admin/viewer-info":[w,a,c,s,e,i,t,n,f,d,g,m,I,"static/chunks/pages/admin/viewer-info-4f547dca5d68024e.js"],"/admin/webhooks":[a,c,s,e,i,"static/chunks/pages/admin/webhooks-e8966ce2d3b8efca.js"],"/embed/chat/readonly":[F,P,o,G,l,h,K,"static/css/a49791b44feb7f30.css","static/chunks/pages/embed/chat/readonly-cb4490b31a64cd75.js"],"/embed/chat/readwrite":[F,P,s,o,G,l,h,K,"static/css/5d951a67116735a9.css","static/chunks/pages/embed/chat/readwrite-354e75dfae993857.js"],"/embed/video":["static/chunks/d6e1aeb5-d7082cd8806a5835.js",d,o,"static/css/7c735c05af084bb2.css","static/chunks/7902-522e54232e4e108b.js",y,h,"static/chunks/2239-7875466ac1c30111.js","static/css/f065863129f648da.css","static/chunks/pages/embed/video-3471451594a48655.js"],sortedPages:["/","/_app","/_error","/admin","/admin/access-tokens","/admin/actions","/admin/chat/emojis","/admin/chat/messages","/admin/chat/users","/admin/config/general","/admin/config/general/AppearanceConfig","/admin/config/general/EditInstanceDetails","/admin/config/general/EditInstanceTags","/admin/config/general/EditPageContent","/admin/config/general/EditSocialLinks","/admin/config/general/GeneralConfig","/admin/config/server","/admin/config/server/EditStorage","/admin/config/server/ServerConfig","/admin/config/server/StorageConfig","/admin/config/server/StreamKeys","/admin/config-chat","/admin/config-federation","/admin/config-notify","/admin/config-social-items","/admin/config-video","/admin/federation/actions","/admin/federation/followers","/admin/hardware-info","/admin/help","/admin/logs","/admin/stream-health","/admin/upgrade","/admin/viewer-info","/admin/webhooks","/embed/chat/readonly","/embed/chat/readwrite","/embed/video"]}}("static/chunks/4485-1a6d1dff2c7e9712.js","static/chunks/3903-40ef42f3e9eb46b5.js","static/chunks/8909-a55c2326f65c0475.js","static/chunks/4267-cfe0f573c442773c.js","static/chunks/2206-af1def5073377327.js","static/chunks/575-77ed8f28a60fd81f.js","static/chunks/8091-5d2e0cdb05cd1ef7.js","static/chunks/5938-b5bac17e4fa31c49.js","static/chunks/7910-44b63d030e4b1767.js","static/chunks/5101-e2c6238798b20535.js","static/chunks/6395-ef10a8778483ac88.js","static/chunks/1082-29aebf20809e875c.js","static/chunks/7466-125ef82341d66105.js","static/chunks/4763-5757756084a7030f.js","static/chunks/7916-e38ed2fa52bf263a.js","static/chunks/4ad82c5e-e8a0b009f1f18bb1.js","static/chunks/1943-909ccbe5b3c551bb.js","static/chunks/5360-dda91f1e1413b52a.js","static/chunks/7076-a4d7b80d601464e4.js","static/chunks/29107295-1453a3860b50f70e.js","static/chunks/8119-57984c2c349ea105.js","static/chunks/6538-d41bb29006638db8.js","static/chunks/1700-92b04edbce34d1e2.js","static/chunks/7661-9773fc2a51b7e27d.js","static/chunks/5473-3b17a2863117f4d3.js","static/chunks/ee8b1517-6f0130e9d41fa162.js","static/chunks/8245-a5fe4c6585111786.js","static/chunks/7066-524305b22bfbc967.js","static/chunks/9550-1a77c14173cd266e.js","static/chunks/7291-22e2f9b1d0dcca39.js","static/chunks/8645-1e2ae1c48a452fb2.js","static/chunks/3522-7799b33ec8e12766.js","static/css/92e768f7d359a80f.css","static/chunks/d3048c20-5ff314987ce2bf57.js","static/chunks/d2094a0f-c2013de6dbc53323.js","static/chunks/3729-505fb6d311751b3c.js","static/chunks/4977-39bc115cc68eebaf.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/static/web/_next/static/dhEf29X9QvzQBRpv9fJ6_/_ssgManifest.js b/static/web/_next/static/yn8vCZyLTcmFNqxQd-p0p/_ssgManifest.js similarity index 100% rename from static/web/_next/static/dhEf29X9QvzQBRpv9fJ6_/_ssgManifest.js rename to static/web/_next/static/yn8vCZyLTcmFNqxQd-p0p/_ssgManifest.js diff --git a/static/web/admin/access-tokens/index.html b/static/web/admin/access-tokens/index.html index f94136848..d4f1451ba 100644 --- a/static/web/admin/access-tokens/index.html +++ b/static/web/admin/access-tokens/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Access Tokens

Access tokens are used to allow external, 3rd party tools to perform specific actions on your Owncast server. They should be kept secure and never included in client code, instead they should be kept on a server that you control.
Read more about how to use these tokens, with examples, at our documentation.
NameTokenScopesLast Used
No data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Access Tokens

Access tokens are used to allow external, 3rd party tools to perform specific actions on your Owncast server. They should be kept secure and never included in client code, instead they should be kept on a server that you control.
Read more about how to use these tokens, with examples, at our documentation.
NameTokenScopesLast Used
No data

\ No newline at end of file diff --git a/static/web/admin/actions/index.html b/static/web/admin/actions/index.html index 58aeb7584..738f68562 100644 --- a/static/web/admin/actions/index.html +++ b/static/web/admin/actions/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

External Actions

External action URLs are 3rd party UI you can display, embedded, into your Owncast page when a user clicks on a button to launch your action.
Read more about how to use actions, with examples, at our documentation.
NameDescriptionURLIconColorOpens
No data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

External Actions

External action URLs are 3rd party UI you can display, embedded, into your Owncast page when a user clicks on a button to launch your action.
Read more about how to use actions, with examples, at our documentation.
NameDescriptionURLIconColorOpens
No data

\ No newline at end of file diff --git a/static/web/admin/chat/emojis/index.html b/static/web/admin/chat/emojis/index.html index 543c54bb8..d16635c39 100644 --- a/static/web/admin/chat/emojis/index.html +++ b/static/web/admin/chat/emojis/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Emojis

Here you can upload new custom emojis for usage in the chat. When uploading a new emoji, the filename will be used as emoji name.
NameEmoji
No data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Emojis

Here you can upload new custom emojis for usage in the chat. When uploading a new emoji, the filename will be used as emoji name.
NameEmoji
No data

\ No newline at end of file diff --git a/static/web/admin/chat/messages/index.html b/static/web/admin/chat/messages/index.html index d22feeb42..b46072026 100644 --- a/static/web/admin/chat/messages/index.html +++ b/static/web/admin/chat/messages/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Chat Messages

Manage the messages from viewers that show up on your stream.

Check multiple messages to change their visibility to:
Time
User
Message
No data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Chat Messages

Manage the messages from viewers that show up on your stream.

Check multiple messages to change their visibility to:
Time
User
Message
No data
\ No newline at end of file diff --git a/static/web/admin/chat/users/index.html b/static/web/admin/chat/users/index.html index f8d1f87e2..1be118771 100644 --- a/static/web/admin/chat/users/index.html +++ b/static/web/admin/chat/users/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

When a stream is active and chat is enabled, connected chat clients will be displayed here.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

When a stream is active and chat is enabled, connected chat clients will be displayed here.

\ No newline at end of file diff --git a/static/web/admin/config-chat/index.html b/static/web/admin/config-chat/index.html index 339c4b6b2..b48effdb3 100644 --- a/static/web/admin/config-chat/index.html +++ b/static/web/admin/config-chat/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file diff --git a/static/web/admin/config-federation/index.html b/static/web/admin/config-federation/index.html index 89d196aaf..8c6d13189 100644 --- a/static/web/admin/config-federation/index.html +++ b/static/web/admin/config-federation/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file diff --git a/static/web/admin/config-notify/index.html b/static/web/admin/config-notify/index.html index 88ec01876..e7b79768b 100644 --- a/static/web/admin/config-notify/index.html +++ b/static/web/admin/config-notify/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Notifications

Let your viewers know when you go live by supporting any of the below notification channels. Learn more about live notifications.


The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

Browser Alerts

Viewers can opt into being notified when you go live with their browser.

Not all browsers support this.

Enable browser notifications

The text to send when you go live.

Twitter

Let your Twitter followers know each time you go live.

Enable Twitter

The text to send when you go live.

Discord

Let your Discord channel know each time you go live.

Create a webhook under Edit Channel / Integrations on your Discord channel and provide it below.

Enable Discord

The webhook assigned to your channel.

The text to send when you go live.

Fediverse Social

Enabling the Fediverse social features will not just alert people to when you go live, but also enable other functionality.

Fediverse social features: Disabled

Custom

Build your own notifications by using custom webhooks.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Notifications

Let your viewers know when you go live by supporting any of the below notification channels. Learn more about live notifications.


The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

Browser Alerts

Viewers can opt into being notified when you go live with their browser.

Not all browsers support this.

Enable browser notifications

The text to send when you go live.

Twitter

Let your Twitter followers know each time you go live.

Enable Twitter

The text to send when you go live.

Discord

Let your Discord channel know each time you go live.

Create a webhook under Edit Channel / Integrations on your Discord channel and provide it below.

Enable Discord

The webhook assigned to your channel.

The text to send when you go live.

Fediverse Social

Enabling the Fediverse social features will not just alert people to when you go live, but also enable other functionality.

Fediverse social features: Disabled

Custom

Build your own notifications by using custom webhooks.

\ No newline at end of file diff --git a/static/web/admin/config-social-items/index.html b/static/web/admin/config-social-items/index.html index 52ca1fb37..e4a1358c0 100644 --- a/static/web/admin/config-social-items/index.html +++ b/static/web/admin/config-social-items/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Social Items

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Social Items

\ No newline at end of file diff --git a/static/web/admin/config-video/index.html b/static/web/admin/config-video/index.html index 1c42ba6c1..d769f524a 100644 --- a/static/web/admin/config-video/index.html +++ b/static/web/admin/config-video/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Video configuration

Before changing your video configuration visit the video documentation to learn how it impacts your stream performance. The general rule is to start conservatively by having one middle quality stream output variant and experiment with adding more of varied qualities.

Stream output

NameVideo bitrateCPU Usage
No name800 kbpsMedium

Latency Buffer

While it's natural to want to keep your latency as low as possible, you may experience reduced error tolerance and stability the lower you go. The lowest setting is not recommended.

For interactive live streams you may want to experiment with a lower latency, for non-interactive broadcasts you may want to increase it. Read to learn more.

LowestHighest

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Video configuration

Before changing your video configuration visit the video documentation to learn how it impacts your stream performance. The general rule is to start conservatively by having one middle quality stream output variant and experiment with adding more of varied qualities.

Stream output

NameVideo bitrateCPU Usage
No name800 kbpsMedium

Latency Buffer

While it's natural to want to keep your latency as low as possible, you may experience reduced error tolerance and stability the lower you go. The lowest setting is not recommended.

For interactive live streams you may want to experiment with a lower latency, for non-interactive broadcasts you may want to increase it. Read to learn more.

LowestHighest

\ No newline at end of file diff --git a/static/web/admin/config/general/AppearanceConfig/index.html b/static/web/admin/config/general/AppearanceConfig/index.html index 69294f048..2459a3410 100644 --- a/static/web/admin/config/general/AppearanceConfig/index.html +++ b/static/web/admin/config/general/AppearanceConfig/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
Loading...
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
Loading...
\ No newline at end of file diff --git a/static/web/admin/config/general/EditInstanceDetails/index.html b/static/web/admin/config/general/EditInstanceDetails/index.html index 52a861851..09b9a5600 100644 --- a/static/web/admin/config/general/EditInstanceDetails/index.html +++ b/static/web/admin/config/general/EditInstanceDetails/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file diff --git a/static/web/admin/config/general/EditInstanceTags/index.html b/static/web/admin/config/general/EditInstanceTags/index.html index 7e716c6f2..440ae5d46 100644 --- a/static/web/admin/config/general/EditInstanceTags/index.html +++ b/static/web/admin/config/general/EditInstanceTags/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Add Tags

This is a great way to categorize your Owncast server on the Directory!

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Add Tags

This is a great way to categorize your Owncast server on the Directory!

\ No newline at end of file diff --git a/static/web/admin/config/general/EditPageContent/index.html b/static/web/admin/config/general/EditPageContent/index.html index 472ff77c9..3432c7cbf 100644 --- a/static/web/admin/config/general/EditPageContent/index.html +++ b/static/web/admin/config/general/EditPageContent/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Custom Page Content

Edit the content of your page by using simple Markdown syntax.


\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Custom Page Content

Edit the content of your page by using simple Markdown syntax.


\ No newline at end of file diff --git a/static/web/admin/config/general/EditSocialLinks/index.html b/static/web/admin/config/general/EditSocialLinks/index.html index 6b1c0f999..48e8735e5 100644 --- a/static/web/admin/config/general/EditSocialLinks/index.html +++ b/static/web/admin/config/general/EditSocialLinks/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file diff --git a/static/web/admin/config/general/GeneralConfig/index.html b/static/web/admin/config/general/GeneralConfig/index.html index ddb6a80cf..5d7f24c67 100644 --- a/static/web/admin/config/general/GeneralConfig/index.html +++ b/static/web/admin/config/general/GeneralConfig/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

The following are displayed on your site to describe your stream and its content. Learn more.

Custom Page Content

Edit the content of your page by using simple Markdown syntax.


\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

The following are displayed on your site to describe your stream and its content. Learn more.

Custom Page Content

Edit the content of your page by using simple Markdown syntax.


\ No newline at end of file diff --git a/static/web/admin/config/general/index.html b/static/web/admin/config/general/index.html index 802f6a16d..f54cfc0ed 100644 --- a/static/web/admin/config/general/index.html +++ b/static/web/admin/config/general/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

The following are displayed on your site to describe your stream and its content. Learn more.

Custom Page Content

Edit the content of your page by using simple Markdown syntax.


\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

The following are displayed on your site to describe your stream and its content. Learn more.

Custom Page Content

Edit the content of your page by using simple Markdown syntax.


\ No newline at end of file diff --git a/static/web/admin/config/server/EditStorage/index.html b/static/web/admin/config/server/EditStorage/index.html index 0c8aec09d..e1f81c655 100644 --- a/static/web/admin/config/server/EditStorage/index.html +++ b/static/web/admin/config/server/EditStorage/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file diff --git a/static/web/admin/config/server/ServerConfig/index.html b/static/web/admin/config/server/ServerConfig/index.html index d41f41839..f4bf0d2ca 100644 --- a/static/web/admin/config/server/ServerConfig/index.html +++ b/static/web/admin/config/server/ServerConfig/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

You should change your admin password from the default and keep it safe. For most people it's likely the other settings will not need to be changed.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

You should change your admin password from the default and keep it safe. For most people it's likely the other settings will not need to be changed.

\ No newline at end of file diff --git a/static/web/admin/config/server/StorageConfig/index.html b/static/web/admin/config/server/StorageConfig/index.html index 1629c44e9..7127c5ae8 100644 --- a/static/web/admin/config/server/StorageConfig/index.html +++ b/static/web/admin/config/server/StorageConfig/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Owncast supports optionally using external storage providers to stream your video. Learn more about this by visiting our Storage Documentation.

Configuring this incorrectly will likely cause your video to be unplayable. Double check the documentation for your storage provider on how to configure the bucket you created for Owncast.

Keep in mind this is for live streaming, not for archival, recording or VOD purposes.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Owncast supports optionally using external storage providers to stream your video. Learn more about this by visiting our Storage Documentation.

Configuring this incorrectly will likely cause your video to be unplayable. Double check the documentation for your storage provider on how to configure the bucket you created for Owncast.

Keep in mind this is for live streaming, not for archival, recording or VOD purposes.

\ No newline at end of file diff --git a/static/web/admin/config/server/StreamKeys/index.html b/static/web/admin/config/server/StreamKeys/index.html index f529d0fda..67fde7552 100644 --- a/static/web/admin/config/server/StreamKeys/index.html +++ b/static/web/admin/config/server/StreamKeys/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
A streaming key is used with your broadcasting software to authenticate itself to Owncast. Most people will only need one. However, if you share a server with others or you want different keys for different broadcasting sources you can add more here.
These keys are unrelated to the admin password and will not grant you access to make changes to Owncast's configuration.
Read more about broadcasting at the documentation.
KeyComment
No data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
A streaming key is used with your broadcasting software to authenticate itself to Owncast. Most people will only need one. However, if you share a server with others or you want different keys for different broadcasting sources you can add more here.
These keys are unrelated to the admin password and will not grant you access to make changes to Owncast's configuration.
Read more about broadcasting at the documentation.
KeyComment
No data

\ No newline at end of file diff --git a/static/web/admin/config/server/index.html b/static/web/admin/config/server/index.html index 041af4bf4..3053bce8e 100644 --- a/static/web/admin/config/server/index.html +++ b/static/web/admin/config/server/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

You should change your admin password from the default and keep it safe. For most people it's likely the other settings will not need to be changed.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

You should change your admin password from the default and keep it safe. For most people it's likely the other settings will not need to be changed.

\ No newline at end of file diff --git a/static/web/admin/federation/actions/index.html b/static/web/admin/federation/actions/index.html index 03b9cc463..efe1cf263 100644 --- a/static/web/admin/federation/actions/index.html +++ b/static/web/admin/federation/actions/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Fediverse Actions

Below is a list of actions that were taken by others in response to your posts as well as people who requested to follow you.
ActionFromWhen
No data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Fediverse Actions

Below is a list of actions that were taken by others in response to your posts as well as people who requested to follow you.
ActionFromWhen
No data
\ No newline at end of file diff --git a/static/web/admin/federation/followers/index.html b/static/web/admin/federation/followers/index.html index d13926872..17b5415d3 100644 --- a/static/web/admin/federation/followers/index.html +++ b/static/web/admin/federation/followers/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

The following accounts get notified when you go live or send a post.

NameURL
Added
Remove
No data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

The following accounts get notified when you go live or send a post.

NameURL
Added
Remove
No data
\ No newline at end of file diff --git a/static/web/admin/hardware-info/index.html b/static/web/admin/hardware-info/index.html index a1cd7e01d..4cf96b68b 100644 --- a/static/web/admin/hardware-info/index.html +++ b/static/web/admin/hardware-info/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Hardware Info


CPU
0%
Memory
0%
Disk
0%
Loading...
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Hardware Info


CPU
0%
Memory
0%
Disk
0%
Loading...
\ No newline at end of file diff --git a/static/web/admin/help/index.html b/static/web/admin/help/index.html index 3b989ff27..18c758603 100644 --- a/static/web/admin/help/index.html +++ b/static/web/admin/help/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

How can we help you?

Troubleshooting

Fix your problems

Documentation

Read the Docs

Common tasks

I want to configure my owncast instance
Help configuring my broadcasting software
I want to embed my stream into another site
I want to customize my website
I want to tweak my video output
I want to use an external storage provider

Other

I found a bug
If you found a bug, then please let us know
I have a general question
Most general questions are answered in our FAQ or exist in our discussions
I want to build add-ons for Owncast
You can build your own bots, overlays, tools and add-ons with our developer APIs. 
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

How can we help you?

Troubleshooting

Fix your problems

Documentation

Read the Docs

Common tasks

I want to configure my owncast instance
Help configuring my broadcasting software
I want to embed my stream into another site
I want to customize my website
I want to tweak my video output
I want to use an external storage provider

Other

I found a bug
If you found a bug, then please let us know
I have a general question
Most general questions are answered in our FAQ or exist in our discussions
I want to build add-ons for Owncast
You can build your own bots, overlays, tools and add-ons with our developer APIs. 
\ No newline at end of file diff --git a/static/web/admin/index.html b/static/web/admin/index.html index 30d19cdd0..b320522a3 100644 --- a/static/web/admin/index.html +++ b/static/web/admin/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

No stream is active

You should start one.

Chat is disabled
Chat will continue to be disabled until you begin a live stream.
Find an audience on the Owncast Directory
List yourself in the Owncast Directory and show off your stream. Enable it in settings.
fediverse
Add your Owncast instance to the Fediverse
Enable Owncast social features to have your instance join the Fediverse, allowing people to follow, share and engage with your live stream.

News & Updates from Owncast

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

No stream is active

You should start one.

Chat is disabled
Chat will continue to be disabled until you begin a live stream.
Find an audience on the Owncast Directory
List yourself in the Owncast Directory and show off your stream. Enable it in settings.
fediverse
Add your Owncast instance to the Fediverse
Enable Owncast social features to have your instance join the Fediverse, allowing people to follow, share and engage with your live stream.

News & Updates from Owncast

\ No newline at end of file diff --git a/static/web/admin/logs/index.html b/static/web/admin/logs/index.html index a242888b5..5cd0be6cd 100644 --- a/static/web/admin/logs/index.html +++ b/static/web/admin/logs/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file diff --git a/static/web/admin/stream-health/index.html b/static/web/admin/stream-health/index.html index bd2fed01f..1f3dda3ce 100644 --- a/static/web/admin/stream-health/index.html +++ b/static/web/admin/stream-health/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Stream Performance

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Stream Performance

\ No newline at end of file diff --git a/static/web/admin/upgrade/index.html b/static/web/admin/upgrade/index.html index 9f0186ccd..64db5002b 100644 --- a/static/web/admin/upgrade/index.html +++ b/static/web/admin/upgrade/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Thu Jan 01 1970

Downloads

NameSize
No data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Thu Jan 01 1970

Downloads

NameSize
No data
\ No newline at end of file diff --git a/static/web/admin/viewer-info/index.html b/static/web/admin/viewer-info/index.html index 1cd32a476..dd6b5234f 100644 --- a/static/web/admin/viewer-info/index.html +++ b/static/web/admin/viewer-info/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Viewer Info


Max viewers last stream
0
All-time max viewers
0
User AgentLocation
Watch Time
No data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Viewer Info


Max viewers last stream
0
All-time max viewers
0
User AgentLocation
Watch Time
No data
\ No newline at end of file diff --git a/static/web/admin/webhooks/index.html b/static/web/admin/webhooks/index.html index 6b6e695da..4cc4192fc 100644 --- a/static/web/admin/webhooks/index.html +++ b/static/web/admin/webhooks/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Webhooks

A webhook is a callback made to an external API in response to an event that takes place within Owncast. This can be used to build chat bots or sending automatic notifications that you've started streaming.
Read more about how to use webhooks, with examples, at our documentation.
URLEvents
No data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Webhooks

A webhook is a callback made to an external API in response to an event that takes place within Owncast. This can be used to build chat bots or sending automatic notifications that you've started streaming.
Read more about how to use webhooks, with examples, at our documentation.
URLEvents
No data

\ No newline at end of file diff --git a/static/web/embed/chat/readonly/index.html b/static/web/embed/chat/readonly/index.html index 75de12cf3..84a54e6ec 100644 --- a/static/web/embed/chat/readonly/index.html +++ b/static/web/embed/chat/readonly/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/static/web/embed/chat/readwrite/index.html b/static/web/embed/chat/readwrite/index.html index 196755760..35d64764e 100644 --- a/static/web/embed/chat/readwrite/index.html +++ b/static/web/embed/chat/readwrite/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/static/web/embed/video/index.html b/static/web/embed/video/index.html index b5cd5a5bf..f6b93095a 100644 --- a/static/web/embed/video/index.html +++ b/static/web/embed/video/index.html @@ -1 +1 @@ -
This stream is offline. Check back soon!
\ No newline at end of file +
This stream is offline. Check back soon!
\ No newline at end of file diff --git a/static/web/index.html b/static/web/index.html index 2cadf0625..fda0af8d9 100644 --- a/static/web/index.html +++ b/static/web/index.html @@ -1,9 +1,9 @@ {{.Name}}
{{.Name}}
\ No newline at end of file +
\ No newline at end of file