uEdition-Editor 2.2.4__tar.gz → 2.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/PKG-INFO +3 -2
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/pyproject.toml +2 -1
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/__about__.py +1 -1
- uedition_editor-2.2.4/uedition_editor/frontend/dist/assets/CodeMirrorEditor-DeB75lTS.js → uedition_editor-2.2.5/uedition_editor/frontend/dist/assets/CodeMirrorEditor-RSurVacL.js +1 -1
- uedition_editor-2.2.4/uedition_editor/frontend/dist/assets/FolderEditor-CW7prHc8.js → uedition_editor-2.2.5/uedition_editor/frontend/dist/assets/FolderEditor-qw4115u-.js +1 -1
- uedition_editor-2.2.5/uedition_editor/frontend/dist/assets/ImageEditor-BIWggS6b.js +1 -0
- uedition_editor-2.2.4/uedition_editor/frontend/dist/assets/PdfEditor-QUshyPu3.js → uedition_editor-2.2.5/uedition_editor/frontend/dist/assets/PdfEditor-AOiQWAyy.js +1 -1
- uedition_editor-2.2.4/uedition_editor/frontend/dist/assets/TeiEditor-CxvffDm0.js → uedition_editor-2.2.5/uedition_editor/frontend/dist/assets/TeiEditor-BzLbO9Zc.js +1 -1
- uedition_editor-2.2.4/uedition_editor/frontend/dist/assets/index-CKkRF2_K.js → uedition_editor-2.2.5/uedition_editor/frontend/dist/assets/index-B-eNR4dq.js +11 -11
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/frontend/dist/index.html +1 -1
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/update_version.py +1 -1
- uedition_editor-2.2.4/uedition_editor/frontend/dist/assets/ImageEditor-wIdXiu8y.js +0 -1
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/.gitignore +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/.pre-commit-config.yaml +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/Containerfile +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/LICENSE.txt +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/README.md +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/__init__.py +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/__main__.py +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/api/__init__.py +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/api/auth.py +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/api/branches.py +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/api/configs.py +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/api/files.py +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/api/tests.py +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/api/util.py +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/cli/__init__.py +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/cron.py +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/frontend/dist/assets/CodeMirrorEditor-DUGUrxLC.css +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/frontend/dist/assets/index-BvXz_3FY.css +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/frontend/dist/assets/index-Vcq4gwWv.js +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/frontend/dist/ueditor.svg +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/settings.py +0 -0
- {uedition_editor-2.2.4 → uedition_editor-2.2.5}/uedition_editor/state.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: uEdition-Editor
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.5
|
|
4
4
|
Project-URL: Documentation, https://github.com/uEdition/uEditor#readme
|
|
5
5
|
Project-URL: Issues, https://github.com/uEdition/uEditor/issues
|
|
6
6
|
Project-URL: Source, https://github.com/uEdition/uEditor
|
|
@@ -12,6 +12,7 @@ Classifier: Programming Language :: Python
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
16
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
16
17
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
17
18
|
Requires-Python: >=3.11
|
|
@@ -29,7 +30,7 @@ Requires-Dist: python-slugify<9,>=8.0.4
|
|
|
29
30
|
Requires-Dist: pyyaml-include<3,>=2
|
|
30
31
|
Requires-Dist: pyyaml<7,>=6
|
|
31
32
|
Requires-Dist: typer<1,>=0.15.1
|
|
32
|
-
Requires-Dist: uedition
|
|
33
|
+
Requires-Dist: uedition
|
|
33
34
|
Requires-Dist: uvicorn<1
|
|
34
35
|
Requires-Dist: websockets<17,>=15
|
|
35
36
|
Description-Content-Type: text/markdown
|
|
@@ -17,6 +17,7 @@ classifiers = [
|
|
|
17
17
|
"Programming Language :: Python :: 3.11",
|
|
18
18
|
"Programming Language :: Python :: 3.12",
|
|
19
19
|
"Programming Language :: Python :: 3.13",
|
|
20
|
+
"Programming Language :: Python :: 3.14",
|
|
20
21
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
21
22
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
22
23
|
]
|
|
@@ -34,7 +35,7 @@ dependencies = [
|
|
|
34
35
|
"pyjwt[crypto]>=2.10.1,<3",
|
|
35
36
|
"PyYaml>=6,<7",
|
|
36
37
|
"pyyaml_include>=2,<3",
|
|
37
|
-
"uEdition
|
|
38
|
+
"uEdition",
|
|
38
39
|
"typer>=0.15.1,<1",
|
|
39
40
|
"uvicorn<1",
|
|
40
41
|
"websockets>=15,<17",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as xf,z as re,A as go,g as F,B as ht,C as Ca,E as Qo,o as Np,d as _e,F as Up,G as kf,v as wf,a as Pf,h as ln,j as vf,f as Cl,b as $f,t as Xa,H as Za,J as Aa,s as Tf,c as So,e as Fp,K as Hp,u as U,L as Ra,M as Kp,q as Jp,y as em}from"./index-CKkRF2_K.js";import{k as tm,b as im,s as nm}from"./index-Vcq4gwWv.js";const Cf=1024;let rm=0,Ie=class{constructor(e,t){this.from=e,this.to=t}};class M{constructor(e={}){this.id=rm++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=ue.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}M.closedBy=new M({deserialize:n=>n.split(" ")});M.openedBy=new M({deserialize:n=>n.split(" ")});M.group=new M({deserialize:n=>n.split(" ")});M.isolate=new M({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});M.contextHash=new M({perNode:!0});M.lookAhead=new M({perNode:!0});M.mounted=new M({perNode:!0});class Qn{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[M.mounted.id]}}const sm=Object.create(null);class ue{constructor(e,t,i,r=0){this.name=e,this.props=t,this.id=i,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):sm,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new ue(e.name||"",t,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(M.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let r of i.split(" "))t[r]=e[i];return i=>{for(let r=i.prop(M.group),s=-1;s<(r?r.length:0);s++){let o=t[s<0?i.name:r[s]];if(o)return o}}}}ue.none=new ue("",Object.create(null),0,8);class Vn{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let i of this.types){let r=null;for(let s of e){let o=s(i);if(o){r||(r=Object.assign({},i.props));let l=o[1],a=o[0];a.combine&&a.id in r&&(l=a.combine(r[a.id],l)),r[a.id]=l}}t.push(r?new ue(i.name,r,i.id,i.flags):i)}return new Vn(t)}}const er=new WeakMap,Ma=new WeakMap;var te;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays"})(te||(te={}));class j{constructor(e,t,i,r,s){if(this.type=e,this.children=t,this.positions=i,this.length=r,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=Qn.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let i of this.children){let r=i.toString();r&&(t&&(t+=","),t+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new Dr(this.topNode,e)}cursorAt(e,t=0,i=0){let r=er.get(this)||this.topNode,s=new Dr(r);return s.moveTo(e,t),er.set(this,s._tree),s}get topNode(){return new ke(this,0,0,null)}resolve(e,t=0){let i=Sn(er.get(this)||this.topNode,e,t,!1);return er.set(this,i),i}resolveInner(e,t=0){let i=Sn(Ma.get(this)||this.topNode,e,t,!0);return Ma.set(this,i),i}resolveStack(e,t=0){return am(this,e,t)}iterate(e){let{enter:t,leave:i,from:r=0,to:s=this.length}=e,o=e.mode||0,l=(o&te.IncludeAnonymous)>0;for(let a=this.cursor(o|te.IncludeAnonymous);;){let h=!1;if(a.from<=s&&a.to>=r&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;h=!0}for(;h&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Al(ue.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,r)=>new j(this.type,t,i,r,this.propValues),e.makeTree||((t,i,r)=>new j(ue.none,t,i,r)))}static build(e){return hm(e)}}j.empty=new j(ue.none,[],[],0);class Xl{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Xl(this.buffer,this.index)}}class Vt{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return ue.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],i=this.buffer[e+3],r=this.set.types[t],s=r.name;if(/\W/.test(s)&&!r.isError&&(s=JSON.stringify(s)),e+=4,i==e)return s;let o=[];for(;e<i;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,t,i,r,s){let{buffer:o}=this,l=-1;for(let a=e;a!=t&&!(Xf(s,r,o[a+1],o[a+2])&&(l=a,i>0));a=o[a+3]);return l}slice(e,t,i){let r=this.buffer,s=new Uint16Array(t-e),o=0;for(let l=e,a=0;l<t;){s[a++]=r[l++],s[a++]=r[l++]-i;let h=s[a++]=r[l++]-i;s[a++]=r[l++]-e,o=Math.max(o,h)}return new Vt(s,o,this.set)}}function Xf(n,e,t,i){switch(n){case-2:return t<e;case-1:return i>=e&&t<e;case 0:return t<e&&i>e;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function Sn(n,e,t,i){for(var r;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let o=!i&&n instanceof ke&&n.index<0?null:n.parent;if(!o)return n;n=o}let s=i?0:te.IgnoreOverlays;if(i)for(let o=n,l=o.parent;l;o=l,l=o.parent)o instanceof ke&&o.index<0&&((r=l.enter(e,t,s))===null||r===void 0?void 0:r.from)!=o.from&&(n=l);for(;;){let o=n.enter(e,t,s);if(!o)return n;n=o}}class Zf{cursor(e=0){return new Dr(this,e)}getChild(e,t=null,i=null){let r=La(this,e,t,i);return r.length?r[0]:null}getChildren(e,t=null,i=null){return La(this,e,t,i)}resolve(e,t=0){return Sn(this,e,t,!1)}resolveInner(e,t=0){return Sn(this,e,t,!0)}matchContext(e){return bo(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),i=this;for(;t;){let r=t.lastChild;if(!r||r.to!=t.to)break;r.type.isError&&r.from==r.to?(i=t,t=r.prevSibling):t=r}return i}get node(){return this}get next(){return this.parent}}class ke extends Zf{constructor(e,t,i,r){super(),this._tree=e,this.from=t,this.index=i,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,i,r,s=0){for(let o=this;;){for(let{children:l,positions:a}=o._tree,h=t>0?l.length:-1;e!=h;e+=t){let c=l[e],f=a[e]+o.from;if(Xf(r,i,f,f+c.length)){if(c instanceof Vt){if(s&te.ExcludeBuffers)continue;let u=c.findChild(0,c.buffer.length,t,i-f,r);if(u>-1)return new Ot(new om(o,c,e,f),null,u)}else if(s&te.IncludeAnonymous||!c.type.isAnonymous||Zl(c)){let u;if(!(s&te.IgnoreMounts)&&(u=Qn.get(c))&&!u.overlay)return new ke(u.tree,f,e,o);let d=new ke(c,f,e,o);return s&te.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?c.children.length-1:0,t,i,r)}}}if(s&te.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let r;if(!(i&te.IgnoreOverlays)&&(r=Qn.get(this._tree))&&r.overlay){let s=e-this.from;for(let{from:o,to:l}of r.overlay)if((t>0?o<=s:o<s)&&(t<0?l>=s:l>s))return new ke(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function La(n,e,t,i){let r=n.cursor(),s=[];if(!r.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=r.type.is(t),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function bo(n,e,t=e.length-1){for(let i=n;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class om{constructor(e,t,i,r){this.parent=e,this.buffer=t,this.index=i,this.start=r}}class Ot extends Zf{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,i);return s<0?null:new Ot(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&te.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new Ot(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Ot(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Ot(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let o=i.buffer[this.index+1];e.push(i.slice(r,s,o)),t.push(0)}return new j(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Af(n){if(!n.length)return null;let e=0,t=n[0];for(let s=1;s<n.length;s++){let o=n[s];(o.from>t.from||o.to<t.to)&&(t=o,e=s)}let i=t instanceof ke&&t.index<0?null:t.parent,r=n.slice();return i?r[e]=i:r.splice(e,1),new lm(r,t)}class lm{constructor(e,t){this.heads=e,this.node=t}get next(){return Af(this.heads)}}function am(n,e,t){let i=n.resolveInner(e,t),r=null;for(let s=i instanceof ke?i:i.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(r||(r=[i])).push(o.resolve(e,t)),s=o}else{let o=Qn.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let l=new ke(o.tree,o.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(Sn(l,e,t,!1))}}return r?Af(r):i}class Dr{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof ke)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof ke?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&te.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&te.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&te.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(r.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:i}=r)}else({index:t,_parent:i}=this._tree);for(;i;{index:t,_parent:i}=i)if(t>-1)for(let s=t+e,o=e<0?-1:i._tree.children.length;s!=o;s+=e){let l=i._tree.children[s];if(this.mode&te.IncludeAnonymous||l instanceof Vt||!l.type.isAnonymous||Zl(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,i=0;if(e&&e.context==this.buffer)e:for(let r=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,i=s+1;break e}r=this.stack[--s]}for(let r=i;r<this.stack.length;r++)t=new Ot(this.buffer,t,this.stack[r]);return this.bufferNode=new Ot(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let i=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,r=!0}}}matchContext(e){if(!this.buffer)return bo(this.node.parent,e);let{buffer:t}=this.buffer,{types:i}=t.set;for(let r=e.length-1,s=this.stack.length-1;r>=0;s--){if(s<0)return bo(this._tree,e,r);let o=i[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function Zl(n){return n.children.some(e=>e instanceof Vt||!e.type.isAnonymous||Zl(e))}function hm(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:r=Cf,reused:s=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new Xl(t,t.length):t,a=i.types,h=0,c=0;function f(x,w,v,E,Y,G){let{id:D,start:Z,end:W,size:_}=l,N=c,de=h;if(_<0)if(l.next(),_==-1){let Je=s[D];v.push(Je),E.push(Z-x);return}else if(_==-3){h=D;return}else if(_==-4){c=D;return}else throw new RangeError(`Unrecognized record size: ${_}`);let me=a[D],We,ce,Ce=Z-x;if(W-Z<=r&&(ce=g(l.pos-w,Y))){let Je=new Uint16Array(ce.size-ce.skip),Pe=l.pos-ce.size,ze=Je.length;for(;l.pos>Pe;)ze=Q(ce.start,Je,ze);We=new Vt(Je,W-ce.start,i),Ce=ce.start-x}else{let Je=l.pos-_;l.next();let Pe=[],ze=[],xt=D>=o?D:-1,Lt=0,Ht=W;for(;l.pos>Je;)xt>=0&&l.id==xt&&l.size>=0?(l.end<=Ht-r&&(O(Pe,ze,Z,Lt,l.end,Ht,xt,N,de),Lt=Pe.length,Ht=l.end),l.next()):G>2500?u(Z,Je,Pe,ze):f(Z,Je,Pe,ze,xt,G+1);if(xt>=0&&Lt>0&&Lt<Pe.length&&O(Pe,ze,Z,Lt,Z,Ht,xt,N,de),Pe.reverse(),ze.reverse(),xt>-1&&Lt>0){let Jn=d(me,de);We=Al(me,Pe,ze,0,Pe.length,0,W-Z,Jn,Jn)}else We=p(me,Pe,ze,W-Z,N-W,de)}v.push(We),E.push(Ce)}function u(x,w,v,E){let Y=[],G=0,D=-1;for(;l.pos>w;){let{id:Z,start:W,end:_,size:N}=l;if(N>4)l.next();else{if(D>-1&&W<D)break;D<0&&(D=_-r),Y.push(Z,W,_),G++,l.next()}}if(G){let Z=new Uint16Array(G*4),W=Y[Y.length-2];for(let _=Y.length-3,N=0;_>=0;_-=3)Z[N++]=Y[_],Z[N++]=Y[_+1]-W,Z[N++]=Y[_+2]-W,Z[N++]=N;v.push(new Vt(Z,Y[2]-W,i)),E.push(W-x)}}function d(x,w){return(v,E,Y)=>{let G=0,D=v.length-1,Z,W;if(D>=0&&(Z=v[D])instanceof j){if(!D&&Z.type==x&&Z.length==Y)return Z;(W=Z.prop(M.lookAhead))&&(G=E[D]+Z.length+W)}return p(x,v,E,Y,G,w)}}function O(x,w,v,E,Y,G,D,Z,W){let _=[],N=[];for(;x.length>E;)_.push(x.pop()),N.push(w.pop()+v-Y);x.push(p(i.types[D],_,N,G-Y,Z-G,W)),w.push(Y-v)}function p(x,w,v,E,Y,G,D){if(G){let Z=[M.contextHash,G];D=D?[Z].concat(D):[Z]}if(Y>25){let Z=[M.lookAhead,Y];D=D?[Z].concat(D):[Z]}return new j(x,w,v,E,D)}function g(x,w){let v=l.fork(),E=0,Y=0,G=0,D=v.end-r,Z={size:0,start:0,skip:0};e:for(let W=v.pos-x;v.pos>W;){let _=v.size;if(v.id==w&&_>=0){Z.size=E,Z.start=Y,Z.skip=G,G+=4,E+=4,v.next();continue}let N=v.pos-_;if(_<0||N<W||v.start<D)break;let de=v.id>=o?4:0,me=v.start;for(v.next();v.pos>N;){if(v.size<0)if(v.size==-3)de+=4;else break e;else v.id>=o&&(de+=4);v.next()}Y=me,E+=_,G+=de}return(w<0||E==x)&&(Z.size=E,Z.start=Y,Z.skip=G),Z.size>4?Z:void 0}function Q(x,w,v){let{id:E,start:Y,end:G,size:D}=l;if(l.next(),D>=0&&E<o){let Z=v;if(D>4){let W=l.pos-(D-4);for(;l.pos>W;)v=Q(x,w,v)}w[--v]=Z,w[--v]=G-x,w[--v]=Y-x,w[--v]=E}else D==-3?h=E:D==-4&&(c=E);return v}let S=[],b=[];for(;l.pos>0;)f(n.start||0,n.bufferStart||0,S,b,-1,0);let k=(e=n.length)!==null&&e!==void 0?e:S.length?b[0]+S[0].length:0;return new j(a[n.topID],S.reverse(),b.reverse(),k)}const za=new WeakMap;function vr(n,e){if(!n.isAnonymous||e instanceof Vt||e.type!=n)return 1;let t=za.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof j)){t=1;break}t+=vr(n,i)}za.set(e,t)}return t}function Al(n,e,t,i,r,s,o,l,a){let h=0;for(let O=i;O<r;O++)h+=vr(n,e[O]);let c=Math.ceil(h*1.5/8),f=[],u=[];function d(O,p,g,Q,S){for(let b=g;b<Q;){let k=b,x=p[b],w=vr(n,O[b]);for(b++;b<Q;b++){let v=vr(n,O[b]);if(w+v>=c)break;w+=v}if(b==k+1){if(w>c){let v=O[k];d(v.children,v.positions,0,v.children.length,p[k]+S);continue}f.push(O[k])}else{let v=p[b-1]+O[b-1].length-x;f.push(Al(n,O,p,k,b,x,v,null,a))}u.push(x+S-s)}}return d(e,t,i,r,0),(l||a)(f,u,o)}class Rf{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof Ot?this.setBuffer(e.context.buffer,e.index,t):e instanceof ke&&this.map.set(e.tree,t)}get(e){return e instanceof Ot?this.getBuffer(e.context.buffer,e.index):e instanceof ke?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class $t{constructor(e,t,i,r,s=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=r,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let r=[new $t(0,e.length,e,0,!1,i)];for(let s of t)s.to>e.length&&r.push(s);return r}static applyChanges(e,t,i=128){if(!t.length)return e;let r=[],s=1,o=e.length?e[0]:null;for(let l=0,a=0,h=0;;l++){let c=l<t.length?t[l]:null,f=c?c.fromA:1e9;if(f-a>=i)for(;o&&o.from<f;){let u=o;if(a>=u.from||f<=u.to||h){let d=Math.max(u.from,a)-h,O=Math.min(u.to,f)-h;u=d>=O?null:new $t(d,O,u.tree,u.offset+h,l>0,!!c)}if(u&&r.push(u),o.to>f)break;o=s<e.length?e[s++]:null}if(!c)break;a=c.toA,h=c.toA-c.toB}return r}}class Rl{startParse(e,t,i){return typeof e=="string"&&(e=new cm(e)),i=i?i.length?i.map(r=>new Ie(r.from,r.to)):[new Ie(0,0)]:[new Ie(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let r=this.startParse(e,t,i);for(;;){let s=r.advance();if(s)return s}}}class cm{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function Mf(n){return(e,t,i,r)=>new um(e,n,t,i,r)}class Ea{constructor(e,t,i,r,s){this.parser=e,this.parse=t,this.overlay=i,this.target=r,this.from=s}}function Da(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class fm{constructor(e,t,i,r,s,o,l){this.parser=e,this.predicate=t,this.mounts=i,this.index=r,this.start=s,this.target=o,this.prev=l,this.depth=0,this.ranges=[]}}const yo=new M({perNode:!0});class um{constructor(e,t,i,r,s){this.nest=t,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new j(i.type,i.children,i.positions,i.length,i.propValues.concat([[yo,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[M.mounted.id]=new Qn(t,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new pm(this.fragments),t=null,i=null,r=new Dr(new ke(this.baseTree,this.ranges[0].from,0,null),te.IncludeAnonymous|te.IgnoreMounts);e:for(let s,o;;){let l=!0,a;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)l=!1;else if(e.hasNode(r)){if(t){let h=t.mounts.find(c=>c.frag.from<=r.from&&c.frag.to>=r.to&&c.mount.overlay);if(h)for(let c of h.mount.overlay){let f=c.from+h.pos,u=c.to+h.pos;f>=r.from&&u<=r.to&&!t.ranges.some(d=>d.from<u&&d.to>f)&&t.ranges.push({from:f,to:u})}}l=!1}else if(i&&(o=dm(i.ranges,r.from,r.to)))l=o!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.from<r.to||!s.overlay)){r.tree||(Om(r),t&&t.depth++,i&&i.depth++);let h=e.findMounts(r.from,s.parser);if(typeof s.overlay=="function")t=new fm(s.parser,s.overlay,h,this.inner.length,r.from,r.tree,t);else{let c=qa(this.ranges,s.overlay||(r.from<r.to?[new Ie(r.from,r.to)]:[]));c.length&&Da(c),(c.length||!s.overlay)&&this.inner.push(new Ea(s.parser,c.length?s.parser.startParse(this.input,Va(h,c),c):s.parser.startParse(""),s.overlay?s.overlay.map(f=>new Ie(f.from-r.from,f.to-r.from)):null,r.tree,c.length?c[0].from:r.from)),s.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):l=!1}}else if(t&&(a=t.predicate(r))&&(a===!0&&(a=new Ie(r.from,r.to)),a.from<a.to)){let h=t.ranges.length-1;h>=0&&t.ranges[h].to==a.from?t.ranges[h]={from:t.ranges[h].from,to:a.to}:t.ranges.push(a)}if(l&&r.firstChild())t&&t.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(t&&!--t.depth){let h=qa(this.ranges,t.ranges);h.length&&(Da(h),this.inner.splice(t.index,0,new Ea(t.parser,t.parser.startParse(this.input,Va(t.mounts,h),h),t.ranges.map(c=>new Ie(c.from-t.start,c.to-t.start)),t.target,h[0].from))),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function dm(n,e,t){for(let i of n){if(i.from>=t)break;if(i.to>e)return i.from<=e&&i.to>=t?2:1}return 0}function Ya(n,e,t,i,r,s){if(e<t){let o=n.buffer[e+1];i.push(n.slice(e,t,o)),r.push(o-s)}}function Om(n){let{node:e}=n,t=[],i=e.context.buffer;do t.push(n.index),n.parent();while(!n.tree);let r=n.tree,s=r.children.indexOf(i),o=r.children[s],l=o.buffer,a=[s];function h(c,f,u,d,O,p){let g=t[p],Q=[],S=[];Ya(o,c,g,Q,S,d);let b=l[g+1],k=l[g+2];a.push(Q.length);let x=p?h(g+4,l[g+3],o.set.types[l[g]],b,k-b,p-1):e.toTree();return Q.push(x),S.push(b-d),Ya(o,l[g+3],f,Q,S,d),new j(u,Q,S,O)}r.children[s]=h(0,l.length,ue.none,0,o.length,t.length-1);for(let c of a){let f=n.tree.children[c],u=n.tree.positions[c];n.yield(new ke(f,u+n.from,c,n._tree))}}class _a{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(te.IncludeAnonymous|te.IgnoreMounts)}moveTo(e){let{cursor:t}=this,i=e-this.offset;for(;!this.done&&t.from<i;)t.to>=e&&t.enter(i,1,te.IgnoreOverlays|te.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof j)t=t.children[0];else break}return!1}}let pm=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(t=i.tree.prop(yo))!==null&&t!==void 0?t:i.to,this.inner=new _a(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(yo))!==null&&e!==void 0?e:t.to,this.inner=new _a(t.tree,-t.offset)}}findMounts(e,t){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(i=s.tree)===null||i===void 0?void 0:i.prop(M.mounted);if(o&&o.parser==t)for(let l=this.fragI;l<this.fragments.length;l++){let a=this.fragments[l];if(a.from>=s.to)break;a.tree==this.curFrag.tree&&r.push({frag:a,pos:s.from-a.offset,mount:o})}}}return r}};function qa(n,e){let t=null,i=e;for(let r=1,s=0;r<n.length;r++){let o=n[r-1].to,l=n[r].from;for(;s<i.length;s++){let a=i[s];if(a.from>=l)break;a.to<=o||(t||(i=t=e.slice()),a.from<o?(t[s]=new Ie(a.from,o),a.to>l&&t.splice(s+1,0,new Ie(l,a.to))):a.to>l?t[s--]=new Ie(l,a.to):t.splice(s--,1))}}return i}function mm(n,e,t,i){let r=0,s=0,o=!1,l=!1,a=-1e9,h=[];for(;;){let c=r==n.length?1e9:o?n[r].to:n[r].from,f=s==e.length?1e9:l?e[s].to:e[s].from;if(o!=l){let u=Math.max(a,t),d=Math.min(c,f,i);u<d&&h.push(new Ie(u,d))}if(a=Math.min(c,f),a==1e9)break;c==a&&(o?(o=!1,r++):o=!0),f==a&&(l?(l=!1,s++):l=!0)}return h}function Va(n,e){let t=[];for(let{pos:i,mount:r,frag:s}of n){let o=i+(r.overlay?r.overlay[0].from:0),l=o+r.tree.length,a=Math.max(s.from,o),h=Math.min(s.to,l);if(r.overlay){let c=r.overlay.map(u=>new Ie(u.from+i,u.to+i)),f=mm(e,c,a,h);for(let u=0,d=a;;u++){let O=u==f.length,p=O?h:f[u].from;if(p>d&&t.push(new $t(d,p,r.tree,-o,s.from>=d||s.openStart,s.to<=p||s.openEnd)),O)break;d=f[u].to}}else t.push(new $t(a,h,r.tree,-o,s.from>=o||s.openStart,s.to<=l||s.openEnd))}return t}let xo=[],Lf=[];(()=>{let n="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(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?Lf:xo).push(t=t+n[e])})();function gm(n){if(n<768)return!1;for(let e=0,t=xo.length;;){let i=e+t>>1;if(n<xo[i])t=i;else if(n>=Lf[i])e=i+1;else return!0;if(e==t)return!1}}function Ba(n){return n>=127462&&n<=127487}const Wa=8205;function Qm(n,e,t=!0,i=!0){return(t?zf:Sm)(n,e,i)}function zf(n,e,t){if(e==n.length)return e;e&&Ef(n.charCodeAt(e))&&Df(n.charCodeAt(e-1))&&e--;let i=Xs(n,e);for(e+=Ia(i);e<n.length;){let r=Xs(n,e);if(i==Wa||r==Wa||t&&gm(r))e+=Ia(r),i=r;else if(Ba(r)){let s=0,o=e-2;for(;o>=0&&Ba(Xs(n,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function Sm(n,e,t){for(;e>0;){let i=zf(n,e-2,t);if(i<e)return i;e--}return 0}function Xs(n,e){let t=n.charCodeAt(e);if(!Df(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Ef(i)?(t-55296<<10)+(i-56320)+65536:t}function Ef(n){return n>=56320&&n<57344}function Df(n){return n>=55296&&n<56320}function Ia(n){return n<65536?1:2}class B{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=Xi(this,e,t);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),ft.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Xi(this,e,t);let i=[];return this.decompose(e,t,i,0),ft.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new an(this),s=new an(e);for(let o=t,l=t;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(l+=r.value.length,r.done||l>=i)return!0}}iter(e=1){return new an(this,e)}iterRange(e,t=this.length){return new Yf(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new _f(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?B.empty:e.length<=32?new oe(e):ft.from(oe.split(e,[]))}}class oe extends B{constructor(e,t=bm(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let s=0;;s++){let o=this.text[s],l=r+o.length;if((t?i:l)>=e)return new ym(r,l,i,o);r=l+1,i++}}decompose(e,t,i,r){let s=e<=0&&t>=this.length?this:new oe(ja(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let o=i.pop(),l=$r(s.text,o.text.slice(),0,s.length);if(l.length<=32)i.push(new oe(l,o.length+s.length));else{let a=l.length>>1;i.push(new oe(l.slice(0,a)),new oe(l.slice(a)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof oe))return super.replace(e,t,i);[e,t]=Xi(this,e,t);let r=$r(this.text,$r(i.text,ja(this.text,0,e)),t),s=this.length+i.length-(t-e);return r.length<=32?new oe(r,s):ft.from(oe.split(r,[]),s)}sliceString(e,t=this.length,i=`
|
|
1
|
+
import{p as xf,z as re,A as go,g as F,B as Ca,o as Np,c as _e,C as Up,E as kf,v as wf,a as Pf,e as ln,f as vf,F as ht,G as Qo,b as $f,t as Xa,H as Za,J as Aa,s as Tf,h as So,d as Fp,q as Cl,K as Hp,u as U,L as Ra,M as Kp,n as Jp,y as em}from"./index-B-eNR4dq.js";import{k as tm,b as im,s as nm}from"./index-Vcq4gwWv.js";const Cf=1024;let rm=0,Ie=class{constructor(e,t){this.from=e,this.to=t}};class M{constructor(e={}){this.id=rm++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=ue.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}M.closedBy=new M({deserialize:n=>n.split(" ")});M.openedBy=new M({deserialize:n=>n.split(" ")});M.group=new M({deserialize:n=>n.split(" ")});M.isolate=new M({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});M.contextHash=new M({perNode:!0});M.lookAhead=new M({perNode:!0});M.mounted=new M({perNode:!0});class Qn{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[M.mounted.id]}}const sm=Object.create(null);class ue{constructor(e,t,i,r=0){this.name=e,this.props=t,this.id=i,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):sm,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new ue(e.name||"",t,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(M.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let r of i.split(" "))t[r]=e[i];return i=>{for(let r=i.prop(M.group),s=-1;s<(r?r.length:0);s++){let o=t[s<0?i.name:r[s]];if(o)return o}}}}ue.none=new ue("",Object.create(null),0,8);class Vn{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let i of this.types){let r=null;for(let s of e){let o=s(i);if(o){r||(r=Object.assign({},i.props));let l=o[1],a=o[0];a.combine&&a.id in r&&(l=a.combine(r[a.id],l)),r[a.id]=l}}t.push(r?new ue(i.name,r,i.id,i.flags):i)}return new Vn(t)}}const er=new WeakMap,Ma=new WeakMap;var te;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays"})(te||(te={}));class j{constructor(e,t,i,r,s){if(this.type=e,this.children=t,this.positions=i,this.length=r,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=Qn.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let i of this.children){let r=i.toString();r&&(t&&(t+=","),t+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new Dr(this.topNode,e)}cursorAt(e,t=0,i=0){let r=er.get(this)||this.topNode,s=new Dr(r);return s.moveTo(e,t),er.set(this,s._tree),s}get topNode(){return new ke(this,0,0,null)}resolve(e,t=0){let i=Sn(er.get(this)||this.topNode,e,t,!1);return er.set(this,i),i}resolveInner(e,t=0){let i=Sn(Ma.get(this)||this.topNode,e,t,!0);return Ma.set(this,i),i}resolveStack(e,t=0){return am(this,e,t)}iterate(e){let{enter:t,leave:i,from:r=0,to:s=this.length}=e,o=e.mode||0,l=(o&te.IncludeAnonymous)>0;for(let a=this.cursor(o|te.IncludeAnonymous);;){let h=!1;if(a.from<=s&&a.to>=r&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;h=!0}for(;h&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Al(ue.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,r)=>new j(this.type,t,i,r,this.propValues),e.makeTree||((t,i,r)=>new j(ue.none,t,i,r)))}static build(e){return hm(e)}}j.empty=new j(ue.none,[],[],0);class Xl{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Xl(this.buffer,this.index)}}class Vt{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return ue.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],i=this.buffer[e+3],r=this.set.types[t],s=r.name;if(/\W/.test(s)&&!r.isError&&(s=JSON.stringify(s)),e+=4,i==e)return s;let o=[];for(;e<i;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,t,i,r,s){let{buffer:o}=this,l=-1;for(let a=e;a!=t&&!(Xf(s,r,o[a+1],o[a+2])&&(l=a,i>0));a=o[a+3]);return l}slice(e,t,i){let r=this.buffer,s=new Uint16Array(t-e),o=0;for(let l=e,a=0;l<t;){s[a++]=r[l++],s[a++]=r[l++]-i;let h=s[a++]=r[l++]-i;s[a++]=r[l++]-e,o=Math.max(o,h)}return new Vt(s,o,this.set)}}function Xf(n,e,t,i){switch(n){case-2:return t<e;case-1:return i>=e&&t<e;case 0:return t<e&&i>e;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function Sn(n,e,t,i){for(var r;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let o=!i&&n instanceof ke&&n.index<0?null:n.parent;if(!o)return n;n=o}let s=i?0:te.IgnoreOverlays;if(i)for(let o=n,l=o.parent;l;o=l,l=o.parent)o instanceof ke&&o.index<0&&((r=l.enter(e,t,s))===null||r===void 0?void 0:r.from)!=o.from&&(n=l);for(;;){let o=n.enter(e,t,s);if(!o)return n;n=o}}class Zf{cursor(e=0){return new Dr(this,e)}getChild(e,t=null,i=null){let r=La(this,e,t,i);return r.length?r[0]:null}getChildren(e,t=null,i=null){return La(this,e,t,i)}resolve(e,t=0){return Sn(this,e,t,!1)}resolveInner(e,t=0){return Sn(this,e,t,!0)}matchContext(e){return bo(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),i=this;for(;t;){let r=t.lastChild;if(!r||r.to!=t.to)break;r.type.isError&&r.from==r.to?(i=t,t=r.prevSibling):t=r}return i}get node(){return this}get next(){return this.parent}}class ke extends Zf{constructor(e,t,i,r){super(),this._tree=e,this.from=t,this.index=i,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,i,r,s=0){for(let o=this;;){for(let{children:l,positions:a}=o._tree,h=t>0?l.length:-1;e!=h;e+=t){let c=l[e],f=a[e]+o.from;if(Xf(r,i,f,f+c.length)){if(c instanceof Vt){if(s&te.ExcludeBuffers)continue;let u=c.findChild(0,c.buffer.length,t,i-f,r);if(u>-1)return new Ot(new om(o,c,e,f),null,u)}else if(s&te.IncludeAnonymous||!c.type.isAnonymous||Zl(c)){let u;if(!(s&te.IgnoreMounts)&&(u=Qn.get(c))&&!u.overlay)return new ke(u.tree,f,e,o);let d=new ke(c,f,e,o);return s&te.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?c.children.length-1:0,t,i,r)}}}if(s&te.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let r;if(!(i&te.IgnoreOverlays)&&(r=Qn.get(this._tree))&&r.overlay){let s=e-this.from;for(let{from:o,to:l}of r.overlay)if((t>0?o<=s:o<s)&&(t<0?l>=s:l>s))return new ke(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function La(n,e,t,i){let r=n.cursor(),s=[];if(!r.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=r.type.is(t),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function bo(n,e,t=e.length-1){for(let i=n;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class om{constructor(e,t,i,r){this.parent=e,this.buffer=t,this.index=i,this.start=r}}class Ot extends Zf{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,i);return s<0?null:new Ot(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&te.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new Ot(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Ot(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Ot(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let o=i.buffer[this.index+1];e.push(i.slice(r,s,o)),t.push(0)}return new j(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Af(n){if(!n.length)return null;let e=0,t=n[0];for(let s=1;s<n.length;s++){let o=n[s];(o.from>t.from||o.to<t.to)&&(t=o,e=s)}let i=t instanceof ke&&t.index<0?null:t.parent,r=n.slice();return i?r[e]=i:r.splice(e,1),new lm(r,t)}class lm{constructor(e,t){this.heads=e,this.node=t}get next(){return Af(this.heads)}}function am(n,e,t){let i=n.resolveInner(e,t),r=null;for(let s=i instanceof ke?i:i.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(r||(r=[i])).push(o.resolve(e,t)),s=o}else{let o=Qn.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let l=new ke(o.tree,o.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(Sn(l,e,t,!1))}}return r?Af(r):i}class Dr{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof ke)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof ke?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&te.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&te.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&te.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(r.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:i}=r)}else({index:t,_parent:i}=this._tree);for(;i;{index:t,_parent:i}=i)if(t>-1)for(let s=t+e,o=e<0?-1:i._tree.children.length;s!=o;s+=e){let l=i._tree.children[s];if(this.mode&te.IncludeAnonymous||l instanceof Vt||!l.type.isAnonymous||Zl(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,i=0;if(e&&e.context==this.buffer)e:for(let r=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,i=s+1;break e}r=this.stack[--s]}for(let r=i;r<this.stack.length;r++)t=new Ot(this.buffer,t,this.stack[r]);return this.bufferNode=new Ot(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let i=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,r=!0}}}matchContext(e){if(!this.buffer)return bo(this.node.parent,e);let{buffer:t}=this.buffer,{types:i}=t.set;for(let r=e.length-1,s=this.stack.length-1;r>=0;s--){if(s<0)return bo(this._tree,e,r);let o=i[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function Zl(n){return n.children.some(e=>e instanceof Vt||!e.type.isAnonymous||Zl(e))}function hm(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:r=Cf,reused:s=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new Xl(t,t.length):t,a=i.types,h=0,c=0;function f(x,w,v,E,Y,G){let{id:D,start:Z,end:W,size:_}=l,N=c,de=h;if(_<0)if(l.next(),_==-1){let Je=s[D];v.push(Je),E.push(Z-x);return}else if(_==-3){h=D;return}else if(_==-4){c=D;return}else throw new RangeError(`Unrecognized record size: ${_}`);let me=a[D],We,ce,Ce=Z-x;if(W-Z<=r&&(ce=g(l.pos-w,Y))){let Je=new Uint16Array(ce.size-ce.skip),Pe=l.pos-ce.size,ze=Je.length;for(;l.pos>Pe;)ze=Q(ce.start,Je,ze);We=new Vt(Je,W-ce.start,i),Ce=ce.start-x}else{let Je=l.pos-_;l.next();let Pe=[],ze=[],xt=D>=o?D:-1,Lt=0,Ht=W;for(;l.pos>Je;)xt>=0&&l.id==xt&&l.size>=0?(l.end<=Ht-r&&(O(Pe,ze,Z,Lt,l.end,Ht,xt,N,de),Lt=Pe.length,Ht=l.end),l.next()):G>2500?u(Z,Je,Pe,ze):f(Z,Je,Pe,ze,xt,G+1);if(xt>=0&&Lt>0&&Lt<Pe.length&&O(Pe,ze,Z,Lt,Z,Ht,xt,N,de),Pe.reverse(),ze.reverse(),xt>-1&&Lt>0){let Jn=d(me,de);We=Al(me,Pe,ze,0,Pe.length,0,W-Z,Jn,Jn)}else We=p(me,Pe,ze,W-Z,N-W,de)}v.push(We),E.push(Ce)}function u(x,w,v,E){let Y=[],G=0,D=-1;for(;l.pos>w;){let{id:Z,start:W,end:_,size:N}=l;if(N>4)l.next();else{if(D>-1&&W<D)break;D<0&&(D=_-r),Y.push(Z,W,_),G++,l.next()}}if(G){let Z=new Uint16Array(G*4),W=Y[Y.length-2];for(let _=Y.length-3,N=0;_>=0;_-=3)Z[N++]=Y[_],Z[N++]=Y[_+1]-W,Z[N++]=Y[_+2]-W,Z[N++]=N;v.push(new Vt(Z,Y[2]-W,i)),E.push(W-x)}}function d(x,w){return(v,E,Y)=>{let G=0,D=v.length-1,Z,W;if(D>=0&&(Z=v[D])instanceof j){if(!D&&Z.type==x&&Z.length==Y)return Z;(W=Z.prop(M.lookAhead))&&(G=E[D]+Z.length+W)}return p(x,v,E,Y,G,w)}}function O(x,w,v,E,Y,G,D,Z,W){let _=[],N=[];for(;x.length>E;)_.push(x.pop()),N.push(w.pop()+v-Y);x.push(p(i.types[D],_,N,G-Y,Z-G,W)),w.push(Y-v)}function p(x,w,v,E,Y,G,D){if(G){let Z=[M.contextHash,G];D=D?[Z].concat(D):[Z]}if(Y>25){let Z=[M.lookAhead,Y];D=D?[Z].concat(D):[Z]}return new j(x,w,v,E,D)}function g(x,w){let v=l.fork(),E=0,Y=0,G=0,D=v.end-r,Z={size:0,start:0,skip:0};e:for(let W=v.pos-x;v.pos>W;){let _=v.size;if(v.id==w&&_>=0){Z.size=E,Z.start=Y,Z.skip=G,G+=4,E+=4,v.next();continue}let N=v.pos-_;if(_<0||N<W||v.start<D)break;let de=v.id>=o?4:0,me=v.start;for(v.next();v.pos>N;){if(v.size<0)if(v.size==-3)de+=4;else break e;else v.id>=o&&(de+=4);v.next()}Y=me,E+=_,G+=de}return(w<0||E==x)&&(Z.size=E,Z.start=Y,Z.skip=G),Z.size>4?Z:void 0}function Q(x,w,v){let{id:E,start:Y,end:G,size:D}=l;if(l.next(),D>=0&&E<o){let Z=v;if(D>4){let W=l.pos-(D-4);for(;l.pos>W;)v=Q(x,w,v)}w[--v]=Z,w[--v]=G-x,w[--v]=Y-x,w[--v]=E}else D==-3?h=E:D==-4&&(c=E);return v}let S=[],b=[];for(;l.pos>0;)f(n.start||0,n.bufferStart||0,S,b,-1,0);let k=(e=n.length)!==null&&e!==void 0?e:S.length?b[0]+S[0].length:0;return new j(a[n.topID],S.reverse(),b.reverse(),k)}const za=new WeakMap;function vr(n,e){if(!n.isAnonymous||e instanceof Vt||e.type!=n)return 1;let t=za.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof j)){t=1;break}t+=vr(n,i)}za.set(e,t)}return t}function Al(n,e,t,i,r,s,o,l,a){let h=0;for(let O=i;O<r;O++)h+=vr(n,e[O]);let c=Math.ceil(h*1.5/8),f=[],u=[];function d(O,p,g,Q,S){for(let b=g;b<Q;){let k=b,x=p[b],w=vr(n,O[b]);for(b++;b<Q;b++){let v=vr(n,O[b]);if(w+v>=c)break;w+=v}if(b==k+1){if(w>c){let v=O[k];d(v.children,v.positions,0,v.children.length,p[k]+S);continue}f.push(O[k])}else{let v=p[b-1]+O[b-1].length-x;f.push(Al(n,O,p,k,b,x,v,null,a))}u.push(x+S-s)}}return d(e,t,i,r,0),(l||a)(f,u,o)}class Rf{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof Ot?this.setBuffer(e.context.buffer,e.index,t):e instanceof ke&&this.map.set(e.tree,t)}get(e){return e instanceof Ot?this.getBuffer(e.context.buffer,e.index):e instanceof ke?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class $t{constructor(e,t,i,r,s=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=r,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let r=[new $t(0,e.length,e,0,!1,i)];for(let s of t)s.to>e.length&&r.push(s);return r}static applyChanges(e,t,i=128){if(!t.length)return e;let r=[],s=1,o=e.length?e[0]:null;for(let l=0,a=0,h=0;;l++){let c=l<t.length?t[l]:null,f=c?c.fromA:1e9;if(f-a>=i)for(;o&&o.from<f;){let u=o;if(a>=u.from||f<=u.to||h){let d=Math.max(u.from,a)-h,O=Math.min(u.to,f)-h;u=d>=O?null:new $t(d,O,u.tree,u.offset+h,l>0,!!c)}if(u&&r.push(u),o.to>f)break;o=s<e.length?e[s++]:null}if(!c)break;a=c.toA,h=c.toA-c.toB}return r}}class Rl{startParse(e,t,i){return typeof e=="string"&&(e=new cm(e)),i=i?i.length?i.map(r=>new Ie(r.from,r.to)):[new Ie(0,0)]:[new Ie(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let r=this.startParse(e,t,i);for(;;){let s=r.advance();if(s)return s}}}class cm{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function Mf(n){return(e,t,i,r)=>new um(e,n,t,i,r)}class Ea{constructor(e,t,i,r,s){this.parser=e,this.parse=t,this.overlay=i,this.target=r,this.from=s}}function Da(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class fm{constructor(e,t,i,r,s,o,l){this.parser=e,this.predicate=t,this.mounts=i,this.index=r,this.start=s,this.target=o,this.prev=l,this.depth=0,this.ranges=[]}}const yo=new M({perNode:!0});class um{constructor(e,t,i,r,s){this.nest=t,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new j(i.type,i.children,i.positions,i.length,i.propValues.concat([[yo,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[M.mounted.id]=new Qn(t,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new pm(this.fragments),t=null,i=null,r=new Dr(new ke(this.baseTree,this.ranges[0].from,0,null),te.IncludeAnonymous|te.IgnoreMounts);e:for(let s,o;;){let l=!0,a;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)l=!1;else if(e.hasNode(r)){if(t){let h=t.mounts.find(c=>c.frag.from<=r.from&&c.frag.to>=r.to&&c.mount.overlay);if(h)for(let c of h.mount.overlay){let f=c.from+h.pos,u=c.to+h.pos;f>=r.from&&u<=r.to&&!t.ranges.some(d=>d.from<u&&d.to>f)&&t.ranges.push({from:f,to:u})}}l=!1}else if(i&&(o=dm(i.ranges,r.from,r.to)))l=o!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.from<r.to||!s.overlay)){r.tree||(Om(r),t&&t.depth++,i&&i.depth++);let h=e.findMounts(r.from,s.parser);if(typeof s.overlay=="function")t=new fm(s.parser,s.overlay,h,this.inner.length,r.from,r.tree,t);else{let c=qa(this.ranges,s.overlay||(r.from<r.to?[new Ie(r.from,r.to)]:[]));c.length&&Da(c),(c.length||!s.overlay)&&this.inner.push(new Ea(s.parser,c.length?s.parser.startParse(this.input,Va(h,c),c):s.parser.startParse(""),s.overlay?s.overlay.map(f=>new Ie(f.from-r.from,f.to-r.from)):null,r.tree,c.length?c[0].from:r.from)),s.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):l=!1}}else if(t&&(a=t.predicate(r))&&(a===!0&&(a=new Ie(r.from,r.to)),a.from<a.to)){let h=t.ranges.length-1;h>=0&&t.ranges[h].to==a.from?t.ranges[h]={from:t.ranges[h].from,to:a.to}:t.ranges.push(a)}if(l&&r.firstChild())t&&t.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(t&&!--t.depth){let h=qa(this.ranges,t.ranges);h.length&&(Da(h),this.inner.splice(t.index,0,new Ea(t.parser,t.parser.startParse(this.input,Va(t.mounts,h),h),t.ranges.map(c=>new Ie(c.from-t.start,c.to-t.start)),t.target,h[0].from))),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function dm(n,e,t){for(let i of n){if(i.from>=t)break;if(i.to>e)return i.from<=e&&i.to>=t?2:1}return 0}function Ya(n,e,t,i,r,s){if(e<t){let o=n.buffer[e+1];i.push(n.slice(e,t,o)),r.push(o-s)}}function Om(n){let{node:e}=n,t=[],i=e.context.buffer;do t.push(n.index),n.parent();while(!n.tree);let r=n.tree,s=r.children.indexOf(i),o=r.children[s],l=o.buffer,a=[s];function h(c,f,u,d,O,p){let g=t[p],Q=[],S=[];Ya(o,c,g,Q,S,d);let b=l[g+1],k=l[g+2];a.push(Q.length);let x=p?h(g+4,l[g+3],o.set.types[l[g]],b,k-b,p-1):e.toTree();return Q.push(x),S.push(b-d),Ya(o,l[g+3],f,Q,S,d),new j(u,Q,S,O)}r.children[s]=h(0,l.length,ue.none,0,o.length,t.length-1);for(let c of a){let f=n.tree.children[c],u=n.tree.positions[c];n.yield(new ke(f,u+n.from,c,n._tree))}}class _a{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(te.IncludeAnonymous|te.IgnoreMounts)}moveTo(e){let{cursor:t}=this,i=e-this.offset;for(;!this.done&&t.from<i;)t.to>=e&&t.enter(i,1,te.IgnoreOverlays|te.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof j)t=t.children[0];else break}return!1}}let pm=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(t=i.tree.prop(yo))!==null&&t!==void 0?t:i.to,this.inner=new _a(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(yo))!==null&&e!==void 0?e:t.to,this.inner=new _a(t.tree,-t.offset)}}findMounts(e,t){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(i=s.tree)===null||i===void 0?void 0:i.prop(M.mounted);if(o&&o.parser==t)for(let l=this.fragI;l<this.fragments.length;l++){let a=this.fragments[l];if(a.from>=s.to)break;a.tree==this.curFrag.tree&&r.push({frag:a,pos:s.from-a.offset,mount:o})}}}return r}};function qa(n,e){let t=null,i=e;for(let r=1,s=0;r<n.length;r++){let o=n[r-1].to,l=n[r].from;for(;s<i.length;s++){let a=i[s];if(a.from>=l)break;a.to<=o||(t||(i=t=e.slice()),a.from<o?(t[s]=new Ie(a.from,o),a.to>l&&t.splice(s+1,0,new Ie(l,a.to))):a.to>l?t[s--]=new Ie(l,a.to):t.splice(s--,1))}}return i}function mm(n,e,t,i){let r=0,s=0,o=!1,l=!1,a=-1e9,h=[];for(;;){let c=r==n.length?1e9:o?n[r].to:n[r].from,f=s==e.length?1e9:l?e[s].to:e[s].from;if(o!=l){let u=Math.max(a,t),d=Math.min(c,f,i);u<d&&h.push(new Ie(u,d))}if(a=Math.min(c,f),a==1e9)break;c==a&&(o?(o=!1,r++):o=!0),f==a&&(l?(l=!1,s++):l=!0)}return h}function Va(n,e){let t=[];for(let{pos:i,mount:r,frag:s}of n){let o=i+(r.overlay?r.overlay[0].from:0),l=o+r.tree.length,a=Math.max(s.from,o),h=Math.min(s.to,l);if(r.overlay){let c=r.overlay.map(u=>new Ie(u.from+i,u.to+i)),f=mm(e,c,a,h);for(let u=0,d=a;;u++){let O=u==f.length,p=O?h:f[u].from;if(p>d&&t.push(new $t(d,p,r.tree,-o,s.from>=d||s.openStart,s.to<=p||s.openEnd)),O)break;d=f[u].to}}else t.push(new $t(a,h,r.tree,-o,s.from>=o||s.openStart,s.to<=l||s.openEnd))}return t}let xo=[],Lf=[];(()=>{let n="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(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?Lf:xo).push(t=t+n[e])})();function gm(n){if(n<768)return!1;for(let e=0,t=xo.length;;){let i=e+t>>1;if(n<xo[i])t=i;else if(n>=Lf[i])e=i+1;else return!0;if(e==t)return!1}}function Ba(n){return n>=127462&&n<=127487}const Wa=8205;function Qm(n,e,t=!0,i=!0){return(t?zf:Sm)(n,e,i)}function zf(n,e,t){if(e==n.length)return e;e&&Ef(n.charCodeAt(e))&&Df(n.charCodeAt(e-1))&&e--;let i=Xs(n,e);for(e+=Ia(i);e<n.length;){let r=Xs(n,e);if(i==Wa||r==Wa||t&&gm(r))e+=Ia(r),i=r;else if(Ba(r)){let s=0,o=e-2;for(;o>=0&&Ba(Xs(n,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function Sm(n,e,t){for(;e>0;){let i=zf(n,e-2,t);if(i<e)return i;e--}return 0}function Xs(n,e){let t=n.charCodeAt(e);if(!Df(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Ef(i)?(t-55296<<10)+(i-56320)+65536:t}function Ef(n){return n>=56320&&n<57344}function Df(n){return n>=55296&&n<56320}function Ia(n){return n<65536?1:2}class B{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=Xi(this,e,t);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),ft.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Xi(this,e,t);let i=[];return this.decompose(e,t,i,0),ft.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new an(this),s=new an(e);for(let o=t,l=t;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(l+=r.value.length,r.done||l>=i)return!0}}iter(e=1){return new an(this,e)}iterRange(e,t=this.length){return new Yf(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new _f(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?B.empty:e.length<=32?new oe(e):ft.from(oe.split(e,[]))}}class oe extends B{constructor(e,t=bm(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let s=0;;s++){let o=this.text[s],l=r+o.length;if((t?i:l)>=e)return new ym(r,l,i,o);r=l+1,i++}}decompose(e,t,i,r){let s=e<=0&&t>=this.length?this:new oe(ja(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let o=i.pop(),l=$r(s.text,o.text.slice(),0,s.length);if(l.length<=32)i.push(new oe(l,o.length+s.length));else{let a=l.length>>1;i.push(new oe(l.slice(0,a)),new oe(l.slice(a)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof oe))return super.replace(e,t,i);[e,t]=Xi(this,e,t);let r=$r(this.text,$r(i.text,ja(this.text,0,e)),t),s=this.length+i.length-(t-e);return r.length<=32?new oe(r,s):ft.from(oe.split(r,[]),s)}sliceString(e,t=this.length,i=`
|
|
2
2
|
`){[e,t]=Xi(this,e,t);let r="";for(let s=0,o=0;s<=t&&o<this.text.length;o++){let l=this.text[o],a=s+l.length;s>e&&o&&(r+=i),e<a&&t>s&&(r+=l.slice(Math.max(0,e-s),t-s)),s=a+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(t.push(new oe(i,r)),i=[],r=-1);return r>-1&&t.push(new oe(i,r)),t}}class ft extends B{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,r){for(let s=0;;s++){let o=this.children[s],l=r+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,r);r=l+1,i=a+1}}decompose(e,t,i,r){for(let s=0,o=0;o<=t&&s<this.children.length;s++){let l=this.children[s],a=o+l.length;if(e<=a&&t>=o){let h=r&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!h?i.push(l):l.decompose(e-o,t-o,i,h)}o=a+1}}replace(e,t,i){if([e,t]=Xi(this,e,t),i.lines<this.lines)for(let r=0,s=0;r<this.children.length;r++){let o=this.children[r],l=s+o.length;if(e>=s&&t<=l){let a=o.replace(e-s,t-s,i),h=this.lines-o.lines+a.lines;if(a.lines<h>>4&&a.lines>h>>6){let c=this.children.slice();return c[r]=a,new ft(c,this.length-(t-e)+i.length)}return super.replace(s,l,a)}s=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
|
|
3
3
|
`){[e,t]=Xi(this,e,t);let r="";for(let s=0,o=0;s<this.children.length&&o<=t;s++){let l=this.children[s],a=o+l.length;o>e&&s&&(r+=i),e<a&&t>o&&(r+=l.sliceString(e-o,t-o,i)),o=a+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof ft))return 0;let i=0,[r,s,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,s+=t){if(r==o||s==l)return i;let a=this.children[r],h=e.children[s];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let O of e)O.flatten(d);return new oe(d,t)}let r=Math.max(32,i>>5),s=r<<1,o=r>>1,l=[],a=0,h=-1,c=[];function f(d){let O;if(d.lines>s&&d instanceof ft)for(let p of d.children)f(p);else d.lines>o&&(a>o||!a)?(u(),l.push(d)):d instanceof oe&&a&&(O=c[c.length-1])instanceof oe&&d.lines+O.lines<=32?(a+=d.lines,h+=d.length+1,c[c.length-1]=new oe(O.text.concat(d.text),O.length+1+d.length)):(a+d.lines>r&&u(),a+=d.lines,h+=d.length+1,c.push(d))}function u(){a!=0&&(l.push(c.length==1?c[0]:ft.from(c,h)),h=-1,a=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new ft(l,t)}}B.empty=new oe([""],0);function bm(n){let e=-1;for(let t of n)e+=t.length+1;return e}function $r(n,e,t=0,i=1e9){for(let r=0,s=0,o=!0;s<n.length&&r<=i;s++){let l=n[s],a=r+l.length;a>=t&&(a>i&&(l=l.slice(0,i-r)),r<t&&(l=l.slice(t-r)),o?(e[e.length-1]+=l,o=!1):e.push(l)),r=a+1}return e}function ja(n,e,t){return $r(n,[""],e,t)}class an{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof oe?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],o=s>>1,l=r instanceof oe?r.text.length:r.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
4
4
|
`,this;e--}else if(r instanceof oe){let a=r.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=r.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof oe?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Yf{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new an(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=i?r:t<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class _f{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=function(){return this.iter()},an.prototype[Symbol.iterator]=Yf.prototype[Symbol.iterator]=_f.prototype[Symbol.iterator]=function(){return this});let ym=class{constructor(e,t,i,r){this.from=e,this.to=t,this.number=i,this.text=r}get length(){return this.to-this.from}};function Xi(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function Se(n,e,t=!0,i=!0){return Qm(n,e,t,i)}function xm(n){return n>=56320&&n<57344}function km(n){return n>=55296&&n<56320}function Ae(n,e){let t=n.charCodeAt(e);if(!km(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return xm(i)?(t-55296<<10)+(i-56320)+65536:t}function Ml(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function ut(n){return n<65536?1:2}const ko=/\r\n?|\n/;var Qe=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(Qe||(Qe={}));class gt{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,r=0;t<this.sections.length;){let s=this.sections[t++],o=this.sections[t++];o<0?(e(i,r,s),r+=s):r+=o,i+=s}}iterChangedRanges(e,t=!1){wo(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];r<0?e.push(i,r):e.push(r,i)}return new gt(e)}composeDesc(e){return this.empty?e:e.empty?this:qf(this,e)}mapDesc(e,t=!1){return e.empty?this:Po(this,e,t)}mapPos(e,t=-1,i=Qe.Simple){let r=0,s=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],h=r+l;if(a<0){if(h>e)return s+(e-r);s+=l}else{if(i!=Qe.Simple&&h>=e&&(i==Qe.TrackDel&&r<e&&h>e||i==Qe.TrackBefore&&r<e||i==Qe.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!l)return e==r||t<0?s:s+a;s+=a}r=h}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,t=e){for(let i=0,r=0;i<this.sections.length&&r<=t;){let s=this.sections[i++],o=this.sections[i++],l=r+s;if(o>=0&&r<=t&&l>=e)return r<e&&l>t?"cover":!0;r=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+i+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new gt(e)}static create(e){return new gt(e)}}class fe extends gt{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return wo(this,(t,i,r,s,o)=>e=e.replace(r,r+(i-t),o),!1),e}mapDesc(e,t=!1){return Po(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let r=0,s=0;r<t.length;r+=2){let o=t[r],l=t[r+1];if(l>=0){t[r]=l,t[r+1]=o;let a=r>>1;for(;i.length<a;)i.push(B.empty);i.push(o?e.slice(s,s+o):B.empty)}s+=o}return new fe(t,i)}compose(e){return this.empty?e:e.empty?this:qf(this,e,!0)}map(e,t=!1){return e.empty?this:Po(this,e,t,!0)}iterChanges(e,t=!1){wo(this,e,t)}get desc(){return gt.create(this.sections)}filter(e){let t=[],i=[],r=[],s=new bn(this);e:for(let o=0,l=0;;){let a=o==e.length?1e9:e[o++];for(;l<a||l==a&&s.len==0;){if(s.done)break e;let c=Math.min(s.len,a-l);ye(r,c,-1);let f=s.ins==-1?-1:s.off==0?s.ins:0;ye(t,c,f),f>0&&Yt(i,t,s.text),s.forward(c),l+=c}let h=e[o++];for(;l<h;){if(s.done)break e;let c=Math.min(s.len,h-l);ye(t,c,-1),ye(r,c,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(c),l+=c}}return{changes:new fe(t,i),filtered:gt.create(r)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],r=this.sections[t+1];r<0?e.push(i):r==0?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let r=[],s=[],o=0,l=null;function a(c=!1){if(!c&&!r.length)return;o<t&&ye(r,t-o,-1);let f=new fe(r,s);l=l?l.compose(f.map(l)):f,r=[],s=[],o=0}function h(c){if(Array.isArray(c))for(let f of c)h(f);else if(c instanceof fe){if(c.length!=t)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${t})`);a(),l=l?l.compose(c.map(l)):c}else{let{from:f,to:u=f,insert:d}=c;if(f>u||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let O=d?typeof d=="string"?B.of(d.split(i||ko)):d:B.empty,p=O.length;if(f==u&&p==0)return;f<o&&a(),f>o&&ye(r,f-o,-1),ye(r,u-f,p),Yt(s,r,O),o=u}}return h(e),a(!l),l}static empty(e){return new fe(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let r=0;r<e.length;r++){let s=e[r];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;i.length<r;)i.push(B.empty);i[r]=B.of(s.slice(1)),t.push(s[0],i[r].length)}}}return new fe(t,i)}static createSet(e,t){return new fe(e,t)}}function ye(n,e,t,i=!1){if(e==0&&t<=0)return;let r=n.length-2;r>=0&&t<=0&&t==n[r+1]?n[r]+=e:r>=0&&e==0&&n[r]==0?n[r+1]+=t:i?(n[r]+=e,n[r+1]+=t):n.push(e,t)}function Yt(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<i;)n.push(B.empty);n.push(t)}}function wo(n,e,t){let i=n.inserted;for(let r=0,s=0,o=0;o<n.sections.length;){let l=n.sections[o++],a=n.sections[o++];if(a<0)r+=l,s+=l;else{let h=r,c=s,f=B.empty;for(;h+=l,c+=a,a&&i&&(f=f.append(i[o-2>>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],a=n.sections[o++];e(r,h,s,c,f),r=h,s=c}}}function Po(n,e,t,i=!1){let r=[],s=i?[]:null,o=new bn(n),l=new bn(e);for(let a=-1;;){if(o.done&&l.len||l.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);ye(r,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!t))){let h=l.len;for(ye(r,l.ins,-1);h;){let c=Math.min(o.len,h);o.ins>=0&&a<o.i&&o.len<=c&&(ye(r,0,o.ins),s&&Yt(s,r,o.text),a=o.i),o.forward(c),h-=c}l.next()}else if(o.ins>=0){let h=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);h+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.len<c)c-=l.len,l.next();else break;ye(r,h,a<o.i?o.ins:0),s&&a<o.i&&Yt(s,r,o.text),a=o.i,o.forward(o.len-c)}else{if(o.done&&l.done)return s?fe.createSet(r,s):gt.create(r);throw new Error("Mismatched change set lengths")}}}function qf(n,e,t=!1){let i=[],r=t?[]:null,s=new bn(n),o=new bn(e);for(let l=!1;;){if(s.done&&o.done)return r?fe.createSet(i,r):gt.create(i);if(s.ins==0)ye(i,s.len,0,l),s.next();else if(o.len==0&&!o.done)ye(i,0,o.ins,l),r&&Yt(r,i,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let a=Math.min(s.len2,o.len),h=i.length;if(s.ins==-1){let c=o.ins==-1?-1:o.off?0:o.ins;ye(i,a,c,l),r&&c&&Yt(r,i,o.text)}else o.ins==-1?(ye(i,s.off?0:s.len,a,l),r&&Yt(r,i,s.textBit(a))):(ye(i,s.off?0:s.len,o.off?0:o.ins,l),r&&!o.off&&Yt(r,i,o.text));l=(s.ins>a||o.ins>=0&&o.len>a)&&(l||i.length>h),s.forward2(a),o.forward(a)}}}}class bn{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?B.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?B.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class si{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new si(i,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return y.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return y.range(this.anchor,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return y.range(e.anchor,e.head)}static create(e,t,i){return new si(e,t,i)}}class y{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:y.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new y([this.main],0)}addRange(e,t=!0){return y.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,y.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new y(e.ranges.map(t=>si.fromJSON(t)),e.main)}static single(e,t=e){return new y([y.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;r<e.length;r++){let s=e[r];if(s.empty?s.from<=i:s.from<i)return y.normalized(e.slice(),t);i=s.to}return new y(e,t)}static cursor(e,t=0,i,r){return si.create(e,e,(t==0?0:t<0?8:16)|(i==null?7:Math.min(6,i))|(r??16777215)<<6)}static range(e,t,i,r){let s=(i??16777215)<<6|(r==null?7:Math.min(6,r));return t<e?si.create(t,e,48|s):si.create(e,t,(t>e?8:0)|s)}static normalized(e,t=0){let i=e[t];e.sort((r,s)=>r.from-s.from),t=e.indexOf(i);for(let r=1;r<e.length;r++){let s=e[r],o=e[r-1];if(s.empty?s.from<=o.to:s.from<o.to){let l=o.from,a=Math.max(s.to,o.to);r<=t&&t--,e.splice(--r,2,s.anchor>s.head?y.range(a,l):y.range(l,a))}}return new y(e,t)}}function Vf(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Ll=0;class X{constructor(e,t,i,r,s){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=r,this.id=Ll++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new X(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:zl),!!e.static,e.enables)}of(e){return new Tr([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Tr(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Tr(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function zl(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class Tr{constructor(e,t,i,r){this.dependencies=e,this.facet=t,this.type=i,this.value=r,this.id=Ll++}dynamicSlot(e){var t;let i=this.value,r=this.facet.compareInput,s=this.id,o=e[s]>>1,l=this.type==2,a=!1,h=!1,c=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?h=!0:(((t=e[f.id])!==null&&t!==void 0?t:1)&1)==0&&c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(a&&u.docChanged||h&&(u.docChanged||u.selection)||vo(f,c)){let d=i(f);if(l?!Ga(d,f.values[o],r):!r(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,u)=>{let d,O=u.config.address[s];if(O!=null){let p=_r(u,O);if(this.dependencies.every(g=>g instanceof X?u.facet(g)===f.facet(g):g instanceof pe?u.field(g,!1)==f.field(g,!1):!0)||(l?Ga(d=i(f),p,r):r(d=i(f),p)))return f.values[o]=p,0}else d=i(f);return f.values[o]=d,1}}}}function Ga(n,e,t){if(n.length!=e.length)return!1;for(let i=0;i<n.length;i++)if(!t(n[i],e[i]))return!1;return!0}function vo(n,e){let t=!1;for(let i of e)hn(n,i)&1&&(t=!0);return t}function wm(n,e,t){let i=t.map(a=>n[a.id]),r=t.map(a=>a.type),s=i.filter(a=>!(a&1)),o=n[e.id]>>1;function l(a){let h=[];for(let c=0;c<i.length;c++){let f=_r(a,i[c]);if(r[c]==2)for(let u of f)h.push(u);else h.push(f)}return e.combine(h)}return{create(a){for(let h of i)hn(a,h);return a.values[o]=l(a),1},update(a,h){if(!vo(a,s))return 0;let c=l(a);return e.compare(c,a.values[o])?0:(a.values[o]=c,1)},reconfigure(a,h){let c=vo(a,i),f=h.config.facets[e.id],u=h.facet(e);if(f&&!c&&zl(t,f))return a.values[o]=u,0;let d=l(a);return e.compare(d,u)?(a.values[o]=u,0):(a.values[o]=d,1)}}}const tr=X.define({static:!0});class pe{constructor(e,t,i,r,s){this.id=e,this.createF=t,this.updateF=i,this.compareF=r,this.spec=s,this.provides=void 0}static define(e){let t=new pe(Ll++,e.create,e.update,e.compare||((i,r)=>i===r),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(tr).find(i=>i.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,r)=>{let s=i.values[t],o=this.updateF(s,r);return this.compareF(s,o)?0:(i.values[t]=o,1)},reconfigure:(i,r)=>{let s=i.facet(tr),o=r.facet(tr),l;return(l=s.find(a=>a.field==this))&&l!=o.find(a=>a.field==this)?(i.values[t]=l.create(i),1):r.config.address[this.id]!=null?(i.values[t]=r.field(this),0):(i.values[t]=this.create(i),1)}}}init(e){return[this,tr.of({field:this,create:e})]}get extension(){return this}}const ti={lowest:4,low:3,default:2,high:1,highest:0};function Gi(n){return e=>new Bf(e,n)}const Rt={highest:Gi(ti.highest),high:Gi(ti.high),default:Gi(ti.default),low:Gi(ti.low),lowest:Gi(ti.lowest)};class Bf{constructor(e,t){this.inner=e,this.prec=t}}class ps{of(e){return new $o(this,e)}reconfigure(e){return ps.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class $o{constructor(e,t){this.compartment=e,this.inner=t}}class Yr{constructor(e,t,i,r,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,i){let r=[],s=Object.create(null),o=new Map;for(let u of Pm(e,t,o))u instanceof pe?r.push(u):(s[u.facet.id]||(s[u.facet.id]=[])).push(u);let l=Object.create(null),a=[],h=[];for(let u of r)l[u.id]=h.length<<1,h.push(d=>u.slot(d));let c=i?.config.facets;for(let u in s){let d=s[u],O=d[0].facet,p=c&&c[u]||[];if(d.every(g=>g.type==0))if(l[O.id]=a.length<<1|1,zl(p,d))a.push(i.facet(O));else{let g=O.combine(d.map(Q=>Q.value));a.push(i&&O.compare(g,i.facet(O))?i.facet(O):g)}else{for(let g of d)g.type==0?(l[g.id]=a.length<<1|1,a.push(g.value)):(l[g.id]=h.length<<1,h.push(Q=>g.dynamicSlot(Q)));l[O.id]=h.length<<1,h.push(g=>wm(g,O,d))}}let f=h.map(u=>u(l));return new Yr(e,o,f,l,a,s)}}function Pm(n,e,t){let i=[[],[],[],[],[]],r=new Map;function s(o,l){let a=r.get(o);if(a!=null){if(a<=l)return;let h=i[a].indexOf(o);h>-1&&i[a].splice(h,1),o instanceof $o&&t.delete(o.compartment)}if(r.set(o,l),Array.isArray(o))for(let h of o)s(h,l);else if(o instanceof $o){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),s(h,l)}else if(o instanceof Bf)s(o.inner,o.prec);else if(o instanceof pe)i[l].push(o),o.provides&&s(o.provides,l);else if(o instanceof Tr)i[l].push(o),o.facet.extensions&&s(o.facet.extensions,ti.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(h,l)}}return s(n,ti.default),i.reduce((o,l)=>o.concat(l))}function hn(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let r=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|r}function _r(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const Wf=X.define(),To=X.define({combine:n=>n.some(e=>e),static:!0}),If=X.define({combine:n=>n.length?n[0]:void 0,static:!0}),jf=X.define(),Gf=X.define(),Nf=X.define(),Uf=X.define({combine:n=>n.length?n[0]:!1});class Mt{constructor(e,t){this.type=e,this.value=t}static define(){return new vm}}class vm{of(e){return new Mt(this,e)}}class $m{constructor(e){this.map=e}of(e){return new L(this,e)}}class L{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new L(this.type,t)}is(e){return this.type==e}static define(e={}){return new $m(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(t);s&&i.push(s)}return i}}L.reconfigure=L.define();L.appendConfig=L.define();class he{constructor(e,t,i,r,s,o){this.startState=e,this.changes=t,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,i&&Vf(i,t.newLength),s.some(l=>l.type==he.time)||(this.annotations=s.concat(he.time.of(Date.now())))}static create(e,t,i,r,s,o){return new he(e,t,i,r,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(he.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}he.time=Mt.define();he.userEvent=Mt.define();he.addToHistory=Mt.define();he.remote=Mt.define();function Tm(n,e){let t=[];for(let i=0,r=0;;){let s,o;if(i<n.length&&(r==e.length||e[r]>=n[i]))s=n[i++],o=n[i++];else if(r<e.length)s=e[r++],o=e[r++];else return t;!t.length||t[t.length-1]<s?t.push(s,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function Ff(n,e,t){var i;let r,s,o;return t?(r=e.changes,s=fe.empty(e.changes.length),o=n.changes.compose(e.changes)):(r=e.changes.map(n.changes),s=n.changes.mapDesc(e.changes,!0),o=n.changes.compose(r)),{changes:o,selection:e.selection?e.selection.map(s):(i=n.selection)===null||i===void 0?void 0:i.map(r),effects:L.mapEffects(n.effects,r).concat(L.mapEffects(e.effects,s)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function Co(n,e,t){let i=e.selection,r=ki(e.annotations);return e.userEvent&&(r=r.concat(he.userEvent.of(e.userEvent))),{changes:e.changes instanceof fe?e.changes:fe.of(e.changes||[],t,n.facet(If)),selection:i&&(i instanceof y?i:y.single(i.anchor,i.head)),effects:ki(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}function Hf(n,e,t){let i=Co(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let o=!!e[s].sequential;i=Ff(i,Co(n,e[s],o?i.changes.newLength:n.doc.length),o)}let r=he.create(n,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return Xm(t?Cm(r):r)}function Cm(n){let e=n.startState,t=!0;for(let r of e.facet(jf)){let s=r(n);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:Tm(t,s))}if(t!==!0){let r,s;if(t===!1)s=n.changes.invertedDesc,r=fe.empty(e.doc.length);else{let o=n.changes.filter(t);r=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}n=he.create(e,r,n.selection&&n.selection.map(s),L.mapEffects(n.effects,s),n.annotations,n.scrollIntoView)}let i=e.facet(Gf);for(let r=i.length-1;r>=0;r--){let s=i[r](n);s instanceof he?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof he?n=s[0]:n=Hf(e,ki(s),!1)}return n}function Xm(n){let e=n.startState,t=e.facet(Nf),i=n;for(let r=t.length-1;r>=0;r--){let s=t[r](n);s&&Object.keys(s).length&&(i=Ff(i,Co(e,s,n.changes.newLength),!0))}return i==n?n:he.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const Zm=[];function ki(n){return n==null?Zm:Array.isArray(n)?n:[n]}var se=(function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n})(se||(se={}));const Am=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Xo;try{Xo=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Rm(n){if(Xo)return Xo.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||Am.test(t)))return!0}return!1}function Mm(n){return e=>{if(!/\S/.test(e))return se.Space;if(Rm(e))return se.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return se.Word;return se.Other}}class q{constructor(e,t,i,r,s,o){this.config=e,this.doc=t,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)hn(this,l<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(i==null){if(t)throw new RangeError("Field is not present in this state");return}return hn(this,i),_r(this,i)}update(...e){return Hf(this,e,!0)}applyTransaction(e){let t=this.config,{base:i,compartments:r}=t;for(let l of e.effects)l.is(ps.reconfigure)?(t&&(r=new Map,t.compartments.forEach((a,h)=>r.set(h,a)),t=null),r.set(l.value.compartment,l.value.extension)):l.is(L.reconfigure)?(t=null,i=l.value):l.is(L.appendConfig)&&(t=null,i=ki(i).concat(l.value));let s;t?s=e.startState.values.slice():(t=Yr.resolve(i,r,this),s=new q(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,h)=>h.reconfigure(a,this),null).values);let o=e.startState.facet(To)?e.newSelection:e.newSelection.asSingle();new q(t,e.newDoc,o,s,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:y.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),r=this.changes(i.changes),s=[i.range],o=ki(i.effects);for(let l=1;l<t.ranges.length;l++){let a=e(t.ranges[l]),h=this.changes(a.changes),c=h.map(r);for(let u=0;u<l;u++)s[u]=s[u].map(c);let f=r.mapDesc(h,!0);s.push(a.range.map(f)),r=r.compose(c),o=L.mapEffects(o,c).concat(L.mapEffects(ki(a.effects),f))}return{changes:r,selection:y.create(s,t.mainIndex),effects:o}}changes(e=[]){return e instanceof fe?e:fe.of(e,this.doc.length,this.facet(q.lineSeparator))}toText(e){return B.of(e.split(this.facet(q.lineSeparator)||ko))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(hn(this,t),_r(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let r=e[i];r instanceof pe&&this.config.address[r.id]!=null&&(t[i]=r.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(i){for(let s in i)if(Object.prototype.hasOwnProperty.call(e,s)){let o=i[s],l=e[s];r.push(o.init(a=>o.spec.fromJSON(l,a)))}}return q.create({doc:e.doc,selection:y.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=Yr.resolve(e.extensions||[],new Map),i=e.doc instanceof B?e.doc:B.of((e.doc||"").split(t.staticFacet(q.lineSeparator)||ko)),r=e.selection?e.selection instanceof y?e.selection:y.single(e.selection.anchor,e.selection.head):y.single(0);return Vf(r,i.length),t.staticFacet(To)||(r=r.asSingle()),new q(t,i,r,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(q.tabSize)}get lineBreak(){return this.facet(q.lineSeparator)||`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as P,o as U,g as f,
|
|
1
|
+
import{p as P,o as U,g as f,i as M,s,a as E,b as j,c as q,t as B,d as N,e as c,f as $,m as z,h as e,I as n,j as G,k as H,l as J,n as r,D as l,q as u,r as K,u as Q,v as V,w as W,x as X,y as Y}from"./index-B-eNR4dq.js";var a=K(()=>Q),Z=u('<button data-button=""><!> <span>Rename</span></button> <button data-button=""><!> <span>Delete this Folder</span></button>',1),aa=u('<div class="flex flex-col w-60 space-y-2"><button data-button=""><!> <span>Create a new Folder</span></button> <button data-button=""><!> <span>Create a new File</span></button> <button data-button=""><!> <span>Upload Files</span></button> <!></div>'),ta=u('<div class="flex-1 relative px-2 py-1 text-gray-700">This branch is protected and no changes can be made.</div>'),ea=u('<div class="flex-1 px-2 py-2" tabindex="-1"><h2 class="sr-only"> </h2> <!></div>');function na(D,x){P(x,!1);let i=z(null);U(()=>{f(i)&&f(i).focus()}),M();var d=ea(),g=e(d),w=e(g),O=s(g,2);{var k=t=>{var o=aa(),p=e(o),y=e(p);n(y,{get path(){return G},class:"w4 h-4"});var v=s(p,2),L=e(v);n(L,{get path(){return H},class:"w4 h-4"});var _=s(v,2),A=e(_);n(A,{get path(){return J},class:"w4 h-4"});var C=s(_,2);{var I=b=>{var m=Z(),h=V(m),S=e(h);n(S,{get path(){return W},class:"w-4 h-4"});var F=s(h,2),T=e(F);n(T,{get path(){return X},class:"w-4 h-4"}),r("click",h,()=>{a(a().activeDialog=l.FOLDER_RENAME)}),r("click",F,()=>{a(a().activeDialog=l.FOLDER_DELETE)}),c(b,m)};E(C,b=>{a().currentFile?.fullpath&&b(I)})}r("click",p,()=>{a(a().activeDialog=l.FOLDER_CREATE)}),r("click",v,()=>{a(a().activeDialog=l.FILE_CREATE)}),r("click",_,()=>{a(a().activeDialog=l.FILE_UPLOAD)}),c(t,o)},R=t=>{var o=ta();c(t,o)};E(O,t=>{!a().apiStatus?.git.protect_default_branch||a().apiStatus?.git.default_branch!==a().currentBranch?.id?t(k):t(R,!1)})}j(d,t=>q(i,t),()=>f(i)),B(()=>N(w,`Actions for the directory ${(a().currentFile?.fullpath?a().currentFile?.fullpath:"/")??""}`)),c(D,d),$()}Y(["click"]);export{na as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as f,i as p,a as u,u as a,e as i,f as v,h as d,t as h,aF as m,q as s}from"./index-B-eNR4dq.js";var _=s('<img alt=""/>'),b=s('<div class="overflow-auto"><!></div>');function F(l,o){f(o,!1),p();var t=b(),n=d(t);{var c=r=>{var e=_();h(()=>m(e,"src",`/api/branches/${a.currentBranch.id??""}/files/${a.currentFile.fullpath??""}`)),i(r,e)};u(n,r=>{a.currentBranch!==null&&a.currentFile!==null&&r(c)})}i(l,t),v()}export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as c,i as n,
|
|
1
|
+
import{p as c,i as n,a as p,u as a,e as l,f as d,h as v,t as h,aF as m,q as i}from"./index-B-eNR4dq.js";var _=i('<iframe title="Test" class="w-full h-full"></iframe>'),b=i('<div class="overflow-auto w-full"><!></div>');function F(s,f){c(f,!1),n();var t=b(),o=v(t);{var u=r=>{var e=_();h(()=>m(e,"src",`/api/branches/${a.currentBranch.id??""}/files/${a.currentFile.fullpath??""}`)),l(r,e)};p(o,r=>{a.currentBranch!==null&&a.currentFile!==null&&r(u)})}l(s,t),d()}export{F as default};
|