isorite 0.8.1 → 0.9.1
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.
- package/dist/main.js +330 -68
- package/docs/setup-for-agents.md +8 -5
- package/docs/setup.md +31 -4
- package/docs/terminal.md +9 -3
- package/package.json +1 -1
- package/plugin/tui.tsx +6 -0
- package/web/_app/immutable/chunks/{Cgml88Pl.js → B3aPQAYq.js} +1 -1
- package/web/_app/immutable/chunks/{yXUzBjUq.js → BXF2XoRC.js} +1 -1
- package/web/_app/immutable/chunks/{BAkGB2fM.js → CBWiKnLz.js} +1 -1
- package/web/_app/immutable/chunks/{CMTjeXEe.js → CJ1dhP0p.js} +1 -1
- package/web/_app/immutable/chunks/CLkY0zVi.js +1 -0
- package/web/_app/immutable/chunks/{CurmVJyp.js → D-aFnd2T.js} +1 -1
- package/web/_app/immutable/chunks/{C_ER1Any.js → DDuWClBR.js} +1 -1
- package/web/_app/immutable/chunks/{C1hqerMA.js → DII7jNnq.js} +1 -1
- package/web/_app/immutable/chunks/{D29fKEzc.js → DRQEUdad.js} +1 -1
- package/web/_app/immutable/chunks/{DsIcKd8x.js → DacMdKjW.js} +1 -1
- package/web/_app/immutable/chunks/{D3BEa5-_.js → DcgxJ8bF.js} +3 -3
- package/web/_app/immutable/chunks/{DPnfDiTn.js → Ddgejj-u.js} +1 -1
- package/web/_app/immutable/chunks/{B4sg4e8i.js → GRrQoDGJ.js} +1 -1
- package/web/_app/immutable/chunks/{B2TCcw-P.js → vUsuwDSf.js} +1 -1
- package/web/_app/immutable/entry/{app.idRgnoYp.js → app.CswuY3sh.js} +2 -2
- package/web/_app/immutable/entry/start.D8ZvSyBD.js +1 -0
- package/web/_app/immutable/nodes/0.DBoa3NAQ.js +26 -0
- package/web/_app/immutable/nodes/{1.DHK7VmG0.js → 1.DrwFerb8.js} +1 -1
- package/web/_app/immutable/nodes/2.DPmbppXV.js +1 -0
- package/web/_app/immutable/nodes/3.BW7AbIrS.js +1 -0
- package/web/_app/immutable/nodes/{4.Ceb5g4Ps.js → 4.B5HAyMKs.js} +1 -1
- package/web/_app/immutable/nodes/{5.DioYOANs.js → 5.BvScSoCM.js} +1 -1
- package/web/_app/immutable/nodes/6.Bna6qY2G.js +1 -0
- package/web/_app/version.json +1 -1
- package/web/index.html +14 -14
- package/web/_app/immutable/chunks/DtPULAe0.js +0 -1
- package/web/_app/immutable/entry/start.CEx_UQO6.js +0 -1
- package/web/_app/immutable/nodes/0.BUd_gY_8.js +0 -26
- package/web/_app/immutable/nodes/2.CDAt-6SJ.js +0 -1
- package/web/_app/immutable/nodes/3.4Wv5nmaw.js +0 -1
- package/web/_app/immutable/nodes/6.CzYfNb6g.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./
|
|
1
|
+
import{l as e}from"./DcgxJ8bF.js";import{A as t,M as n,bt as r,o as i,r as a}from"./BxTFtVqu.js";import{i as o,r as s}from"./Cq5C893B.js";import{javascriptLanguage as c}from"./K_3X9lyC.js";var l=s.deserialize({version:14,states:"%pOVOWOOObQPOOOpOSO'#C_OOOO'#Cp'#CpQVOWOOQxQPOOO!TQQOOQ!YQPOOOOOO,58y,58yO!_OSO,58yOOOO-E6n-E6nO!dQQO'#CqQ{QPOOO!iQPOOQ{QPOOO!qQPOOOOOO1G.e1G.eOOQO,59],59]OOQO-E6o-E6oO!yOpO'#CiO#RO`O'#CiQOQPOOO#ZO#tO'#CmO#fO!bO'#CmOOQO,59T,59TO#qOpO,59TO#vO`O,59TOOOO'#Cr'#CrO#{O#tO,59XOOQO,59X,59XOOOO'#Cs'#CsO$WO!bO,59XOOQO1G.o1G.oOOOO-E6p-E6pOOQO1G.s1G.sOOOO-E6q-E6q",stateData:"$g~OjOS~OQROUROkQO~OWTOXUOZUO`VO~OSXOTWO~OXUO[]OlZO~OY^O~O[_O~OT`O~OYaO~OmcOodO~OmfOogO~O^iOnhO~O_jOphO~ObkOqkOrmO~OcnOsnOtmO~OnpO~OppO~ObkOqkOrrO~OcnOsnOtrO~OWX`~",goto:`!^hPPPiPPPPPPPPPmPPPpPPsy!Q!WTROSRe]Re_QSORYSS[T^Rb[QlfRqlQogRso`,nodeNames:`⚠ Content Text Interpolation InterpolationContent }} Entity Attribute VueAttributeName : Identifier @ Is ScriptAttributeValue AttributeScript AttributeScript AttributeName AttributeValue Entity Entity`,maxTerm:36,nodeProps:[[`isolate`,-3,3,13,17,``]],skippedNodes:[0],repeatNodeCount:4,tokenData:"'y~RdXY!aYZ!a]^!apq!ars!rwx!w}!O!|!O!P#t!Q![#y![!]$s!_!`%g!b!c%l!c!}#y#R#S#y#T#j#y#j#k%q#k#o#y%W;'S#y;'S;:j$m<%lO#y~!fSj~XY!aYZ!a]^!apq!a~!wOm~~!|Oo~!b#RX`!b}!O!|!Q![!|![!]!|!c!}!|#R#S!|#T#o!|%W;'S!|;'S;:j#n<%lO!|!b#qP;=`<%l!|~#yOl~%W$QXY#t`!b}!O!|!Q![#y![!]!|!c!}#y#R#S#y#T#o#y%W;'S#y;'S;:j$m<%lO#y%W$pP;=`<%l#y~$zXX~`!b}!O!|!Q![!|![!]!|!c!}!|#R#S!|#T#o!|%W;'S!|;'S;:j#n<%lO!|~%lO[~~%qOZ~%W%xXY#t`!b}!O&e!Q![#y![!]!|!c!}#y#R#S#y#T#o#y%W;'S#y;'S;:j$m<%lO#y!b&jX`!b}!O!|!Q![!|![!]!|!c!}'V#R#S!|#T#o'V%W;'S!|;'S;:j#n<%lO!|!b'^XW!b`!b}!O!|!Q![!|![!]!|!c!}'V#R#S!|#T#o'V%W;'S!|;'S;:j#n<%lO!|",tokenizers:[6,7,new o(`b~RP#q#rU~XP#q#r[~aOT~~`,17,4),new o("!k~RQvwX#o#p!_~^TU~Opmq!]m!^;'Sm;'S;=`!X<%lOm~pUOpmq!]m!]!^!S!^;'Sm;'S;=`!X<%lOm~!XOU~~![P;=`<%lm~!bP#o#p!e~!jOk~~",72,2),new o(`[~RPwxU~ZOp~~`,11,15),new o(`[~RPrsU~ZOn~~`,11,14),new o("!e~RQvwXwx!_~^Tc~Opmq!]m!^;'Sm;'S;=`!X<%lOm~pUOpmq!]m!]!^!S!^;'Sm;'S;=`!X<%lOm~!XOc~~![P;=`<%lm~!dOt~~",66,35),new o("!e~RQrsXvw^~^Or~~cTb~Oprq!]r!^;'Sr;'S;=`!^<%lOr~uUOprq!]r!]!^!X!^;'Sr;'S;=`!^<%lOr~!^Ob~~!aP;=`<%lr~",66,33)],topRules:{Content:[0,1],Attribute:[1,7]},tokenPrec:157}),u=c.parser.configure({top:`SingleExpression`}),d=l.configure({props:[t({Text:n.content,Is:n.definitionOperator,AttributeName:n.attributeName,VueAttributeName:n.keyword,Identifier:n.variableName,"AttributeValue ScriptAttributeValue":n.attributeValue,Entity:n.character,"{{ }}":n.brace,"@ :":n.punctuation})]}),f={parser:u},p=d.configure({wrap:r((e,t)=>e.name==`InterpolationContent`?f:null)}),m=d.configure({wrap:r((e,t)=>e.name==`AttributeScript`?f:null),top:`Attribute`}),h={parser:p},g={parser:m},_=e();function v(e){return e.configure({dialect:`selfClosing`,wrap:r(b)},`vue`)}var y=v(_.language);function b(e,t){switch(e.name){case`Attribute`:return/^(@|:|v-)/.test(t.read(e.from,e.from+2))?g:null;case`Text`:return h}return null}function x(e={}){let t=_;if(e.base){if(e.base.language.name!=`html`||!(e.base.language instanceof a))throw RangeError(`The base option must be the result of calling html(...)`);t=e.base}return new i(t.language==_.language?y:v(t.language),[t.support,t.language.data.of({closeBrackets:{brackets:[`{`,`"`]}})])}export{x as vue};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,D as t,F as n,H as r,I as i,L as a,P as o,Q as s,S as c,T as l,X as u,Y as d,at as f,d as p,dt as m,f as h,h as g,i as _,j as v,k as y,ot as b,q as x,tt as S,u as C}from"./nMarIA7J.js";import"./xihTtKlq.js";import{t as w}from"./
|
|
1
|
+
import{$ as e,D as t,F as n,H as r,I as i,L as a,P as o,Q as s,S as c,T as l,X as u,Y as d,at as f,d as p,dt as m,f as h,h as g,i as _,j as v,k as y,ot as b,q as x,tt as S,u as C}from"./nMarIA7J.js";import"./xihTtKlq.js";import{t as w}from"./D-aFnd2T.js";var T=v(`<li role="option"><button type="button" tabindex="-1" class="svelte-35e6rs"><span class="dir svelte-35e6rs"> </span><span class="detail svelte-35e6rs"> </span></button></li>`),E=v(`<ul class="suggest svelte-35e6rs" role="listbox" aria-label="folders"></ul>`),D=v(`<span class="field-wrap svelte-35e6rs"><input autocomplete="off" spellcheck="false" role="combobox" aria-autocomplete="list"/> <!></span>`);function O(o,v){b(v,!0);let O=_(v,`value`,15,``),k=_(v,`placeholder`,3,``),A=_(v,`id`,3,`folder`),j=_(v,`quiet`,3,!1),M=e(!1),N=e(0),P=S(()=>O().trim().replace(/^\/+|\/+$/g,``).toLowerCase()),F=e=>w.listing.notes.filter(t=>t.dir===e).length,I=S(()=>{let e=w.listing.dirs.filter(e=>e.toLowerCase().includes(a(P))),t=e=>e.split(`/`).at(-1).toLowerCase().startsWith(a(P))?0:e.toLowerCase().startsWith(a(P))?1:2,n=e.sort((e,n)=>t(e)-t(n)||e.localeCompare(n)).map(e=>({dir:e,made:!1}));return a(P)&&!w.listing.dirs.some(e=>e.toLowerCase()===a(P))&&n.push({dir:O().trim().replace(/^\/+|\/+$/g,``),made:!0}),n.slice(0,8)});function L(e){O(e),s(M,!1),v.onpick?.(e)}function R(e){if(a(M)&&a(I).length){if(e.key===`ArrowDown`){s(N,(a(N)+1)%a(I).length),e.preventDefault();return}if(e.key===`ArrowUp`){s(N,(a(N)-1+a(I).length)%a(I).length),e.preventDefault();return}if((e.key===`Enter`||e.key===`Tab`)&&a(I)[a(N)]&&(e.key===`Enter`||a(P))){e.key===`Enter`&&e.preventDefault(),L(a(I)[a(N)].dir);return}if(e.key===`Escape`){s(M,!1),e.stopPropagation();return}}v.onkeydown?.(e)}var z=D(),B=x(z);p(B);let V;var H=u(B,2),U=e=>{var o=E();c(o,23,()=>a(I),e=>e.dir+e.made,(e,o,c)=>{var l=T();let f;var p=x(l),_=x(p),v=d(_,!0),b=u(_),S=d(b,!0);m(p),m(l),r(e=>{h(l,`id`,`${A()??``}-opt-${a(c)??``}`),h(l,`aria-selected`,a(c)===a(N)),f=g(l,1,`svelte-35e6rs`,null,f,{at:a(c)===a(N)}),t(v,a(o).dir),t(S,e)},[()=>a(o).made?`new folder`:`${F(a(o).dir)} ${F(a(o).dir)===1?`note`:`notes`}`]),n(`mousedown`,p,e=>e.preventDefault()),n(`click`,p,()=>L(a(o).dir)),i(`mouseenter`,p,()=>s(N,a(c),!0)),y(e,l)}),m(o),r(()=>h(o,`id`,`${A()??``}-list`)),y(e,o)};l(H,e=>{a(M)&&a(I).length&&e(U)}),m(z),r(()=>{h(B,`id`,A()),V=g(B,1,`mono svelte-35e6rs`,null,V,{field:!j(),quiet:j()}),h(B,`placeholder`,k()),h(B,`aria-label`,v.label),h(B,`aria-expanded`,a(M)&&a(I).length>0),h(B,`aria-controls`,`${A()??``}-list`),h(B,`aria-activedescendant`,a(M)&&a(I)[a(N)]?`${A()}-opt-${a(N)}`:void 0)}),i(`focus`,B,()=>{s(M,!0),s(N,0)}),n(`input`,B,()=>{s(M,!0),s(N,0)}),i(`blur`,B,()=>setTimeout(()=>s(M,!1),120)),n(`keydown`,B,R),C(B,O),y(o,z),f()}o([`input`,`keydown`,`mousedown`,`click`]);export{O as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./nMarIA7J.js";import{i as e}from"./
|
|
1
|
+
import"./nMarIA7J.js";import{i as e}from"./CLkY0zVi.js";var t={get data(){return e.data},get error(){return e.error},get form(){return e.form},get params(){return e.params},get route(){return e.route},get state(){return e.state},get status(){return e.status},get url(){return e.url}};export{t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DIGvaVgJ.js","./BxTFtVqu.js","./yxd8jSz3.js","./Cq5C893B.js","./C6Btt2Xs.js","./DtbnBenW.js","./D_aBVMvK.js","./Bbt0DTmZ.js","./K_3X9lyC.js","./
|
|
2
|
-
import{$ as e,L as t,Q as n,Z as r,_t as i,gt as a,ht as o}from"./nMarIA7J.js";import{t as s}from"./CRzLMJPS.js";import{t as c}from"./
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DIGvaVgJ.js","./BxTFtVqu.js","./yxd8jSz3.js","./Cq5C893B.js","./C6Btt2Xs.js","./DtbnBenW.js","./D_aBVMvK.js","./Bbt0DTmZ.js","./K_3X9lyC.js","./BXF2XoRC.js","./CDAjAYjS.js","./_rHYGvON.js","./DDuWClBR.js","./GRrQoDGJ.js","./Bffqt7tx.js","./BWonG38x.js","./BEHa2uNW.js","./BPW39P52.js","./Ds8Pkiic.js","./CPF5uNy5.js","./DLa7NjNO.js","./DXiLM1-G.js","./CygcOYNo.js","./GwMd3KmG.js","./Cp5ooBfH.js","./Bu8mWwtz.js","./DII7jNnq.js","./B3aPQAYq.js","./8wVGBFSs.js","./nMarIA7J.js","./CRzLMJPS.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{$ as e,L as t,Q as n,Z as r,_t as i,gt as a,ht as o}from"./nMarIA7J.js";import{t as s}from"./CRzLMJPS.js";import{t as c}from"./D-aFnd2T.js";import{i as l}from"./CBWiKnLz.js";import{A as u,B as d,C as f,D as p,F as m,J as h,M as g,O as _,Q as v,S as y,Y as b,_ as ee,a as x,b as S,bt as te,c as ne,d as C,g as re,gt as ie,ht as ae,i as oe,j as se,k as ce,lt as le,mt as ue,o as de,p as fe,s as pe,vt as me,yt as he}from"./BxTFtVqu.js";import{t as ge}from"./yxd8jSz3.js";var _e=Symbol.for(`yaml.alias`),ve=Symbol.for(`yaml.document`),ye=Symbol.for(`yaml.map`),be=Symbol.for(`yaml.pair`),xe=Symbol.for(`yaml.scalar`),Se=Symbol.for(`yaml.seq`),Ce=Symbol.for(`yaml.node.type`),we=e=>!!e&&typeof e==`object`&&e[Ce]===_e,w=e=>!!e&&typeof e==`object`&&e[Ce]===ve,Te=e=>!!e&&typeof e==`object`&&e[Ce]===ye,Ee=e=>!!e&&typeof e==`object`&&e[Ce]===be,T=e=>!!e&&typeof e==`object`&&e[Ce]===xe,De=e=>!!e&&typeof e==`object`&&e[Ce]===Se;function Oe(e){if(e&&typeof e==`object`)switch(e[Ce]){case ye:case Se:return!0}return!1}function ke(e){if(e&&typeof e==`object`)switch(e[Ce]){case _e:case ye:case xe:case Se:return!0}return!1}var Ae=e=>(T(e)||Oe(e))&&!!e.anchor,je=Symbol(`break visit`),Me=Symbol(`skip children`),Ne=Symbol(`remove node`);function Pe(e,t){let n=Ie(t);w(e)?Fe(null,e.contents,n,Object.freeze([e]))===Ne&&(e.contents=null):Fe(null,e,n,Object.freeze([]))}Pe.BREAK=je,Pe.SKIP=Me,Pe.REMOVE=Ne;function Fe(e,t,n,r){let i=Le(e,t,n,r);if(ke(i)||Ee(i))return Re(e,r,i),Fe(e,i,n,r);if(typeof i!=`symbol`){if(Oe(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=Fe(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===je)return je;else i===Ne&&(t.items.splice(e,1),--e)}}else if(Ee(t)){r=Object.freeze(r.concat(t));let e=Fe(`key`,t.key,n,r);if(e===je)return je;e===Ne&&(t.key=null);let i=Fe(`value`,t.value,n,r);if(i===je)return je;i===Ne&&(t.value=null)}}return i}function Ie(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function Le(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(Te(t))return n.Map?.(e,t,r);if(De(t))return n.Seq?.(e,t,r);if(Ee(t))return n.Pair?.(e,t,r);if(T(t))return n.Scalar?.(e,t,r);if(we(t))return n.Alias?.(e,t,r)}function Re(e,t,n){let r=t[t.length-1];if(Oe(r))r.items[e]=n;else if(Ee(r))e===`key`?r.key=n:r.value=n;else if(w(r))r.contents=n;else{let e=we(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var ze={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},Be=e=>e.replace(/[!,[\]{}]/g,e=>ze[e]),Ve=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+Be(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&ke(e.contents)){let t={};Pe(e.contents,(e,n)=>{ke(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
|
|
3
3
|
`)}};Ve.defaultYaml={explicit:!1,version:`1.2`},Ve.defaultTags={"!!":`tag:yaml.org,2002:`};function He(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function Ue(e){let t=new Set;return Pe(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function We(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function Ge(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=Ue(e);let a=We(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(T(t.node)||Oe(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function Ke(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=Ke(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=Ke(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=Ke(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=Ke(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function qe(e,t,n){if(Array.isArray(e))return e.map((e,t)=>qe(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!Ae(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var Je=class{constructor(e){Object.defineProperty(this,Ce,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!w(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=qe(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?Ke(i,{"":o},``,o):o}},Ye=class extends Je{constructor(e){super(_e),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],Pe(e,{Node:(e,t)=>{(we(t)||Ae(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}if(r&&t){let{anchors:e,doc:n,maxAliasCount:i}=t,a=e.get(r);if(a||=(qe(r,null,t),e.get(r)),a?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=E(n,r,e)),a.count*a.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`)}return r}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}return t.anchors.get(n).res}toString(e,t,n){let r=`*${this.source}`;if(e){if(He(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function E(e,t,n){if(we(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(Oe(t)){let r=0;for(let i of t.items){let t=E(e,i,n);t>r&&(r=t)}return r}if(Ee(t)){let r=E(e,t.key,n),i=E(e,t.value,n);return Math.max(r,i)}return 1}var D=e=>!e||typeof e!=`function`&&typeof e!=`object`,O=class extends Je{constructor(e){super(xe),this.value=e}toJSON(e,t){return t?.keep?this.value:qe(this.value,e,t)}toString(){return String(this.value)}};O.BLOCK_FOLDED=`BLOCK_FOLDED`,O.BLOCK_LITERAL=`BLOCK_LITERAL`,O.PLAIN=`PLAIN`,O.QUOTE_DOUBLE=`QUOTE_DOUBLE`,O.QUOTE_SINGLE=`QUOTE_SINGLE`;var k=`tag:yaml.org,2002:`;function Xe(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function Ze(e,t,n){if(w(e)&&(e=e.contents),ke(e))return e;if(Ee(e)){let t=n.schema[ye].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new Ye(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=k+t.slice(2));let l=Xe(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new O(e);return c&&(c.node=t),t}l=e instanceof Map?o[ye]:Symbol.iterator in Object(e)?o[Se]:o[ye]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new O(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function Qe(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return Ze(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var A=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,$e=class extends Je{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>ke(t)||Ee(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(A(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(Oe(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,Qe(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(Oe(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&T(i)?i.value:i:Oe(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Ee(t))return!1;let n=t.value;return n==null||e&&T(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return Oe(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(Oe(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,Qe(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},et=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function tt(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var nt=(e,t,n)=>e.endsWith(`
|
|
4
4
|
`)?tt(n,t):n.includes(`
|
|
5
5
|
`)?`
|
|
@@ -669,5 +669,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
669
669
|
`+e.scrub();for(let n of e.markers)t.marks.push(n)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=fv(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=L_;if(t.end=e,e>=this.to)t.text=``;else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let e=this.absoluteLineStart,n=this.rangeI;for(;this.ranges[n].to<t.end;){n++;let r=this.ranges[n].from,i=this.lineChunkAt(r);t.end=r+i.length,t.text=t.text.slice(0,this.ranges[n-1].to-e)+i,e=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(t);e.depth<this.stack.length;e.depth++){let t=this.stack[e.depth],n=this.parser.skipContextMarkup[t.type];if(!n)throw Error(`Unhandled block context `+Q[t.type]);let r=this.line.markers.length;if(!n(t,this,e)){this.line.markers.length>r&&(t.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),n;if(this.input.lineChunks)n=t==`
|
|
670
670
|
`?``:t;else{let e=t.indexOf(`
|
|
671
671
|
`);n=e<0?t:t.slice(0,e)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,n=0){this.block=c_.create(e,n,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,n=0){this.startContext(this.parser.getNodeType(e),t,n)}addNode(e,t,n){typeof e==`number`&&(e=new he(this.parser.nodeSet.types[e],G_,G_,(n??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(lv(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?z_(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let t of e.parsers)if(t.finish(this,e))return;let t=lv(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(Q.Paragraph,e.content.length),e.start)}elt(e,t,n,r){return typeof e==`string`?Y_(this.parser.getNodeType(e),t,n,r):new J_(e,t)}get buffer(){return new K_(this.parser.nodeSet)}};function z_(e,t,n,r,i){let a=e[t].to,o=[],s=[],c=n.from+r;function l(n,i){for(;i?n>=a:n>a;){let i=e[t+1].from-a;r+=i,n+=i,t++,a=e[t].to}}for(let u=n.firstChild;u;u=u.nextSibling){l(u.from+r,!0);let n=u.from+r,d,f=i.get(u.tree);f?d=f:u.to+r>a?(d=z_(e,t,u,r,i),l(u.to+r,!1)):d=u.toTree(),o.push(d),s.push(n-c)}return l(n.to+r,!1),new he(n.type,o,s,n.to+r-c,n.tree?n.tree.propValues:void 0)}var B_=class e extends me{constructor(e,t,n,r,i,a,o,s,c){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=n,this.blockNames=r,this.endLeafBlock=i,this.skipContextMarkup=a,this.inlineParsers=o,this.inlineNames=s,this.wrappers=c,this.nodeTypes=Object.create(null);for(let t of e.types)this.nodeTypes[t.name]=t.id}createParse(e,t,n){let r=new R_(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}configure(t){let n=H_(t);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,a=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),s=this.blockNames.slice(),c=this.inlineParsers.slice(),l=this.inlineNames.slice(),d=this.endLeafBlock.slice(),f=this.wrappers;if(V_(n.defineNodes)){i=Object.assign({},i);let e=r.types.slice(),t;for(let r of n.defineNodes){let{name:n,block:a,composite:o,style:s}=typeof r==`string`?{name:r}:r;if(e.some(e=>e.name==n))continue;o&&(i[e.length]=(e,t,n)=>o(t,n,e.value));let c=e.length,l=o?[`Block`,`BlockContext`]:a?c>=Q.ATXHeading1&&c<=Q.SetextHeading2?[`Block`,`LeafBlock`,`Heading`]:[`Block`,`LeafBlock`]:void 0;e.push(ie.define({id:c,name:n,props:l&&[[ue.group,l]]})),s&&(t||={},Array.isArray(s)||s instanceof _?t[n]=s:Object.assign(t,s))}r=new ae(e),t&&(r=r.extend(u(t)))}if(V_(n.props)&&(r=r.extend(...n.props)),V_(n.remove))for(let e of n.remove){let t=this.blockNames.indexOf(e),n=this.inlineNames.indexOf(e);t>-1&&(a[t]=o[t]=void 0),n>-1&&(c[n]=void 0)}if(V_(n.parseBlock))for(let e of n.parseBlock){let t=s.indexOf(e.name);if(t>-1)a[t]=e.parse,o[t]=e.leaf;else{let t=e.before?U_(s,e.before):e.after?U_(s,e.after)+1:s.length-1;a.splice(t,0,e.parse),o.splice(t,0,e.leaf),s.splice(t,0,e.name)}e.endLeaf&&d.push(e.endLeaf)}if(V_(n.parseInline))for(let e of n.parseInline){let t=l.indexOf(e.name);if(t>-1)c[t]=e.parse;else{let t=e.before?U_(l,e.before):e.after?U_(l,e.after)+1:l.length-1;c.splice(t,0,e.parse),l.splice(t,0,e.name)}}return n.wrap&&(f=f.concat(n.wrap)),new e(r,a,o,s,d,i,c,l,f)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let n=new cv(this,e,t);outer:for(let e=t;e<n.end;){let t=n.char(e);for(let r of this.inlineParsers)if(r){let i=r(n,t,e);if(i>=0){e=i;continue outer}}e++}return n.resolveMarkers(0)}};function V_(e){return e!=null&&e.length>0}function H_(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=H_(e[0]);if(e.length==1)return t;let n=H_(e.slice(1));if(!n||!t)return t||n;let r=(e,t)=>(e||G_).concat(t||G_),i=t.wrap,a=n.wrap;return{props:r(t.props,n.props),defineNodes:r(t.defineNodes,n.defineNodes),parseBlock:r(t.parseBlock,n.parseBlock),parseInline:r(t.parseInline,n.parseInline),remove:r(t.remove,n.remove),wrap:i?a?(e,t,n,r)=>i(a(e,t,n,r),t,n,r):i:a}}function U_(e,t){let n=e.indexOf(t);if(n<0)throw RangeError(`Position specified relative to unknown parser ${t}`);return n}var W_=[ie.none];for(let e=1,t;t=Q[e];e++)W_[e]=ie.define({id:e,name:t,props:e>=Q.Escape?[]:[[ue.group,e in f_?[`Block`,`BlockContext`]:[`Block`,`LeafBlock`]]],top:t==`Document`});var G_=[],K_=class{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,n,r=0){return this.content.push(e,t,n,4+r*4),this}writeElements(e,t=0){for(let n of e)n.writeTo(this,t);return this}finish(e,t){return he.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}},q_=class{constructor(e,t,n,r=G_){this.type=e,this.from=t,this.to=n,this.children=r}writeTo(e,t){let n=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-n)}toTree(e){return new K_(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},J_=class{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return G_}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}};function Y_(e,t,n,r){return new q_(e,t,n,r)}var X_={resolve:`Emphasis`,mark:`EmphasisMark`},Z_={resolve:`Emphasis`,mark:`EmphasisMark`},Q_={},$_={},ev=class{constructor(e,t,n,r,i=n-t){this.type=e,this.from=t,this.to=n,this.side=r,this.size=i}},tv=`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`,nv=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{nv=RegExp(`[\\p{S}|\\p{P}]`,`u`)}catch{}var rv={Escape(e,t,n){if(t!=92||n==e.end-1)return-1;let r=e.char(n+1);for(let t=0;t<32;t++)if(tv.charCodeAt(t)==r)return e.append(Y_(Q.Escape,n,n+2));return-1},Entity(e,t,n){if(t!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(n+1,n+31));return r?e.append(Y_(Q.Entity,n,n+1+r[0].length)):-1},InlineCode(e,t,n){if(t!=96||n&&e.char(n-1)==96)return-1;let r=n+1;for(;r<e.end&&e.char(r)==96;)r++;let i=r-n,a=0;for(;r<e.end;r++)if(e.char(r)==96){if(a++,a==i&&e.char(r+1)!=96)return e.append(Y_(Q.InlineCode,n,r+1,[Y_(Q.CodeMark,n,n+i),Y_(Q.CodeMark,r+1-i,r+1)]))}else a=0;return-1},HTMLTag(e,t,n){if(t!=60||n==e.end-1)return-1;let r=e.slice(n+1,e.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return e.append(Y_(Q.Autolink,n,n+1+i[0].length,[Y_(Q.LinkMark,n,n+1),Y_(Q.URL,n+1,n+i[0].length),Y_(Q.LinkMark,n+i[0].length,n+1+i[0].length)]));let a=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(a)return e.append(Y_(Q.Comment,n,n+1+a[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return e.append(Y_(Q.ProcessingInstruction,n,n+1+o[0].length));let s=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return s?e.append(Y_(Q.HTMLTag,n,n+1+s[0].length)):-1},Emphasis(e,t,n){if(t!=95&&t!=42)return-1;let r=n+1;for(;e.char(r)==t;)r++;let i=e.slice(n-1,n),a=e.slice(r,r+1),o=nv.test(i),s=nv.test(a),c=/\s|^$/.test(i),l=/\s|^$/.test(a),u=!l&&(!s||c||o),d=!c&&(!o||l||s),f=u&&(t==42||!d||o),p=d&&(t==42||!u||s);return e.append(new ev(t==95?X_:Z_,n,r,!!f|(p?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(Y_(Q.HardBreak,n,n+2));if(t==32){let t=n+1;for(;e.char(t)==32;)t++;if(e.char(t)==10&&t>=n+2)return e.append(Y_(Q.HardBreak,n,t+1))}return-1},Link(e,t,n){return t==91?e.append(new ev(Q_,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new ev($_,n,n+2,1)):-1},LinkEnd(e,t,n){if(t!=93)return-1;for(let t=e.parts.length-1;t>=0;t--){let r=e.parts[t];if(r instanceof ev&&(r.type==Q_||r.type==$_)){if(!r.side||e.skipSpace(r.to)==n&&!/[(\[]/.test(e.slice(n+1,n+2)))return e.parts[t]=null,-1;let i=e.takeContent(t),a=e.parts[t]=iv(e,i,r.type==Q_?Q.Link:Q.Image,r.from,n+1);if(r.type==Q_)for(let n=0;n<t;n++){let t=e.parts[n];t instanceof ev&&t.type==Q_&&(t.side=0)}return a.to}}return-1}};function iv(e,t,n,r,i){let{text:a}=e,o=e.char(i),s=i;if(t.unshift(Y_(Q.LinkMark,r,r+(n==Q.Image?2:1))),t.push(Y_(Q.LinkMark,i-1,i)),o==40){let n=e.skipSpace(i+1),r=av(a,n-e.offset,e.offset),o;r&&(n=e.skipSpace(r.to),n!=r.to&&(o=ov(a,n-e.offset,e.offset),o&&(n=e.skipSpace(o.to)))),e.char(n)==41&&(t.push(Y_(Q.LinkMark,i,i+1)),s=n+1,r&&t.push(r),o&&t.push(o),t.push(Y_(Q.LinkMark,n,s)))}else if(o==91){let n=sv(a,i-e.offset,e.offset,!1);n&&(t.push(n),s=n.to)}return Y_(n,r,s,t)}function av(e,t,n){if(e.charCodeAt(t)==60){for(let r=t+1;r<e.length;r++){let i=e.charCodeAt(r);if(i==62)return Y_(Q.URL,t+n,r+1+n);if(i==60||i==10)return!1}return null}{let r=0,i=t;for(let t=!1;i<e.length;i++){let n=e.charCodeAt(i);if(p_(n))break;if(t)t=!1;else if(n==40)r++;else if(n==41){if(!r)break;r--}else n==92&&(t=!0)}return i>t?Y_(Q.URL,t+n,i+n):i==e.length&&null}}function ov(e,t,n){let r=e.charCodeAt(t);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let r=t+1,a=!1;r<e.length;r++){let o=e.charCodeAt(r);if(a)a=!1;else if(o==i)return Y_(Q.LinkTitle,t+n,r+1+n);else o==92&&(a=!0)}return null}function sv(e,t,n,r){for(let i=!1,a=t+1,o=Math.min(e.length,a+999);a<o;a++){let o=e.charCodeAt(a);if(i)i=!1;else if(o==93)return!r&&Y_(Q.LinkLabel,t+n,a+1+n);else{if(r&&!p_(o)&&(r=!1),o==91)return!1;o==92&&(i=!0)}}return null}var cv=class{constructor(e,t,n){this.parser=e,this.text=t,this.offset=n,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,n,r,i){return this.append(new ev(e,t,n,!!r|(i?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof ev&&(t.type==Q_||t.type==$_))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let t=e;t<this.parts.length;t++){let n=this.parts[t];if(!(n instanceof ev&&n.type.resolve&&n.side&2))continue;let r=n.type==X_||n.type==Z_,i=n.to-n.from,a,o=t-1;for(;o>=e;o--){let e=this.parts[o];if(e instanceof ev&&e.side&1&&e.type==n.type&&!(r&&(n.side&1||e.side&2)&&(e.size+n.size)%3==0&&(e.size%3||n.size%3))){a=e;break}}if(!a)continue;let s=n.type.resolve,c=[],l=a.from,u=n.to;if(r){let e=Math.min(2,a.to-a.from,i);l=a.to-e,u=n.from+e,s=e==1?`Emphasis`:`StrongEmphasis`}a.type.mark&&c.push(this.elt(a.type.mark,l,a.to));for(let e=o+1;e<t;e++)this.parts[e]instanceof q_&&c.push(this.parts[e]),this.parts[e]=null;n.type.mark&&c.push(this.elt(n.type.mark,n.from,u));let d=this.elt(s,l,u,c);this.parts[o]=r&&a.from!=l?new ev(a.type,a.from,l,a.side,a.size):null,(this.parts[t]=r&&n.to!=u?new ev(n.type,u,n.to,n.side,n.size):null)?this.parts.splice(t,0,d):this.parts[t]=d}let t=[];for(let n=e;n<this.parts.length;n++){let e=this.parts[n];e instanceof q_&&t.push(e)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let n=this.parts[t];if(n instanceof ev&&n.type==e&&n.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof ev?t:null}skipSpace(e){return m_(this.text,e-this.offset)+this.offset}elt(e,t,n,r){return typeof e==`string`?Y_(this.parser.getNodeType(e),t,n,r):new J_(e,t)}};cv.linkStart=Q_,cv.imageStart=$_,cv.emphasisAsterisk=Z_,cv.emphasisUnderscore=X_;function lv(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),r=0;for(let e of t){for(;r<n.length&&n[r].to<e.to;)r++;if(r<n.length&&n[r].from<e.from){let t=n[r];t instanceof q_&&(n[r]=new q_(t.type,t.from,t.to,lv(t.children,[e])))}else n.splice(r++,0,e)}return n}var uv=[Q.CodeBlock,Q.ListItem,Q.OrderedList,Q.BulletList],dv=class{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let e=this.fragment.to;for(;e>0&&this.input.read(e-1,e)!=`
|
|
672
|
-
`;)e--;this.fragmentEnd=e?e-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let r=e+this.fragment.offset;for(;n.to<=r;)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(ue.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-+!!this.fragment.openEnd,i=e.absoluteLineStart,a=i,o=e.block.children.length,s=a,c=o;for(;;){if(t.to-n>r||t.to-n>e.to){if(t.type.isAnonymous&&t.firstChild())continue;break}let i=fv(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,i);else{let n=new he(e.parser.nodeSet.types[Q.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(n,t.tree),e.addNode(n,i)}if(t.type.is(`Block`)&&(uv.indexOf(t.type.id)<0?(a=t.to-n,o=e.block.children.length):(a=s,o=c),s=t.to-n,c=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return a-i}};function fv(e,t){let n=e;for(let r=1;r<t.length;r++){let i=t[r-1].to,a=t[r].from;i<e&&(n-=a-i)}return n}var pv=u({"Blockquote/...":g.quote,HorizontalRule:g.contentSeparator,"ATXHeading1/... SetextHeading1/...":g.heading1,"ATXHeading2/... SetextHeading2/...":g.heading2,"ATXHeading3/...":g.heading3,"ATXHeading4/...":g.heading4,"ATXHeading5/...":g.heading5,"ATXHeading6/...":g.heading6,"Comment CommentBlock":g.comment,Escape:g.escape,Entity:g.character,"Emphasis/...":g.emphasis,"StrongEmphasis/...":g.strong,"Link/... Image/...":g.link,"OrderedList/... BulletList/...":g.list,"BlockQuote/...":g.quote,"InlineCode CodeText":g.monospace,"URL Autolink":g.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":g.processingInstruction,"CodeInfo LinkLabel":g.labelName,LinkTitle:g.string,Paragraph:g.content}),mv=new B_(new ae(W_).extend(pv),Object.keys(j_).map(e=>j_[e]),Object.keys(j_).map(e=>F_[e]),Object.keys(j_),I_,f_,Object.keys(rv).map(e=>rv[e]),Object.keys(rv),[]);function hv(e,t,n){let r=[];for(let i=e.firstChild,a=t;;i=i.nextSibling){let e=i?i.from:n;if(e>a&&r.push({from:a,to:e}),!i)break;a=i.to}return r}function gv(e){let{codeParser:t,htmlParser:n}=e;return{wrap:te((e,r)=>{let i=e.type.id;if(t&&(i==Q.CodeBlock||i==Q.FencedCode)){let n=``;if(i==Q.FencedCode){let t=e.node.getChild(Q.CodeInfo);t&&(n=r.read(t.from,t.to))}let a=t(n);if(a)return{parser:a,overlay:e=>e.type.id==Q.CodeText,bracketed:i==Q.FencedCode}}else if(n&&(i==Q.HTMLBlock||i==Q.HTMLTag||i==Q.CommentBlock))return{parser:n,overlay:hv(e.node,e.from,e.to)};return null})}}var _v={resolve:`Strikethrough`,mark:`StrikethroughMark`},vv={defineNodes:[{name:`Strikethrough`,style:{"Strikethrough/...":g.strikethrough}},{name:`StrikethroughMark`,style:g.processingInstruction}],parseInline:[{name:`Strikethrough`,parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),i=e.slice(n+2,n+3),a=/\s|^$/.test(r),o=/\s|^$/.test(i),s=nv.test(r),c=nv.test(i);return e.addDelimiter(_v,n,n+2,!o&&(!c||a||s),!a&&(!s||o||c))},after:`Emphasis`}]};function yv(e,t,n=0,r,i=0){let a=0,o=!0,s=-1,c=-1,l=!1,u=()=>{r.push(e.elt(`TableCell`,i+s,i+c,e.parser.parseInline(t.slice(s,c),i+s)))};for(let d=n;d<t.length;d++){let n=t.charCodeAt(d);n==124&&!l?((!o||s>-1)&&a++,o=!1,r&&(s>-1&&u(),r.push(e.elt(`TableDelimiter`,d+i,d+i+1))),s=c=-1):(l||n!=32&&n!=9)&&(s<0&&(s=d),c=d+1),l=!l&&n==92}return s>-1&&(a++,r&&u()),a}function bv(e,t){for(let n=t;n<e.length;n++){let t=e.charCodeAt(n);if(t==124)return!0;t==92&&n++}return!1}var xv=/^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,Sv=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&xv.test(r=t.text.slice(t.pos))){let i=[];yv(e,n.content,0,i,n.start)==yv(e,r,0)&&(this.rows=[e.elt(`TableHeader`,n.start,n.start+n.content.length,i),e.elt(`TableDelimiter`,e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let n=[];yv(e,t.text,t.pos,n,e.lineStart),this.rows.push(e.elt(`TableRow`,e.lineStart+t.pos,e.lineStart+t.text.length,n))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt(`Table`,t.start,t.start+t.content.length,this.rows)),!0):!1}},Cv={defineNodes:[{name:`Table`,block:!0},{name:`TableHeader`,style:{"TableHeader/...":g.heading}},`TableRow`,{name:`TableCell`,style:g.content},{name:`TableDelimiter`,style:g.processingInstruction}],parseBlock:[{name:`Table`,leaf(e,t){return bv(t.content,0)?new Sv:null},endLeaf(e,t,n){if(n.parsers.some(e=>e instanceof Sv)||!bv(t.text,t.basePos))return!1;let r=e.peekLine();return xv.test(r)&&yv(e,t.text,t.basePos)==yv(e,r,t.basePos)},before:`SetextHeading`}]},wv=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt(`Task`,t.start,t.start+t.content.length,[e.elt(`TaskMarker`,t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},Tv={defineNodes:[{name:`Task`,block:!0,style:g.list},{name:`TaskMarker`,style:g.atom}],parseBlock:[{name:`TaskList`,leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name==`ListItem`?new wv:null},after:`SetextHeading`}]},Ev=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,Dv=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,Ov=/[\w-]+\.[\w-]+($|[/:])/,kv=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Av=/\/[a-zA-Z\d@.]+/gy;function jv(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function Mv(e,t){Dv.lastIndex=t;let n=Dv.exec(e);if(!n||Ov.exec(n[0])[0].indexOf(`_`)>-1)return-1;let r=t+n[0].length;for(;;){let n=e[r-1],i;if(/[?!.,:*_~]/.test(n)||n==`)`&&jv(e,t,r,`)`)>jv(e,t,r,`(`))r--;else if(n==`;`&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+i.index;else break}return r}function Nv(e,t){kv.lastIndex=t;let n=kv.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r==`_`||r==`-`?-1:t+n[0].length-+(r==`.`)}var Pv=[Cv,Tv,vv,{parseInline:[{name:`Autolink`,parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;Ev.lastIndex=r;let i=Ev.exec(e.text),a=-1;return!i||(i[1]||i[2]?(a=Mv(e.text,r+i[0].length),a>-1&&e.hasOpenLink&&(a=r+/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a))[0].length)):i[3]?a=Nv(e.text,r):(a=Nv(e.text,r+i[0].length),a>-1&&i[0]==`xmpp:`&&(Av.lastIndex=a,i=Av.exec(e.text),i&&(a=i.index+i[0].length))),a<0)?-1:(e.addElement(e.elt(`URL`,n,a+e.offset)),a+e.offset)}}]}];function Fv(e,t,n){return(r,i,a)=>{if(i!=e||r.char(a+1)==e)return-1;let o=[r.elt(n,a,a+1)];for(let i=a+1;i<r.end;i++){let s=r.char(i);if(s==e)return r.addElement(r.elt(t,a,i+1,o.concat(r.elt(n,i,i+1))));if(s==92&&o.push(r.elt(`Escape`,i,i+++2)),p_(s))break}return-1}}var Iv={defineNodes:[{name:`Superscript`,style:g.special(g.content)},{name:`SuperscriptMark`,style:g.processingInstruction}],parseInline:[{name:`Superscript`,parse:Fv(94,`Superscript`,`SuperscriptMark`)}]},Lv={defineNodes:[{name:`Subscript`,style:g.special(g.content)},{name:`SubscriptMark`,style:g.processingInstruction}],parseInline:[{name:`Subscript`,parse:Fv(126,`Subscript`,`SubscriptMark`)}]},Rv={defineNodes:[{name:`Emoji`,style:g.character}],parseInline:[{name:`Emoji`,parse(e,t,n){let r;return t!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(n+1,e.end)))?-1:e.addElement(e.elt(`Emoji`,n,n+1+r[0].length))}}]},zv=a({html:()=>Uv,htmlCompletionSource:()=>Wv}),Bv=ie.define({id:0,name:`Document`,top:!0}),Vv=class extends me{createParse(e,t,n){let r=n[0]?.from??0,i=n[n.length-1]?.to??e.length;return{parsedPos:i,stoppedAt:null,stopAt(){},advance:()=>new he(Bv,[],[],i-r)}}},Hv=new oe(C(),new Vv,[],`html`);function Uv(e){return new de(Hv)}function Wv(){return null}var Gv=a({commonmarkLanguage:()=>ey,deleteMarkupBackward:()=>my,insertNewlineContinueMarkup:()=>ly,insertNewlineContinueMarkupCommand:()=>cy,markdown:()=>_y,markdownKeymap:()=>hy,markdownLanguage:()=>ty,pasteURLAsLink:()=>Sy}),Kv=C({commentTokens:{block:{open:`<!--`,close:`-->`}}}),qv=new ue,Jv=mv.configure({props:[re.add(e=>!e.is(`Block`)||e.is(`Document`)||Yv(e)!=null||Xv(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),qv.add(Yv),S.add({Document:()=>null}),f.add({Document:Kv})]});function Yv(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function Xv(e){return e.name==`OrderedList`||e.name==`BulletList`}function Zv(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=Yv(e.type))!=null&&r<=t)break;n=e}return n.to}var Qv=ee.of((e,t,n)=>{for(let r=p(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let e=r.type.prop(qv);if(e==null)continue;let t=Zv(r,e);if(t>n)return{from:n,to:t}}return null});function $v(e){return new oe(Kv,e,[],`markdown`)}var ey=$v(Jv),ty=$v(Jv.configure([Pv,Lv,Iv,Rv,{props:[re.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function ny(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):x.matchLanguageName(e,n,!0),t instanceof x)return t.support?t.support.language.parser:pe.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var ry=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}marker(e,t){let n=this.node.name==`OrderedList`?String(+ay(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function iy(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new ry(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new ry(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new ry(i.parent,s,s+t,a[1],e,n,i))}}return r}function ay(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function oy(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=ay(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function sy(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(y)!=` `)return e;let r=le(e,4,n),i=``;for(let e=r;e>0;)e>=4?(i+=` `,e-=4):(i+=` `,e--);return i+e.slice(n)}var cy=(e={})=>({state:t,dispatch:n})=>{let r=p(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!ty.isActiveAt(t,n.from,-1)&&!ty.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=iy(r.resolveInner(o,-1),i);for(;c.length&&c[c.length-1].from>o-s.from;)c.pop();if(!c.length)return a={range:n};let l=c[c.length-1];if(l.to-l.spaceAfter.length>o-s.from)return a={range:n};let u=o>=l.to-l.spaceAfter.length&&!/\S/.test(s.text.slice(l.to));if(l.item&&u){if(l.item.from<s.from&&!/^[\s>]*$/.test(s.text.slice(0,l.to)))return a={range:n};let r=l.node.firstChild,u=l.node.getChild(`ListItem`,`ListItem`);if(r.to>=o||u&&u.to<o||s.from>0&&!/[^\s>]/.test(i.lineAt(s.from-1).text)||e.nonTightLists===!1){let e=c.length>1?c[c.length-2]:null,t,n=``;e&&e.item?(t=s.from+e.from,n=e.marker(i,1)):t=s.from+(e?e.to:0);let r=[{from:t,to:o,insert:n}];return l.node.name==`OrderedList`&&oy(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&oy(e.item,i,r),{range:h.cursor(t+n.length),changes:r}}{let e=fy(c,t,s);return{range:h.cursor(o+e.length+1),changes:{from:s.from,insert:e+t.lineBreak}}}}if(l.node.name==`Blockquote`&&u&&s.from){let e=i.lineAt(s.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==l.from){let i=t.changes([{from:e.from+r.index,to:e.to},{from:s.from+l.from,to:s.to}]);return{range:n.map(i),changes:i}}}let d=[];l.node.name==`OrderedList`&&oy(l.item,i,d);let f=l.item&&l.item.from<s.from,p=``;if(!f||/^[\s\d.)\-+*>]*/.exec(s.text)[0].length>=l.to)for(let e=0,t=c.length-1;e<=t;e++)p+=e==t&&!f?c[e].marker(i,1):c[e].blank(e<t?le(s.text,4,c[e+1].from)-p.length:null);let m=o;for(;m>s.from&&/\s/.test(s.text.charAt(m-s.from-1));)m--;return p=sy(p,t),dy(l.node,t.doc)&&(p=fy(c,t,s)+t.lineBreak+p),d.push({from:m,to:o,insert:t.lineBreak+p}),{range:h.cursor(m+p.length+1),changes:d}});return!a&&(n(t.update(o,{scrollIntoView:!0,userEvent:`input`})),!0)},ly=cy();function uy(e){return e.name==`QuoteMark`||e.name==`ListMark`}function dy(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+ +!o<a.number}function fy(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?le(n.text,4,e[t+1].from)-r.length:null,t<i);return sy(r,t)}function py(e,t){let n=e.resolveInner(t,-1),r=t;uy(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(uy(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var my=({state:e,dispatch:t})=>{let n=p(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&ty.isActiveAt(e,t.from)){let t=a.lineAt(i),r=iy(py(n,i),a);if(r.length){let n=r[r.length-1],a=n.to-n.spaceAfter.length+ +!!n.spaceAfter;if(i-t.from>a&&!/\S/.test(t.text.slice(a,i-t.from)))return{range:h.cursor(t.from+a),changes:{from:t.from+a,to:i}};if(i-t.from==a&&(n.item&&t.from<=n.item.from||/^[\s>]*$/.test(t.text.slice(0,n.to)))){let r=t.from+n.from;if(n.item&&n.node.from<n.item.from&&/\S/.test(t.text.slice(n.from,n.to))){let i=n.blank(le(t.text,4,n.to)-le(t.text,4,n.from));return r==t.from&&(i=sy(i,e)),{range:h.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:h.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return!r&&(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)},hy=[{key:`Enter`,run:ly},{key:`Backspace`,run:my}],gy=Uv({matchClosingTags:!1});function _y(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=ey,completeHTMLTags:a=!0,pasteURLAsLink:o=!0,htmlTagLanguage:s=gy}=e;if(!(i instanceof B_))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=e.extensions?[e.extensions]:[],l=[s.support,Qv],u;o&&l.push(Sy),n instanceof de?(l.push(n.support),u=n.language):n&&(u=n);let f=t||u?ny(t,u):void 0;c.push(gv({codeParser:f,htmlParser:s.language.parser})),r&&l.push(v.high(d.of(hy)));let p=$v(i.configure(c));return a&&l.push(p.data.of({autocomplete:vy})),new de(p,l)}function vy(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=p(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name==`CodeBlock`||i.name==`FencedCode`||i.name==`ProcessingInstructionBlock`||i.name==`CommentBlock`||i.name==`Link`||i.name==`Image`)return null;i=i.parent}return{from:n-r[0].length,to:n,options:by(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var yy=null;function by(){if(yy)return yy;let e=Wv(new ge(b.create({extensions:gy}),0,!0));return yy=e?e.options:[]}var xy=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,Sy=m.domEventHandlers({paste:(e,t)=>{let{main:n}=t.state.selection;if(n.empty)return!1;let r=e.clipboardData?.getData(`text/plain`);if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r=`https://`+r),!ty.isActiveAt(t.state,n.from,1)))return!1;let i=p(t.state),a=!1;return i.iterate({from:n.from,to:n.to,enter:e=>{(e.from>n.from||xy.test(e.name))&&(a=!0)},leave:e=>{e.to<n.to&&(a=!0)}}),!a&&(t.dispatch({changes:[{from:n.from,insert:`[`},{from:n.to,insert:`](${r})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}});function $(e){return new de(ne.define(e))}function Cy(e){return s(()=>import(`./DIGvaVgJ.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([0,1,2,3]),import.meta.url)}var wy=[x.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return s(()=>import(`./C6Btt2Xs.js`).then(e=>e.cpp()),__vite__mapDeps([4,1,3]),import.meta.url)}}),x.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return s(()=>import(`./C6Btt2Xs.js`).then(e=>e.cpp()),__vite__mapDeps([4,1,3]),import.meta.url)}}),x.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return Cy(`Cassandra`)}}),x.of({name:`CSS`,extensions:[`css`],load(){return s(()=>import(`./DtbnBenW.js`).then(e=>e.css()),__vite__mapDeps([5,1,3]),import.meta.url)}}),x.of({name:`Go`,extensions:[`go`],load(){return s(()=>import(`./D_aBVMvK.js`).then(e=>e.go()),__vite__mapDeps([6,1,2,3]),import.meta.url)}}),x.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return s(()=>Promise.resolve().then(()=>zv).then(e=>e.html()),void 0,import.meta.url)}}),x.of({name:`Java`,extensions:[`java`],load(){return s(()=>import(`./Bbt0DTmZ.js`).then(e=>e.java()),__vite__mapDeps([7,1,3]),import.meta.url)}}),x.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return s(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript()),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),x.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return s(()=>import(`./yXUzBjUq.js`).then(e=>e.jinja()),__vite__mapDeps([9,1,3]),import.meta.url)}}),x.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return s(()=>import(`./CDAjAYjS.js`).then(e=>e.json()),__vite__mapDeps([10,1,3]),import.meta.url)}}),x.of({name:`JSX`,extensions:[`jsx`],load(){return s(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),x.of({name:`LESS`,extensions:[`less`],load(){return s(()=>import(`./_rHYGvON.js`).then(e=>e.less()),__vite__mapDeps([11,1,3,5]),import.meta.url)}}),x.of({name:`Liquid`,extensions:[`liquid`],load(){return s(()=>import(`./C_ER1Any.js`).then(e=>e.liquid()),__vite__mapDeps([12,1,3]),import.meta.url)}}),x.of({name:`MariaDB SQL`,load(){return Cy(`MariaSQL`)}}),x.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return s(()=>Promise.resolve().then(()=>Gv).then(e=>e.markdown()),void 0,import.meta.url)}}),x.of({name:`MS SQL`,load(){return Cy(`MSSQL`)}}),x.of({name:`MySQL`,load(){return Cy(`MySQL`)}}),x.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return s(()=>import(`./B4sg4e8i.js`).then(e=>e.php()),__vite__mapDeps([13,1,3]),import.meta.url)}}),x.of({name:`PLSQL`,extensions:[`pls`],load(){return Cy(`PLSQL`)}}),x.of({name:`PostgreSQL`,load(){return Cy(`PostgreSQL`)}}),x.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return s(()=>import(`./Bffqt7tx.js`).then(e=>e.python()),__vite__mapDeps([14,1,2,3]),import.meta.url)}}),x.of({name:`Rust`,extensions:[`rs`],load(){return s(()=>import(`./BWonG38x.js`).then(e=>e.rust()),__vite__mapDeps([15,1,3]),import.meta.url)}}),x.of({name:`Sass`,extensions:[`sass`],load(){return s(()=>import(`./BEHa2uNW.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([16,1,3,5]),import.meta.url)}}),x.of({name:`SCSS`,extensions:[`scss`],load(){return s(()=>import(`./BEHa2uNW.js`).then(e=>e.sass()),__vite__mapDeps([16,1,3,5]),import.meta.url)}}),x.of({name:`SQL`,extensions:[`sql`],load(){return Cy(`StandardSQL`)}}),x.of({name:`SQLite`,load(){return Cy(`SQLite`)}}),x.of({name:`TSX`,extensions:[`tsx`],load(){return s(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),x.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return s(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),x.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return s(()=>import(`./BPW39P52.js`).then(e=>e.wast()),__vite__mapDeps([17,1,3]),import.meta.url)}}),x.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return s(()=>import(`./Ds8Pkiic.js`).then(e=>e.xml()),__vite__mapDeps([18,1,3]),import.meta.url)}}),x.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return s(()=>import(`./CPF5uNy5.js`).then(e=>e.yaml()),__vite__mapDeps([19,1,3]),import.meta.url)}}),x.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return s(()=>import(`./gfMMiTNf.js`).then(e=>$(e.apl)),[],import.meta.url)}}),x.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return s(()=>import(`./C_eisQCp.js`).then(e=>$(e.asciiArmor)),[],import.meta.url)}}),x.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return s(()=>import(`./DCl_8MCW.js`).then(e=>$(e.asn1({}))),[],import.meta.url)}}),x.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return s(()=>import(`./BEn0Cwpx.js`).then(e=>$(e.asterisk)),[],import.meta.url)}}),x.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return s(()=>import(`./D5EjA2JK.js`).then(e=>$(e.brainfuck)),[],import.meta.url)}}),x.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return s(()=>import(`./DHLQUbN7.js`).then(e=>$(e.cobol)),[],import.meta.url)}}),x.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.csharp)),[],import.meta.url)}}),x.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return s(()=>import(`./BflJGmDX.js`).then(e=>$(e.clojure)),[],import.meta.url)}}),x.of({name:`ClojureScript`,extensions:[`cljs`],load(){return s(()=>import(`./BflJGmDX.js`).then(e=>$(e.clojure)),[],import.meta.url)}}),x.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return s(()=>import(`./CnaYoQib.js`).then(e=>$(e.gss)),[],import.meta.url)}}),x.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return s(()=>import(`./84nbDH0I.js`).then(e=>$(e.cmake)),[],import.meta.url)}}),x.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return s(()=>import(`./De_zI4J0.js`).then(e=>$(e.coffeeScript)),[],import.meta.url)}}),x.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return s(()=>import(`./DgAKBe0r.js`).then(e=>$(e.commonLisp)),[],import.meta.url)}}),x.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return s(()=>import(`./p9eYesGn.js`).then(e=>$(e.cypher)),[],import.meta.url)}}),x.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return s(()=>import(`./B_1Jd8HM.js`).then(e=>$(e.cython)),[],import.meta.url)}}),x.of({name:`Crystal`,extensions:[`cr`],load(){return s(()=>import(`./Bsdphhtm.js`).then(e=>$(e.crystal)),[],import.meta.url)}}),x.of({name:`D`,extensions:[`d`],load(){return s(()=>import(`./DWkQyNnU.js`).then(e=>$(e.d)),[],import.meta.url)}}),x.of({name:`Dart`,extensions:[`dart`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.dart)),[],import.meta.url)}}),x.of({name:`diff`,extensions:[`diff`,`patch`],load(){return s(()=>import(`./ChtP43wD.js`).then(e=>$(e.diff)),[],import.meta.url)}}),x.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return s(()=>import(`./DLa7NjNO.js`).then(e=>$(e.dockerFile)),__vite__mapDeps([20,21]),import.meta.url)}}),x.of({name:`DTD`,extensions:[`dtd`],load(){return s(()=>import(`./DTF72YNO.js`).then(e=>$(e.dtd)),[],import.meta.url)}}),x.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return s(()=>import(`./S7ucR4pR.js`).then(e=>$(e.dylan)),[],import.meta.url)}}),x.of({name:`EBNF`,load(){return s(()=>import(`./D4c0_ac3.js`).then(e=>$(e.ebnf)),[],import.meta.url)}}),x.of({name:`ECL`,extensions:[`ecl`],load(){return s(()=>import(`./BVIeWmwY.js`).then(e=>$(e.ecl)),[],import.meta.url)}}),x.of({name:`edn`,extensions:[`edn`],load(){return s(()=>import(`./BflJGmDX.js`).then(e=>$(e.clojure)),[],import.meta.url)}}),x.of({name:`Eiffel`,extensions:[`e`],load(){return s(()=>import(`./BEjRio4Q.js`).then(e=>$(e.eiffel)),[],import.meta.url)}}),x.of({name:`Elm`,extensions:[`elm`],load(){return s(()=>import(`./Cshzl8qu.js`).then(e=>$(e.elm)),[],import.meta.url)}}),x.of({name:`Erlang`,extensions:[`erl`],load(){return s(()=>import(`./BV0c4Hdn.js`).then(e=>$(e.erlang)),[],import.meta.url)}}),x.of({name:`Esper`,load(){return s(()=>import(`./DuQMFDvy.js`).then(e=>$(e.esper)),[],import.meta.url)}}),x.of({name:`Factor`,extensions:[`factor`],load(){return s(()=>import(`./CygcOYNo.js`).then(e=>$(e.factor)),__vite__mapDeps([22,21]),import.meta.url)}}),x.of({name:`FCL`,load(){return s(()=>import(`./ClOhbFR7.js`).then(e=>$(e.fcl)),[],import.meta.url)}}),x.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return s(()=>import(`./D6RzAl64.js`).then(e=>$(e.forth)),[],import.meta.url)}}),x.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return s(()=>import(`./Bt6PBEDR.js`).then(e=>$(e.fortran)),[],import.meta.url)}}),x.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return s(()=>import(`./B45xgp2S.js`).then(e=>$(e.fSharp)),[],import.meta.url)}}),x.of({name:`Gas`,extensions:[`s`],load(){return s(()=>import(`./BHEdbvp9.js`).then(e=>$(e.gas)),[],import.meta.url)}}),x.of({name:`Gherkin`,extensions:[`feature`],load(){return s(()=>import(`./oBAE_ms0.js`).then(e=>$(e.gherkin)),[],import.meta.url)}}),x.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return s(()=>import(`./CUpZ7dEl.js`).then(e=>$(e.groovy)),[],import.meta.url)}}),x.of({name:`Haskell`,extensions:[`hs`],load(){return s(()=>import(`./BRsoo5mP.js`).then(e=>$(e.haskell)),[],import.meta.url)}}),x.of({name:`Haxe`,extensions:[`hx`],load(){return s(()=>import(`./DjVOVvNP.js`).then(e=>$(e.haxe)),[],import.meta.url)}}),x.of({name:`HXML`,extensions:[`hxml`],load(){return s(()=>import(`./DjVOVvNP.js`).then(e=>$(e.hxml)),[],import.meta.url)}}),x.of({name:`HTTP`,load(){return s(()=>import(`./CLVgA2GD.js`).then(e=>$(e.http)),[],import.meta.url)}}),x.of({name:`IDL`,extensions:[`pro`],load(){return s(()=>import(`./BUZw3wgd.js`).then(e=>$(e.idl)),[],import.meta.url)}}),x.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return s(()=>import(`./Bu8mWwtz.js`).then(e=>$(e.jsonld)),[],import.meta.url)}}),x.of({name:`Julia`,extensions:[`jl`],load(){return s(()=>import(`./CQfgDRfP.js`).then(e=>$(e.julia)),[],import.meta.url)}}),x.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.kotlin)),[],import.meta.url)}}),x.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return s(()=>import(`./BXxG0Yva.js`).then(e=>$(e.liveScript)),[],import.meta.url)}}),x.of({name:`Lua`,extensions:[`lua`],load(){return s(()=>import(`./DPCEkfD_.js`).then(e=>$(e.lua)),[],import.meta.url)}}),x.of({name:`mIRC`,extensions:[`mrc`],load(){return s(()=>import(`./C9zpzAZU.js`).then(e=>$(e.mirc)),[],import.meta.url)}}),x.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return s(()=>import(`./u8YMmbU0.js`).then(e=>$(e.mathematica)),[],import.meta.url)}}),x.of({name:`Modelica`,extensions:[`mo`],load(){return s(()=>import(`./CqHI_q-D.js`).then(e=>$(e.modelica)),[],import.meta.url)}}),x.of({name:`MUMPS`,extensions:[`mps`],load(){return s(()=>import(`./BSzj6Xyz.js`).then(e=>$(e.mumps)),[],import.meta.url)}}),x.of({name:`Mbox`,extensions:[`mbox`],load(){return s(()=>import(`./BEMVcqjs.js`).then(e=>$(e.mbox)),[],import.meta.url)}}),x.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return s(()=>import(`./8H7HVH4w.js`).then(e=>$(e.nginx)),[],import.meta.url)}}),x.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return s(()=>import(`./GwMd3KmG.js`).then(e=>$(e.nsis)),__vite__mapDeps([23,21]),import.meta.url)}}),x.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return s(()=>import(`./CzMBulkp.js`).then(e=>$(e.ntriples)),[],import.meta.url)}}),x.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.objectiveC)),[],import.meta.url)}}),x.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.objectiveCpp)),[],import.meta.url)}}),x.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return s(()=>import(`./B45xgp2S.js`).then(e=>$(e.oCaml)),[],import.meta.url)}}),x.of({name:`Octave`,extensions:[`m`],load(){return s(()=>import(`./D2Q8cUp1.js`).then(e=>$(e.octave)),[],import.meta.url)}}),x.of({name:`Oz`,extensions:[`oz`],load(){return s(()=>import(`./BwTct_5T.js`).then(e=>$(e.oz)),[],import.meta.url)}}),x.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return s(()=>import(`./Dp_KdFgX.js`).then(e=>$(e.pascal)),[],import.meta.url)}}),x.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return s(()=>import(`./BkSkiI9m.js`).then(e=>$(e.perl)),[],import.meta.url)}}),x.of({name:`Pig`,extensions:[`pig`],load(){return s(()=>import(`./AF4Hwhju.js`).then(e=>$(e.pig)),[],import.meta.url)}}),x.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return s(()=>import(`./D8WpQPaX.js`).then(e=>$(e.powerShell)),[],import.meta.url)}}),x.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return s(()=>import(`./C357ku5U.js`).then(e=>$(e.properties)),[],import.meta.url)}}),x.of({name:`ProtoBuf`,extensions:[`proto`],load(){return s(()=>import(`./D1ij_kNL.js`).then(e=>$(e.protobuf)),[],import.meta.url)}}),x.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return s(()=>import(`./Cp5ooBfH.js`).then(e=>$(e.pug)),__vite__mapDeps([24,25]),import.meta.url)}}),x.of({name:`Puppet`,extensions:[`pp`],load(){return s(()=>import(`./BZyAS7I4.js`).then(e=>$(e.puppet)),[],import.meta.url)}}),x.of({name:`Q`,extensions:[`q`],load(){return s(()=>import(`./B9NhS7L_.js`).then(e=>$(e.q)),[],import.meta.url)}}),x.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return s(()=>import(`./CxDmU1I4.js`).then(e=>$(e.r)),[],import.meta.url)}}),x.of({name:`RPM Changes`,load(){return s(()=>import(`./gpDK5sbt.js`).then(e=>$(e.rpmChanges)),[],import.meta.url)}}),x.of({name:`RPM Spec`,extensions:[`spec`],load(){return s(()=>import(`./gpDK5sbt.js`).then(e=>$(e.rpmSpec)),[],import.meta.url)}}),x.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return s(()=>import(`./ChfNwlCY.js`).then(e=>$(e.ruby)),[],import.meta.url)}}),x.of({name:`SAS`,extensions:[`sas`],load(){return s(()=>import(`./C2OyD2Y6.js`).then(e=>$(e.sas)),[],import.meta.url)}}),x.of({name:`Scala`,extensions:[`scala`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.scala)),[],import.meta.url)}}),x.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return s(()=>import(`./D9qYN0V5.js`).then(e=>$(e.scheme)),[],import.meta.url)}}),x.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return s(()=>import(`./DwuoZtxw.js`).then(e=>$(e.shell)),[],import.meta.url)}}),x.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return s(()=>import(`./tLWDfEkZ.js`).then(e=>$(e.sieve)),[],import.meta.url)}}),x.of({name:`Smalltalk`,extensions:[`st`],load(){return s(()=>import(`./BLp5-jwC.js`).then(e=>$(e.smalltalk)),[],import.meta.url)}}),x.of({name:`Solr`,load(){return s(()=>import(`./B78wSQJQ.js`).then(e=>$(e.solr)),[],import.meta.url)}}),x.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return s(()=>import(`./B45xgp2S.js`).then(e=>$(e.sml)),[],import.meta.url)}}),x.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return s(()=>import(`./Dz-mlCAC.js`).then(e=>$(e.sparql)),[],import.meta.url)}}),x.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return s(()=>import(`./CTIncYxj.js`).then(e=>$(e.spreadsheet)),[],import.meta.url)}}),x.of({name:`Squirrel`,extensions:[`nut`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.squirrel)),[],import.meta.url)}}),x.of({name:`Stylus`,extensions:[`styl`],load(){return s(()=>import(`./BOVgKnng.js`).then(e=>$(e.stylus)),[],import.meta.url)}}),x.of({name:`Swift`,extensions:[`swift`],load(){return s(()=>import(`./DKB6_1j6.js`).then(e=>$(e.swift)),[],import.meta.url)}}),x.of({name:`sTeX`,load(){return s(()=>import(`./DNzd62Q_.js`).then(e=>$(e.stex)),[],import.meta.url)}}),x.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return s(()=>import(`./DNzd62Q_.js`).then(e=>$(e.stex)),[],import.meta.url)}}),x.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return s(()=>import(`./CjI9Y6RI.js`).then(e=>$(e.verilog)),[],import.meta.url)}}),x.of({name:`Tcl`,extensions:[`tcl`],load(){return s(()=>import(`./BGfruO1u.js`).then(e=>$(e.tcl)),[],import.meta.url)}}),x.of({name:`Textile`,extensions:[`textile`],load(){return s(()=>import(`./C4jVoHG1.js`).then(e=>$(e.textile)),[],import.meta.url)}}),x.of({name:`TiddlyWiki`,load(){return s(()=>import(`./VlUiK86J.js`).then(e=>$(e.tiddlyWiki)),[],import.meta.url)}}),x.of({name:`Tiki wiki`,load(){return s(()=>import(`./DTszW0OQ.js`).then(e=>$(e.tiki)),[],import.meta.url)}}),x.of({name:`TOML`,extensions:[`toml`],load(){return s(()=>import(`./BPTmHmyx.js`).then(e=>$(e.toml)),[],import.meta.url)}}),x.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return s(()=>import(`./C2dAgh7P.js`).then(e=>$(e.troff)),[],import.meta.url)}}),x.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return s(()=>import(`./PPSTk1ow.js`).then(e=>$(e.ttcn)),[],import.meta.url)}}),x.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return s(()=>import(`./2b4Gb5sE.js`).then(e=>$(e.ttcnCfg)),[],import.meta.url)}}),x.of({name:`Turtle`,extensions:[`ttl`],load(){return s(()=>import(`./Cx3rYX2g.js`).then(e=>$(e.turtle)),[],import.meta.url)}}),x.of({name:`Web IDL`,extensions:[`webidl`],load(){return s(()=>import(`./D5jiJvOU.js`).then(e=>$(e.webIDL)),[],import.meta.url)}}),x.of({name:`VB.NET`,extensions:[`vb`],load(){return s(()=>import(`./BthdM_4N.js`).then(e=>$(e.vb)),[],import.meta.url)}}),x.of({name:`VBScript`,extensions:[`vbs`],load(){return s(()=>import(`./D9f6rSsU.js`).then(e=>$(e.vbScript)),[],import.meta.url)}}),x.of({name:`Velocity`,extensions:[`vtl`],load(){return s(()=>import(`./CqftRsjg.js`).then(e=>$(e.velocity)),[],import.meta.url)}}),x.of({name:`Verilog`,extensions:[`v`],load(){return s(()=>import(`./CjI9Y6RI.js`).then(e=>$(e.verilog)),[],import.meta.url)}}),x.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return s(()=>import(`./kS471soi.js`).then(e=>$(e.vhdl)),[],import.meta.url)}}),x.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return s(()=>import(`./BKJx4mf9.js`).then(e=>$(e.xQuery)),[],import.meta.url)}}),x.of({name:`Yacas`,extensions:[`ys`],load(){return s(()=>import(`./CXXgtw0p.js`).then(e=>$(e.yacas)),[],import.meta.url)}}),x.of({name:`Z80`,extensions:[`z80`],load(){return s(()=>import(`./Co3PbHdE.js`).then(e=>$(e.z80)),[],import.meta.url)}}),x.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return s(()=>import(`./qgSLujhx.js`).then(e=>$(e.mscgen)),[],import.meta.url)}}),x.of({name:`Xù`,extensions:[`xu`],load(){return s(()=>import(`./qgSLujhx.js`).then(e=>$(e.xu)),[],import.meta.url)}}),x.of({name:`MsGenny`,extensions:[`msgenny`],load(){return s(()=>import(`./qgSLujhx.js`).then(e=>$(e.msgenny)),[],import.meta.url)}}),x.of({name:`Vue`,extensions:[`vue`],load(){return s(()=>import(`./C1hqerMA.js`).then(e=>e.vue()),__vite__mapDeps([26,1,3,8,2]),import.meta.url)}}),x.of({name:`Angular Template`,load(){return s(()=>import(`./Cgml88Pl.js`).then(e=>e.angular()),__vite__mapDeps([27,1,3,8,2]),import.meta.url)}})],Ty=se([{tag:g.keyword,class:`tok-k`},{tag:[g.string,g.regexp,g.special(g.string)],class:`tok-s`},{tag:[g.number,g.bool,g.null,g.atom],class:`tok-n`},{tag:[g.typeName,g.className,g.namespace],class:`tok-t`},{tag:g.comment,class:`tok-c`}]),Ey={style:e=>Ty.style(e),scope:e=>e.prop(f)!==ty.data};function Dy(e){let t=e.trim().split(/\s/)[0]??``;return t?x.matchLanguageName(wy,t,!1):null}var Oy=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`);function ky(e,t){let n=Dy(t)?.support;if(!n)return null;let r=``,i=fe(b.create({doc:e,extensions:[n]}),e.length,500)??n.language.parser.parse(e);return ce(e,i,Ey,(e,t)=>{r+=t?`<span class="${t}">${Oy(e)}</span>`:Oy(e)},()=>{r+=`
|
|
672
|
+
`;)e--;this.fragmentEnd=e?e-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let r=e+this.fragment.offset;for(;n.to<=r;)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(ue.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-+!!this.fragment.openEnd,i=e.absoluteLineStart,a=i,o=e.block.children.length,s=a,c=o;for(;;){if(t.to-n>r||t.to-n>e.to){if(t.type.isAnonymous&&t.firstChild())continue;break}let i=fv(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,i);else{let n=new he(e.parser.nodeSet.types[Q.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(n,t.tree),e.addNode(n,i)}if(t.type.is(`Block`)&&(uv.indexOf(t.type.id)<0?(a=t.to-n,o=e.block.children.length):(a=s,o=c),s=t.to-n,c=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return a-i}};function fv(e,t){let n=e;for(let r=1;r<t.length;r++){let i=t[r-1].to,a=t[r].from;i<e&&(n-=a-i)}return n}var pv=u({"Blockquote/...":g.quote,HorizontalRule:g.contentSeparator,"ATXHeading1/... SetextHeading1/...":g.heading1,"ATXHeading2/... SetextHeading2/...":g.heading2,"ATXHeading3/...":g.heading3,"ATXHeading4/...":g.heading4,"ATXHeading5/...":g.heading5,"ATXHeading6/...":g.heading6,"Comment CommentBlock":g.comment,Escape:g.escape,Entity:g.character,"Emphasis/...":g.emphasis,"StrongEmphasis/...":g.strong,"Link/... Image/...":g.link,"OrderedList/... BulletList/...":g.list,"BlockQuote/...":g.quote,"InlineCode CodeText":g.monospace,"URL Autolink":g.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":g.processingInstruction,"CodeInfo LinkLabel":g.labelName,LinkTitle:g.string,Paragraph:g.content}),mv=new B_(new ae(W_).extend(pv),Object.keys(j_).map(e=>j_[e]),Object.keys(j_).map(e=>F_[e]),Object.keys(j_),I_,f_,Object.keys(rv).map(e=>rv[e]),Object.keys(rv),[]);function hv(e,t,n){let r=[];for(let i=e.firstChild,a=t;;i=i.nextSibling){let e=i?i.from:n;if(e>a&&r.push({from:a,to:e}),!i)break;a=i.to}return r}function gv(e){let{codeParser:t,htmlParser:n}=e;return{wrap:te((e,r)=>{let i=e.type.id;if(t&&(i==Q.CodeBlock||i==Q.FencedCode)){let n=``;if(i==Q.FencedCode){let t=e.node.getChild(Q.CodeInfo);t&&(n=r.read(t.from,t.to))}let a=t(n);if(a)return{parser:a,overlay:e=>e.type.id==Q.CodeText,bracketed:i==Q.FencedCode}}else if(n&&(i==Q.HTMLBlock||i==Q.HTMLTag||i==Q.CommentBlock))return{parser:n,overlay:hv(e.node,e.from,e.to)};return null})}}var _v={resolve:`Strikethrough`,mark:`StrikethroughMark`},vv={defineNodes:[{name:`Strikethrough`,style:{"Strikethrough/...":g.strikethrough}},{name:`StrikethroughMark`,style:g.processingInstruction}],parseInline:[{name:`Strikethrough`,parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),i=e.slice(n+2,n+3),a=/\s|^$/.test(r),o=/\s|^$/.test(i),s=nv.test(r),c=nv.test(i);return e.addDelimiter(_v,n,n+2,!o&&(!c||a||s),!a&&(!s||o||c))},after:`Emphasis`}]};function yv(e,t,n=0,r,i=0){let a=0,o=!0,s=-1,c=-1,l=!1,u=()=>{r.push(e.elt(`TableCell`,i+s,i+c,e.parser.parseInline(t.slice(s,c),i+s)))};for(let d=n;d<t.length;d++){let n=t.charCodeAt(d);n==124&&!l?((!o||s>-1)&&a++,o=!1,r&&(s>-1&&u(),r.push(e.elt(`TableDelimiter`,d+i,d+i+1))),s=c=-1):(l||n!=32&&n!=9)&&(s<0&&(s=d),c=d+1),l=!l&&n==92}return s>-1&&(a++,r&&u()),a}function bv(e,t){for(let n=t;n<e.length;n++){let t=e.charCodeAt(n);if(t==124)return!0;t==92&&n++}return!1}var xv=/^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,Sv=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&xv.test(r=t.text.slice(t.pos))){let i=[];yv(e,n.content,0,i,n.start)==yv(e,r,0)&&(this.rows=[e.elt(`TableHeader`,n.start,n.start+n.content.length,i),e.elt(`TableDelimiter`,e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let n=[];yv(e,t.text,t.pos,n,e.lineStart),this.rows.push(e.elt(`TableRow`,e.lineStart+t.pos,e.lineStart+t.text.length,n))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt(`Table`,t.start,t.start+t.content.length,this.rows)),!0):!1}},Cv={defineNodes:[{name:`Table`,block:!0},{name:`TableHeader`,style:{"TableHeader/...":g.heading}},`TableRow`,{name:`TableCell`,style:g.content},{name:`TableDelimiter`,style:g.processingInstruction}],parseBlock:[{name:`Table`,leaf(e,t){return bv(t.content,0)?new Sv:null},endLeaf(e,t,n){if(n.parsers.some(e=>e instanceof Sv)||!bv(t.text,t.basePos))return!1;let r=e.peekLine();return xv.test(r)&&yv(e,t.text,t.basePos)==yv(e,r,t.basePos)},before:`SetextHeading`}]},wv=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt(`Task`,t.start,t.start+t.content.length,[e.elt(`TaskMarker`,t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},Tv={defineNodes:[{name:`Task`,block:!0,style:g.list},{name:`TaskMarker`,style:g.atom}],parseBlock:[{name:`TaskList`,leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name==`ListItem`?new wv:null},after:`SetextHeading`}]},Ev=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,Dv=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,Ov=/[\w-]+\.[\w-]+($|[/:])/,kv=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Av=/\/[a-zA-Z\d@.]+/gy;function jv(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function Mv(e,t){Dv.lastIndex=t;let n=Dv.exec(e);if(!n||Ov.exec(n[0])[0].indexOf(`_`)>-1)return-1;let r=t+n[0].length;for(;;){let n=e[r-1],i;if(/[?!.,:*_~]/.test(n)||n==`)`&&jv(e,t,r,`)`)>jv(e,t,r,`(`))r--;else if(n==`;`&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+i.index;else break}return r}function Nv(e,t){kv.lastIndex=t;let n=kv.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r==`_`||r==`-`?-1:t+n[0].length-+(r==`.`)}var Pv=[Cv,Tv,vv,{parseInline:[{name:`Autolink`,parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;Ev.lastIndex=r;let i=Ev.exec(e.text),a=-1;return!i||(i[1]||i[2]?(a=Mv(e.text,r+i[0].length),a>-1&&e.hasOpenLink&&(a=r+/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a))[0].length)):i[3]?a=Nv(e.text,r):(a=Nv(e.text,r+i[0].length),a>-1&&i[0]==`xmpp:`&&(Av.lastIndex=a,i=Av.exec(e.text),i&&(a=i.index+i[0].length))),a<0)?-1:(e.addElement(e.elt(`URL`,n,a+e.offset)),a+e.offset)}}]}];function Fv(e,t,n){return(r,i,a)=>{if(i!=e||r.char(a+1)==e)return-1;let o=[r.elt(n,a,a+1)];for(let i=a+1;i<r.end;i++){let s=r.char(i);if(s==e)return r.addElement(r.elt(t,a,i+1,o.concat(r.elt(n,i,i+1))));if(s==92&&o.push(r.elt(`Escape`,i,i+++2)),p_(s))break}return-1}}var Iv={defineNodes:[{name:`Superscript`,style:g.special(g.content)},{name:`SuperscriptMark`,style:g.processingInstruction}],parseInline:[{name:`Superscript`,parse:Fv(94,`Superscript`,`SuperscriptMark`)}]},Lv={defineNodes:[{name:`Subscript`,style:g.special(g.content)},{name:`SubscriptMark`,style:g.processingInstruction}],parseInline:[{name:`Subscript`,parse:Fv(126,`Subscript`,`SubscriptMark`)}]},Rv={defineNodes:[{name:`Emoji`,style:g.character}],parseInline:[{name:`Emoji`,parse(e,t,n){let r;return t!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(n+1,e.end)))?-1:e.addElement(e.elt(`Emoji`,n,n+1+r[0].length))}}]},zv=a({html:()=>Uv,htmlCompletionSource:()=>Wv}),Bv=ie.define({id:0,name:`Document`,top:!0}),Vv=class extends me{createParse(e,t,n){let r=n[0]?.from??0,i=n[n.length-1]?.to??e.length;return{parsedPos:i,stoppedAt:null,stopAt(){},advance:()=>new he(Bv,[],[],i-r)}}},Hv=new oe(C(),new Vv,[],`html`);function Uv(e){return new de(Hv)}function Wv(){return null}var Gv=a({commonmarkLanguage:()=>ey,deleteMarkupBackward:()=>my,insertNewlineContinueMarkup:()=>ly,insertNewlineContinueMarkupCommand:()=>cy,markdown:()=>_y,markdownKeymap:()=>hy,markdownLanguage:()=>ty,pasteURLAsLink:()=>Sy}),Kv=C({commentTokens:{block:{open:`<!--`,close:`-->`}}}),qv=new ue,Jv=mv.configure({props:[re.add(e=>!e.is(`Block`)||e.is(`Document`)||Yv(e)!=null||Xv(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),qv.add(Yv),S.add({Document:()=>null}),f.add({Document:Kv})]});function Yv(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function Xv(e){return e.name==`OrderedList`||e.name==`BulletList`}function Zv(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=Yv(e.type))!=null&&r<=t)break;n=e}return n.to}var Qv=ee.of((e,t,n)=>{for(let r=p(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let e=r.type.prop(qv);if(e==null)continue;let t=Zv(r,e);if(t>n)return{from:n,to:t}}return null});function $v(e){return new oe(Kv,e,[],`markdown`)}var ey=$v(Jv),ty=$v(Jv.configure([Pv,Lv,Iv,Rv,{props:[re.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function ny(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):x.matchLanguageName(e,n,!0),t instanceof x)return t.support?t.support.language.parser:pe.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var ry=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}marker(e,t){let n=this.node.name==`OrderedList`?String(+ay(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function iy(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new ry(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new ry(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new ry(i.parent,s,s+t,a[1],e,n,i))}}return r}function ay(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function oy(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=ay(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function sy(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(y)!=` `)return e;let r=le(e,4,n),i=``;for(let e=r;e>0;)e>=4?(i+=` `,e-=4):(i+=` `,e--);return i+e.slice(n)}var cy=(e={})=>({state:t,dispatch:n})=>{let r=p(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!ty.isActiveAt(t,n.from,-1)&&!ty.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=iy(r.resolveInner(o,-1),i);for(;c.length&&c[c.length-1].from>o-s.from;)c.pop();if(!c.length)return a={range:n};let l=c[c.length-1];if(l.to-l.spaceAfter.length>o-s.from)return a={range:n};let u=o>=l.to-l.spaceAfter.length&&!/\S/.test(s.text.slice(l.to));if(l.item&&u){if(l.item.from<s.from&&!/^[\s>]*$/.test(s.text.slice(0,l.to)))return a={range:n};let r=l.node.firstChild,u=l.node.getChild(`ListItem`,`ListItem`);if(r.to>=o||u&&u.to<o||s.from>0&&!/[^\s>]/.test(i.lineAt(s.from-1).text)||e.nonTightLists===!1){let e=c.length>1?c[c.length-2]:null,t,n=``;e&&e.item?(t=s.from+e.from,n=e.marker(i,1)):t=s.from+(e?e.to:0);let r=[{from:t,to:o,insert:n}];return l.node.name==`OrderedList`&&oy(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&oy(e.item,i,r),{range:h.cursor(t+n.length),changes:r}}{let e=fy(c,t,s);return{range:h.cursor(o+e.length+1),changes:{from:s.from,insert:e+t.lineBreak}}}}if(l.node.name==`Blockquote`&&u&&s.from){let e=i.lineAt(s.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==l.from){let i=t.changes([{from:e.from+r.index,to:e.to},{from:s.from+l.from,to:s.to}]);return{range:n.map(i),changes:i}}}let d=[];l.node.name==`OrderedList`&&oy(l.item,i,d);let f=l.item&&l.item.from<s.from,p=``;if(!f||/^[\s\d.)\-+*>]*/.exec(s.text)[0].length>=l.to)for(let e=0,t=c.length-1;e<=t;e++)p+=e==t&&!f?c[e].marker(i,1):c[e].blank(e<t?le(s.text,4,c[e+1].from)-p.length:null);let m=o;for(;m>s.from&&/\s/.test(s.text.charAt(m-s.from-1));)m--;return p=sy(p,t),dy(l.node,t.doc)&&(p=fy(c,t,s)+t.lineBreak+p),d.push({from:m,to:o,insert:t.lineBreak+p}),{range:h.cursor(m+p.length+1),changes:d}});return!a&&(n(t.update(o,{scrollIntoView:!0,userEvent:`input`})),!0)},ly=cy();function uy(e){return e.name==`QuoteMark`||e.name==`ListMark`}function dy(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+ +!o<a.number}function fy(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?le(n.text,4,e[t+1].from)-r.length:null,t<i);return sy(r,t)}function py(e,t){let n=e.resolveInner(t,-1),r=t;uy(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(uy(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var my=({state:e,dispatch:t})=>{let n=p(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&ty.isActiveAt(e,t.from)){let t=a.lineAt(i),r=iy(py(n,i),a);if(r.length){let n=r[r.length-1],a=n.to-n.spaceAfter.length+ +!!n.spaceAfter;if(i-t.from>a&&!/\S/.test(t.text.slice(a,i-t.from)))return{range:h.cursor(t.from+a),changes:{from:t.from+a,to:i}};if(i-t.from==a&&(n.item&&t.from<=n.item.from||/^[\s>]*$/.test(t.text.slice(0,n.to)))){let r=t.from+n.from;if(n.item&&n.node.from<n.item.from&&/\S/.test(t.text.slice(n.from,n.to))){let i=n.blank(le(t.text,4,n.to)-le(t.text,4,n.from));return r==t.from&&(i=sy(i,e)),{range:h.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:h.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return!r&&(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)},hy=[{key:`Enter`,run:ly},{key:`Backspace`,run:my}],gy=Uv({matchClosingTags:!1});function _y(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=ey,completeHTMLTags:a=!0,pasteURLAsLink:o=!0,htmlTagLanguage:s=gy}=e;if(!(i instanceof B_))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=e.extensions?[e.extensions]:[],l=[s.support,Qv],u;o&&l.push(Sy),n instanceof de?(l.push(n.support),u=n.language):n&&(u=n);let f=t||u?ny(t,u):void 0;c.push(gv({codeParser:f,htmlParser:s.language.parser})),r&&l.push(v.high(d.of(hy)));let p=$v(i.configure(c));return a&&l.push(p.data.of({autocomplete:vy})),new de(p,l)}function vy(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=p(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name==`CodeBlock`||i.name==`FencedCode`||i.name==`ProcessingInstructionBlock`||i.name==`CommentBlock`||i.name==`Link`||i.name==`Image`)return null;i=i.parent}return{from:n-r[0].length,to:n,options:by(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var yy=null;function by(){if(yy)return yy;let e=Wv(new ge(b.create({extensions:gy}),0,!0));return yy=e?e.options:[]}var xy=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,Sy=m.domEventHandlers({paste:(e,t)=>{let{main:n}=t.state.selection;if(n.empty)return!1;let r=e.clipboardData?.getData(`text/plain`);if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r=`https://`+r),!ty.isActiveAt(t.state,n.from,1)))return!1;let i=p(t.state),a=!1;return i.iterate({from:n.from,to:n.to,enter:e=>{(e.from>n.from||xy.test(e.name))&&(a=!0)},leave:e=>{e.to<n.to&&(a=!0)}}),!a&&(t.dispatch({changes:[{from:n.from,insert:`[`},{from:n.to,insert:`](${r})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}});function $(e){return new de(ne.define(e))}function Cy(e){return s(()=>import(`./DIGvaVgJ.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([0,1,2,3]),import.meta.url)}var wy=[x.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return s(()=>import(`./C6Btt2Xs.js`).then(e=>e.cpp()),__vite__mapDeps([4,1,3]),import.meta.url)}}),x.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return s(()=>import(`./C6Btt2Xs.js`).then(e=>e.cpp()),__vite__mapDeps([4,1,3]),import.meta.url)}}),x.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return Cy(`Cassandra`)}}),x.of({name:`CSS`,extensions:[`css`],load(){return s(()=>import(`./DtbnBenW.js`).then(e=>e.css()),__vite__mapDeps([5,1,3]),import.meta.url)}}),x.of({name:`Go`,extensions:[`go`],load(){return s(()=>import(`./D_aBVMvK.js`).then(e=>e.go()),__vite__mapDeps([6,1,2,3]),import.meta.url)}}),x.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return s(()=>Promise.resolve().then(()=>zv).then(e=>e.html()),void 0,import.meta.url)}}),x.of({name:`Java`,extensions:[`java`],load(){return s(()=>import(`./Bbt0DTmZ.js`).then(e=>e.java()),__vite__mapDeps([7,1,3]),import.meta.url)}}),x.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return s(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript()),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),x.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return s(()=>import(`./BXF2XoRC.js`).then(e=>e.jinja()),__vite__mapDeps([9,1,3]),import.meta.url)}}),x.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return s(()=>import(`./CDAjAYjS.js`).then(e=>e.json()),__vite__mapDeps([10,1,3]),import.meta.url)}}),x.of({name:`JSX`,extensions:[`jsx`],load(){return s(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),x.of({name:`LESS`,extensions:[`less`],load(){return s(()=>import(`./_rHYGvON.js`).then(e=>e.less()),__vite__mapDeps([11,1,3,5]),import.meta.url)}}),x.of({name:`Liquid`,extensions:[`liquid`],load(){return s(()=>import(`./DDuWClBR.js`).then(e=>e.liquid()),__vite__mapDeps([12,1,3]),import.meta.url)}}),x.of({name:`MariaDB SQL`,load(){return Cy(`MariaSQL`)}}),x.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return s(()=>Promise.resolve().then(()=>Gv).then(e=>e.markdown()),void 0,import.meta.url)}}),x.of({name:`MS SQL`,load(){return Cy(`MSSQL`)}}),x.of({name:`MySQL`,load(){return Cy(`MySQL`)}}),x.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return s(()=>import(`./GRrQoDGJ.js`).then(e=>e.php()),__vite__mapDeps([13,1,3]),import.meta.url)}}),x.of({name:`PLSQL`,extensions:[`pls`],load(){return Cy(`PLSQL`)}}),x.of({name:`PostgreSQL`,load(){return Cy(`PostgreSQL`)}}),x.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return s(()=>import(`./Bffqt7tx.js`).then(e=>e.python()),__vite__mapDeps([14,1,2,3]),import.meta.url)}}),x.of({name:`Rust`,extensions:[`rs`],load(){return s(()=>import(`./BWonG38x.js`).then(e=>e.rust()),__vite__mapDeps([15,1,3]),import.meta.url)}}),x.of({name:`Sass`,extensions:[`sass`],load(){return s(()=>import(`./BEHa2uNW.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([16,1,3,5]),import.meta.url)}}),x.of({name:`SCSS`,extensions:[`scss`],load(){return s(()=>import(`./BEHa2uNW.js`).then(e=>e.sass()),__vite__mapDeps([16,1,3,5]),import.meta.url)}}),x.of({name:`SQL`,extensions:[`sql`],load(){return Cy(`StandardSQL`)}}),x.of({name:`SQLite`,load(){return Cy(`SQLite`)}}),x.of({name:`TSX`,extensions:[`tsx`],load(){return s(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),x.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return s(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),x.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return s(()=>import(`./BPW39P52.js`).then(e=>e.wast()),__vite__mapDeps([17,1,3]),import.meta.url)}}),x.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return s(()=>import(`./Ds8Pkiic.js`).then(e=>e.xml()),__vite__mapDeps([18,1,3]),import.meta.url)}}),x.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return s(()=>import(`./CPF5uNy5.js`).then(e=>e.yaml()),__vite__mapDeps([19,1,3]),import.meta.url)}}),x.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return s(()=>import(`./gfMMiTNf.js`).then(e=>$(e.apl)),[],import.meta.url)}}),x.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return s(()=>import(`./C_eisQCp.js`).then(e=>$(e.asciiArmor)),[],import.meta.url)}}),x.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return s(()=>import(`./DCl_8MCW.js`).then(e=>$(e.asn1({}))),[],import.meta.url)}}),x.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return s(()=>import(`./BEn0Cwpx.js`).then(e=>$(e.asterisk)),[],import.meta.url)}}),x.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return s(()=>import(`./D5EjA2JK.js`).then(e=>$(e.brainfuck)),[],import.meta.url)}}),x.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return s(()=>import(`./DHLQUbN7.js`).then(e=>$(e.cobol)),[],import.meta.url)}}),x.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.csharp)),[],import.meta.url)}}),x.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return s(()=>import(`./BflJGmDX.js`).then(e=>$(e.clojure)),[],import.meta.url)}}),x.of({name:`ClojureScript`,extensions:[`cljs`],load(){return s(()=>import(`./BflJGmDX.js`).then(e=>$(e.clojure)),[],import.meta.url)}}),x.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return s(()=>import(`./CnaYoQib.js`).then(e=>$(e.gss)),[],import.meta.url)}}),x.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return s(()=>import(`./84nbDH0I.js`).then(e=>$(e.cmake)),[],import.meta.url)}}),x.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return s(()=>import(`./De_zI4J0.js`).then(e=>$(e.coffeeScript)),[],import.meta.url)}}),x.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return s(()=>import(`./DgAKBe0r.js`).then(e=>$(e.commonLisp)),[],import.meta.url)}}),x.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return s(()=>import(`./p9eYesGn.js`).then(e=>$(e.cypher)),[],import.meta.url)}}),x.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return s(()=>import(`./B_1Jd8HM.js`).then(e=>$(e.cython)),[],import.meta.url)}}),x.of({name:`Crystal`,extensions:[`cr`],load(){return s(()=>import(`./Bsdphhtm.js`).then(e=>$(e.crystal)),[],import.meta.url)}}),x.of({name:`D`,extensions:[`d`],load(){return s(()=>import(`./DWkQyNnU.js`).then(e=>$(e.d)),[],import.meta.url)}}),x.of({name:`Dart`,extensions:[`dart`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.dart)),[],import.meta.url)}}),x.of({name:`diff`,extensions:[`diff`,`patch`],load(){return s(()=>import(`./ChtP43wD.js`).then(e=>$(e.diff)),[],import.meta.url)}}),x.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return s(()=>import(`./DLa7NjNO.js`).then(e=>$(e.dockerFile)),__vite__mapDeps([20,21]),import.meta.url)}}),x.of({name:`DTD`,extensions:[`dtd`],load(){return s(()=>import(`./DTF72YNO.js`).then(e=>$(e.dtd)),[],import.meta.url)}}),x.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return s(()=>import(`./S7ucR4pR.js`).then(e=>$(e.dylan)),[],import.meta.url)}}),x.of({name:`EBNF`,load(){return s(()=>import(`./D4c0_ac3.js`).then(e=>$(e.ebnf)),[],import.meta.url)}}),x.of({name:`ECL`,extensions:[`ecl`],load(){return s(()=>import(`./BVIeWmwY.js`).then(e=>$(e.ecl)),[],import.meta.url)}}),x.of({name:`edn`,extensions:[`edn`],load(){return s(()=>import(`./BflJGmDX.js`).then(e=>$(e.clojure)),[],import.meta.url)}}),x.of({name:`Eiffel`,extensions:[`e`],load(){return s(()=>import(`./BEjRio4Q.js`).then(e=>$(e.eiffel)),[],import.meta.url)}}),x.of({name:`Elm`,extensions:[`elm`],load(){return s(()=>import(`./Cshzl8qu.js`).then(e=>$(e.elm)),[],import.meta.url)}}),x.of({name:`Erlang`,extensions:[`erl`],load(){return s(()=>import(`./BV0c4Hdn.js`).then(e=>$(e.erlang)),[],import.meta.url)}}),x.of({name:`Esper`,load(){return s(()=>import(`./DuQMFDvy.js`).then(e=>$(e.esper)),[],import.meta.url)}}),x.of({name:`Factor`,extensions:[`factor`],load(){return s(()=>import(`./CygcOYNo.js`).then(e=>$(e.factor)),__vite__mapDeps([22,21]),import.meta.url)}}),x.of({name:`FCL`,load(){return s(()=>import(`./ClOhbFR7.js`).then(e=>$(e.fcl)),[],import.meta.url)}}),x.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return s(()=>import(`./D6RzAl64.js`).then(e=>$(e.forth)),[],import.meta.url)}}),x.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return s(()=>import(`./Bt6PBEDR.js`).then(e=>$(e.fortran)),[],import.meta.url)}}),x.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return s(()=>import(`./B45xgp2S.js`).then(e=>$(e.fSharp)),[],import.meta.url)}}),x.of({name:`Gas`,extensions:[`s`],load(){return s(()=>import(`./BHEdbvp9.js`).then(e=>$(e.gas)),[],import.meta.url)}}),x.of({name:`Gherkin`,extensions:[`feature`],load(){return s(()=>import(`./oBAE_ms0.js`).then(e=>$(e.gherkin)),[],import.meta.url)}}),x.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return s(()=>import(`./CUpZ7dEl.js`).then(e=>$(e.groovy)),[],import.meta.url)}}),x.of({name:`Haskell`,extensions:[`hs`],load(){return s(()=>import(`./BRsoo5mP.js`).then(e=>$(e.haskell)),[],import.meta.url)}}),x.of({name:`Haxe`,extensions:[`hx`],load(){return s(()=>import(`./DjVOVvNP.js`).then(e=>$(e.haxe)),[],import.meta.url)}}),x.of({name:`HXML`,extensions:[`hxml`],load(){return s(()=>import(`./DjVOVvNP.js`).then(e=>$(e.hxml)),[],import.meta.url)}}),x.of({name:`HTTP`,load(){return s(()=>import(`./CLVgA2GD.js`).then(e=>$(e.http)),[],import.meta.url)}}),x.of({name:`IDL`,extensions:[`pro`],load(){return s(()=>import(`./BUZw3wgd.js`).then(e=>$(e.idl)),[],import.meta.url)}}),x.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return s(()=>import(`./Bu8mWwtz.js`).then(e=>$(e.jsonld)),[],import.meta.url)}}),x.of({name:`Julia`,extensions:[`jl`],load(){return s(()=>import(`./CQfgDRfP.js`).then(e=>$(e.julia)),[],import.meta.url)}}),x.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.kotlin)),[],import.meta.url)}}),x.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return s(()=>import(`./BXxG0Yva.js`).then(e=>$(e.liveScript)),[],import.meta.url)}}),x.of({name:`Lua`,extensions:[`lua`],load(){return s(()=>import(`./DPCEkfD_.js`).then(e=>$(e.lua)),[],import.meta.url)}}),x.of({name:`mIRC`,extensions:[`mrc`],load(){return s(()=>import(`./C9zpzAZU.js`).then(e=>$(e.mirc)),[],import.meta.url)}}),x.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return s(()=>import(`./u8YMmbU0.js`).then(e=>$(e.mathematica)),[],import.meta.url)}}),x.of({name:`Modelica`,extensions:[`mo`],load(){return s(()=>import(`./CqHI_q-D.js`).then(e=>$(e.modelica)),[],import.meta.url)}}),x.of({name:`MUMPS`,extensions:[`mps`],load(){return s(()=>import(`./BSzj6Xyz.js`).then(e=>$(e.mumps)),[],import.meta.url)}}),x.of({name:`Mbox`,extensions:[`mbox`],load(){return s(()=>import(`./BEMVcqjs.js`).then(e=>$(e.mbox)),[],import.meta.url)}}),x.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return s(()=>import(`./8H7HVH4w.js`).then(e=>$(e.nginx)),[],import.meta.url)}}),x.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return s(()=>import(`./GwMd3KmG.js`).then(e=>$(e.nsis)),__vite__mapDeps([23,21]),import.meta.url)}}),x.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return s(()=>import(`./CzMBulkp.js`).then(e=>$(e.ntriples)),[],import.meta.url)}}),x.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.objectiveC)),[],import.meta.url)}}),x.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.objectiveCpp)),[],import.meta.url)}}),x.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return s(()=>import(`./B45xgp2S.js`).then(e=>$(e.oCaml)),[],import.meta.url)}}),x.of({name:`Octave`,extensions:[`m`],load(){return s(()=>import(`./D2Q8cUp1.js`).then(e=>$(e.octave)),[],import.meta.url)}}),x.of({name:`Oz`,extensions:[`oz`],load(){return s(()=>import(`./BwTct_5T.js`).then(e=>$(e.oz)),[],import.meta.url)}}),x.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return s(()=>import(`./Dp_KdFgX.js`).then(e=>$(e.pascal)),[],import.meta.url)}}),x.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return s(()=>import(`./BkSkiI9m.js`).then(e=>$(e.perl)),[],import.meta.url)}}),x.of({name:`Pig`,extensions:[`pig`],load(){return s(()=>import(`./AF4Hwhju.js`).then(e=>$(e.pig)),[],import.meta.url)}}),x.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return s(()=>import(`./D8WpQPaX.js`).then(e=>$(e.powerShell)),[],import.meta.url)}}),x.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return s(()=>import(`./C357ku5U.js`).then(e=>$(e.properties)),[],import.meta.url)}}),x.of({name:`ProtoBuf`,extensions:[`proto`],load(){return s(()=>import(`./D1ij_kNL.js`).then(e=>$(e.protobuf)),[],import.meta.url)}}),x.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return s(()=>import(`./Cp5ooBfH.js`).then(e=>$(e.pug)),__vite__mapDeps([24,25]),import.meta.url)}}),x.of({name:`Puppet`,extensions:[`pp`],load(){return s(()=>import(`./BZyAS7I4.js`).then(e=>$(e.puppet)),[],import.meta.url)}}),x.of({name:`Q`,extensions:[`q`],load(){return s(()=>import(`./B9NhS7L_.js`).then(e=>$(e.q)),[],import.meta.url)}}),x.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return s(()=>import(`./CxDmU1I4.js`).then(e=>$(e.r)),[],import.meta.url)}}),x.of({name:`RPM Changes`,load(){return s(()=>import(`./gpDK5sbt.js`).then(e=>$(e.rpmChanges)),[],import.meta.url)}}),x.of({name:`RPM Spec`,extensions:[`spec`],load(){return s(()=>import(`./gpDK5sbt.js`).then(e=>$(e.rpmSpec)),[],import.meta.url)}}),x.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return s(()=>import(`./ChfNwlCY.js`).then(e=>$(e.ruby)),[],import.meta.url)}}),x.of({name:`SAS`,extensions:[`sas`],load(){return s(()=>import(`./C2OyD2Y6.js`).then(e=>$(e.sas)),[],import.meta.url)}}),x.of({name:`Scala`,extensions:[`scala`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.scala)),[],import.meta.url)}}),x.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return s(()=>import(`./D9qYN0V5.js`).then(e=>$(e.scheme)),[],import.meta.url)}}),x.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return s(()=>import(`./DwuoZtxw.js`).then(e=>$(e.shell)),[],import.meta.url)}}),x.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return s(()=>import(`./tLWDfEkZ.js`).then(e=>$(e.sieve)),[],import.meta.url)}}),x.of({name:`Smalltalk`,extensions:[`st`],load(){return s(()=>import(`./BLp5-jwC.js`).then(e=>$(e.smalltalk)),[],import.meta.url)}}),x.of({name:`Solr`,load(){return s(()=>import(`./B78wSQJQ.js`).then(e=>$(e.solr)),[],import.meta.url)}}),x.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return s(()=>import(`./B45xgp2S.js`).then(e=>$(e.sml)),[],import.meta.url)}}),x.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return s(()=>import(`./Dz-mlCAC.js`).then(e=>$(e.sparql)),[],import.meta.url)}}),x.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return s(()=>import(`./CTIncYxj.js`).then(e=>$(e.spreadsheet)),[],import.meta.url)}}),x.of({name:`Squirrel`,extensions:[`nut`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.squirrel)),[],import.meta.url)}}),x.of({name:`Stylus`,extensions:[`styl`],load(){return s(()=>import(`./BOVgKnng.js`).then(e=>$(e.stylus)),[],import.meta.url)}}),x.of({name:`Swift`,extensions:[`swift`],load(){return s(()=>import(`./DKB6_1j6.js`).then(e=>$(e.swift)),[],import.meta.url)}}),x.of({name:`sTeX`,load(){return s(()=>import(`./DNzd62Q_.js`).then(e=>$(e.stex)),[],import.meta.url)}}),x.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return s(()=>import(`./DNzd62Q_.js`).then(e=>$(e.stex)),[],import.meta.url)}}),x.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return s(()=>import(`./CjI9Y6RI.js`).then(e=>$(e.verilog)),[],import.meta.url)}}),x.of({name:`Tcl`,extensions:[`tcl`],load(){return s(()=>import(`./BGfruO1u.js`).then(e=>$(e.tcl)),[],import.meta.url)}}),x.of({name:`Textile`,extensions:[`textile`],load(){return s(()=>import(`./C4jVoHG1.js`).then(e=>$(e.textile)),[],import.meta.url)}}),x.of({name:`TiddlyWiki`,load(){return s(()=>import(`./VlUiK86J.js`).then(e=>$(e.tiddlyWiki)),[],import.meta.url)}}),x.of({name:`Tiki wiki`,load(){return s(()=>import(`./DTszW0OQ.js`).then(e=>$(e.tiki)),[],import.meta.url)}}),x.of({name:`TOML`,extensions:[`toml`],load(){return s(()=>import(`./BPTmHmyx.js`).then(e=>$(e.toml)),[],import.meta.url)}}),x.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return s(()=>import(`./C2dAgh7P.js`).then(e=>$(e.troff)),[],import.meta.url)}}),x.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return s(()=>import(`./PPSTk1ow.js`).then(e=>$(e.ttcn)),[],import.meta.url)}}),x.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return s(()=>import(`./2b4Gb5sE.js`).then(e=>$(e.ttcnCfg)),[],import.meta.url)}}),x.of({name:`Turtle`,extensions:[`ttl`],load(){return s(()=>import(`./Cx3rYX2g.js`).then(e=>$(e.turtle)),[],import.meta.url)}}),x.of({name:`Web IDL`,extensions:[`webidl`],load(){return s(()=>import(`./D5jiJvOU.js`).then(e=>$(e.webIDL)),[],import.meta.url)}}),x.of({name:`VB.NET`,extensions:[`vb`],load(){return s(()=>import(`./BthdM_4N.js`).then(e=>$(e.vb)),[],import.meta.url)}}),x.of({name:`VBScript`,extensions:[`vbs`],load(){return s(()=>import(`./D9f6rSsU.js`).then(e=>$(e.vbScript)),[],import.meta.url)}}),x.of({name:`Velocity`,extensions:[`vtl`],load(){return s(()=>import(`./CqftRsjg.js`).then(e=>$(e.velocity)),[],import.meta.url)}}),x.of({name:`Verilog`,extensions:[`v`],load(){return s(()=>import(`./CjI9Y6RI.js`).then(e=>$(e.verilog)),[],import.meta.url)}}),x.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return s(()=>import(`./kS471soi.js`).then(e=>$(e.vhdl)),[],import.meta.url)}}),x.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return s(()=>import(`./BKJx4mf9.js`).then(e=>$(e.xQuery)),[],import.meta.url)}}),x.of({name:`Yacas`,extensions:[`ys`],load(){return s(()=>import(`./CXXgtw0p.js`).then(e=>$(e.yacas)),[],import.meta.url)}}),x.of({name:`Z80`,extensions:[`z80`],load(){return s(()=>import(`./Co3PbHdE.js`).then(e=>$(e.z80)),[],import.meta.url)}}),x.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return s(()=>import(`./qgSLujhx.js`).then(e=>$(e.mscgen)),[],import.meta.url)}}),x.of({name:`Xù`,extensions:[`xu`],load(){return s(()=>import(`./qgSLujhx.js`).then(e=>$(e.xu)),[],import.meta.url)}}),x.of({name:`MsGenny`,extensions:[`msgenny`],load(){return s(()=>import(`./qgSLujhx.js`).then(e=>$(e.msgenny)),[],import.meta.url)}}),x.of({name:`Vue`,extensions:[`vue`],load(){return s(()=>import(`./DII7jNnq.js`).then(e=>e.vue()),__vite__mapDeps([26,1,3,8,2]),import.meta.url)}}),x.of({name:`Angular Template`,load(){return s(()=>import(`./B3aPQAYq.js`).then(e=>e.angular()),__vite__mapDeps([27,1,3,8,2]),import.meta.url)}})],Ty=se([{tag:g.keyword,class:`tok-k`},{tag:[g.string,g.regexp,g.special(g.string)],class:`tok-s`},{tag:[g.number,g.bool,g.null,g.atom],class:`tok-n`},{tag:[g.typeName,g.className,g.namespace],class:`tok-t`},{tag:g.comment,class:`tok-c`}]),Ey={style:e=>Ty.style(e),scope:e=>e.prop(f)!==ty.data};function Dy(e){let t=e.trim().split(/\s/)[0]??``;return t?x.matchLanguageName(wy,t,!1):null}var Oy=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`);function ky(e,t){let n=Dy(t)?.support;if(!n)return null;let r=``,i=fe(b.create({doc:e,extensions:[n]}),e.length,500)??n.language.parser.parse(e);return ce(e,i,Ey,(e,t)=>{r+=t?`<span class="${t}">${Oy(e)}</span>`:Oy(e)},()=>{r+=`
|
|
673
673
|
`}),r}async function Ay(e,t){let n=Dy(t);if(!n)return null;try{await n.load()}catch{return null}return ky(e,t)}function jy(e,t){let n=()=>{for(let t of e.querySelectorAll(`pre > code[class*='language-']:not([data-coloured])`)){let e=/language-(\S+)/.exec(t.className)?.[1]??``,n=t.textContent??``;t.dataset.coloured=``,Ay(n,e).then(e=>{e!==null&&t.textContent===n&&(t.innerHTML=e)})}};return n(),{update:n}}var My=new xc({html:!1,linkify:!0,typographer:!0}).use(vl.default,{engine:kh,delimiters:[`dollars`,`brackets`],katexOptions:{throwOnError:!1}});My.renderer.rules.table_open=()=>`<div class="table-wrap"><table>`,My.renderer.rules.table_close=()=>`</table></div>`;var Ny=My.utils.escapeHtml;My.renderer.rules.fence=(e,t)=>{let n=e[t],r=n.info.trim().split(/\s/)[0]??``;if(r.toLowerCase()===`mermaid`)return`<div class="diagram"><pre><code>${Ny(n.content)}</code></pre></div>\n`;let i=(r?ky(n.content.replace(/\n$/,``),r):null)??Ny(n.content.replace(/\n$/,``)),a=r?`<span class="code-lang">${Ny(r)}</span>`:``;return`<div class="code-block"><pre><code${r?` class="language-${Ny(r)}"`:``}>${i}</code></pre>${a}</div>\n`};var Py=My.renderer.rules.link_open??((e,t,n,r,i)=>i.renderToken(e,t,n));My.renderer.rules.link_open=(e,t,n,r,i)=>{let a=e[t],o=a.attrGet(`href`)??``;return/^https?:/i.test(o)?(a.attrSet(`target`,`_blank`),a.attrSet(`rel`,`noopener`)):o.startsWith(`/`)&&/\.md(#.*)?$/.test(o)&&a.attrSet(`href`,`#/n`+o.replace(/\.md(#.*)?$/,``)),Py(e,t,n,r,i)};function Fy(e){return s_.sanitize(My.render(e||``),{ADD_ATTR:[`target`]})}var Iy=null,Ly=()=>Iy??=s(()=>import(`./8wVGBFSs.js`).then(e=>e.t),__vite__mapDeps([28,29,30]),import.meta.url);function Ry(e,t){let n=kh.renderToString(e,{throwOnError:!1,output:`html`}),r=document.createElement(`span`);r.style.cssText=`position:absolute;visibility:hidden;left:-9999px;top:0;white-space:nowrap;font-size:${t}px`,r.innerHTML=n,document.body.append(r);let{width:i,height:a}=r.getBoundingClientRect();return r.remove(),i?{html:n,width:Math.ceil(i),height:Math.ceil(a)}:null}function zy(e){return s_.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0,html:!0},ADD_TAGS:[`foreignObject`],HTML_INTEGRATION_POINTS:{"annotation-xml":!0,foreignobject:!0},RETURN_DOM_FRAGMENT:!0})}var By={links:!1,images:!1,autoDirection:!0,zoom:!1,math:Ry,sanitize:zy,fontSize:12};async function Vy(e,t,n){return(await Ly()).mountAsync(e,t,n?{...By,onError:n}:By)}async function Hy(e,t){let n=await Ly();await n.load(n.detectType(t)),e.update(t)}function Uy(e,t){let n=()=>{for(let t of e.querySelectorAll(`div.diagram:not([data-drawn])`))t.dataset.drawn=``,Vy(t,t.textContent??``)};return n(),{update:n}}var Wy=`<svg viewBox="0 0 16 16" aria-hidden="true"><rect x="5.5" y="5.5" width="8" height="8"/><path d="M10.5 3.5v-1h-8v8h1"/></svg>`,Gy=`<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8.5l3 3 7-7"/></svg>`;function Ky(e){for(let t of e.querySelectorAll(`.code-block:not(:has(> .code-copy))`)){let e=document.createElement(`button`);e.type=`button`,e.className=`code-copy`,e.title=`Copy the code`,e.setAttribute(`aria-label`,`Copy the code`),e.innerHTML=Wy,e.addEventListener(`click`,()=>{let n=t.querySelector(`code`)?.textContent??``;navigator.clipboard?.writeText(n).then(()=>{e.classList.add(`done`),e.innerHTML=Gy,setTimeout(()=>{e.classList.remove(`done`),e.innerHTML=Wy},1500)},()=>void 0)}),t.insertBefore(e,t.querySelector(`.code-lang`))}}var qy=e=>typeof e==`object`&&!!e&&`copy`in e&&!!e.copy;function Jy(e,t){let n=t=>{jy(e),Uy(e),qy(t)&&Ky(e)};return n(t),{update:e=>n(e)}}export{Oc as A,Zc as C,Rc as D,Yc as E,oi as F,Ec as M,Tc as N,Ic as O,Sc as P,$c as S,al as T,Qc as _,Ey as a,el as b,ty as c,gl as d,hl as f,ol as g,cl as h,Fy as i,Cc as j,Fc as k,Uv as l,ul as m,Vy as n,wy as o,ml as p,Hy as r,_y as s,Jy as t,kh as u,Gc as v,Xc as w,nl as x,tl as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,D as t,F as n,H as r,I as i,L as a,P as o,Q as s,S as c,T as l,U as u,X as d,Y as f,at as p,d as m,dt as h,f as g,j as _,k as v,mt as y,nt as b,ot as x,q as S,tt as C,u as w}from"./nMarIA7J.js";import{t as T}from"./
|
|
1
|
+
import{$ as e,D as t,F as n,H as r,I as i,L as a,P as o,Q as s,S as c,T as l,U as u,X as d,Y as f,at as p,d as m,dt as h,f as g,j as _,k as v,mt as y,nt as b,ot as x,q as S,tt as C,u as w}from"./nMarIA7J.js";import{t as T}from"./CLkY0zVi.js";import"./xihTtKlq.js";import{i as E,r as D,t as O}from"./D-aFnd2T.js";import{t as k}from"./DRQEUdad.js";var A=_(`<p class="problem svelte-btgyzc" role="alert"> </p>`),j=_(`<form class="frame new svelte-btgyzc"><span class="frame-title">a new note</span> <label class="svelte-btgyzc"><span class="label">title</span> <input class="field" placeholder="Entropy" autocomplete="off"/></label> <label for="new-folder" class="svelte-btgyzc"><span class="label">folder</span></label> <!> <p class="faint path svelte-btgyzc"> </p> <!> <div class="row svelte-btgyzc"><button class="btn primary" type="submit">make it</button><button class="btn quiet" type="button">cancel</button></div></form>`),M=_(`<p class="soft empty svelte-btgyzc">This base has no notes yet. Make the first one.</p>`),N=_(`<span class="soft desc svelte-btgyzc"> </span>`),P=_(`<li class="svelte-btgyzc"><a class="svelte-btgyzc"><span class="serif title svelte-btgyzc"> </span><!></a></li>`),ee=_(`<section><h2 class="svelte-btgyzc"><span class="label"> </span><button class="btn quiet add svelte-btgyzc" type="button">+</button></h2> <ul class="svelte-btgyzc"></ul></section>`),te=_(`<li class="svelte-btgyzc"><a class="svelte-btgyzc"><span class="serif title svelte-btgyzc"> </span><span class="soft desc svelte-btgyzc"> </span></a></li>`),ne=_(`<section><h2 class="svelte-btgyzc"><span class="label">in the text</span></h2> <ul class="svelte-btgyzc"></ul></section>`),re=_(`<p class="soft empty svelte-btgyzc">No note matches.</p>`),ie=_(`<div class="notes svelte-btgyzc"><div class="top svelte-btgyzc"><label class="hidden-label" for="filter">Find a note</label> <input id="filter" class="field grow" type="search" placeholder="find a note" autocomplete="off"/> <button class="btn primary" type="button" data-tour="new-note">new note</button></div> <!> <!> <!> <!> <!></div>`);function F(o,_){x(_,!0);let F=e(``),I=e([]),L=e(!1),R=e(``),z=e(``),B=e(``),V=C(()=>a(F).trim().toLowerCase().split(/\s+/).filter(Boolean)),H=e=>a(V).every(t=>`${e.title}\n${e.id}\n${e.description}`.toLowerCase().includes(t)),U=C(()=>a(V).length?O.listing.notes.filter(H):O.listing.notes),ae=C(()=>{let e=new Map;if(!a(V).length)for(let t of O.listing.dirs)e.set(t,[]);for(let t of a(U))e.set(t.dir,[...e.get(t.dir)??[],t]);return[...e].sort(([e],[t])=>e<t?-1:+(e>t))}),W=C(()=>a(V).length?a(I).filter(e=>!a(U).some(t=>t.id===e.id)):[]);u(()=>{let e=a(F).trim();if(e.length<2){s(I,[]);return}let t=setTimeout(()=>{O.api.search(e).then(t=>{a(F).trim()===e&&s(I,t)},()=>void 0)},200);return()=>clearTimeout(t)});let G=C(()=>[a(z).trim().replace(/^\/+|\/+$/g,``),E(a(R))].filter(Boolean).join(`/`));function K(e=``){s(L,!0),s(z,e,!0),s(R,``),s(B,``)}async function oe(e){if(e.preventDefault(),!E(a(R)))s(B,`Give the note a title.`);else try{await O.api.createNote(a(G),`---\ntype: Concept\ntitle: ${JSON.stringify(a(R).trim())}\n---\n\n`),await O.refresh(),await T(D(a(G)))}catch(e){s(B,e.message,!0)}}var q=ie(),J=S(q),Y=d(S(J),2);m(Y),b(Y,!0);var se=d(Y,2);h(J);var X=d(J,2),ce=e=>{var o=j(),c=d(S(o),2),u=d(S(c),2);m(u),b(u,!0),h(c);var p=d(c,4);k(p,{id:`new-folder`,label:`folder`,placeholder:`none: the top of the base`,get value(){return a(z)},set value(e){s(z,e,!0)}});var g=d(p,2),_=f(g,!0),y=d(g,2),x=e=>{var n=A(),i=f(n,!0);r(()=>t(i,a(B))),v(e,n)};l(y,e=>{a(B)&&e(x)});var C=d(y,2),T=d(S(C));h(C),h(o),r(()=>t(_,a(G)?`${a(G)}.md`:` `)),i(`submit`,o,oe),w(u,()=>a(R),e=>s(R,e)),n(`click`,T,()=>s(L,!1)),v(e,o)};l(X,e=>{a(L)&&e(ce)});var Z=d(X,2),le=e=>{var t=M();v(e,t)};l(Z,e=>{!O.listing.notes.length&&!a(L)&&e(le)});var Q=d(Z,2);c(Q,17,()=>a(ae),([e,t])=>e,(e,i)=>{var o=C(()=>y(a(i),2));let s=()=>a(o)[0],u=()=>a(o)[1];var p=ee(),m=S(p),_=S(m),b=f(_,!0),x=d(_);h(m);var w=d(m,2);c(w,21,u,e=>e.id,(e,n)=>{var i=P(),o=S(i),s=S(o),c=f(s,!0),u=d(s),p=e=>{var i=N(),o=f(i,!0);r(()=>t(o,a(n).description)),v(e,i)};l(u,e=>{a(n).description&&e(p)}),h(o),h(i),r(e=>{g(o,`href`,e),t(c,a(n).title)},[()=>D(a(n).id)]),v(e,i)}),h(w),h(p),r(()=>{t(b,s()||`the top of the base`),g(x,`aria-label`,`New note in ${s()||`the top of the base`}`)}),n(`click`,x,()=>K(s())),v(e,p)});var $=d(Q,2),ue=e=>{var n=ne(),i=d(S(n),2);c(i,21,()=>a(W),e=>e.id,(e,n)=>{var i=te(),o=S(i),s=S(o),c=f(s,!0),l=d(s),u=f(l,!0);h(o),h(i),r(e=>{g(o,`href`,e),t(c,a(n).title),t(u,a(n).snippet)},[()=>D(a(n).id)]),v(e,i)}),h(i),h(n),v(e,n)};l($,e=>{a(W).length&&e(ue)});var de=d($,2),fe=e=>{var t=re();v(e,t)};l(de,e=>{a(V).length&&!a(U).length&&!a(W).length&&e(fe)}),h(q),w(Y,()=>a(F),e=>s(F,e)),n(`click`,se,()=>K()),v(o,q),p()}o([`click`]);export{F as t};
|