@glifox/gnosis 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,18 @@
1
- (function(u,B){typeof exports=="object"&&typeof module<"u"?B(exports,require("@codemirror/language-data"),require("@codemirror/lang-markdown"),require("@lezer/markdown"),require("@lezer/highlight"),require("@codemirror/view"),require("@codemirror/language"),require("codemirror"),require("@codemirror/state")):typeof define=="function"&&define.amd?define(["exports","@codemirror/language-data","@codemirror/lang-markdown","@lezer/markdown","@lezer/highlight","@codemirror/view","@codemirror/language","codemirror","@codemirror/state"],B):(u=typeof globalThis<"u"?globalThis:u||self,B(u.gnosis={},u.languageData,u.langMarkdown,u.markdown,u.highlight,u.view,u.language,u.codemirror,u.state))})(this,function(u,B,q,te,e,b,v,N,W){"use strict";var Xe=Object.defineProperty;var Ze=(u,B,q)=>B in u?Xe(u,B,{enumerable:!0,configurable:!0,writable:!0,value:q}):u[B]=q;var H=(u,B,q)=>Ze(u,typeof B!="symbol"?B+"":B,q);const i=e.Tag.define("none"),oe={props:[e.styleTags({"Blockquote/...":i,HorizontalRule:i,"ATXHeading1/... SetextHeading1/...":i,"ATXHeading2/... SetextHeading2/...":i,"ATXHeading3/...":i,"ATXHeading4/...":i,"ATXHeading5/...":i,"ATXHeading6/...":i,"Comment CommentBlock":i,Escape:i,Entity:i,"Emphasis/...":i,"StrongEmphasis/...":i,"Strikethrough/...":i,"TableHeader/...":i,"Link/... Image/...":i,"OrderedList/... BulletList/...":i,"BlockQuote/...":i,"InlineCode CodeText":i,"URL Autolink":i,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark StrikethroughMark":i,"CodeInfo LinkLabel TaskMarker TableDelimiter":i,LinkTitle:i,Paragraph:i})]},E=(r,a,o={})=>{const n=class{constructor(d){H(this,"decorations");H(this,"conf");this.conf=a,this.decorations=r(d,this.conf)}update(d){(d.docChanged||d.viewportChanged||d.selectionSet)&&(this.decorations=r(d.view,this.conf))}};return b.ViewPlugin.fromClass(n,{decorations:c=>c.decorations,...o})},T=(r,a,o)=>{const n=r.state.selection.ranges;for(let c of n)if(c.from>=a&&c.from<=o||c.to>=a&&c.to<=o||c.from<=a&&c.to>=o)return!0;return!1},A=(r,a)=>{for(const{from:o,to:n}of r.visibleRanges)v.syntaxTree(r.state).iterate({...a,from:o,to:n})};function ne(r,a,o,n=1){const c=m=>[(r[0]-(1-m)*a[0])/m,(r[1]-(1-m)*a[1])/m,(r[2]-(1-m)*a[2])/m];let d=o,s=c(d);const t=s.map((m,g)=>m<0&&a[g]>0?1-s[g]/a[g]:o),l=Math.max(...t);return l>d&&(d=Math.min(l,n),r=c(d)),s=s.map(m=>Math.round(m<0?0:m)),s.push(d),s}function se(r,a){const o=["Document"],n={},c={HorizontalRule:(s,t,l=!0)=>[b.Decoration.line({class:"hr "+(l?"sw":"")}).range(s),b.Decoration.mark({class:"mk"}).range(s,t)]},d=[];return A(r,{enter:({type:s,from:t,to:l})=>(s.name in c&&d.push(...c[s.name](t,l,T(r,t,l))),o.includes(s.name)||s.name in n)}),b.Decoration.set(d,!1)}const ce=r=>{const{color:a="black"}=r||{};return N.EditorView.baseTheme({".hr":{position:"relative"},".hr > .mk":{fontSize:"0"},".hr.sw > .mk":{fontSize:"inherit"},".hr::before":{content:'""',position:"absolute",width:"calc(100% - 12px)",height:".2ch",backgroundColor:a},"&.cm-focused .hr.sw::before":{width:"0",height:"0"}})},P=(r={})=>[E(se,{}),ce(r==null?void 0:r.color)];function le(r,a){const o=["FencedCode"],n={StrongEmphasis:(s=!0,t,l)=>b.Decoration.mark({class:"il st "+(s?"sw":"")}).range(t,l),Strikethrough:(s=!0,t,l)=>b.Decoration.mark({class:"il sk "+(s?"sw":"")}).range(t,l),InlineCode:(s=!0,t,l)=>b.Decoration.mark({class:"il ic "+(s?"sw":"")}).range(t,l),Emphasis:(s=!0,t,l)=>b.Decoration.mark({class:"il it "+(s?"sw":"")}).range(t,l),Mark:(s,t)=>b.Decoration.mark({class:"mkl"}).range(s,t)},c=["EmphasisMark","CodeMark","StrikethroughMark"],d=[];return A(r,{enter:({type:{name:s},from:t,to:l})=>c.includes(s)?(d.push(n.Mark(t,l)),!1):(s in n&&d.push(n[s](T(r,t,l),t,l)),!o.includes(s))}),b.Decoration.set(d,!1)}const de=N.EditorView.baseTheme({".it ":{fontStyle:"italic"},".st ":{fontWeight:"bold"},".sk ":{textDecoration:"line-through"},".ic ":{fontFamily:"monospace",paddingInline:".6ch",borderRadius:".6ch"}}),be=N.EditorView.baseTheme({".il .mkl":{fontSize:"0"},"&.cm-focused .il.sw .mkl":{fontSize:"inherit"}}),I=(r={})=>{const{hideMarks:a=!0}=r;return[E(le,{}),de,a?be:[]]};class me extends b.WidgetType{constructor(o){super();H(this,"checked",!1);this.checked=o}toDOM(){let o=document.createElement("span");o.setAttribute("aria-hidden","true"),o.className="TaskMark";let n=o.appendChild(document.createElement("input"));return n.type="checkbox",n.checked=this.checked,o}ignoreEvent(){return!1}}function ge(r,a){const o=["Document","ListItem","Task"],n={BulletList:"bl",OrderedList:"ol"},c={ListMark:(t,l,m,g=!0)=>b.Decoration.mark({class:`${m} lm ${g?"sw":""}`}).range(t,l),TaskMarker:(t,l,m,g=!0)=>{const f=r.state.doc.sliceString(t+1,l-1)==="x";return g?b.Decoration.mark({class:`tm ${f?"ck":""}`}).range(t,l):b.Decoration.replace({widget:new me(f)}).range(t,l)}},d=[],s=[];return A(r,{enter:({type:t,from:l,to:m})=>t.name in n?(s.push({name:t.name,from:l,to:m}),!0):(t.name in c&&d.push(c[t.name](l,m,n[s.slice(-1)[0].name],T(r,l,m))),o.includes(t.name)),leave:({type:{name:t},from:l,to:m})=>{const g=s.slice(-1)[0];g&&g.name===t&&g.from===l&&g.to===m&&s.pop()}}),b.Decoration.set(d,!1)}const ue=(r,a)=>{var n;let o=r.target;if(o.nodeName==="INPUT"&&((n=o.parentElement)!=null&&n.classList.contains("TaskMark")))return fe(a,a.posAtDOM(o))},fe=(r,a)=>{const o=a-2,n=a-1;let c=r.state.doc.sliceString(Math.max(0,o),n),d;if(c==="x")d={from:o,to:n,insert:" "};else if(c===" ")d={from:o,to:n,insert:"x"};else return!1;return r.dispatch({changes:d}),!0},ie=r=>{const{color:a="black"}=r||{};return N.EditorView.baseTheme({".lm.bl":{position:"relative",paddingInlineStart:"1ch",color:"transparent"},".lm.bl::before":{content:'""',display:"inline",position:"absolute",backgroundColor:a,borderRadius:"50%",top:"50%",left:".5ch",transform:"translate(0, -50%)",height:".4em",width:".4em"},"&light .lm.bl::before":{backgroundColor:"black"},"&dark .lm.bl::before":{backgroundColor:"white"},"&.cm-focused .lm.bl.sw, &.cm-focused .lm.bl.sw::before":{backgroundColor:"transparent",color:"inherit"}})},$=(r={})=>[E(ge,{},{eventHandlers:{mousedown:ue}}),ie(r==null?void 0:r.color)],pe=(r,a)=>{var n;let o=r.target;if(o.nodeName==="BUTTON"&&((n=o.parentElement)!=null&&n.classList.contains("wg-codeblock"))){const c=["FencedCode","CodeBlock"];let d="";const s={enter:({type:{name:t},from:l,to:m,node:g})=>(c.includes(t)&&(d=ke(a,g.toTree(),l,m)),!c.includes(t))};return v.syntaxTree(a.state).iterate({...s,from:a.posAtDOM(o),to:a.posAtDOM(o)+2}),navigator.clipboard.writeText(d),!0}},ke=(r,a,o,n)=>{const c=["CodeMark","CodeInfo"];let d=r.state.doc.sliceString(o,n),s=new Set;a.iterate({enter({type:{name:g},from:f,node:C}){c.includes(g)&&s.add(r.state.doc.lineAt(f+o).number)}});const t=r.state.doc.lineAt(o),l=o-t.from,m=[];return d.split(`
2
- `).forEach((g,f)=>{s.has(f+t.number)||m.push(g.slice(l))}),m.join(`
3
- `)};class G extends b.WidgetType{constructor(o,n,c){super();H(this,"classes","");this.classes=o,this.width=n,this.marginLeft=c}toDOM(){let o=document.createElement("span");return o.setAttribute("aria-hidden","true"),o.className=this.classes+" vacio",o.textContent=" ",o.style.width=this.width,o.style.marginLeft=this.marginLeft,o}ignoreEvent(){return!1}}const xe=r=>`<svg class="cb-icon" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ (function(i,B){typeof exports=="object"&&typeof module<"u"?B(exports,require("@codemirror/language-data"),require("@codemirror/lang-markdown"),require("@lezer/markdown"),require("@lezer/highlight"),require("@codemirror/view"),require("@codemirror/language"),require("codemirror"),require("@codemirror/state")):typeof define=="function"&&define.amd?define(["exports","@codemirror/language-data","@codemirror/lang-markdown","@lezer/markdown","@lezer/highlight","@codemirror/view","@codemirror/language","codemirror","@codemirror/state"],B):(i=typeof globalThis<"u"?globalThis:i||self,B(i.gnosis={},i.languageData,i.langMarkdown,i.markdown,i.highlight,i.view,i.language,i.codemirror,i.state))})(this,function(i,B,M,ae,e,b,v,L,O){"use strict";var Ue=Object.defineProperty;var Xe=(i,B,M)=>B in i?Ue(i,B,{enumerable:!0,configurable:!0,writable:!0,value:M}):i[B]=M;var A=(i,B,M)=>Xe(i,typeof B!="symbol"?B+"":B,M);const p=e.Tag.define("none"),te={props:[e.styleTags({"Blockquote/...":p,HorizontalRule:p,"ATXHeading1/... SetextHeading1/...":p,"ATXHeading2/... SetextHeading2/...":p,"ATXHeading3/...":p,"ATXHeading4/...":p,"ATXHeading5/...":p,"ATXHeading6/...":p,"Comment CommentBlock":p,Escape:p,Entity:p,"Emphasis/...":p,"StrongEmphasis/...":p,"Strikethrough/...":p,"TableHeader/...":p,"Link/... Image/...":p,"OrderedList/... BulletList/...":p,"BlockQuote/...":p,"InlineCode CodeText":p,"URL Autolink":p,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark StrikethroughMark":p,"CodeInfo LinkLabel TaskMarker TableDelimiter":p,LinkTitle:p,Paragraph:p,"QuoteType/.. QuoteTypeMark QuoteTypeText":p})]},E=(a,r,t={})=>{const o=class{constructor(d){A(this,"decorations");A(this,"conf");this.conf=r,this.decorations=a(d,this.conf)}update(d){(d.docChanged||d.viewportChanged||d.selectionSet)&&(this.decorations=a(d.view,this.conf))}};return b.ViewPlugin.fromClass(o,{decorations:c=>c.decorations,...t})},q=(a,r,t)=>{const o=a.state.selection.ranges;for(let c of o)if(c.from>=r&&c.from<=t||c.to>=r&&c.to<=t||c.from<=r&&c.to>=t)return!0;return!1},T=(a,r)=>{for(const{from:t,to:o}of a.visibleRanges)v.syntaxTree(a.state).iterate({...r,from:t,to:o})};function oe(a,r,t,o=1){const c=g=>[(a[0]-(1-g)*r[0])/g,(a[1]-(1-g)*r[1])/g,(a[2]-(1-g)*r[2])/g];let d=t,s=c(d);const n=s.map((g,m)=>g<0&&r[m]>0?1-s[m]/r[m]:t),l=Math.max(...n);return l>d&&(d=Math.min(l,o),a=c(d)),s=s.map(g=>Math.round(g<0?0:g)),s.push(d),s}function ne(a,r){const t=["Document"],o={},c={HorizontalRule:(s,n,l=!0)=>[b.Decoration.line({class:"hr "+(l?"sw":"")}).range(s),b.Decoration.mark({class:"mk"}).range(s,n)]},d=[];return T(a,{enter:({type:s,from:n,to:l})=>(s.name in c&&d.push(...c[s.name](n,l,q(a,n,l))),t.includes(s.name)||s.name in o)}),b.Decoration.set(d,!1)}const se=a=>{const{color:r="black"}=a||{};return L.EditorView.baseTheme({".hr":{position:"relative"},".hr > .mk":{fontSize:"0"},".hr.sw > .mk":{fontSize:"inherit"},".hr::before":{content:'""',position:"absolute",width:"calc(100% - 12px)",height:".2ch",backgroundColor:r},"&.cm-focused .hr.sw::before":{width:"0",height:"0"}})},R=(a={})=>[E(ne,{}),se(a==null?void 0:a.color)];function ce(a,r){const t=["FencedCode"],o={StrongEmphasis:(s=!0,n,l)=>b.Decoration.mark({class:"il st "+(s?"sw":"")}).range(n,l),Strikethrough:(s=!0,n,l)=>b.Decoration.mark({class:"il sk "+(s?"sw":"")}).range(n,l),InlineCode:(s=!0,n,l)=>b.Decoration.mark({class:"il ic "+(s?"sw":"")}).range(n,l),Emphasis:(s=!0,n,l)=>b.Decoration.mark({class:"il it "+(s?"sw":"")}).range(n,l),Mark:(s,n)=>b.Decoration.mark({class:"mkl"}).range(s,n)},c=["EmphasisMark","CodeMark","StrikethroughMark"],d=[];return T(a,{enter:({type:{name:s},from:n,to:l})=>c.includes(s)?(d.push(o.Mark(n,l)),!1):(s in o&&d.push(o[s](q(a,n,l),n,l)),!t.includes(s))}),b.Decoration.set(d,!1)}const le=L.EditorView.baseTheme({".it ":{fontStyle:"italic"},".st ":{fontWeight:"bold"},".sk ":{textDecoration:"line-through"},".ic ":{fontFamily:"monospace",paddingInline:".6ch",borderRadius:".6ch"}}),de=L.EditorView.baseTheme({".il .mkl":{fontSize:"0"},"&.cm-focused .il.sw .mkl":{fontSize:"inherit"}}),W=(a={})=>{const{hideMarks:r=!0}=a;return[E(ce,{}),le,r?de:[]]};class ge extends b.WidgetType{constructor(t){super();A(this,"checked",!1);this.checked=t}toDOM(){let t=document.createElement("span");t.setAttribute("aria-hidden","true"),t.className="TaskMark";let o=t.appendChild(document.createElement("input"));return o.type="checkbox",o.checked=this.checked,t}ignoreEvent(){return!1}}function be(a,r){const t=["Document","ListItem","Task","Blockquote"],o={BulletList:{class:"bl",offset:2},OrderedList:{class:"ol",offset:3}},c={ListMark:(l,g,m,u=!0)=>b.Decoration.mark({class:`${m.class} lm ${u?"sw":""}`}).range(l,g),TaskMarker:(l,g,m,u=!0)=>{const C=a.state.doc.sliceString(l+1,g-1)==="x";return u?b.Decoration.mark({class:`tm ${C?"ck":""}`}).range(l,g):b.Decoration.replace({widget:new ge(C)}).range(l,g)}},d={ListItem:(l,g,m,u)=>{const C=m.offset+(u?4:0),k=l+C,f=`calc(100% - ${Math.max(0,C)+4}ch)`;return k>=g?[]:[b.Decoration.mark({class:"ls-text-line",attributes:{style:`width: ${f}`}}).range(k,g)]}},s=[],n=[];return T(a,{enter:({name:l,from:g,to:m,node:u})=>l in o?(n.push({name:l,from:g,to:m}),!0):(l in c&&s.push(c[l](g,m,o[n.slice(-1)[0].name],q(a,g,m))),l in d&&(console.log({node:u,name:l}),s.push(...d[l](g,m,o[n.slice(-1)[0].name],u.getChild("Task")!==null))),t.includes(l)),leave:({name:l,from:g,to:m})=>{const u=n.slice(-1)[0];u&&u.name===l&&u.from===g&&u.to===m&&n.pop()}}),b.Decoration.set(s,!0)}const me=(a,r)=>{var o;let t=a.target;if(t.nodeName==="INPUT"&&((o=t.parentElement)!=null&&o.classList.contains("TaskMark")))return ue(r,r.posAtDOM(t))},ue=(a,r)=>{const t=r-2,o=r-1;let c=a.state.doc.sliceString(Math.max(0,t),o),d;if(c==="x")d={from:t,to:o,insert:" "};else if(c===" ")d={from:t,to:o,insert:"x"};else return!1;return a.dispatch({changes:d}),!0},fe=a=>{const{color:r="black"}=a||{};return L.EditorView.baseTheme({"& .lm.bl":{position:"relative",paddingInlineStart:"1ch",color:"transparent"},"& .lm.bl::before":{content:'""',display:"inline",position:"absolute",backgroundColor:r,borderRadius:"50%",top:"50%",left:".5ch",transform:"translate(0, -50%)",height:".4em",width:".4em"},"&light .lm.bl::before":{backgroundColor:"black"},"&dark .lm.bl::before":{backgroundColor:"white"},"&.cm-focused .lm.bl.sw, &.cm-focused .lm.bl.sw::before":{backgroundColor:"transparent",color:"inherit"},"& .ls-text-line":{display:"inline-block",ariaHidden:"true"},"& .cm-line .lm, & .cm-line .TaskMark, & .cm-line .tm, & .cm-line .ls-text-line":{verticalAlign:"top"}})},P=(a={})=>[E(be,{},{eventHandlers:{mousedown:me}}),fe(a==null?void 0:a.color)],ie=(a,r)=>{var o;let t=a.target;if(t.nodeName==="BUTTON"&&((o=t.parentElement)!=null&&o.classList.contains("wg-codeblock"))){const c=["FencedCode","CodeBlock"];let d="";const s={enter:({type:{name:n},from:l,to:g,node:m})=>(c.includes(n)&&(d=pe(r,m.toTree(),l,g)),!c.includes(n))};return v.syntaxTree(r.state).iterate({...s,from:r.posAtDOM(t),to:r.posAtDOM(t)+2}),navigator.clipboard.writeText(d),!0}},pe=(a,r,t,o)=>{const c=["CodeMark","CodeInfo"];let d=a.state.doc.sliceString(t,o),s=new Set;r.iterate({enter({type:{name:m},from:u,node:C}){c.includes(m)&&s.add(a.state.doc.lineAt(u+t).number)}});const n=a.state.doc.lineAt(t),l=t-n.from,g=[];return d.split(`
2
+ `).forEach((m,u)=>{s.has(u+n.number)||g.push(m.slice(l))}),g.join(`
3
+ `)};class Q extends b.WidgetType{constructor(t,o,c){super();A(this,"classes","");this.classes=t,this.width=o,this.marginLeft=c}toDOM(){let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.className=this.classes+" vacio",t.textContent=" ",t.style.width=this.width,t.style.marginLeft=this.marginLeft,t}ignoreEvent(){return!1}}const ke=a=>`<svg class="cb-icon" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
4
4
  <path class="cb-icon-path cb.i1" fill-rule="evenodd" clip-rule="evenodd" d="M15 0C15.5304 0 16.0391 0.210714 16.4142 0.585786C16.7893 0.960859 17 1.46957 17 2V12C17 12.5304 16.7893 13.0391 16.4142 13.4142C16.0391 13.7893 15.5304 14 15 14H14V6C14 4.93913 13.5786 3.92172 12.8284 3.17157C12.0783 2.42143 11.0609 2 10 2H7C6.64895 1.99924 6.30395 2.09135 6 2.267V2C6 1.46957 6.21071 0.960859 6.58579 0.585786C6.96086 0.210714 7.46957 0 8 0H15Z"/>
5
5
  <path class="cb-icon-path cb.i1" fill-rule="evenodd" clip-rule="evenodd" d="M5 4.054V8H1.2C1.27464 7.84448 1.3691 7.69928 1.481 7.568L3.941 4.698C4.2169 4.37661 4.58771 4.15111 5 4.054ZM7 4V8C7 8.53043 6.78929 9.03914 6.41421 9.41421C6.03914 9.78929 5.53043 10 5 10H1V16C1 16.5304 1.21071 17.0391 1.58579 17.4142C1.96086 17.7893 2.46957 18 3 18H10C10.5304 18 11.0391 17.7893 11.4142 17.4142C11.7893 17.0391 12 16.5304 12 16V6C12 5.46957 11.7893 4.96086 11.4142 4.58579C11.0391 4.21071 10.5304 4 10 4H7Z"/>
6
- </svg>`;class ye extends b.WidgetType{constructor(a,o){super(),this.type=a,this.code=o}toDOM(){let a=document.createElement("span");a.setAttribute("aria-hidden","true"),a.className="wg-codeblock";let o=document.createElement("button");return o.className="wg-codeblock-btn",o.innerHTML=xe(),a.appendChild(o),a}ignoreEvent(){return!1}}const O=[];function Q(r,a){const{mode:o}=a,n=["Document","Blockquote","ListItem","BulletList","OrderedList"],c={FencedCode:j,CodeBlock:j},d={CodeMark:(t,l,m)=>[b.Decoration.mark({class:"cb-mk"}).range(l,m)],CodeInfo:(t,l,m)=>[b.Decoration.mark({class:"cb-mi"}).range(l,m)]},s=[];return A(r,{enter:({type:{name:t},from:l,to:m})=>(o==="type"&&t in c&&s.push(...c[t](r,l,m)),o==="mark"&&t in d&&s.push(...d[t](r,l,m)),n.includes(t)||t in c?(O.push({name:t,from:l,to:m}),!0):!1),Leave:({type:{name:t},from:l,to:m})=>n.includes(t)||t in c?(O.pop(),!0):!1}),{type:b.Decoration.set(s,!0),mark:b.Decoration.set(s,!0)}[o]}const j=(r,a,o)=>{const n=[],c=O[O.length-1],d=["BulletList","OrderedList","ListItem"].some(k=>k===c.name),s=["Blockquote"].some(k=>k===c.name),t=r.state.doc.lineAt(a),l=a-t.from,m=l>0,g=T(r,t.from,o);g||n.push(b.Decoration.widget({widget:new ye("view.state.sliceDoc(from, to)","code"),side:0}).range(a+1));const f=t.number,C=r.state.doc.sliceString(a,o).split(`
7
- `).length;for(let k=f;k<C+f;k++){const{from:p,to:w}=r.state.doc.line(k),D="100% - 1.2ch",F=["cb-content"];g&&F.push("sw"),k===f&&F.push("cb-start"),k===C+f-1&&F.push("cb-end");const x=Math.max(p+l,0);if(w<x)F.push("free"),n.push(b.Decoration.widget({widget:new G(F.join(" "),`calc(${D} - ${x-p}ch)`,`calc(${x-w}ch + 2px)`),side:1}).range(w)),console.log("Hello World");else if(x===w)F.push("wg"),n.push(b.Decoration.widget({widget:new G(F.join(" "),`calc(${D} - ${x-p}ch)`),side:1}).range(x));else if(d||s||m){const L={style:`width: calc(${D} - ${x-p}ch)`};w>x&&n.push(b.Decoration.mark({class:F.join(" "),attributes:L}).range(x,w)),p!==x&&d&&n.push(b.Decoration.mark({class:"cb-listsp"}).range(p,x)),p!==x&&m&&n.push(b.Decoration.mark({class:"cb-spacer"}).range(p,x)),p!==x&&s&&n.push(b.Decoration.mark({class:"cb-quote bq"}).range(p,x))}else if(p!==w){const L={style:`width: calc(${D})`};n.push(b.Decoration.mark({class:F.join(" "),attributes:L}).range(p,w))}n.push(b.Decoration.line({class:"cb-line"}).range(p))}return n},Fe=()=>{const n="4px",c="1lh";return N.EditorView.baseTheme({".cb-start":{borderRadius:`${n} ${n} 0 0`},".cb-end ":{borderRadius:`0 0 ${n} ${n}`},".cb-start.cb-end":{borderRadius:`${n}`},".cb-content":{display:"inline-block",marginLeft:"2px",paddingLeft:"6px",paddingRigth:"0px",position:"relative"},".cb-content.wg":{cursor:"text"},".cb-content.wg.start":{maxWidth:"1px",Width:"1px",paddingLeft:"5px"},".cb-content.wg.end":{marginLeft:"0",paddingLeft:"0"},".cb-mi, .cb-mk":{color:"transparent"},"&.cm-focused .cb-content.sw > .cb-mi, &.cm-focused .cb-content.sw > .cb-mk":{color:"inherit"},"&.cm-focused .cb-content.sw .wg-codeblock":{display:"none",opacity:"0"},".wg-codeblock":{display:"inline-block",position:"absolute",top:"0",right:"0",zIndex:"100",margin:".05lh"},".wg-codeblock-btn":{padding:"0",display:"inline-flex",borderRadius:"999999px",background:"transparent",border:"none",outline:"none",justifyContent:"center",alignItems:"center",height:`calc(${c} + 4px )`,width:"5ch"},".cb-icon":{width:c,height:c,pointerEvents:"none",fill:"currentColor",opacity:"0.7"},".wg-codeblock-btn:hover":{background:"rgba(0, 0, 0, 0.07)"},".wg-codeblock-btn:hover .cb-icon":{opacity:"1"},".cb-content.cb-start.cb-end .wg-codeblock":{marginTop:"0",marginBottom:"0",top:"0",bottom:"0"},".cb-content.cb-start.cb-end .wg-codeblock-btn":{boxSizing:"border-box",maxHeight:"100%",width:"5ch"}})},V=r=>[E(Q,{mode:"mark"}),E(Q,{mode:"type"},{eventHandlers:{mousedown:pe}}),Fe()];function Be(r,a){const o=["Document"],n={ATXHeading1:(s,t=!0)=>b.Decoration.line({class:"h1 hg "+(t?"sw":"")}).range(s),ATXHeading2:(s,t=!0)=>b.Decoration.line({class:"h2 hg "+(t?"sw":"")}).range(s),ATXHeading3:(s,t=!0)=>b.Decoration.line({class:"h3 hg "+(t?"sw":"")}).range(s),ATXHeading4:(s,t=!0)=>b.Decoration.line({class:"h4 hg "+(t?"sw":"")}).range(s),ATXHeading5:(s,t=!0)=>b.Decoration.line({class:"h5 hg "+(t?"sw":"")}).range(s),ATXHeading6:(s,t=!0)=>b.Decoration.line({class:"h6 hg "+(t?"sw":"")}).range(s)},c={HeaderMark:(s,t)=>b.Decoration.mark({class:"mk"}).range(s,t)},d=[];return A(r,{enter:({type:s,from:t,to:l})=>(s.name in n&&d.push(n[s.name](t,T(r,t,l))),s.name in c&&d.push(c[s.name](t,l+1)),o.includes(s.name)||s.name in n)}),b.Decoration.set(d,!1)}const Ce=N.EditorView.baseTheme({".h1 ":{fontSize:"2.6rem"},".h2 ":{fontSize:"2.0rem"},".h3 ":{fontSize:"1.8rem"},".h4 ":{fontSize:"1.6rem"},".h5 ":{fontSize:"1.4rem"},".h6 ":{fontSize:"1.2rem"}}),we=N.EditorView.baseTheme({".hg .mk":{fontSize:"0"},"&.cm-focused .hg.sw .mk":{fontSize:"inherit"}}),z=(r={})=>[E(Be,{}),Ce,we],Ne={version:"1.7.1",latte:{name:"Latte",emoji:"🌻",order:0,dark:!1,colors:{rosewater:{name:"Rosewater",order:0,hex:"#dc8a78",rgb:{r:220,g:138,b:120},hsl:{h:10.799999999999995,s:.5882352941176472,l:.6666666666666667},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#dd7878",rgb:{r:221,g:120,b:120},hsl:{h:0,s:.5976331360946746,l:.6686274509803922},accent:!0},pink:{name:"Pink",order:2,hex:"#ea76cb",rgb:{r:234,g:118,b:203},hsl:{h:316.0344827586207,s:.7341772151898731,l:.6901960784313725},accent:!0},mauve:{name:"Mauve",order:3,hex:"#8839ef",rgb:{r:136,g:57,b:239},hsl:{h:266.0439560439561,s:.8504672897196262,l:.5803921568627451},accent:!0},red:{name:"Red",order:4,hex:"#d20f39",rgb:{r:210,g:15,b:57},hsl:{h:347.0769230769231,s:.8666666666666666,l:.4411764705882353},accent:!0},maroon:{name:"Maroon",order:5,hex:"#e64553",rgb:{r:230,g:69,b:83},hsl:{h:354.78260869565213,s:.76303317535545,l:.5862745098039216},accent:!0},peach:{name:"Peach",order:6,hex:"#fe640b",rgb:{r:254,g:100,b:11},hsl:{h:21.975308641975307,s:.9918367346938776,l:.5196078431372549},accent:!0},yellow:{name:"Yellow",order:7,hex:"#df8e1d",rgb:{r:223,g:142,b:29},hsl:{h:34.948453608247426,s:.7698412698412698,l:.49411764705882355},accent:!0},green:{name:"Green",order:8,hex:"#40a02b",rgb:{r:64,g:160,b:43},hsl:{h:109.23076923076923,s:.5763546798029556,l:.39803921568627454},accent:!0},teal:{name:"Teal",order:9,hex:"#179299",rgb:{r:23,g:146,b:153},hsl:{h:183.23076923076923,s:.7386363636363636,l:.34509803921568627},accent:!0},sky:{name:"Sky",order:10,hex:"#04a5e5",rgb:{r:4,g:165,b:229},hsl:{h:197.0666666666667,s:.965665236051502,l:.45686274509803926},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#209fb5",rgb:{r:32,g:159,b:181},hsl:{h:188.85906040268458,s:.6995305164319249,l:.4176470588235294},accent:!0},blue:{name:"Blue",order:12,hex:"#1e66f5",rgb:{r:30,g:102,b:245},hsl:{h:219.90697674418607,s:.9148936170212768,l:.5392156862745098},accent:!0},lavender:{name:"Lavender",order:13,hex:"#7287fd",rgb:{r:114,g:135,b:253},hsl:{h:230.93525179856115,s:.9720279720279721,l:.7196078431372549},accent:!0},text:{name:"Text",order:14,hex:"#4c4f69",rgb:{r:76,g:79,b:105},hsl:{h:233.79310344827587,s:.16022099447513813,l:.3549019607843137},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#5c5f77",rgb:{r:92,g:95,b:119},hsl:{h:233.33333333333334,s:.1279620853080569,l:.4137254901960784},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#6c6f85",rgb:{r:108,g:111,b:133},hsl:{h:232.79999999999998,s:.10373443983402494,l:.4725490196078431},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#7c7f93",rgb:{r:124,g:127,b:147},hsl:{h:232.17391304347825,s:.09623430962343092,l:.5313725490196078},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#8c8fa1",rgb:{r:140,g:143,b:161},hsl:{h:231.42857142857144,s:.10047846889952144,l:.5901960784313726},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#9ca0b0",rgb:{r:156,g:160,b:176},hsl:{h:228.00000000000003,s:.11235955056179768,l:.6509803921568628},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#acb0be",rgb:{r:172,g:176,b:190},hsl:{h:226.6666666666667,s:.12162162162162159,l:.7098039215686275},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#bcc0cc",rgb:{r:188,g:192,b:204},hsl:{h:225.00000000000003,s:.13559322033898308,l:.7686274509803922},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#ccd0da",rgb:{r:204,g:208,b:218},hsl:{h:222.85714285714292,s:.1590909090909089,l:.8274509803921568},accent:!1},base:{name:"Base",order:23,hex:"#eff1f5",rgb:{r:239,g:241,b:245},hsl:{h:220.00000000000009,s:.23076923076923136,l:.9490196078431372},accent:!1},mantle:{name:"Mantle",order:24,hex:"#e6e9ef",rgb:{r:230,g:233,b:239},hsl:{h:220.00000000000006,s:.21951219512195116,l:.919607843137255},accent:!1},crust:{name:"Crust",order:25,hex:"#dce0e8",rgb:{r:220,g:224,b:232},hsl:{h:220.00000000000006,s:.20689655172413762,l:.8862745098039215},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#5c5f77",rgb:{r:92,g:95,b:119},hsl:{h:233.33333333333334,s:.1279620853080569,l:.4137254901960784},code:0},bright:{name:"Bright Black",hex:"#6c6f85",rgb:{r:108,g:111,b:133},hsl:{h:232.79999999999998,s:.10373443983402494,l:.4725490196078431},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#d20f39",rgb:{r:210,g:15,b:57},hsl:{h:347.0769230769231,s:.8666666666666666,l:.4411764705882353},code:1},bright:{name:"Bright Red",hex:"#de293e",rgb:{r:222,g:41,b:62},hsl:{h:353.0386740331492,s:.7327935222672065,l:.515686274509804},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#40a02b",rgb:{r:64,g:160,b:43},hsl:{h:109.23076923076923,s:.5763546798029556,l:.39803921568627454},code:2},bright:{name:"Bright Green",hex:"#49af3d",rgb:{r:73,g:175,b:61},hsl:{h:113.68421052631581,s:.48305084745762705,l:.4627450980392157},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#df8e1d",rgb:{r:223,g:142,b:29},hsl:{h:34.948453608247426,s:.7698412698412698,l:.49411764705882355},code:3},bright:{name:"Bright Yellow",hex:"#eea02d",rgb:{r:238,g:160,b:45},hsl:{h:35.751295336787564,s:.8502202643171807,l:.5549019607843138},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#1e66f5",rgb:{r:30,g:102,b:245},hsl:{h:219.90697674418607,s:.9148936170212768,l:.5392156862745098},code:4},bright:{name:"Bright Blue",hex:"#456eff",rgb:{r:69,g:110,b:255},hsl:{h:226.77419354838707,s:1,l:.6352941176470588},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#ea76cb",rgb:{r:234,g:118,b:203},hsl:{h:316.0344827586207,s:.7341772151898731,l:.6901960784313725},code:5},bright:{name:"Bright Magenta",hex:"#fe85d8",rgb:{r:254,g:133,b:216},hsl:{h:318.8429752066116,s:.983739837398374,l:.7588235294117647},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#179299",rgb:{r:23,g:146,b:153},hsl:{h:183.23076923076923,s:.7386363636363636,l:.34509803921568627},code:6},bright:{name:"Bright Cyan",hex:"#2d9fa8",rgb:{r:45,g:159,b:168},hsl:{h:184.39024390243904,s:.5774647887323943,l:.4176470588235294},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#acb0be",rgb:{r:172,g:176,b:190},hsl:{h:226.6666666666667,s:.12162162162162159,l:.7098039215686275},code:7},bright:{name:"Bright White",hex:"#bcc0cc",rgb:{r:188,g:192,b:204},hsl:{h:225.00000000000003,s:.13559322033898308,l:.7686274509803922},code:15}}}},frappe:{name:"Frappé",emoji:"🪴",order:1,dark:!0,colors:{rosewater:{name:"Rosewater",order:0,hex:"#f2d5cf",rgb:{r:242,g:213,b:207},hsl:{h:10.2857142857143,s:.5737704918032784,l:.8803921568627451},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#eebebe",rgb:{r:238,g:190,b:190},hsl:{h:0,s:.5853658536585367,l:.8392156862745098},accent:!0},pink:{name:"Pink",order:2,hex:"#f4b8e4",rgb:{r:244,g:184,b:228},hsl:{h:316,s:.7317073170731713,l:.8392156862745098},accent:!0},mauve:{name:"Mauve",order:3,hex:"#ca9ee6",rgb:{r:202,g:158,b:230},hsl:{h:276.66666666666663,s:.5901639344262294,l:.7607843137254902},accent:!0},red:{name:"Red",order:4,hex:"#e78284",rgb:{r:231,g:130,b:132},hsl:{h:358.8118811881188,s:.6778523489932885,l:.7078431372549019},accent:!0},maroon:{name:"Maroon",order:5,hex:"#ea999c",rgb:{r:234,g:153,b:156},hsl:{h:357.77777777777777,s:.6585365853658534,l:.7588235294117647},accent:!0},peach:{name:"Peach",order:6,hex:"#ef9f76",rgb:{r:239,g:159,b:118},hsl:{h:20.33057851239669,s:.7908496732026143,l:.7},accent:!0},yellow:{name:"Yellow",order:7,hex:"#e5c890",rgb:{r:229,g:200,b:144},hsl:{h:39.52941176470588,s:.6204379562043796,l:.7313725490196079},accent:!0},green:{name:"Green",order:8,hex:"#a6d189",rgb:{r:166,g:209,b:137},hsl:{h:95.83333333333331,s:.4390243902439024,l:.6784313725490196},accent:!0},teal:{name:"Teal",order:9,hex:"#81c8be",rgb:{r:129,g:200,b:190},hsl:{h:171.5492957746479,s:.3922651933701657,l:.6450980392156862},accent:!0},sky:{name:"Sky",order:10,hex:"#99d1db",rgb:{r:153,g:209,b:219},hsl:{h:189.09090909090907,s:.47826086956521735,l:.7294117647058823},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#85c1dc",rgb:{r:133,g:193,b:220},hsl:{h:198.62068965517244,s:.5541401273885351,l:.692156862745098},accent:!0},blue:{name:"Blue",order:12,hex:"#8caaee",rgb:{r:140,g:170,b:238},hsl:{h:221.6326530612245,s:.7424242424242424,l:.7411764705882353},accent:!0},lavender:{name:"Lavender",order:13,hex:"#babbf1",rgb:{r:186,g:187,b:241},hsl:{h:238.90909090909093,s:.6626506024096385,l:.8372549019607842},accent:!0},text:{name:"Text",order:14,hex:"#c6d0f5",rgb:{r:198,g:208,b:245},hsl:{h:227.2340425531915,s:.7014925373134333,l:.8686274509803922},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#b5bfe2",rgb:{r:181,g:191,b:226},hsl:{h:226.66666666666669,s:.43689320388349495,l:.7980392156862746},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#a5adce",rgb:{r:165,g:173,b:206},hsl:{h:228.29268292682926,s:.2949640287769784,l:.7274509803921569},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#949cbb",rgb:{r:148,g:156,b:187},hsl:{h:227.69230769230768,s:.22285714285714275,l:.6568627450980392},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#838ba7",rgb:{r:131,g:139,b:167},hsl:{h:226.66666666666669,s:.16981132075471703,l:.584313725490196},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#737994",rgb:{r:115,g:121,b:148},hsl:{h:229.0909090909091,s:.13360323886639683,l:.515686274509804},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#626880",rgb:{r:98,g:104,b:128},hsl:{h:228.00000000000003,s:.1327433628318584,l:.44313725490196076},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#51576d",rgb:{r:81,g:87,b:109},hsl:{h:227.14285714285714,s:.14736842105263157,l:.37254901960784315},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#414559",rgb:{r:65,g:69,b:89},hsl:{h:230.00000000000003,s:.15584415584415584,l:.30196078431372547},accent:!1},base:{name:"Base",order:23,hex:"#303446",rgb:{r:48,g:52,b:70},hsl:{h:229.0909090909091,s:.18644067796610175,l:.23137254901960785},accent:!1},mantle:{name:"Mantle",order:24,hex:"#292c3c",rgb:{r:41,g:44,b:60},hsl:{h:230.52631578947367,s:.18811881188118806,l:.19803921568627453},accent:!1},crust:{name:"Crust",order:25,hex:"#232634",rgb:{r:35,g:38,b:52},hsl:{h:229.41176470588238,s:.19540229885057467,l:.17058823529411765},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#51576d",rgb:{r:81,g:87,b:109},hsl:{h:227.14285714285714,s:.14736842105263157,l:.37254901960784315},code:0},bright:{name:"Bright Black",hex:"#626880",rgb:{r:98,g:104,b:128},hsl:{h:228.00000000000003,s:.1327433628318584,l:.44313725490196076},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#e78284",rgb:{r:231,g:130,b:132},hsl:{h:358.8118811881188,s:.6778523489932885,l:.7078431372549019},code:1},bright:{name:"Bright Red",hex:"#e67172",rgb:{r:230,g:113,b:114},hsl:{h:359.4871794871795,s:.7005988023952096,l:.6725490196078432},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#a6d189",rgb:{r:166,g:209,b:137},hsl:{h:95.83333333333331,s:.4390243902439024,l:.6784313725490196},code:2},bright:{name:"Bright Green",hex:"#8ec772",rgb:{r:142,g:199,b:114},hsl:{h:100.23529411764706,s:.431472081218274,l:.6137254901960785},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#e5c890",rgb:{r:229,g:200,b:144},hsl:{h:39.52941176470588,s:.6204379562043796,l:.7313725490196079},code:3},bright:{name:"Bright Yellow",hex:"#d9ba73",rgb:{r:217,g:186,b:115},hsl:{h:41.764705882352935,s:.5730337078651685,l:.6509803921568628},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#8caaee",rgb:{r:140,g:170,b:238},hsl:{h:221.6326530612245,s:.7424242424242424,l:.7411764705882353},code:4},bright:{name:"Bright Blue",hex:"#7b9ef0",rgb:{r:123,g:158,b:240},hsl:{h:222.05128205128207,s:.7959183673469388,l:.711764705882353},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#f4b8e4",rgb:{r:244,g:184,b:228},hsl:{h:316,s:.7317073170731713,l:.8392156862745098},code:5},bright:{name:"Bright Magenta",hex:"#f2a4db",rgb:{r:242,g:164,b:219},hsl:{h:317.6923076923077,s:.7499999999999998,l:.7960784313725491},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#81c8be",rgb:{r:129,g:200,b:190},hsl:{h:171.5492957746479,s:.3922651933701657,l:.6450980392156862},code:6},bright:{name:"Bright Cyan",hex:"#5abfb5",rgb:{r:90,g:191,b:181},hsl:{h:174.05940594059405,s:.44104803493449785,l:.5509803921568628},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#a5adce",rgb:{r:165,g:173,b:206},hsl:{h:228.29268292682926,s:.2949640287769784,l:.7274509803921569},code:7},bright:{name:"Bright White",hex:"#b5bfe2",rgb:{r:181,g:191,b:226},hsl:{h:226.66666666666669,s:.43689320388349495,l:.7980392156862746},code:15}}}},macchiato:{name:"Macchiato",emoji:"🌺",order:2,dark:!0,colors:{rosewater:{name:"Rosewater",order:0,hex:"#f4dbd6",rgb:{r:244,g:219,b:214},hsl:{h:9.999999999999963,s:.5769230769230775,l:.8980392156862745},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#f0c6c6",rgb:{r:240,g:198,b:198},hsl:{h:0,s:.5833333333333333,l:.8588235294117648},accent:!0},pink:{name:"Pink",order:2,hex:"#f5bde6",rgb:{r:245,g:189,b:230},hsl:{h:316.0714285714286,s:.7368421052631583,l:.8509803921568628},accent:!0},mauve:{name:"Mauve",order:3,hex:"#c6a0f6",rgb:{r:198,g:160,b:246},hsl:{h:266.51162790697674,s:.8269230769230772,l:.7960784313725491},accent:!0},red:{name:"Red",order:4,hex:"#ed8796",rgb:{r:237,g:135,b:150},hsl:{h:351.1764705882353,s:.7391304347826088,l:.7294117647058824},accent:!0},maroon:{name:"Maroon",order:5,hex:"#ee99a0",rgb:{r:238,g:153,b:160},hsl:{h:355.05882352941177,s:.7142857142857143,l:.7666666666666666},accent:!0},peach:{name:"Peach",order:6,hex:"#f5a97f",rgb:{r:245,g:169,b:127},hsl:{h:21.355932203389827,s:.8550724637681162,l:.7294117647058824},accent:!0},yellow:{name:"Yellow",order:7,hex:"#eed49f",rgb:{r:238,g:212,b:159},hsl:{h:40.253164556962034,s:.6991150442477877,l:.7784313725490196},accent:!0},green:{name:"Green",order:8,hex:"#a6da95",rgb:{r:166,g:218,b:149},hsl:{h:105.21739130434783,s:.4825174825174825,l:.7196078431372549},accent:!0},teal:{name:"Teal",order:9,hex:"#8bd5ca",rgb:{r:139,g:213,b:202},hsl:{h:171.08108108108107,s:.46835443037974706,l:.6901960784313725},accent:!0},sky:{name:"Sky",order:10,hex:"#91d7e3",rgb:{r:145,g:215,b:227},hsl:{h:188.78048780487802,s:.5942028985507245,l:.7294117647058823},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#7dc4e4",rgb:{r:125,g:196,b:228},hsl:{h:198.64077669902912,s:.6560509554140128,l:.692156862745098},accent:!0},blue:{name:"Blue",order:12,hex:"#8aadf4",rgb:{r:138,g:173,b:244},hsl:{h:220.188679245283,s:.8281250000000003,l:.7490196078431373},accent:!0},lavender:{name:"Lavender",order:13,hex:"#b7bdf8",rgb:{r:183,g:189,b:248},hsl:{h:234.46153846153848,s:.8227848101265824,l:.8450980392156863},accent:!0},text:{name:"Text",order:14,hex:"#cad3f5",rgb:{r:202,g:211,b:245},hsl:{h:227.4418604651163,s:.6825396825396831,l:.8764705882352941},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#b8c0e0",rgb:{r:184,g:192,b:224},hsl:{h:228,s:.39215686274509803,l:.8},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#a5adcb",rgb:{r:165,g:173,b:203},hsl:{h:227.36842105263156,s:.2676056338028167,l:.7215686274509804},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#939ab7",rgb:{r:147,g:154,b:183},hsl:{h:228.33333333333331,s:.2000000000000001,l:.6470588235294117},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#8087a2",rgb:{r:128,g:135,b:162},hsl:{h:227.6470588235294,s:.1545454545454545,l:.5686274509803921},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#6e738d",rgb:{r:110,g:115,b:141},hsl:{h:230.32258064516128,s:.12350597609561753,l:.49215686274509807},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#5b6078",rgb:{r:91,g:96,b:120},hsl:{h:229.65517241379308,s:.13744075829383887,l:.4137254901960784},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#494d64",rgb:{r:73,g:77,b:100},hsl:{h:231.11111111111114,s:.15606936416184972,l:.3392156862745098},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#363a4f",rgb:{r:54,g:58,b:79},hsl:{h:230.4,s:.1879699248120301,l:.2607843137254902},accent:!1},base:{name:"Base",order:23,hex:"#24273a",rgb:{r:36,g:39,b:58},hsl:{h:231.8181818181818,s:.23404255319148934,l:.1843137254901961},accent:!1},mantle:{name:"Mantle",order:24,hex:"#1e2030",rgb:{r:30,g:32,b:48},hsl:{h:233.33333333333334,s:.23076923076923075,l:.15294117647058825},accent:!1},crust:{name:"Crust",order:25,hex:"#181926",rgb:{r:24,g:25,b:38},hsl:{h:235.71428571428572,s:.22580645161290322,l:.12156862745098039},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#494d64",rgb:{r:73,g:77,b:100},hsl:{h:231.11111111111114,s:.15606936416184972,l:.3392156862745098},code:0},bright:{name:"Bright Black",hex:"#5b6078",rgb:{r:91,g:96,b:120},hsl:{h:229.65517241379308,s:.13744075829383887,l:.4137254901960784},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#ed8796",rgb:{r:237,g:135,b:150},hsl:{h:351.1764705882353,s:.7391304347826088,l:.7294117647058824},code:1},bright:{name:"Bright Red",hex:"#ec7486",rgb:{r:236,g:116,b:134},hsl:{h:351,s:.759493670886076,l:.6901960784313725},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#a6da95",rgb:{r:166,g:218,b:149},hsl:{h:105.21739130434783,s:.4825174825174825,l:.7196078431372549},code:2},bright:{name:"Bright Green",hex:"#8ccf7f",rgb:{r:140,g:207,b:127},hsl:{h:110.24999999999999,s:.45454545454545453,l:.6549019607843137},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#eed49f",rgb:{r:238,g:212,b:159},hsl:{h:40.253164556962034,s:.6991150442477877,l:.7784313725490196},code:3},bright:{name:"Bright Yellow",hex:"#e1c682",rgb:{r:225,g:198,b:130},hsl:{h:42.94736842105264,s:.6129032258064515,l:.696078431372549},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#8aadf4",rgb:{r:138,g:173,b:244},hsl:{h:220.188679245283,s:.8281250000000003,l:.7490196078431373},code:4},bright:{name:"Bright Blue",hex:"#78a1f6",rgb:{r:120,g:161,b:246},hsl:{h:220.47619047619048,s:.8750000000000002,l:.7176470588235294},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#f5bde6",rgb:{r:245,g:189,b:230},hsl:{h:316.0714285714286,s:.7368421052631583,l:.8509803921568628},code:5},bright:{name:"Bright Magenta",hex:"#f2a9dd",rgb:{r:242,g:169,b:221},hsl:{h:317.26027397260276,s:.7373737373737372,l:.8058823529411765},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#8bd5ca",rgb:{r:139,g:213,b:202},hsl:{h:171.08108108108107,s:.46835443037974706,l:.6901960784313725},code:6},bright:{name:"Bright Cyan",hex:"#63cbc0",rgb:{r:99,g:203,b:192},hsl:{h:173.65384615384616,s:.4999999999999998,l:.592156862745098},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#a5adcb",rgb:{r:165,g:173,b:203},hsl:{h:227.36842105263156,s:.2676056338028167,l:.7215686274509804},code:7},bright:{name:"Bright White",hex:"#b8c0e0",rgb:{r:184,g:192,b:224},hsl:{h:228,s:.39215686274509803,l:.8},code:15}}}},mocha:{name:"Mocha",emoji:"🌿",order:3,dark:!0,colors:{rosewater:{name:"Rosewater",order:0,hex:"#f5e0dc",rgb:{r:245,g:224,b:220},hsl:{h:9.599999999999968,s:.555555555555556,l:.911764705882353},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#f2cdcd",rgb:{r:242,g:205,b:205},hsl:{h:0,s:.587301587301587,l:.8764705882352941},accent:!0},pink:{name:"Pink",order:2,hex:"#f5c2e7",rgb:{r:245,g:194,b:231},hsl:{h:316.4705882352941,s:.7183098591549301,l:.8607843137254902},accent:!0},mauve:{name:"Mauve",order:3,hex:"#cba6f7",rgb:{r:203,g:166,b:247},hsl:{h:267.4074074074074,s:.8350515463917528,l:.8098039215686275},accent:!0},red:{name:"Red",order:4,hex:"#f38ba8",rgb:{r:243,g:139,b:168},hsl:{h:343.2692307692308,s:.8124999999999998,l:.7490196078431373},accent:!0},maroon:{name:"Maroon",order:5,hex:"#eba0ac",rgb:{r:235,g:160,b:172},hsl:{h:350.4,s:.6521739130434779,l:.7745098039215685},accent:!0},peach:{name:"Peach",order:6,hex:"#fab387",rgb:{r:250,g:179,b:135},hsl:{h:22.95652173913043,s:.92,l:.7549019607843137},accent:!0},yellow:{name:"Yellow",order:7,hex:"#f9e2af",rgb:{r:249,g:226,b:175},hsl:{h:41.35135135135135,s:.8604651162790699,l:.8313725490196078},accent:!0},green:{name:"Green",order:8,hex:"#a6e3a1",rgb:{r:166,g:227,b:161},hsl:{h:115.45454545454544,s:.5409836065573769,l:.7607843137254902},accent:!0},teal:{name:"Teal",order:9,hex:"#94e2d5",rgb:{r:148,g:226,b:213},hsl:{h:170.00000000000003,s:.5735294117647057,l:.7333333333333334},accent:!0},sky:{name:"Sky",order:10,hex:"#89dceb",rgb:{r:137,g:220,b:235},hsl:{h:189.18367346938774,s:.7101449275362316,l:.7294117647058823},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#74c7ec",rgb:{r:116,g:199,b:236},hsl:{h:198.5,s:.759493670886076,l:.6901960784313725},accent:!0},blue:{name:"Blue",order:12,hex:"#89b4fa",rgb:{r:137,g:180,b:250},hsl:{h:217.1681415929203,s:.9186991869918699,l:.7588235294117647},accent:!0},lavender:{name:"Lavender",order:13,hex:"#b4befe",rgb:{r:180,g:190,b:254},hsl:{h:231.89189189189187,s:.9736842105263159,l:.8509803921568628},accent:!0},text:{name:"Text",order:14,hex:"#cdd6f4",rgb:{r:205,g:214,b:244},hsl:{h:226.15384615384616,s:.6393442622950825,l:.8803921568627451},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#bac2de",rgb:{r:186,g:194,b:222},hsl:{h:226.66666666666669,s:.35294117647058837,l:.8},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#a6adc8",rgb:{r:166,g:173,b:200},hsl:{h:227.6470588235294,s:.23611111111111102,l:.7176470588235294},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#9399b2",rgb:{r:147,g:153,b:178},hsl:{h:228.38709677419354,s:.16756756756756758,l:.6372549019607843},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#7f849c",rgb:{r:127,g:132,b:156},hsl:{h:229.65517241379308,s:.12775330396475776,l:.5549019607843138},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#6c7086",rgb:{r:108,g:112,b:134},hsl:{h:230.7692307692308,s:.10743801652892565,l:.4745098039215686},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#585b70",rgb:{r:88,g:91,b:112},hsl:{h:232.5,s:.12,l:.39215686274509803},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#45475a",rgb:{r:69,g:71,b:90},hsl:{h:234.2857142857143,s:.13207547169811326,l:.31176470588235294},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#313244",rgb:{r:49,g:50,b:68},hsl:{h:236.84210526315792,s:.16239316239316234,l:.22941176470588237},accent:!1},base:{name:"Base",order:23,hex:"#1e1e2e",rgb:{r:30,g:30,b:46},hsl:{h:240,s:.21052631578947367,l:.14901960784313725},accent:!1},mantle:{name:"Mantle",order:24,hex:"#181825",rgb:{r:24,g:24,b:37},hsl:{h:240,s:.2131147540983607,l:.11960784313725491},accent:!1},crust:{name:"Crust",order:25,hex:"#11111b",rgb:{r:17,g:17,b:27},hsl:{h:240,s:.22727272727272727,l:.08627450980392157},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#45475a",rgb:{r:69,g:71,b:90},hsl:{h:234.2857142857143,s:.13207547169811326,l:.31176470588235294},code:0},bright:{name:"Bright Black",hex:"#585b70",rgb:{r:88,g:91,b:112},hsl:{h:232.5,s:.12,l:.39215686274509803},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#f38ba8",rgb:{r:243,g:139,b:168},hsl:{h:343.2692307692308,s:.8124999999999998,l:.7490196078431373},code:1},bright:{name:"Bright Red",hex:"#f37799",rgb:{r:243,g:119,b:153},hsl:{h:343.54838709677415,s:.8378378378378376,l:.7098039215686274},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#a6e3a1",rgb:{r:166,g:227,b:161},hsl:{h:115.45454545454544,s:.5409836065573769,l:.7607843137254902},code:2},bright:{name:"Bright Green",hex:"#89d88b",rgb:{r:137,g:216,b:139},hsl:{h:121.51898734177213,s:.5031847133757963,l:.692156862745098},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#f9e2af",rgb:{r:249,g:226,b:175},hsl:{h:41.35135135135135,s:.8604651162790699,l:.8313725490196078},code:3},bright:{name:"Bright Yellow",hex:"#ebd391",rgb:{r:235,g:211,b:145},hsl:{h:44,s:.692307692307692,l:.7450980392156863},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#89b4fa",rgb:{r:137,g:180,b:250},hsl:{h:217.1681415929203,s:.9186991869918699,l:.7588235294117647},code:4},bright:{name:"Bright Blue",hex:"#74a8fc",rgb:{r:116,g:168,b:252},hsl:{h:217.05882352941174,s:.9577464788732396,l:.7215686274509804},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#f5c2e7",rgb:{r:245,g:194,b:231},hsl:{h:316.4705882352941,s:.7183098591549301,l:.8607843137254902},code:5},bright:{name:"Bright Magenta",hex:"#f2aede",rgb:{r:242,g:174,b:222},hsl:{h:317.6470588235294,s:.7234042553191488,l:.8156862745098039},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#94e2d5",rgb:{r:148,g:226,b:213},hsl:{h:170.00000000000003,s:.5735294117647057,l:.7333333333333334},code:6},bright:{name:"Bright Cyan",hex:"#6bd7ca",rgb:{r:107,g:215,b:202},hsl:{h:172.77777777777777,s:.5744680851063831,l:.6313725490196078},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#a6adc8",rgb:{r:166,g:173,b:200},hsl:{h:227.6470588235294,s:.23611111111111102,l:.7176470588235294},code:7},bright:{name:"Bright White",hex:"#bac2de",rgb:{r:186,g:194,b:222},hsl:{h:226.66666666666669,s:.35294117647058837,l:.8},code:15}}}}},R=r=>Object.entries(r),{version:he,...De}=Ne,_=R(De).reduce((r,[a,o])=>(r[a]={...o,colorEntries:R(o.colors),ansiColorEntries:R(o.ansiColors)},r),{});R(_);const y=({variant:r,settings:a,styles:o})=>{const n=b.EditorView.theme({"&":{backgroundColor:a.background,color:a.foreground},".cm-content":{caretColor:a.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:a.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:a.selection},".cm-activeLine":{backgroundColor:a.lineHighlight},".cm-gutters":{backgroundColor:a.gutterBackground,color:a.gutterForeground},".cm-activeLineGutter":{backgroundColor:a.lineHighlight}},{dark:r==="dark"}),c=v.HighlightStyle.define(o);return[n,v.syntaxHighlighting(c)]};y({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:e.tags.comment,color:"#404080"},{tag:[e.tags.string,e.tags.regexp],color:"#999999"},{tag:e.tags.number,color:"#7090B0"},{tag:[e.tags.bool,e.tags.null],color:"#8080A0"},{tag:[e.tags.punctuation,e.tags.derefOperator],color:"#805080"},{tag:e.tags.keyword,color:"#60B0FF"},{tag:e.tags.definitionKeyword,color:"#B0FFF0"},{tag:e.tags.moduleKeyword,color:"#60B0FF"},{tag:e.tags.operator,color:"#A0A0FF"},{tag:[e.tags.variableName,e.tags.self],color:"#008080"},{tag:e.tags.operatorKeyword,color:"#A0A0FF"},{tag:e.tags.controlKeyword,color:"#80A0FF"},{tag:e.tags.className,color:"#70E080"},{tag:[e.tags.function(e.tags.propertyName),e.tags.propertyName],color:"#50A0A0"},{tag:e.tags.tagName,color:"#009090"},{tag:e.tags.modifier,color:"#B0FFF0"},{tag:[e.tags.squareBracket,e.tags.attributeName],color:"#D0D0FF"}]}),y({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:e.tags.comment,color:"#787b8099"},{tag:e.tags.string,color:"#86b300"},{tag:e.tags.regexp,color:"#4cbf99"},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"#ffaa33"},{tag:e.tags.variableName,color:"#5c6166"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#fa8d3e"},{tag:[e.tags.keyword,e.tags.special(e.tags.brace)],color:"#fa8d3e"},{tag:e.tags.operator,color:"#ed9366"},{tag:e.tags.separator,color:"#5c6166b3"},{tag:e.tags.punctuation,color:"#5c6166"},{tag:[e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName)],color:"#f2ae49"},{tag:[e.tags.className,e.tags.definition(e.tags.typeName)],color:"#22a4e6"},{tag:[e.tags.tagName,e.tags.typeName,e.tags.self,e.tags.labelName],color:"#55b4d4"},{tag:e.tags.angleBracket,color:"#55b4d480"},{tag:e.tags.attributeName,color:"#f2ae49"}]}),y({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:e.tags.comment,color:"#6E6E6E"},{tag:[e.tags.string,e.tags.regexp,e.tags.special(e.tags.brace)],color:"#5C81B3"},{tag:e.tags.number,color:"#C1E1B8"},{tag:e.tags.bool,color:"#53667D"},{tag:[e.tags.definitionKeyword,e.tags.modifier,e.tags.function(e.tags.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[e.tags.keyword,e.tags.moduleKeyword,e.tags.operatorKeyword,e.tags.operator],color:"#697A8E",fontWeight:"bold"},{tag:[e.tags.variableName,e.tags.attributeName],color:"#708E67"},{tag:[e.tags.function(e.tags.variableName),e.tags.definition(e.tags.propertyName),e.tags.derefOperator],color:"#fff"},{tag:e.tags.tagName,color:"#A3D295"}]}),y({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:e.tags.comment,color:"#666666"},{tag:[e.tags.string,e.tags.special(e.tags.brace)],color:"#54BE0D"},{tag:e.tags.regexp,color:"#E9C062"},{tag:e.tags.number,color:"#CF6A4C"},{tag:[e.tags.keyword,e.tags.operator],color:"#5EA6EA"},{tag:e.tags.variableName,color:"#7587A6"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#F9EE98"},{tag:[e.tags.propertyName,e.tags.function(e.tags.variableName)],color:"#937121"},{tag:[e.tags.typeName,e.tags.angleBracket,e.tags.tagName],color:"#9B859D"}]}),y({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:e.tags.comment,color:"#6B4E32"},{tag:[e.tags.keyword,e.tags.operator,e.tags.derefOperator],color:"#EF5D32"},{tag:e.tags.className,color:"#EFAC32",fontWeight:"bold"},{tag:[e.tags.typeName,e.tags.propertyName,e.tags.function(e.tags.variableName),e.tags.definition(e.tags.variableName)],color:"#EFAC32"},{tag:e.tags.definition(e.tags.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:e.tags.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[e.tags.number,e.tags.bool],color:"#6C99BB"},{tag:[e.tags.variableName,e.tags.self],color:"#7DAF9C"},{tag:[e.tags.string,e.tags.special(e.tags.brace),e.tags.regexp],color:"#D9D762"},{tag:[e.tags.angleBracket,e.tags.tagName,e.tags.attributeName],color:"#EFCB43"}]}),y({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:e.tags.comment,color:"#404040"},{tag:[e.tags.string,e.tags.special(e.tags.brace),e.tags.regexp],color:"#00D8FF"},{tag:e.tags.number,color:"#E62286"},{tag:[e.tags.variableName,e.tags.attributeName,e.tags.self],color:"#E62286",fontWeight:"bold"},{tag:e.tags.function(e.tags.variableName),color:"#fff",fontWeight:"bold"}]}),y({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:e.tags.comment,color:"#BCC8BA"},{tag:[e.tags.string,e.tags.special(e.tags.brace),e.tags.regexp],color:"#5D90CD"},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"#46A609"},{tag:e.tags.keyword,color:"#AF956F"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#C52727"},{tag:[e.tags.angleBracket,e.tags.tagName,e.tags.attributeName],color:"#606060"},{tag:e.tags.self,color:"#000"}]}),y({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:e.tags.comment,color:"#0088FF"},{tag:e.tags.string,color:"#3AD900"},{tag:e.tags.regexp,color:"#80FFC2"},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"#FF628C"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#FFEE80"},{tag:e.tags.variableName,color:"#CCCCCC"},{tag:e.tags.self,color:"#FF80E1"},{tag:[e.tags.className,e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName),e.tags.definition(e.tags.typeName),e.tags.labelName],color:"#FFDD00"},{tag:[e.tags.keyword,e.tags.operator],color:"#FF9D00"},{tag:[e.tags.propertyName,e.tags.typeName],color:"#80FFBB"},{tag:e.tags.special(e.tags.brace),color:"#EDEF7D"},{tag:e.tags.attributeName,color:"#9EFFFF"},{tag:e.tags.derefOperator,color:"#fff"}]}),y({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:e.tags.comment,color:"#AEAEAE"},{tag:[e.tags.string,e.tags.special(e.tags.brace),e.tags.regexp],color:"#8DFF8E"},{tag:[e.tags.className,e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName),e.tags.function(e.tags.definition(e.tags.variableName)),e.tags.definition(e.tags.typeName)],color:"#A3EBFF"},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"#62E9BD"},{tag:[e.tags.keyword,e.tags.operator],color:"#2BF1DC"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#F8FBB1"},{tag:[e.tags.variableName,e.tags.self],color:"#B683CA"},{tag:[e.tags.angleBracket,e.tags.tagName,e.tags.typeName,e.tags.propertyName],color:"#60A4F1"},{tag:e.tags.derefOperator,color:"#E0E0E0"},{tag:e.tags.attributeName,color:"#7BACCA"}]}),y({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:e.tags.comment,color:"#6272a4"},{tag:[e.tags.string,e.tags.special(e.tags.brace)],color:"#f1fa8c"},{tag:[e.tags.number,e.tags.self,e.tags.bool,e.tags.null],color:"#bd93f9"},{tag:[e.tags.keyword,e.tags.operator],color:"#ff79c6"},{tag:[e.tags.definitionKeyword,e.tags.typeName],color:"#8be9fd"},{tag:e.tags.definition(e.tags.typeName),color:"#f8f8f2"},{tag:[e.tags.className,e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName),e.tags.attributeName],color:"#50fa7b"}]}),y({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:e.tags.comment,color:"#AAAAAA"},{tag:[e.tags.keyword,e.tags.operator,e.tags.typeName,e.tags.tagName,e.tags.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[e.tags.attributeName,e.tags.definition(e.tags.propertyName)],color:"#4F9FD0"},{tag:[e.tags.className,e.tags.string,e.tags.special(e.tags.brace)],color:"#CF4F5F"},{tag:e.tags.number,color:"#CF4F5F",fontWeight:"bold"},{tag:e.tags.variableName,fontWeight:"bold"}]}),y({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:e.tags.comment,color:"#9995b7"},{tag:e.tags.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#ff5792"},{tag:[e.tags.className,e.tags.tagName,e.tags.definition(e.tags.typeName)],color:"#0094f0"},{tag:[e.tags.number,e.tags.bool,e.tags.null,e.tags.special(e.tags.brace)],color:"#5842ff"},{tag:[e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName)],color:"#0095a8"},{tag:e.tags.typeName,color:"#b3694d"},{tag:[e.tags.propertyName,e.tags.variableName],color:"#fa8900"},{tag:e.tags.operator,color:"#ff5792"},{tag:e.tags.self,color:"#e64100"},{tag:[e.tags.string,e.tags.regexp],color:"#00b368"},{tag:[e.tags.paren,e.tags.bracket],color:"#0431fa"},{tag:e.tags.labelName,color:"#00bdd6"},{tag:e.tags.attributeName,color:"#e64100"},{tag:e.tags.angleBracket,color:"#9995b7"}]}),y({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:e.tags.comment,color:"#9893a5"},{tag:[e.tags.bool,e.tags.null],color:"#286983"},{tag:e.tags.number,color:"#d7827e"},{tag:e.tags.className,color:"#d7827e"},{tag:[e.tags.angleBracket,e.tags.tagName,e.tags.typeName],color:"#56949f"},{tag:e.tags.attributeName,color:"#907aa9"},{tag:e.tags.punctuation,color:"#797593"},{tag:[e.tags.keyword,e.tags.modifier],color:"#286983"},{tag:[e.tags.string,e.tags.regexp],color:"#ea9d34"},{tag:e.tags.variableName,color:"#d7827e"}]}),y({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:e.tags.comment,color:"#CFCFCF"},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"#E66C29"},{tag:[e.tags.className,e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName),e.tags.labelName,e.tags.definition(e.tags.typeName)],color:"#2EB43B"},{tag:e.tags.keyword,color:"#D8B229"},{tag:e.tags.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#925A47"},{tag:e.tags.string,color:"#704D3D"},{tag:e.tags.typeName,color:"#2F8996"},{tag:[e.tags.variableName,e.tags.propertyName],color:"#77ACB0"},{tag:e.tags.self,color:"#77ACB0",fontWeight:"bold"},{tag:e.tags.regexp,color:"#E3965E"},{tag:[e.tags.tagName,e.tags.angleBracket],color:"#BAA827"},{tag:e.tags.attributeName,color:"#B06520"},{tag:e.tags.derefOperator,color:"#000"}]}),y({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:e.tags.comment,color:"#93A1A1"},{tag:e.tags.string,color:"#2AA198"},{tag:e.tags.regexp,color:"#D30102"},{tag:e.tags.number,color:"#D33682"},{tag:e.tags.variableName,color:"#268BD2"},{tag:[e.tags.keyword,e.tags.operator,e.tags.punctuation],color:"#859900"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#073642",fontWeight:"bold"},{tag:[e.tags.className,e.tags.self,e.tags.definition(e.tags.propertyName)],color:"#268BD2"},{tag:e.tags.function(e.tags.variableName),color:"#268BD2"},{tag:[e.tags.bool,e.tags.null],color:"#B58900"},{tag:e.tags.tagName,color:"#268BD2",fontWeight:"bold"},{tag:e.tags.angleBracket,color:"#93A1A1"},{tag:e.tags.attributeName,color:"#93A1A1"},{tag:e.tags.typeName,color:"#859900"}]}),y({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:e.tags.comment,color:"#8E908C"},{tag:[e.tags.variableName,e.tags.self,e.tags.propertyName,e.tags.attributeName,e.tags.regexp],color:"#C82829"},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"#F5871F"},{tag:[e.tags.className,e.tags.typeName,e.tags.definition(e.tags.typeName)],color:"#C99E00"},{tag:[e.tags.string,e.tags.special(e.tags.brace)],color:"#718C00"},{tag:e.tags.operator,color:"#3E999F"},{tag:[e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName)],color:"#4271AE"},{tag:e.tags.keyword,color:"#8959A8"},{tag:e.tags.derefOperator,color:"#4D4D4C"}]});const Y=new W.Compartment,U=(r="latte")=>{const a=_[r].colors,o=a.base,n=r==="latte"?"#484b64":a.text.hex,c=Ee(a.crust.rgb,o.rgb,.1);return[y({variant:r==="latte"?"light":"dark",settings:{background:o.hex,foreground:n,caret:a.rosewater.hex,lineHighlight:K(a.overlay1.rgb,.1),gutterBackground:o.hex,gutterForeground:n},styles:[{tag:e.tags.modifier,color:a.mauve.hex},{tag:e.tags.controlKeyword,color:a.mauve.hex},{tag:e.tags.operatorKeyword,color:a.mauve.hex},{tag:e.tags.definitionKeyword,color:a.mauve.hex},{tag:e.tags.moduleKeyword,color:a.mauve.hex},{tag:e.tags.bool,color:a.peach.hex},{tag:e.tags.null,color:a.peach.hex},{tag:e.tags.null,color:a.peach.hex},{tag:[e.tags.function(e.tags.variableName)],color:a.blue.hex},{tag:[e.tags.function(e.tags.definition(e.tags.variableName))],color:a.blue.hex},{tag:[e.tags.definition(e.tags.className)],color:a.yellow.hex,fontWeight:"bold"},{tag:e.tags.propertyName,color:a.blue.hex},{tag:[e.tags.function(e.tags.propertyName)],color:a.blue.hex},{tag:e.tags.lineComment,color:a.overlay2.hex},{tag:e.tags.number,color:a.peach.hex},{tag:e.tags.string,color:a.green.hex},{tag:[e.tags.special(e.tags.string)],color:a.green.hex,fontWeight:"600"},{tag:e.tags.arithmeticOperator,color:a.sky.hex},{tag:e.tags.bitwiseOperator,color:a.sky.hex},{tag:e.tags.compareOperator,color:a.sky.hex},{tag:e.tags.definitionOperator,color:a.sky.hex},{tag:e.tags.punctuation,color:a.peach.hex},{tag:e.tags.meta,color:a.teal.hex},{tag:e.tags.paren,color:a.overlay2.hex},{tag:e.tags.squareBracket,color:a.overlay2.hex},{tag:e.tags.brace,color:a.overlay2.hex},{tag:e.tags.derefOperator,color:a.overlay2.hex},{tag:e.tags.separator,color:a.overlay2.hex},{tag:e.tags.definitionKeyword,color:a.mauve.hex},{tag:e.tags.self,color:a.red.hex},{tag:[e.tags.standard(e.tags.typeName)],color:a.yellow.hex},{tag:e.tags.typeName,color:a.yellow.hex},{tag:e.tags.namespace,color:a.yellow.hex},{tag:e.tags.labelName,color:a.teal.hex},{tag:e.tags.variableName,color:n},{tag:e.tags.operator,color:a.sky.hex},{tag:e.tags.logicOperator,color:a.sky.hex},{tag:e.tags.updateOperator,color:a.sky.hex},{tag:e.tags.character,color:a.green.hex},{tag:e.tags.escape,color:a.pink.hex},{tag:e.tags.literal,color:a.sky.hex},{tag:e.tags.processingInstruction,color:a.mauve.hex},{tag:e.tags.angleBracket,color:a.overlay2.hex},{tag:e.tags.keyword,color:a.yellow.hex},{tag:e.tags.tagName,color:a.blue.hex},{tag:e.tags.className,color:a.teal.hex},{tag:[e.tags.constant(e.tags.className)],color:a.teal.hex},{tag:e.tags.attributeName,color:a.peach.hex},{tag:e.tags.atom,color:a.yellow.hex},{tag:e.tags.unit,color:a.yellow.hex},{tag:e.tags.color,color:a.pink.hex},{tag:e.tags.macroName,color:a.peach.hex}]}),b.EditorView.theme({"& .cm-selectionBackground, ::selection":{background:`${K(a.overlay2.rgb,.3)} !important`},"& .cb-content, & .ic":{backgroundColor:c},".cb-icon":{fill:n},".wg-codeblock-btn:hover":{backgroundColor:K(a.overlay1.rgb,.2)},".bq-none-mark":{"--bq-none-mark":n},".bq-note-mark":{"--bq-note-mark":a.blue.hex},".bq-tip-mark":{"--bq-tip-mark":a.green.hex},".bq-warning-mark":{"--bq-warning-mark":a.peach.hex},".bq-important-mark":{"--bq-important-mark":a.mauve.hex},".bq-caution-mark":{"--bq-caution-mark":a.red.hex},"& a.url":{color:a.blue.hex},"& a.url:visited":{color:a.mauve.hex},"& .cm-rendered-tag":{border:`1px solid ${a.surface2.hex}`,borderRadius:"4px",fontSize:".8em",padding:"0px 3px",background:a.surface0.hex}},{dark:r!=="latte"})]},Ee=(r,a,o)=>{const n=[r.r,r.g,r.b],c=[a.r,a.g,a.b];return`rgba(${ne(n,c,o,.3).join(", ")})`},K=(r,a)=>`rgba(${r.r}, ${r.g}, ${r.b}, ${a})`;function Te(r,a){const o=["Document","ListItem","BulletList","OrderedList"],n={none:"bq-none-mark",note:"bq-note-mark",tip:"bq-tip-mark",warning:"bq-warning-mark",important:"bq-important-mark",caution:"bq-caution-mark"},c={QuoteMark:(t,l,m)=>{const g=["qt-mk"];return m in n?g.push(n[m]):g.push(n.none),b.Decoration.mark({class:g.join(" ")}).range(t,l)},BlockquoteLine:(t,l)=>b.Decoration.line({class:"bq-line "+(l?"sw":"")}).range(t),quoteLine:(t,l,m)=>{const g=`calc(100% - ${Math.max(0,m)+1.2}ch)`;return b.Decoration.mark({class:"bq-text-line",attributes:{style:`width: ${g}`}}).range(t,l)}},d=(t,l,m,g)=>{const f=[],{from:C,to:k}=l,p=m.number,w=(D,F)=>{let x=0;const L=[];let S=0;return{enter({name:M,node:ee,from:ae,to:re}){M==="Blockquote"&&L.push(Ae(t,ee)),M==="QuoteMark"&&(f.push(c[M](ae,re,L[x])),S=re,x++)},leave({name:M,from:ee,to:ae}){M==="Paragraph"&&S<F&&f.push(c.quoteLine(S,F,S-D))}}};for(let D=p;D<g+p;D++){const{from:F,to:x}=t.state.doc.line(D),{from:L,to:S}=l,M=T(t,L,S);f.push(c.BlockquoteLine(F,M)),v.syntaxTree(t.state).iterate({from:F,to:x,...w(F,x)})}return f},s=[];return A(r,{enter:({name:t})=>!(t in o),leave:({name:t,from:l,to:m,node:g})=>{if(t!=="Blockquote")return;const f=r.state.sliceDoc(l,m).split(`
8
- `),C=r.state.doc.lineAt(l);s.push(...d(r,g,C,f.length))}}),b.Decoration.set(s,!0)}const Ae=(r,a)=>{const o=a.getChild("QuoteType");if(!o)return"none";const n=o.getChild("QuoteTypeText");return n?r.state.sliceDoc(n.from,n.to).toLowerCase():"none"},Le=()=>N.EditorView.baseTheme({"& .qt-mk":{position:"relative",color:"transparent",verticalAlign:"top"},"& .qt-mk::after":{position:"absolute",content:'" "',backgroundColor:"currentColor",top:"-100vh",width:"4px",height:"200vh",zIndex:"-1"},"&.cm-focused .bq-line.sw .qt-mk::after":{opacity:.3},"& .bq-line":{lineHeight:"1.2lh",overflowY:"hidden"},"&.cm-focused .bq-line.sw .bq-none-mark, .bq-none-mark::after":{color:"var(--bq-none-mark)"},"&.cm-focused .bq-line.sw .bq-note-mark, .bq-note-mark::after":{color:"var(--bq-note-mark)"},"&.cm-focused .bq-line.sw .bq-tip-mark, .bq-tip-mark::after":{color:"var(--bq-tip-mark)"},"&.cm-focused .bq-line.sw .bq-warning-mark, .bq-warning-mark::after":{color:"var(--bq-warning-mark)"},"&.cm-focused .bq-line.sw .bq-important-mark, .bq-important-mark::after":{color:"var(--bq-important-mark)"},"&.cm-focused .bq-line.sw .bq-caution-mark, .bq-caution-mark::after":{color:"var(--bq-caution-mark)"},"& .bq-text-line":{lineHeight:"1lh",display:"inline-block",paddingLeft:"6px",textIndent:"-7px",ariaHidden:"true"}}),Me=r=>[E(Te,r),Le()],qe={name:"QuoteTypeParser",parse(r,a){if((()=>{for(let n=0;n<r.depth;n++)if(r.parentType(n).name==="Blockquote")return!0;return!1})()){const n=a.text.match(/^(\s*>\s*)+(\[!\w+\])\s*$/);if(n&&n[2]){const c=n[2],d=a.text.indexOf(c),s=d+c.length,t=r.elt("QuoteType",r.lineStart+d,r.lineStart+s);t.children=[r.elt("QuoteTypeMark",r.lineStart+d,r.lineStart+d+2),r.elt("QuoteTypeText",r.lineStart+d+2,r.lineStart+s-1),r.elt("QuoteTypeMark",r.lineStart+s-1,r.lineStart+s)],r.addElement(t)}}return!1}},Se={defineNodes:[{name:"QuoteType",style:{"QuoteType/...":e.tags.content}},{name:"QuoteTypeMark",style:e.tags.processingInstruction},{name:"QuoteTypeText",style:e.tags.bool}],parseBlock:[qe]},X=(r,a,o)=>{const n=r.state.sliceDoc(a,o),c=n.match(/\[(.*)\]/);return c!==null&&c.length>1?{text:c[1],from:a+n.indexOf(c[1]),to:a+1+c[1].length}:{text:null}};function ve(r,a){const o=["FencedCode","Image","Link"],n={Link:{marks:["LinkMark"],url:"URL"}},c={Link:(s,t,l)=>b.Decoration.mark({class:"link "+(l?"sw":"")}).range(s,t),LinkMark:(s,t)=>b.Decoration.mark({class:"lk-mk"}).range(s,t),TextDec:(s,t,l)=>b.Decoration.mark({class:"lk-text url",tagName:"a",attributes:{href:l,target:"_blank"}}).range(s,t),URL:(s,t,l)=>b.Decoration.mark({class:"lk-url url",tagName:"a",attributes:{href:l,target:"_blank"}}).range(s,t)},d=[];return A(r,{enter:({type:{name:s},from:t,to:l,node:m})=>{if(s==="URL"&&d.push(c.URL(t,l,r.state.sliceDoc(t,l))),!(s in n))return!o.includes(s);d.push(c.Link(t,l,T(r,t,l)));const g=n[s].marks.flatMap(k=>m.getChildren(k));d.push(...g.map(({from:k,to:p})=>c.LinkMark(k,p)));const f=m.getChild(n[s].url);let C=null;if(f!==null){const{from:k,to:p}=f;C=r.state.sliceDoc(k,p),d.push(c.URL(k,p,C))}if(m.getChild("Image")===null){const{text:k,from:p,to:w}=X(r,t,l);k!==null&&C!==null&&d.push(c.TextDec(p,w,C))}return!1}}),b.Decoration.set(d,!0)}const He=(r,a)=>r.ctrlKey?Oe(r.target):!1,Oe=r=>{if(r.nodeName==="A"&&r.href&&r.classList.contains("url"))return window.open(r.href,r.target),!0},Re=N.EditorView.baseTheme({".lk-mk, .link > .lk-url":{display:"none"},"&.cm-focused .link.sw .lk-mk, &.cm-focused .link.sw .lk-url":{display:"inherit"}}),We=(r={})=>{const{hideMarks:a=!0}=r;return[E(ve,{},{eventHandlers:{mousedown:He}}),Re]};class Pe extends b.WidgetType{constructor(a,o=null,n="[image]"){super(),this.img=a,this.url=o,this.alt=n}toDOM(){let a=document.createElement("img");if(a.src=this.img,a.alt=this.alt,a.style.minWidth="100px",this.url){let o=document.createElement("a");return o.href=this.url,o.target="_blank",o.classList.add("url"),o.appendChild(a),o}else return a}eq(a){return this.img===a.img}ignoreEvent(){return!1}}function Ie(r,a){const o=["FencedCode","Image"],n=[];return A(r,{enter:({type:{name:c},from:d,to:s,node:t})=>{if(c==="Image"&&!T(r,d,s)){const{from:l,to:m}=t.getChild("URL"),g=r.state.sliceDoc(l,m),{text:f}=X(r,d,s);n.push(b.Decoration.replace({widget:new Pe(g,$e(r,t),f)}).range(d,s))}return!o.includes(c)}}),b.Decoration.set(n,!1)}const $e=(r,a)=>{const n=a.parent.getChild("URL");if(n!==null){const{from:c,to:d}=n;return r.state.sliceDoc(c,d)}return null},Ve=(r,a)=>r.ctrlKey?ze(r.target):!1,ze=r=>{const a=r.parentElement??!1;if(r.nodeName==="IMG"&&a&&a.nodeName==="A"&&a.classList.contains("url"))return!0},Ke=N.EditorView.baseTheme({}),Ge=(r={})=>{const{hideMarks:a=!0}=r;return[E(Ie,{},{eventHandlers:{mousedown:Ve}}),Ke]};class Z extends b.WidgetType{constructor(a,o=!1){super(),this.content=a,this.tag=o}toDOM(){const a=document.createElement("div");a.className="cm-html-widget",a.setAttribute("aria-hidden","true");const o=this.content.replace(/^```html\n?/,"").replace(/```$/,"").trim();return a.innerHTML=(this.tag?'<span class="cm-rendered-tag">RTAG</span>':"")+o,a.querySelectorAll("script").forEach(n=>{n.parentNode.removeChild(n)}),a}ignoreEvent(a){return a.type==="click"}eq(a){return a.content===this.content}}const J=W.StateEffect.define(),Qe=W.StateField.define({create(r){return b.Decoration.none},update(r,a){r=r.map(a.changes);for(let o of a.effects)if(o.is(J))return o.value;return r},provide:r=>b.EditorView.decorations.from(r)});function je(r){const a=[/<br>/,/<img .*\/>/],o={HTMLBlock:(c,d)=>{const s=r.state.doc.sliceString(c,d);return[b.Decoration.replace({widget:new Z(s),inclusive:!1}).range(c,d)]},HTMLTag:(c,d)=>{const s=r.state.doc.sliceString(c,d);return console.log(s),a.some(t=>t.test(s))?(console.log(s),[b.Decoration.replace({widget:new Z(s,!0),inclusive:!1}).range(c,d)]):[]}},n=[];return A(r,{enter:({type:c,from:d,to:s,node:t})=>{c.name in o&&(!T(r,d,s)||!r.hasFocus)&&n.push(...o[c.name](d,s))}}),b.Decoration.set(n)}const _e=N.EditorView.baseTheme({"& .cm-html-widget":{all:"unset"},"& .cm-html-widget > *":{paddingTop:"0",paddingBottom:"0",marginBottom:"0",marginTop:"0"},"& .cm-widgetBuffer":{display:"none"}}),Ye=b.EditorView.updateListener.of(r=>{if(r.selectionSet||r.docChanged||r.focusChanged||r.geometryChanged){const a=je(r.view);r.view.dispatch({effects:J.of(a)})}}),Ue=(r={})=>[Qe,Ye,_e],h=(r={markdown:{}})=>{const{markdown:{defaultCodeLanguage:a,codeLanguages:o,addKeymap:n,base:c,completeHTMLTags:d,htmlTagLanguage:s,extensions:t=[]},inline:l,Heading:m,Hr:g,List:f,Code:C}=r,k={defaultCodeLanguage:a,codeLanguages:o||B.languages,addKeymap:n,base:c,completeHTMLTags:d,htmlTagLanguage:s,extensions:[...t,te.GFM,oe,Se]};return[q.markdown(k),Y.of(U()),I(l),z(m),$(f),P(g),V(),We(),Ge(),Me(),Ue()]};typeof window<"u"&&(window.gnosis=h,window.HrPlugin=P,window.ListPlugin=$,window.CodePlugin=V,window.InlinePlugin=I,window.HeadingPlugin=z),u.CodePlugin=V,u.HeadingPlugin=z,u.HrPlugin=P,u.InlinePlugin=I,u.ListPlugin=$,u.catppuccin=U,u.gnosis=h,u.themeVariant=Y,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
6
+ </svg>`;class xe extends b.WidgetType{constructor(r,t){super(),this.type=r,this.code=t}toDOM(){let r=document.createElement("span");r.setAttribute("aria-hidden","true"),r.className="wg-codeblock";let t=document.createElement("button");return t.className="wg-codeblock-btn",t.innerHTML=ke(),r.appendChild(t),r}ignoreEvent(){return!1}}const S=[];function K(a,r){const{mode:t}=r,o=["Document","Blockquote","ListItem","BulletList","OrderedList"],c={FencedCode:G,CodeBlock:G},d={CodeMark:(n,l,g)=>[b.Decoration.mark({class:"cb-mk"}).range(l,g)],CodeInfo:(n,l,g)=>[b.Decoration.mark({class:"cb-mi"}).range(l,g)]},s=[];return T(a,{enter:({type:{name:n},from:l,to:g})=>(t==="type"&&n in c&&s.push(...c[n](a,l,g)),t==="mark"&&n in d&&s.push(...d[n](a,l,g)),o.includes(n)||n in c?(S.push({name:n,from:l,to:g}),!0):!1),Leave:({type:{name:n},from:l,to:g})=>o.includes(n)||n in c?(S.pop(),!0):!1}),{type:b.Decoration.set(s,!0),mark:b.Decoration.set(s,!0)}[t]}const G=(a,r,t)=>{const o=[],c=S[S.length-1],d=["BulletList","OrderedList","ListItem"].some(k=>k===c.name),s=["Blockquote"].some(k=>k===c.name),n=a.state.doc.lineAt(r),l=r-n.from,g=l>0,m=q(a,n.from,t);m||o.push(b.Decoration.widget({widget:new xe("view.state.sliceDoc(from, to)","code"),side:0}).range(r+1));const u=n.number,C=a.state.doc.sliceString(r,t).split(`
7
+ `).length;for(let k=u;k<C+u;k++){const{from:f,to:F}=a.state.doc.line(k),D="100% - 1.2ch",w=["cb-content"];m&&w.push("sw"),k===u&&w.push("cb-start"),k===C+u-1&&w.push("cb-end");const x=Math.max(f+l,0);if(F<x)w.push("free"),o.push(b.Decoration.widget({widget:new Q(w.join(" "),`calc(${D} - ${x-f}ch)`,`calc(${x-F}ch + 2px)`),side:1}).range(F)),console.log("Hello World");else if(x===F)w.push("wg"),o.push(b.Decoration.widget({widget:new Q(w.join(" "),`calc(${D} - ${x-f}ch)`),side:1}).range(x));else if(d||s||g){const N={style:`width: calc(${D} - ${x-f}ch)`};F>x&&o.push(b.Decoration.mark({class:w.join(" "),attributes:N}).range(x,F)),f!==x&&d&&o.push(b.Decoration.mark({class:"cb-listsp"}).range(f,x)),f!==x&&g&&o.push(b.Decoration.mark({class:"cb-spacer"}).range(f,x)),f!==x&&s&&o.push(b.Decoration.mark({class:"cb-quote bq"}).range(f,x))}else if(f!==F){const N={style:`width: calc(${D})`};o.push(b.Decoration.mark({class:w.join(" "),attributes:N}).range(f,F))}o.push(b.Decoration.line({class:"cb-line"}).range(f))}return o},Ce=()=>{const o="4px",c="1lh";return L.EditorView.baseTheme({".cb-start":{borderRadius:`${o} ${o} 0 0`},".cb-end ":{borderRadius:`0 0 ${o} ${o}`},".cb-start.cb-end":{borderRadius:`${o}`},".cb-content":{display:"inline-block",marginLeft:"2px",paddingLeft:"6px",paddingRigth:"0px",position:"relative"},".cb-content.wg":{cursor:"text"},".cb-content.wg.start":{maxWidth:"1px",Width:"1px",paddingLeft:"5px"},".cb-content.wg.end":{marginLeft:"0",paddingLeft:"0"},".cb-mi, .cb-mk":{color:"transparent"},"&.cm-focused .cb-content.sw > .cb-mi, &.cm-focused .cb-content.sw > .cb-mk":{color:"inherit"},"&.cm-focused .cb-content.sw .wg-codeblock":{display:"none",opacity:"0"},".wg-codeblock":{display:"inline-block",position:"absolute",top:"0",right:"0",zIndex:"100",margin:".05lh"},".wg-codeblock-btn":{padding:"0",display:"inline-flex",borderRadius:"999999px",background:"transparent",border:"none",outline:"none",justifyContent:"center",alignItems:"center",height:`calc(${c} + 4px )`,width:"5ch"},".cb-icon":{width:c,height:c,pointerEvents:"none",fill:"currentColor",opacity:"0.7"},".wg-codeblock-btn:hover":{background:"rgba(0, 0, 0, 0.07)"},".wg-codeblock-btn:hover .cb-icon":{opacity:"1"},".cb-content.cb-start.cb-end .wg-codeblock":{marginTop:"0",marginBottom:"0",top:"0",bottom:"0"},".cb-content.cb-start.cb-end .wg-codeblock-btn":{boxSizing:"border-box",maxHeight:"100%",width:"5ch"}})},I=a=>[E(K,{mode:"mark"}),E(K,{mode:"type"},{eventHandlers:{mousedown:ie}}),Ce()];function ye(a,r){const t=["Document"],o={ATXHeading1:(s,n=!0)=>b.Decoration.line({class:"h1 hg "+(n?"sw":"")}).range(s),ATXHeading2:(s,n=!0)=>b.Decoration.line({class:"h2 hg "+(n?"sw":"")}).range(s),ATXHeading3:(s,n=!0)=>b.Decoration.line({class:"h3 hg "+(n?"sw":"")}).range(s),ATXHeading4:(s,n=!0)=>b.Decoration.line({class:"h4 hg "+(n?"sw":"")}).range(s),ATXHeading5:(s,n=!0)=>b.Decoration.line({class:"h5 hg "+(n?"sw":"")}).range(s),ATXHeading6:(s,n=!0)=>b.Decoration.line({class:"h6 hg "+(n?"sw":"")}).range(s)},c={HeaderMark:(s,n)=>b.Decoration.mark({class:"mk"}).range(s,n)},d=[];return T(a,{enter:({type:s,from:n,to:l})=>(s.name in o&&d.push(o[s.name](n,q(a,n,l))),s.name in c&&d.push(c[s.name](n,l+1)),t.includes(s.name)||s.name in o)}),b.Decoration.set(d,!1)}const Fe=L.EditorView.baseTheme({".h1 ":{fontSize:"2.6rem"},".h2 ":{fontSize:"2.0rem"},".h3 ":{fontSize:"1.8rem"},".h4 ":{fontSize:"1.6rem"},".h5 ":{fontSize:"1.4rem"},".h6 ":{fontSize:"1.2rem"}}),we=L.EditorView.baseTheme({".hg .mk":{fontSize:"0"},"&.cm-focused .hg.sw .mk":{fontSize:"inherit"}}),$=(a={})=>[E(ye,{}),Fe,we],Be={version:"1.7.1",latte:{name:"Latte",emoji:"🌻",order:0,dark:!1,colors:{rosewater:{name:"Rosewater",order:0,hex:"#dc8a78",rgb:{r:220,g:138,b:120},hsl:{h:10.799999999999995,s:.5882352941176472,l:.6666666666666667},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#dd7878",rgb:{r:221,g:120,b:120},hsl:{h:0,s:.5976331360946746,l:.6686274509803922},accent:!0},pink:{name:"Pink",order:2,hex:"#ea76cb",rgb:{r:234,g:118,b:203},hsl:{h:316.0344827586207,s:.7341772151898731,l:.6901960784313725},accent:!0},mauve:{name:"Mauve",order:3,hex:"#8839ef",rgb:{r:136,g:57,b:239},hsl:{h:266.0439560439561,s:.8504672897196262,l:.5803921568627451},accent:!0},red:{name:"Red",order:4,hex:"#d20f39",rgb:{r:210,g:15,b:57},hsl:{h:347.0769230769231,s:.8666666666666666,l:.4411764705882353},accent:!0},maroon:{name:"Maroon",order:5,hex:"#e64553",rgb:{r:230,g:69,b:83},hsl:{h:354.78260869565213,s:.76303317535545,l:.5862745098039216},accent:!0},peach:{name:"Peach",order:6,hex:"#fe640b",rgb:{r:254,g:100,b:11},hsl:{h:21.975308641975307,s:.9918367346938776,l:.5196078431372549},accent:!0},yellow:{name:"Yellow",order:7,hex:"#df8e1d",rgb:{r:223,g:142,b:29},hsl:{h:34.948453608247426,s:.7698412698412698,l:.49411764705882355},accent:!0},green:{name:"Green",order:8,hex:"#40a02b",rgb:{r:64,g:160,b:43},hsl:{h:109.23076923076923,s:.5763546798029556,l:.39803921568627454},accent:!0},teal:{name:"Teal",order:9,hex:"#179299",rgb:{r:23,g:146,b:153},hsl:{h:183.23076923076923,s:.7386363636363636,l:.34509803921568627},accent:!0},sky:{name:"Sky",order:10,hex:"#04a5e5",rgb:{r:4,g:165,b:229},hsl:{h:197.0666666666667,s:.965665236051502,l:.45686274509803926},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#209fb5",rgb:{r:32,g:159,b:181},hsl:{h:188.85906040268458,s:.6995305164319249,l:.4176470588235294},accent:!0},blue:{name:"Blue",order:12,hex:"#1e66f5",rgb:{r:30,g:102,b:245},hsl:{h:219.90697674418607,s:.9148936170212768,l:.5392156862745098},accent:!0},lavender:{name:"Lavender",order:13,hex:"#7287fd",rgb:{r:114,g:135,b:253},hsl:{h:230.93525179856115,s:.9720279720279721,l:.7196078431372549},accent:!0},text:{name:"Text",order:14,hex:"#4c4f69",rgb:{r:76,g:79,b:105},hsl:{h:233.79310344827587,s:.16022099447513813,l:.3549019607843137},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#5c5f77",rgb:{r:92,g:95,b:119},hsl:{h:233.33333333333334,s:.1279620853080569,l:.4137254901960784},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#6c6f85",rgb:{r:108,g:111,b:133},hsl:{h:232.79999999999998,s:.10373443983402494,l:.4725490196078431},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#7c7f93",rgb:{r:124,g:127,b:147},hsl:{h:232.17391304347825,s:.09623430962343092,l:.5313725490196078},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#8c8fa1",rgb:{r:140,g:143,b:161},hsl:{h:231.42857142857144,s:.10047846889952144,l:.5901960784313726},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#9ca0b0",rgb:{r:156,g:160,b:176},hsl:{h:228.00000000000003,s:.11235955056179768,l:.6509803921568628},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#acb0be",rgb:{r:172,g:176,b:190},hsl:{h:226.6666666666667,s:.12162162162162159,l:.7098039215686275},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#bcc0cc",rgb:{r:188,g:192,b:204},hsl:{h:225.00000000000003,s:.13559322033898308,l:.7686274509803922},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#ccd0da",rgb:{r:204,g:208,b:218},hsl:{h:222.85714285714292,s:.1590909090909089,l:.8274509803921568},accent:!1},base:{name:"Base",order:23,hex:"#eff1f5",rgb:{r:239,g:241,b:245},hsl:{h:220.00000000000009,s:.23076923076923136,l:.9490196078431372},accent:!1},mantle:{name:"Mantle",order:24,hex:"#e6e9ef",rgb:{r:230,g:233,b:239},hsl:{h:220.00000000000006,s:.21951219512195116,l:.919607843137255},accent:!1},crust:{name:"Crust",order:25,hex:"#dce0e8",rgb:{r:220,g:224,b:232},hsl:{h:220.00000000000006,s:.20689655172413762,l:.8862745098039215},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#5c5f77",rgb:{r:92,g:95,b:119},hsl:{h:233.33333333333334,s:.1279620853080569,l:.4137254901960784},code:0},bright:{name:"Bright Black",hex:"#6c6f85",rgb:{r:108,g:111,b:133},hsl:{h:232.79999999999998,s:.10373443983402494,l:.4725490196078431},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#d20f39",rgb:{r:210,g:15,b:57},hsl:{h:347.0769230769231,s:.8666666666666666,l:.4411764705882353},code:1},bright:{name:"Bright Red",hex:"#de293e",rgb:{r:222,g:41,b:62},hsl:{h:353.0386740331492,s:.7327935222672065,l:.515686274509804},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#40a02b",rgb:{r:64,g:160,b:43},hsl:{h:109.23076923076923,s:.5763546798029556,l:.39803921568627454},code:2},bright:{name:"Bright Green",hex:"#49af3d",rgb:{r:73,g:175,b:61},hsl:{h:113.68421052631581,s:.48305084745762705,l:.4627450980392157},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#df8e1d",rgb:{r:223,g:142,b:29},hsl:{h:34.948453608247426,s:.7698412698412698,l:.49411764705882355},code:3},bright:{name:"Bright Yellow",hex:"#eea02d",rgb:{r:238,g:160,b:45},hsl:{h:35.751295336787564,s:.8502202643171807,l:.5549019607843138},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#1e66f5",rgb:{r:30,g:102,b:245},hsl:{h:219.90697674418607,s:.9148936170212768,l:.5392156862745098},code:4},bright:{name:"Bright Blue",hex:"#456eff",rgb:{r:69,g:110,b:255},hsl:{h:226.77419354838707,s:1,l:.6352941176470588},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#ea76cb",rgb:{r:234,g:118,b:203},hsl:{h:316.0344827586207,s:.7341772151898731,l:.6901960784313725},code:5},bright:{name:"Bright Magenta",hex:"#fe85d8",rgb:{r:254,g:133,b:216},hsl:{h:318.8429752066116,s:.983739837398374,l:.7588235294117647},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#179299",rgb:{r:23,g:146,b:153},hsl:{h:183.23076923076923,s:.7386363636363636,l:.34509803921568627},code:6},bright:{name:"Bright Cyan",hex:"#2d9fa8",rgb:{r:45,g:159,b:168},hsl:{h:184.39024390243904,s:.5774647887323943,l:.4176470588235294},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#acb0be",rgb:{r:172,g:176,b:190},hsl:{h:226.6666666666667,s:.12162162162162159,l:.7098039215686275},code:7},bright:{name:"Bright White",hex:"#bcc0cc",rgb:{r:188,g:192,b:204},hsl:{h:225.00000000000003,s:.13559322033898308,l:.7686274509803922},code:15}}}},frappe:{name:"Frappé",emoji:"🪴",order:1,dark:!0,colors:{rosewater:{name:"Rosewater",order:0,hex:"#f2d5cf",rgb:{r:242,g:213,b:207},hsl:{h:10.2857142857143,s:.5737704918032784,l:.8803921568627451},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#eebebe",rgb:{r:238,g:190,b:190},hsl:{h:0,s:.5853658536585367,l:.8392156862745098},accent:!0},pink:{name:"Pink",order:2,hex:"#f4b8e4",rgb:{r:244,g:184,b:228},hsl:{h:316,s:.7317073170731713,l:.8392156862745098},accent:!0},mauve:{name:"Mauve",order:3,hex:"#ca9ee6",rgb:{r:202,g:158,b:230},hsl:{h:276.66666666666663,s:.5901639344262294,l:.7607843137254902},accent:!0},red:{name:"Red",order:4,hex:"#e78284",rgb:{r:231,g:130,b:132},hsl:{h:358.8118811881188,s:.6778523489932885,l:.7078431372549019},accent:!0},maroon:{name:"Maroon",order:5,hex:"#ea999c",rgb:{r:234,g:153,b:156},hsl:{h:357.77777777777777,s:.6585365853658534,l:.7588235294117647},accent:!0},peach:{name:"Peach",order:6,hex:"#ef9f76",rgb:{r:239,g:159,b:118},hsl:{h:20.33057851239669,s:.7908496732026143,l:.7},accent:!0},yellow:{name:"Yellow",order:7,hex:"#e5c890",rgb:{r:229,g:200,b:144},hsl:{h:39.52941176470588,s:.6204379562043796,l:.7313725490196079},accent:!0},green:{name:"Green",order:8,hex:"#a6d189",rgb:{r:166,g:209,b:137},hsl:{h:95.83333333333331,s:.4390243902439024,l:.6784313725490196},accent:!0},teal:{name:"Teal",order:9,hex:"#81c8be",rgb:{r:129,g:200,b:190},hsl:{h:171.5492957746479,s:.3922651933701657,l:.6450980392156862},accent:!0},sky:{name:"Sky",order:10,hex:"#99d1db",rgb:{r:153,g:209,b:219},hsl:{h:189.09090909090907,s:.47826086956521735,l:.7294117647058823},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#85c1dc",rgb:{r:133,g:193,b:220},hsl:{h:198.62068965517244,s:.5541401273885351,l:.692156862745098},accent:!0},blue:{name:"Blue",order:12,hex:"#8caaee",rgb:{r:140,g:170,b:238},hsl:{h:221.6326530612245,s:.7424242424242424,l:.7411764705882353},accent:!0},lavender:{name:"Lavender",order:13,hex:"#babbf1",rgb:{r:186,g:187,b:241},hsl:{h:238.90909090909093,s:.6626506024096385,l:.8372549019607842},accent:!0},text:{name:"Text",order:14,hex:"#c6d0f5",rgb:{r:198,g:208,b:245},hsl:{h:227.2340425531915,s:.7014925373134333,l:.8686274509803922},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#b5bfe2",rgb:{r:181,g:191,b:226},hsl:{h:226.66666666666669,s:.43689320388349495,l:.7980392156862746},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#a5adce",rgb:{r:165,g:173,b:206},hsl:{h:228.29268292682926,s:.2949640287769784,l:.7274509803921569},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#949cbb",rgb:{r:148,g:156,b:187},hsl:{h:227.69230769230768,s:.22285714285714275,l:.6568627450980392},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#838ba7",rgb:{r:131,g:139,b:167},hsl:{h:226.66666666666669,s:.16981132075471703,l:.584313725490196},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#737994",rgb:{r:115,g:121,b:148},hsl:{h:229.0909090909091,s:.13360323886639683,l:.515686274509804},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#626880",rgb:{r:98,g:104,b:128},hsl:{h:228.00000000000003,s:.1327433628318584,l:.44313725490196076},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#51576d",rgb:{r:81,g:87,b:109},hsl:{h:227.14285714285714,s:.14736842105263157,l:.37254901960784315},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#414559",rgb:{r:65,g:69,b:89},hsl:{h:230.00000000000003,s:.15584415584415584,l:.30196078431372547},accent:!1},base:{name:"Base",order:23,hex:"#303446",rgb:{r:48,g:52,b:70},hsl:{h:229.0909090909091,s:.18644067796610175,l:.23137254901960785},accent:!1},mantle:{name:"Mantle",order:24,hex:"#292c3c",rgb:{r:41,g:44,b:60},hsl:{h:230.52631578947367,s:.18811881188118806,l:.19803921568627453},accent:!1},crust:{name:"Crust",order:25,hex:"#232634",rgb:{r:35,g:38,b:52},hsl:{h:229.41176470588238,s:.19540229885057467,l:.17058823529411765},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#51576d",rgb:{r:81,g:87,b:109},hsl:{h:227.14285714285714,s:.14736842105263157,l:.37254901960784315},code:0},bright:{name:"Bright Black",hex:"#626880",rgb:{r:98,g:104,b:128},hsl:{h:228.00000000000003,s:.1327433628318584,l:.44313725490196076},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#e78284",rgb:{r:231,g:130,b:132},hsl:{h:358.8118811881188,s:.6778523489932885,l:.7078431372549019},code:1},bright:{name:"Bright Red",hex:"#e67172",rgb:{r:230,g:113,b:114},hsl:{h:359.4871794871795,s:.7005988023952096,l:.6725490196078432},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#a6d189",rgb:{r:166,g:209,b:137},hsl:{h:95.83333333333331,s:.4390243902439024,l:.6784313725490196},code:2},bright:{name:"Bright Green",hex:"#8ec772",rgb:{r:142,g:199,b:114},hsl:{h:100.23529411764706,s:.431472081218274,l:.6137254901960785},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#e5c890",rgb:{r:229,g:200,b:144},hsl:{h:39.52941176470588,s:.6204379562043796,l:.7313725490196079},code:3},bright:{name:"Bright Yellow",hex:"#d9ba73",rgb:{r:217,g:186,b:115},hsl:{h:41.764705882352935,s:.5730337078651685,l:.6509803921568628},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#8caaee",rgb:{r:140,g:170,b:238},hsl:{h:221.6326530612245,s:.7424242424242424,l:.7411764705882353},code:4},bright:{name:"Bright Blue",hex:"#7b9ef0",rgb:{r:123,g:158,b:240},hsl:{h:222.05128205128207,s:.7959183673469388,l:.711764705882353},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#f4b8e4",rgb:{r:244,g:184,b:228},hsl:{h:316,s:.7317073170731713,l:.8392156862745098},code:5},bright:{name:"Bright Magenta",hex:"#f2a4db",rgb:{r:242,g:164,b:219},hsl:{h:317.6923076923077,s:.7499999999999998,l:.7960784313725491},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#81c8be",rgb:{r:129,g:200,b:190},hsl:{h:171.5492957746479,s:.3922651933701657,l:.6450980392156862},code:6},bright:{name:"Bright Cyan",hex:"#5abfb5",rgb:{r:90,g:191,b:181},hsl:{h:174.05940594059405,s:.44104803493449785,l:.5509803921568628},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#a5adce",rgb:{r:165,g:173,b:206},hsl:{h:228.29268292682926,s:.2949640287769784,l:.7274509803921569},code:7},bright:{name:"Bright White",hex:"#b5bfe2",rgb:{r:181,g:191,b:226},hsl:{h:226.66666666666669,s:.43689320388349495,l:.7980392156862746},code:15}}}},macchiato:{name:"Macchiato",emoji:"🌺",order:2,dark:!0,colors:{rosewater:{name:"Rosewater",order:0,hex:"#f4dbd6",rgb:{r:244,g:219,b:214},hsl:{h:9.999999999999963,s:.5769230769230775,l:.8980392156862745},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#f0c6c6",rgb:{r:240,g:198,b:198},hsl:{h:0,s:.5833333333333333,l:.8588235294117648},accent:!0},pink:{name:"Pink",order:2,hex:"#f5bde6",rgb:{r:245,g:189,b:230},hsl:{h:316.0714285714286,s:.7368421052631583,l:.8509803921568628},accent:!0},mauve:{name:"Mauve",order:3,hex:"#c6a0f6",rgb:{r:198,g:160,b:246},hsl:{h:266.51162790697674,s:.8269230769230772,l:.7960784313725491},accent:!0},red:{name:"Red",order:4,hex:"#ed8796",rgb:{r:237,g:135,b:150},hsl:{h:351.1764705882353,s:.7391304347826088,l:.7294117647058824},accent:!0},maroon:{name:"Maroon",order:5,hex:"#ee99a0",rgb:{r:238,g:153,b:160},hsl:{h:355.05882352941177,s:.7142857142857143,l:.7666666666666666},accent:!0},peach:{name:"Peach",order:6,hex:"#f5a97f",rgb:{r:245,g:169,b:127},hsl:{h:21.355932203389827,s:.8550724637681162,l:.7294117647058824},accent:!0},yellow:{name:"Yellow",order:7,hex:"#eed49f",rgb:{r:238,g:212,b:159},hsl:{h:40.253164556962034,s:.6991150442477877,l:.7784313725490196},accent:!0},green:{name:"Green",order:8,hex:"#a6da95",rgb:{r:166,g:218,b:149},hsl:{h:105.21739130434783,s:.4825174825174825,l:.7196078431372549},accent:!0},teal:{name:"Teal",order:9,hex:"#8bd5ca",rgb:{r:139,g:213,b:202},hsl:{h:171.08108108108107,s:.46835443037974706,l:.6901960784313725},accent:!0},sky:{name:"Sky",order:10,hex:"#91d7e3",rgb:{r:145,g:215,b:227},hsl:{h:188.78048780487802,s:.5942028985507245,l:.7294117647058823},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#7dc4e4",rgb:{r:125,g:196,b:228},hsl:{h:198.64077669902912,s:.6560509554140128,l:.692156862745098},accent:!0},blue:{name:"Blue",order:12,hex:"#8aadf4",rgb:{r:138,g:173,b:244},hsl:{h:220.188679245283,s:.8281250000000003,l:.7490196078431373},accent:!0},lavender:{name:"Lavender",order:13,hex:"#b7bdf8",rgb:{r:183,g:189,b:248},hsl:{h:234.46153846153848,s:.8227848101265824,l:.8450980392156863},accent:!0},text:{name:"Text",order:14,hex:"#cad3f5",rgb:{r:202,g:211,b:245},hsl:{h:227.4418604651163,s:.6825396825396831,l:.8764705882352941},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#b8c0e0",rgb:{r:184,g:192,b:224},hsl:{h:228,s:.39215686274509803,l:.8},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#a5adcb",rgb:{r:165,g:173,b:203},hsl:{h:227.36842105263156,s:.2676056338028167,l:.7215686274509804},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#939ab7",rgb:{r:147,g:154,b:183},hsl:{h:228.33333333333331,s:.2000000000000001,l:.6470588235294117},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#8087a2",rgb:{r:128,g:135,b:162},hsl:{h:227.6470588235294,s:.1545454545454545,l:.5686274509803921},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#6e738d",rgb:{r:110,g:115,b:141},hsl:{h:230.32258064516128,s:.12350597609561753,l:.49215686274509807},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#5b6078",rgb:{r:91,g:96,b:120},hsl:{h:229.65517241379308,s:.13744075829383887,l:.4137254901960784},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#494d64",rgb:{r:73,g:77,b:100},hsl:{h:231.11111111111114,s:.15606936416184972,l:.3392156862745098},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#363a4f",rgb:{r:54,g:58,b:79},hsl:{h:230.4,s:.1879699248120301,l:.2607843137254902},accent:!1},base:{name:"Base",order:23,hex:"#24273a",rgb:{r:36,g:39,b:58},hsl:{h:231.8181818181818,s:.23404255319148934,l:.1843137254901961},accent:!1},mantle:{name:"Mantle",order:24,hex:"#1e2030",rgb:{r:30,g:32,b:48},hsl:{h:233.33333333333334,s:.23076923076923075,l:.15294117647058825},accent:!1},crust:{name:"Crust",order:25,hex:"#181926",rgb:{r:24,g:25,b:38},hsl:{h:235.71428571428572,s:.22580645161290322,l:.12156862745098039},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#494d64",rgb:{r:73,g:77,b:100},hsl:{h:231.11111111111114,s:.15606936416184972,l:.3392156862745098},code:0},bright:{name:"Bright Black",hex:"#5b6078",rgb:{r:91,g:96,b:120},hsl:{h:229.65517241379308,s:.13744075829383887,l:.4137254901960784},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#ed8796",rgb:{r:237,g:135,b:150},hsl:{h:351.1764705882353,s:.7391304347826088,l:.7294117647058824},code:1},bright:{name:"Bright Red",hex:"#ec7486",rgb:{r:236,g:116,b:134},hsl:{h:351,s:.759493670886076,l:.6901960784313725},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#a6da95",rgb:{r:166,g:218,b:149},hsl:{h:105.21739130434783,s:.4825174825174825,l:.7196078431372549},code:2},bright:{name:"Bright Green",hex:"#8ccf7f",rgb:{r:140,g:207,b:127},hsl:{h:110.24999999999999,s:.45454545454545453,l:.6549019607843137},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#eed49f",rgb:{r:238,g:212,b:159},hsl:{h:40.253164556962034,s:.6991150442477877,l:.7784313725490196},code:3},bright:{name:"Bright Yellow",hex:"#e1c682",rgb:{r:225,g:198,b:130},hsl:{h:42.94736842105264,s:.6129032258064515,l:.696078431372549},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#8aadf4",rgb:{r:138,g:173,b:244},hsl:{h:220.188679245283,s:.8281250000000003,l:.7490196078431373},code:4},bright:{name:"Bright Blue",hex:"#78a1f6",rgb:{r:120,g:161,b:246},hsl:{h:220.47619047619048,s:.8750000000000002,l:.7176470588235294},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#f5bde6",rgb:{r:245,g:189,b:230},hsl:{h:316.0714285714286,s:.7368421052631583,l:.8509803921568628},code:5},bright:{name:"Bright Magenta",hex:"#f2a9dd",rgb:{r:242,g:169,b:221},hsl:{h:317.26027397260276,s:.7373737373737372,l:.8058823529411765},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#8bd5ca",rgb:{r:139,g:213,b:202},hsl:{h:171.08108108108107,s:.46835443037974706,l:.6901960784313725},code:6},bright:{name:"Bright Cyan",hex:"#63cbc0",rgb:{r:99,g:203,b:192},hsl:{h:173.65384615384616,s:.4999999999999998,l:.592156862745098},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#a5adcb",rgb:{r:165,g:173,b:203},hsl:{h:227.36842105263156,s:.2676056338028167,l:.7215686274509804},code:7},bright:{name:"Bright White",hex:"#b8c0e0",rgb:{r:184,g:192,b:224},hsl:{h:228,s:.39215686274509803,l:.8},code:15}}}},mocha:{name:"Mocha",emoji:"🌿",order:3,dark:!0,colors:{rosewater:{name:"Rosewater",order:0,hex:"#f5e0dc",rgb:{r:245,g:224,b:220},hsl:{h:9.599999999999968,s:.555555555555556,l:.911764705882353},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#f2cdcd",rgb:{r:242,g:205,b:205},hsl:{h:0,s:.587301587301587,l:.8764705882352941},accent:!0},pink:{name:"Pink",order:2,hex:"#f5c2e7",rgb:{r:245,g:194,b:231},hsl:{h:316.4705882352941,s:.7183098591549301,l:.8607843137254902},accent:!0},mauve:{name:"Mauve",order:3,hex:"#cba6f7",rgb:{r:203,g:166,b:247},hsl:{h:267.4074074074074,s:.8350515463917528,l:.8098039215686275},accent:!0},red:{name:"Red",order:4,hex:"#f38ba8",rgb:{r:243,g:139,b:168},hsl:{h:343.2692307692308,s:.8124999999999998,l:.7490196078431373},accent:!0},maroon:{name:"Maroon",order:5,hex:"#eba0ac",rgb:{r:235,g:160,b:172},hsl:{h:350.4,s:.6521739130434779,l:.7745098039215685},accent:!0},peach:{name:"Peach",order:6,hex:"#fab387",rgb:{r:250,g:179,b:135},hsl:{h:22.95652173913043,s:.92,l:.7549019607843137},accent:!0},yellow:{name:"Yellow",order:7,hex:"#f9e2af",rgb:{r:249,g:226,b:175},hsl:{h:41.35135135135135,s:.8604651162790699,l:.8313725490196078},accent:!0},green:{name:"Green",order:8,hex:"#a6e3a1",rgb:{r:166,g:227,b:161},hsl:{h:115.45454545454544,s:.5409836065573769,l:.7607843137254902},accent:!0},teal:{name:"Teal",order:9,hex:"#94e2d5",rgb:{r:148,g:226,b:213},hsl:{h:170.00000000000003,s:.5735294117647057,l:.7333333333333334},accent:!0},sky:{name:"Sky",order:10,hex:"#89dceb",rgb:{r:137,g:220,b:235},hsl:{h:189.18367346938774,s:.7101449275362316,l:.7294117647058823},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#74c7ec",rgb:{r:116,g:199,b:236},hsl:{h:198.5,s:.759493670886076,l:.6901960784313725},accent:!0},blue:{name:"Blue",order:12,hex:"#89b4fa",rgb:{r:137,g:180,b:250},hsl:{h:217.1681415929203,s:.9186991869918699,l:.7588235294117647},accent:!0},lavender:{name:"Lavender",order:13,hex:"#b4befe",rgb:{r:180,g:190,b:254},hsl:{h:231.89189189189187,s:.9736842105263159,l:.8509803921568628},accent:!0},text:{name:"Text",order:14,hex:"#cdd6f4",rgb:{r:205,g:214,b:244},hsl:{h:226.15384615384616,s:.6393442622950825,l:.8803921568627451},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#bac2de",rgb:{r:186,g:194,b:222},hsl:{h:226.66666666666669,s:.35294117647058837,l:.8},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#a6adc8",rgb:{r:166,g:173,b:200},hsl:{h:227.6470588235294,s:.23611111111111102,l:.7176470588235294},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#9399b2",rgb:{r:147,g:153,b:178},hsl:{h:228.38709677419354,s:.16756756756756758,l:.6372549019607843},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#7f849c",rgb:{r:127,g:132,b:156},hsl:{h:229.65517241379308,s:.12775330396475776,l:.5549019607843138},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#6c7086",rgb:{r:108,g:112,b:134},hsl:{h:230.7692307692308,s:.10743801652892565,l:.4745098039215686},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#585b70",rgb:{r:88,g:91,b:112},hsl:{h:232.5,s:.12,l:.39215686274509803},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#45475a",rgb:{r:69,g:71,b:90},hsl:{h:234.2857142857143,s:.13207547169811326,l:.31176470588235294},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#313244",rgb:{r:49,g:50,b:68},hsl:{h:236.84210526315792,s:.16239316239316234,l:.22941176470588237},accent:!1},base:{name:"Base",order:23,hex:"#1e1e2e",rgb:{r:30,g:30,b:46},hsl:{h:240,s:.21052631578947367,l:.14901960784313725},accent:!1},mantle:{name:"Mantle",order:24,hex:"#181825",rgb:{r:24,g:24,b:37},hsl:{h:240,s:.2131147540983607,l:.11960784313725491},accent:!1},crust:{name:"Crust",order:25,hex:"#11111b",rgb:{r:17,g:17,b:27},hsl:{h:240,s:.22727272727272727,l:.08627450980392157},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#45475a",rgb:{r:69,g:71,b:90},hsl:{h:234.2857142857143,s:.13207547169811326,l:.31176470588235294},code:0},bright:{name:"Bright Black",hex:"#585b70",rgb:{r:88,g:91,b:112},hsl:{h:232.5,s:.12,l:.39215686274509803},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#f38ba8",rgb:{r:243,g:139,b:168},hsl:{h:343.2692307692308,s:.8124999999999998,l:.7490196078431373},code:1},bright:{name:"Bright Red",hex:"#f37799",rgb:{r:243,g:119,b:153},hsl:{h:343.54838709677415,s:.8378378378378376,l:.7098039215686274},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#a6e3a1",rgb:{r:166,g:227,b:161},hsl:{h:115.45454545454544,s:.5409836065573769,l:.7607843137254902},code:2},bright:{name:"Bright Green",hex:"#89d88b",rgb:{r:137,g:216,b:139},hsl:{h:121.51898734177213,s:.5031847133757963,l:.692156862745098},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#f9e2af",rgb:{r:249,g:226,b:175},hsl:{h:41.35135135135135,s:.8604651162790699,l:.8313725490196078},code:3},bright:{name:"Bright Yellow",hex:"#ebd391",rgb:{r:235,g:211,b:145},hsl:{h:44,s:.692307692307692,l:.7450980392156863},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#89b4fa",rgb:{r:137,g:180,b:250},hsl:{h:217.1681415929203,s:.9186991869918699,l:.7588235294117647},code:4},bright:{name:"Bright Blue",hex:"#74a8fc",rgb:{r:116,g:168,b:252},hsl:{h:217.05882352941174,s:.9577464788732396,l:.7215686274509804},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#f5c2e7",rgb:{r:245,g:194,b:231},hsl:{h:316.4705882352941,s:.7183098591549301,l:.8607843137254902},code:5},bright:{name:"Bright Magenta",hex:"#f2aede",rgb:{r:242,g:174,b:222},hsl:{h:317.6470588235294,s:.7234042553191488,l:.8156862745098039},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#94e2d5",rgb:{r:148,g:226,b:213},hsl:{h:170.00000000000003,s:.5735294117647057,l:.7333333333333334},code:6},bright:{name:"Bright Cyan",hex:"#6bd7ca",rgb:{r:107,g:215,b:202},hsl:{h:172.77777777777777,s:.5744680851063831,l:.6313725490196078},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#a6adc8",rgb:{r:166,g:173,b:200},hsl:{h:227.6470588235294,s:.23611111111111102,l:.7176470588235294},code:7},bright:{name:"Bright White",hex:"#bac2de",rgb:{r:186,g:194,b:222},hsl:{h:226.66666666666669,s:.35294117647058837,l:.8},code:15}}}}},H=a=>Object.entries(a),{version:he,...Ne}=Be,_=H(Ne).reduce((a,[r,t])=>(a[r]={...t,colorEntries:H(t.colors),ansiColorEntries:H(t.ansiColors)},a),{});H(_);const y=({variant:a,settings:r,styles:t})=>{const o=b.EditorView.theme({"&":{backgroundColor:r.background,color:r.foreground},".cm-content":{caretColor:r.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:r.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:r.selection},".cm-activeLine":{backgroundColor:r.lineHighlight},".cm-gutters":{backgroundColor:r.gutterBackground,color:r.gutterForeground},".cm-activeLineGutter":{backgroundColor:r.lineHighlight}},{dark:a==="dark"}),c=v.HighlightStyle.define(t);return[o,v.syntaxHighlighting(c)]};y({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:e.tags.comment,color:"#404080"},{tag:[e.tags.string,e.tags.regexp],color:"#999999"},{tag:e.tags.number,color:"#7090B0"},{tag:[e.tags.bool,e.tags.null],color:"#8080A0"},{tag:[e.tags.punctuation,e.tags.derefOperator],color:"#805080"},{tag:e.tags.keyword,color:"#60B0FF"},{tag:e.tags.definitionKeyword,color:"#B0FFF0"},{tag:e.tags.moduleKeyword,color:"#60B0FF"},{tag:e.tags.operator,color:"#A0A0FF"},{tag:[e.tags.variableName,e.tags.self],color:"#008080"},{tag:e.tags.operatorKeyword,color:"#A0A0FF"},{tag:e.tags.controlKeyword,color:"#80A0FF"},{tag:e.tags.className,color:"#70E080"},{tag:[e.tags.function(e.tags.propertyName),e.tags.propertyName],color:"#50A0A0"},{tag:e.tags.tagName,color:"#009090"},{tag:e.tags.modifier,color:"#B0FFF0"},{tag:[e.tags.squareBracket,e.tags.attributeName],color:"#D0D0FF"}]}),y({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:e.tags.comment,color:"#787b8099"},{tag:e.tags.string,color:"#86b300"},{tag:e.tags.regexp,color:"#4cbf99"},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"#ffaa33"},{tag:e.tags.variableName,color:"#5c6166"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#fa8d3e"},{tag:[e.tags.keyword,e.tags.special(e.tags.brace)],color:"#fa8d3e"},{tag:e.tags.operator,color:"#ed9366"},{tag:e.tags.separator,color:"#5c6166b3"},{tag:e.tags.punctuation,color:"#5c6166"},{tag:[e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName)],color:"#f2ae49"},{tag:[e.tags.className,e.tags.definition(e.tags.typeName)],color:"#22a4e6"},{tag:[e.tags.tagName,e.tags.typeName,e.tags.self,e.tags.labelName],color:"#55b4d4"},{tag:e.tags.angleBracket,color:"#55b4d480"},{tag:e.tags.attributeName,color:"#f2ae49"}]}),y({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:e.tags.comment,color:"#6E6E6E"},{tag:[e.tags.string,e.tags.regexp,e.tags.special(e.tags.brace)],color:"#5C81B3"},{tag:e.tags.number,color:"#C1E1B8"},{tag:e.tags.bool,color:"#53667D"},{tag:[e.tags.definitionKeyword,e.tags.modifier,e.tags.function(e.tags.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[e.tags.keyword,e.tags.moduleKeyword,e.tags.operatorKeyword,e.tags.operator],color:"#697A8E",fontWeight:"bold"},{tag:[e.tags.variableName,e.tags.attributeName],color:"#708E67"},{tag:[e.tags.function(e.tags.variableName),e.tags.definition(e.tags.propertyName),e.tags.derefOperator],color:"#fff"},{tag:e.tags.tagName,color:"#A3D295"}]}),y({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:e.tags.comment,color:"#666666"},{tag:[e.tags.string,e.tags.special(e.tags.brace)],color:"#54BE0D"},{tag:e.tags.regexp,color:"#E9C062"},{tag:e.tags.number,color:"#CF6A4C"},{tag:[e.tags.keyword,e.tags.operator],color:"#5EA6EA"},{tag:e.tags.variableName,color:"#7587A6"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#F9EE98"},{tag:[e.tags.propertyName,e.tags.function(e.tags.variableName)],color:"#937121"},{tag:[e.tags.typeName,e.tags.angleBracket,e.tags.tagName],color:"#9B859D"}]}),y({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:e.tags.comment,color:"#6B4E32"},{tag:[e.tags.keyword,e.tags.operator,e.tags.derefOperator],color:"#EF5D32"},{tag:e.tags.className,color:"#EFAC32",fontWeight:"bold"},{tag:[e.tags.typeName,e.tags.propertyName,e.tags.function(e.tags.variableName),e.tags.definition(e.tags.variableName)],color:"#EFAC32"},{tag:e.tags.definition(e.tags.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:e.tags.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[e.tags.number,e.tags.bool],color:"#6C99BB"},{tag:[e.tags.variableName,e.tags.self],color:"#7DAF9C"},{tag:[e.tags.string,e.tags.special(e.tags.brace),e.tags.regexp],color:"#D9D762"},{tag:[e.tags.angleBracket,e.tags.tagName,e.tags.attributeName],color:"#EFCB43"}]}),y({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:e.tags.comment,color:"#404040"},{tag:[e.tags.string,e.tags.special(e.tags.brace),e.tags.regexp],color:"#00D8FF"},{tag:e.tags.number,color:"#E62286"},{tag:[e.tags.variableName,e.tags.attributeName,e.tags.self],color:"#E62286",fontWeight:"bold"},{tag:e.tags.function(e.tags.variableName),color:"#fff",fontWeight:"bold"}]}),y({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:e.tags.comment,color:"#BCC8BA"},{tag:[e.tags.string,e.tags.special(e.tags.brace),e.tags.regexp],color:"#5D90CD"},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"#46A609"},{tag:e.tags.keyword,color:"#AF956F"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#C52727"},{tag:[e.tags.angleBracket,e.tags.tagName,e.tags.attributeName],color:"#606060"},{tag:e.tags.self,color:"#000"}]}),y({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:e.tags.comment,color:"#0088FF"},{tag:e.tags.string,color:"#3AD900"},{tag:e.tags.regexp,color:"#80FFC2"},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"#FF628C"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#FFEE80"},{tag:e.tags.variableName,color:"#CCCCCC"},{tag:e.tags.self,color:"#FF80E1"},{tag:[e.tags.className,e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName),e.tags.definition(e.tags.typeName),e.tags.labelName],color:"#FFDD00"},{tag:[e.tags.keyword,e.tags.operator],color:"#FF9D00"},{tag:[e.tags.propertyName,e.tags.typeName],color:"#80FFBB"},{tag:e.tags.special(e.tags.brace),color:"#EDEF7D"},{tag:e.tags.attributeName,color:"#9EFFFF"},{tag:e.tags.derefOperator,color:"#fff"}]}),y({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:e.tags.comment,color:"#AEAEAE"},{tag:[e.tags.string,e.tags.special(e.tags.brace),e.tags.regexp],color:"#8DFF8E"},{tag:[e.tags.className,e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName),e.tags.function(e.tags.definition(e.tags.variableName)),e.tags.definition(e.tags.typeName)],color:"#A3EBFF"},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"#62E9BD"},{tag:[e.tags.keyword,e.tags.operator],color:"#2BF1DC"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#F8FBB1"},{tag:[e.tags.variableName,e.tags.self],color:"#B683CA"},{tag:[e.tags.angleBracket,e.tags.tagName,e.tags.typeName,e.tags.propertyName],color:"#60A4F1"},{tag:e.tags.derefOperator,color:"#E0E0E0"},{tag:e.tags.attributeName,color:"#7BACCA"}]}),y({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:e.tags.comment,color:"#6272a4"},{tag:[e.tags.string,e.tags.special(e.tags.brace)],color:"#f1fa8c"},{tag:[e.tags.number,e.tags.self,e.tags.bool,e.tags.null],color:"#bd93f9"},{tag:[e.tags.keyword,e.tags.operator],color:"#ff79c6"},{tag:[e.tags.definitionKeyword,e.tags.typeName],color:"#8be9fd"},{tag:e.tags.definition(e.tags.typeName),color:"#f8f8f2"},{tag:[e.tags.className,e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName),e.tags.attributeName],color:"#50fa7b"}]}),y({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:e.tags.comment,color:"#AAAAAA"},{tag:[e.tags.keyword,e.tags.operator,e.tags.typeName,e.tags.tagName,e.tags.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[e.tags.attributeName,e.tags.definition(e.tags.propertyName)],color:"#4F9FD0"},{tag:[e.tags.className,e.tags.string,e.tags.special(e.tags.brace)],color:"#CF4F5F"},{tag:e.tags.number,color:"#CF4F5F",fontWeight:"bold"},{tag:e.tags.variableName,fontWeight:"bold"}]}),y({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:e.tags.comment,color:"#9995b7"},{tag:e.tags.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#ff5792"},{tag:[e.tags.className,e.tags.tagName,e.tags.definition(e.tags.typeName)],color:"#0094f0"},{tag:[e.tags.number,e.tags.bool,e.tags.null,e.tags.special(e.tags.brace)],color:"#5842ff"},{tag:[e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName)],color:"#0095a8"},{tag:e.tags.typeName,color:"#b3694d"},{tag:[e.tags.propertyName,e.tags.variableName],color:"#fa8900"},{tag:e.tags.operator,color:"#ff5792"},{tag:e.tags.self,color:"#e64100"},{tag:[e.tags.string,e.tags.regexp],color:"#00b368"},{tag:[e.tags.paren,e.tags.bracket],color:"#0431fa"},{tag:e.tags.labelName,color:"#00bdd6"},{tag:e.tags.attributeName,color:"#e64100"},{tag:e.tags.angleBracket,color:"#9995b7"}]}),y({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:e.tags.comment,color:"#9893a5"},{tag:[e.tags.bool,e.tags.null],color:"#286983"},{tag:e.tags.number,color:"#d7827e"},{tag:e.tags.className,color:"#d7827e"},{tag:[e.tags.angleBracket,e.tags.tagName,e.tags.typeName],color:"#56949f"},{tag:e.tags.attributeName,color:"#907aa9"},{tag:e.tags.punctuation,color:"#797593"},{tag:[e.tags.keyword,e.tags.modifier],color:"#286983"},{tag:[e.tags.string,e.tags.regexp],color:"#ea9d34"},{tag:e.tags.variableName,color:"#d7827e"}]}),y({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:e.tags.comment,color:"#CFCFCF"},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"#E66C29"},{tag:[e.tags.className,e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName),e.tags.labelName,e.tags.definition(e.tags.typeName)],color:"#2EB43B"},{tag:e.tags.keyword,color:"#D8B229"},{tag:e.tags.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#925A47"},{tag:e.tags.string,color:"#704D3D"},{tag:e.tags.typeName,color:"#2F8996"},{tag:[e.tags.variableName,e.tags.propertyName],color:"#77ACB0"},{tag:e.tags.self,color:"#77ACB0",fontWeight:"bold"},{tag:e.tags.regexp,color:"#E3965E"},{tag:[e.tags.tagName,e.tags.angleBracket],color:"#BAA827"},{tag:e.tags.attributeName,color:"#B06520"},{tag:e.tags.derefOperator,color:"#000"}]}),y({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:e.tags.comment,color:"#93A1A1"},{tag:e.tags.string,color:"#2AA198"},{tag:e.tags.regexp,color:"#D30102"},{tag:e.tags.number,color:"#D33682"},{tag:e.tags.variableName,color:"#268BD2"},{tag:[e.tags.keyword,e.tags.operator,e.tags.punctuation],color:"#859900"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#073642",fontWeight:"bold"},{tag:[e.tags.className,e.tags.self,e.tags.definition(e.tags.propertyName)],color:"#268BD2"},{tag:e.tags.function(e.tags.variableName),color:"#268BD2"},{tag:[e.tags.bool,e.tags.null],color:"#B58900"},{tag:e.tags.tagName,color:"#268BD2",fontWeight:"bold"},{tag:e.tags.angleBracket,color:"#93A1A1"},{tag:e.tags.attributeName,color:"#93A1A1"},{tag:e.tags.typeName,color:"#859900"}]}),y({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:e.tags.comment,color:"#8E908C"},{tag:[e.tags.variableName,e.tags.self,e.tags.propertyName,e.tags.attributeName,e.tags.regexp],color:"#C82829"},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"#F5871F"},{tag:[e.tags.className,e.tags.typeName,e.tags.definition(e.tags.typeName)],color:"#C99E00"},{tag:[e.tags.string,e.tags.special(e.tags.brace)],color:"#718C00"},{tag:e.tags.operator,color:"#3E999F"},{tag:[e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName)],color:"#4271AE"},{tag:e.tags.keyword,color:"#8959A8"},{tag:e.tags.derefOperator,color:"#4D4D4C"}]});const j=new O.Compartment,Y=(a="latte")=>{const r=_[a].colors,t=r.base,o=a==="latte"?"#484b64":r.text.hex,c=Le(r.crust.rgb,t.rgb,.1);return document.querySelector(":root").style.setProperty("--editor-background",t.hex),[y({variant:a==="latte"?"light":"dark",settings:{background:t.hex,foreground:o,caret:r.rosewater.hex,lineHighlight:z(r.overlay1.rgb,.1),gutterBackground:t.hex,gutterForeground:o},styles:[{tag:e.tags.modifier,color:r.mauve.hex},{tag:e.tags.controlKeyword,color:r.mauve.hex},{tag:e.tags.operatorKeyword,color:r.mauve.hex},{tag:e.tags.definitionKeyword,color:r.mauve.hex},{tag:e.tags.moduleKeyword,color:r.mauve.hex},{tag:e.tags.bool,color:r.peach.hex},{tag:e.tags.null,color:r.peach.hex},{tag:e.tags.null,color:r.peach.hex},{tag:[e.tags.function(e.tags.variableName)],color:r.blue.hex},{tag:[e.tags.function(e.tags.definition(e.tags.variableName))],color:r.blue.hex},{tag:[e.tags.definition(e.tags.className)],color:r.yellow.hex,fontWeight:"bold"},{tag:e.tags.propertyName,color:r.blue.hex},{tag:[e.tags.function(e.tags.propertyName)],color:r.blue.hex},{tag:e.tags.lineComment,color:r.overlay2.hex},{tag:e.tags.number,color:r.peach.hex},{tag:e.tags.string,color:r.green.hex},{tag:[e.tags.special(e.tags.string)],color:r.green.hex,fontWeight:"600"},{tag:e.tags.arithmeticOperator,color:r.sky.hex},{tag:e.tags.bitwiseOperator,color:r.sky.hex},{tag:e.tags.compareOperator,color:r.sky.hex},{tag:e.tags.definitionOperator,color:r.sky.hex},{tag:e.tags.punctuation,color:r.peach.hex},{tag:e.tags.meta,color:r.teal.hex},{tag:e.tags.paren,color:r.overlay2.hex},{tag:e.tags.squareBracket,color:r.overlay2.hex},{tag:e.tags.brace,color:r.overlay2.hex},{tag:e.tags.derefOperator,color:r.overlay2.hex},{tag:e.tags.separator,color:r.overlay2.hex},{tag:e.tags.definitionKeyword,color:r.mauve.hex},{tag:e.tags.self,color:r.red.hex},{tag:[e.tags.standard(e.tags.typeName)],color:r.yellow.hex},{tag:e.tags.typeName,color:r.yellow.hex},{tag:e.tags.namespace,color:r.yellow.hex},{tag:e.tags.labelName,color:r.teal.hex},{tag:e.tags.variableName,color:o},{tag:e.tags.operator,color:r.sky.hex},{tag:e.tags.logicOperator,color:r.sky.hex},{tag:e.tags.updateOperator,color:r.sky.hex},{tag:e.tags.character,color:r.green.hex},{tag:e.tags.escape,color:r.pink.hex},{tag:e.tags.literal,color:r.sky.hex},{tag:e.tags.processingInstruction,color:r.mauve.hex},{tag:e.tags.angleBracket,color:r.overlay2.hex},{tag:e.tags.keyword,color:r.yellow.hex},{tag:e.tags.tagName,color:r.blue.hex},{tag:e.tags.className,color:r.teal.hex},{tag:[e.tags.constant(e.tags.className)],color:r.teal.hex},{tag:e.tags.attributeName,color:r.peach.hex},{tag:e.tags.atom,color:r.yellow.hex},{tag:e.tags.unit,color:r.yellow.hex},{tag:e.tags.color,color:r.pink.hex},{tag:e.tags.macroName,color:r.peach.hex}]}),b.EditorView.theme({"& .cm-selectionBackground, ::selection":{background:`${z(r.overlay2.rgb,.3)} !important`},"& .cb-content, & .ic":{backgroundColor:c},".cb-icon":{fill:o},".wg-codeblock-btn:hover":{backgroundColor:z(r.overlay1.rgb,.2)},".bq-none-mark":{"--bq-none-mark":o},".bq-note-mark":{"--bq-note-mark":r.blue.hex},".bq-tip-mark":{"--bq-tip-mark":r.green.hex},".bq-warning-mark":{"--bq-warning-mark":r.peach.hex},".bq-important-mark":{"--bq-important-mark":r.mauve.hex},".bq-caution-mark":{"--bq-caution-mark":r.red.hex},".wg-qt-icon":{"--bq-none-mark":o,"--bq-note-mark":r.blue.hex,"--bq-tip-mark":r.green.hex,"--bq-warning-mark":r.peach.hex,"--bq-important-mark":r.mauve.hex,"--bq-caution-mark":r.red.hex},"& a.url":{color:r.blue.hex},"& a.url:visited":{color:r.mauve.hex},"& .cm-rendered-tag":{border:`1px solid ${r.surface2.hex}`,borderRadius:"4px",fontSize:".8em",padding:"0px 3px",background:r.surface0.hex}},{dark:a!=="latte"})]},Le=(a,r,t)=>{const o=[a.r,a.g,a.b],c=[r.r,r.g,r.b];return`rgba(${oe(o,c,t,.3).join(", ")})`},z=(a,r)=>`rgba(${a.r}, ${a.g}, ${a.b}, ${r})`,U={tip:a=>`<svg class="qt-icon qt-tip" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
8
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M197.813 54.2439C196.932 54.6529 195.79 55.5789 195.274 56.3019L194.336 57.6169L194.219 70.8359L194.102 84.0549L195.076 85.3319C197.802 88.9059 203.271 88.5369 205.364 84.6369C206.151 83.1699 206.872 60.7239 206.215 58.1479C205.842 56.6839 203.21 53.9059 202.196 53.9059C201.901 53.9059 201.155 53.8149 200.537 53.7039C199.864 53.5829 198.772 53.7989 197.813 54.2439ZM116.233 86.0419C113.323 87.6899 112.27 91.6249 113.92 94.6849C115.402 97.4339 131.364 113.194 132.973 113.496C138.573 114.546 142.477 110.343 140.971 104.883C140.465 103.049 125.118 87.2169 122.574 85.9039C120.632 84.9019 118.15 84.9559 116.233 86.0419ZM277.93 85.7559C276.466 86.4829 260.132 103.191 259.49 104.618C257.281 109.529 261.871 114.699 267.084 113.171C268.604 112.726 283.491 98.5359 285.985 95.1559C289.892 89.8619 283.853 82.8139 277.93 85.7559ZM192.578 105.326C174.207 107.647 159.188 115.505 147.608 128.855C123.664 156.459 124.119 191.541 148.828 223.047C160.759 238.26 165.383 249.444 166.996 266.992C167.829 276.054 168.682 277.986 172.825 280.204C174.652 281.182 221.998 281.773 225.389 280.86C229.012 279.884 232.583 275.584 232.967 271.735C233.077 270.63 233.363 267.529 233.603 264.844C234.904 250.229 238.454 241.734 249.573 226.622C261.236 210.772 265.303 202.299 269.01 186.133C271.624 174.731 269.08 156.872 263.028 144.145C251.295 119.471 219.462 101.931 192.578 105.326ZM88.992 165.981C83.602 166.183 82.734 166.309 81.765 167.028C77.932 169.873 77.932 174.66 81.766 177.503C83.099 178.491 104.15 178.988 108.11 178.124C114.214 176.794 115.972 170.208 111.179 166.626C109.976 165.727 101.966 165.494 88.992 165.981ZM289.847 166.481C285.102 168.919 285.171 174.882 289.974 177.45C292.2 178.64 314.187 179.022 317.07 177.921C322.542 175.831 321.886 167.919 316.118 166.457C312.336 165.498 291.723 165.517 289.847 166.481ZM132.14 230.477C129.964 231.352 113.316 248.951 113.059 250.648C112.263 255.894 117.791 260.112 122.389 257.768C124.057 256.918 139.906 240.858 140.656 239.258C143.226 233.779 137.81 228.195 132.14 230.477ZM262.386 230.871C259.487 232.447 258.349 236.857 260.122 239.648C261.348 241.579 276.261 256.486 277.701 257.219C282.933 259.885 288.816 254.457 286.416 249.179C285.559 247.294 271.67 232.693 269.4 231.29C267.429 230.071 264.211 229.879 262.386 230.871ZM174.576 292.561C170.753 293.719 169.922 295.59 169.922 303.033C169.922 310.255 170.618 312.154 173.969 314.076L175.977 315.227L200.113 315.231C223.446 315.234 224.301 315.208 225.774 314.457C229.279 312.669 230.367 309.882 230.446 302.493L230.504 297.04L229.29 295.365C226.903 292.07 228.123 292.201 200.195 292.23C186.66 292.243 175.131 292.392 174.576 292.561ZM180.946 325.217C179.882 325.963 179.759 328.554 180.683 330.774C185.032 341.224 208.831 343.084 217.528 333.654C220.185 330.773 221.108 326.967 219.531 325.391C218.456 324.315 182.465 324.154 180.946 325.217Z"/>
9
+ </svg>`,note:a=>`<svg class="qt-icon qt-note" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
10
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M107.227 63.8769C101.558 65.1289 95.375 67.9369 91.406 71.0639C90.01 72.1639 88.215 73.5439 87.417 74.1299C86.62 74.7159 85.96 75.3819 85.952 75.6099C85.944 75.8379 85.612 76.3739 85.214 76.8009C81.982 80.2699 78.079 87.8199 76.776 93.1259L75.781 97.1769V198.907C75.781 262.894 75.922 301.425 76.16 302.76C76.368 303.928 76.623 305.38 76.726 305.987C78.4 315.889 87.879 327.367 98.558 332.423C107.578 336.694 98.739 336.366 201.563 336.242L291.602 336.133L294.27 335.228C309.157 330.183 318.557 320.61 322.536 306.445L323.633 302.539V228.516C323.633 144.681 323.906 151.756 320.402 144.774L318.615 141.211L286.943 109.57C269.523 92.1679 253.932 76.5229 252.297 74.8049C246.111 68.3049 241.836 65.3209 236.902 64.0589C233.006 63.0629 111.686 62.8929 107.227 63.8769ZM233.77 78.3359C236.715 80.5619 300.292 144.132 300.799 145.356C301.574 147.227 300.841 149.245 299.01 150.282L297.461 151.159L274.127 151.165C258.248 151.17 250.198 151.032 248.931 150.734C240.06 148.649 234.561 144.527 231.043 137.327C228.119 131.344 228.085 130.936 228.21 104.035L228.32 80.5309L229.275 79.5149C229.801 78.9559 230.767 78.3419 231.424 78.1519C233.014 77.6899 232.904 77.6809 233.77 78.3359ZM192.354 175.195C194.09 176.288 194.73 177.166 196.549 180.952C197.924 183.813 194.551 189.489 190.695 190.803C187.744 191.808 132.089 191.686 129.883 190.669C122.396 187.22 123.011 176.607 130.837 174.194C131.386 174.024 145.033 173.917 161.164 173.954L190.492 174.023L192.354 175.195ZM269.587 217.641C271.831 218.313 276.709 223.047 275.158 223.047C275.018 223.047 275.115 223.301 275.373 223.611C277.4 226.054 274.593 231.969 270.523 233.832L268.466 234.774L199.37 234.672L130.273 234.57L128.645 233.465C122.49 229.288 123.57 220.238 130.522 217.722C132.38 217.05 267.351 216.971 269.587 217.641ZM247.509 261.237C249.631 262.341 252.9 266.371 252.223 267.048C252.125 267.146 252.179 267.824 252.344 268.555C252.508 269.285 252.542 269.985 252.417 270.109C252.293 270.233 252.148 270.627 252.096 270.984C251.721 273.539 250.106 275.678 247.498 277.074L245.898 277.93L189.258 278.036C138.155 278.132 132.426 278.082 130.664 277.516C122.018 274.742 123.019 262.33 132.031 260.562C132.783 260.414 158.711 260.317 189.648 260.347L245.898 260.4L247.509 261.237Z"/>
11
+ </svg>`,important:a=>`<svg class="qt-icon qt-important" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
12
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M190.234 64.334C153.518 67.16 117.751 87.08 95.346 117.181C46.258 183.13 68.9 277.91 142.564 314.837C228.927 358.129 330.405 294.361 330.594 196.68C330.742 119.807 265.747 58.523 190.234 64.334ZM219.531 126.465C220.494 126.947 221.218 127.78 221.98 129.284L223.062 131.421L222.957 139.621L222.852 147.822L221.875 148.263C213.74 151.931 214.67 145.87 214.532 196.094C214.395 245.634 214.025 242.228 219.783 244.354C223.193 245.613 223.047 245.172 223.047 254.214C223.047 263.28 222.791 264.649 220.681 266.868L219.262 268.359H200.09H180.919L179.769 267.392C177.295 265.31 176.926 263.501 177.043 254.054C177.131 246.999 177.246 245.543 177.734 245.295C178.057 245.131 179.5 244.445 180.943 243.77C182.568 243.01 183.905 242.067 184.459 241.291L185.352 240.039L185.456 197.305C185.559 155.268 185.548 154.545 184.78 152.959C183.999 151.347 181.2 149.279 178.906 148.622C176.957 148.063 176.953 148.047 176.953 139.659C176.953 129.986 177.595 127.658 180.624 126.34C182.693 125.439 217.703 125.552 219.531 126.465Z"/>
13
+ </svg>`,warning:a=>`<svg class="qt-icon qt-warning" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
14
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M195.982 53.527C185.35 55.195 178.527 60.217 172.381 70.898C165.461 82.925 148.022 114.138 122.184 160.742C115.633 172.559 100.427 199.98 88.394 221.68C57.505 277.38 55.934 280.238 54.25 283.76C45.588 301.882 55.075 322.592 74.884 328.805L78.32 329.883L198.438 329.99C278.577 330.062 319.42 329.965 321.154 329.699C337.809 327.15 349.594 312.698 348.718 295.898C348.297 287.827 348.329 287.895 328.438 252.148C310.272 219.501 297.79 196.996 280.665 166.016C235.38 84.092 225.675 66.998 222.278 63.175C216.156 56.285 204.847 52.136 195.982 53.527ZM209.263 116.46C218.176 119.751 220.681 125.503 219.95 141.003C219.711 146.059 219.256 155.732 218.938 162.5C218.62 169.268 218.011 180.43 217.584 187.305C216.759 200.593 216.366 207.385 215.42 224.66C215.058 231.282 214.609 236.196 214.259 237.373C210.281 250.771 189.551 250.542 185.792 237.058C185.226 235.025 184.802 229.702 183.979 214.258C183.761 210.176 183.323 202.881 183.006 198.047C182.213 185.991 181.756 178.028 181.054 164.063C180.724 157.51 180.287 149.424 180.081 146.094C178.833 125.858 181.444 119.151 191.797 115.99C194.231 115.247 206.901 115.588 209.263 116.46ZM205.893 260.709C224.265 266.28 227.749 290.936 211.55 300.733C192.458 312.28 170.521 292.287 180.334 272.284C184.884 263.009 196.351 257.816 205.893 260.709Z"/>
15
+ </svg>`,caution:a=>`<svg class="qt-icon qt-caution" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
16
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M196.094 54.176C191.229 54.988 188.782 56.222 167.834 68.423C158.562 73.823 147.197 80.435 142.578 83.117C137.959 85.799 129.961 90.458 124.805 93.47C119.648 96.482 111.211 101.406 106.055 104.413C84.503 116.982 82.78 118.066 79.627 121.029C76.043 124.397 73.548 127.986 71.861 132.199C69.426 138.28 69.543 135.024 69.435 199.872L69.336 259.18L70.21 263.086C72.901 275.106 75.333 277.456 99.826 291.697C130.626 309.606 166.896 330.685 175.781 335.841C190.902 344.615 195.154 346.196 201.915 345.563C208.158 344.978 210.107 344.123 225.391 335.264C255.218 317.977 294.844 294.867 311.417 285.093C322.591 278.504 327.153 273.047 329.413 263.569L330.273 259.961V199.609V139.258L329.396 135.938C327.721 129.594 324.327 124.148 319.504 120.066C316.509 117.531 317.424 118.075 248.047 77.651C205.151 52.657 205.162 52.662 196.094 54.176ZM206.746 110.34C212.104 111.475 216.464 114.838 218.945 119.75C220.313 122.457 220.428 126.187 219.575 140.039C219.323 144.121 218.592 157.129 217.95 168.945C214.743 227.944 214.663 228.952 212.917 232.683C208.369 242.403 195.202 244.021 188.814 235.646C185.935 231.872 185.59 229.751 184.375 208.398C183.935 200.664 182.688 180.01 181.605 162.5C178.965 119.84 178.966 119.825 183.963 114.828C188.541 110.25 197.755 108.434 206.746 110.34ZM205.105 254.139C220.433 258.641 225.321 277.899 213.857 288.623C198.306 303.17 174.003 287.211 181.04 267.073C184.452 257.309 195.564 251.336 205.105 254.139Z"/>
17
+ </svg>`,none:()=>""};class De extends b.WidgetType{constructor(r){super(),this.type=r}toDOM(){let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),r.className="wg-qt-icon",r.innerHTML=this.type in U?U[this.type]():"",r}ignoreEvent(){return!1}eq(r){return this.type===r.type}}function Ee(a,r){const t=["Document","ListItem","BulletList","OrderedList"],o={none:"bq-none-mark",note:"bq-note-mark",tip:"bq-tip-mark",warning:"bq-warning-mark",important:"bq-important-mark",caution:"bq-caution-mark"},c={QuoteMark:(n,l,g)=>{const m=["qt-mk"];return g in o?m.push(o[g]):m.push(o.none),b.Decoration.mark({class:m.join(" ")}).range(n,l)},QuoteType:(n,l,g)=>b.Decoration.widget({widget:new De(g),side:1}).range(n),BlockquoteLine:(n,l)=>b.Decoration.line({class:"bq-line "+(l?"sw":"")}).range(n),quoteLine:(n,l,g)=>{const m=`calc(100% - ${Math.max(0,g)+1.2}ch)`;return b.Decoration.mark({class:"bq-text-line",attributes:{style:`width: ${m}`}}).range(n,l)}},d=(n,l,g,m)=>{const u=[],C=g.number,k=(f,F)=>{let D=0;const w=[];let x=0;return{enter({name:N,node:re,from:V,to:Z}){N==="Blockquote"&&w.push(qe(n,re)),N==="QuoteMark"&&(u.push(c[N](V,Z,w[D])),x=Z,D++),N==="QuoteType"&&u.push(c[N](V,Z,w[D-1]))},leave({name:N,from:re,to:V}){N==="Paragraph"&&x<F&&u.push(c.quoteLine(x,F,x-f))}}};for(let f=C;f<m+C;f++){const{from:F,to:D}=n.state.doc.line(f),{from:w,to:x}=l,N=q(n,w,x);u.push(c.BlockquoteLine(F,N)),v.syntaxTree(n.state).iterate({from:F,to:D,...k(F,D)})}return u},s=[];return T(a,{enter:({name:n,from:l,to:g,node:m})=>{if(n==="Blockquote"){const u=a.state.sliceDoc(l,g).split(`
18
+ `),C=a.state.doc.lineAt(l);s.push(...d(a,m,C,u.length))}return t.includes(n)}}),b.Decoration.set(s,!0)}const qe=(a,r)=>{const t=r.getChild("QuoteType");if(!t)return"none";const o=t.getChild("QuoteTypeText");return o?a.state.sliceDoc(o.from,o.to).toLowerCase():"none"},Te=()=>L.EditorView.baseTheme({"& .qt-mk":{position:"relative",color:"transparent",verticalAlign:"top"},"& .qt-mk::after":{position:"absolute",content:'" "',backgroundColor:"currentColor",top:"-100vh",width:"4px",height:"200vh",zIndex:"-1"},"&.cm-focused .bq-line.sw .qt-mk::after":{opacity:.3},"& .bq-line":{lineHeight:"1.2lh",overflowY:"hidden"},"&.cm-focused .bq-line.sw .bq-none-mark, .bq-none-mark::after":{color:"var(--bq-none-mark)"},"&.cm-focused .bq-line.sw .bq-note-mark, .bq-note-mark::after":{color:"var(--bq-note-mark)"},"&.cm-focused .bq-line.sw .bq-tip-mark, .bq-tip-mark::after":{color:"var(--bq-tip-mark)"},"&.cm-focused .bq-line.sw .bq-warning-mark, .bq-warning-mark::after":{color:"var(--bq-warning-mark)"},"&.cm-focused .bq-line.sw .bq-important-mark, .bq-important-mark::after":{color:"var(--bq-important-mark)"},"&.cm-focused .bq-line.sw .bq-caution-mark, .bq-caution-mark::after":{color:"var(--bq-caution-mark)"},"& .bq-text-line":{lineHeight:"1lh",display:"inline-block",paddingLeft:"6px",textIndent:"-7px",ariaHidden:"true"},"& .bq-text-line *":{verticalAlign:"middle"},"& .wg-qt-icon":{display:"inline-block"},"& .wg-qt-icon > .qt-icon":{paddingLeft:"1ch",width:"2em",height:"2em"},"& .wg-qt-icon > .qt-tip":{fill:"var(--bq-tip-mark)"},"& .wg-qt-icon > .qt-note":{fill:"var(--bq-note-mark)"},"& .wg-qt-icon > .qt-important":{fill:"var(--bq-important-mark)"},"& .wg-qt-icon > .qt-warning":{fill:"var(--bq-warning-mark)"},"& .wg-qt-icon > .qt-caution":{fill:"var(--bq-caution-mark)"}}),Me=a=>[E(Ee,a),Te()],ve={name:"QuoteTypeParser",parse(a,r){if((()=>{for(let o=0;o<a.depth;o++)if(a.parentType(o).name==="Blockquote")return!0;return!1})()){const o=r.text.match(/^(\s*>\s*)+(\[!\w+\])\s*$/);if(o&&o[2]){const c=o[2],d=r.text.indexOf(c),s=d+c.length,n=a.elt("QuoteType",a.lineStart+d,a.lineStart+s);n.children=[a.elt("QuoteTypeMark",a.lineStart+d,a.lineStart+d+2),a.elt("QuoteTypeText",a.lineStart+d+2,a.lineStart+s-1),a.elt("QuoteTypeMark",a.lineStart+s-1,a.lineStart+s)],a.addElement(n)}}return!1}},Ae={defineNodes:[{name:"QuoteType",style:{"QuoteType/...":e.tags.content}},{name:"QuoteTypeMark",style:e.tags.processingInstruction},{name:"QuoteTypeText",style:e.tags.bool}],parseBlock:[ve]},X=(a,r,t)=>{const o=a.state.sliceDoc(r,t),c=o.match(/\[(.*)\]/);return c!==null&&c.length>1?{text:c[1],from:r+o.indexOf(c[1]),to:r+1+c[1].length}:{text:null}};function Se(a,r){const t=["FencedCode","Image","Link"],o={Link:{marks:["LinkMark"],url:"URL"}},c={Link:(s,n,l)=>b.Decoration.mark({class:"link "+(l?"sw":"")}).range(s,n),LinkMark:(s,n)=>b.Decoration.mark({class:"lk-mk"}).range(s,n),TextDec:(s,n,l)=>b.Decoration.mark({class:"lk-text url",tagName:"a",attributes:{href:l,target:"_blank"}}).range(s,n),URL:(s,n,l)=>b.Decoration.mark({class:"lk-url url",tagName:"a",attributes:{href:l,target:"_blank"}}).range(s,n)},d=[];return T(a,{enter:({type:{name:s},from:n,to:l,node:g})=>{if(s==="URL"&&d.push(c.URL(n,l,a.state.sliceDoc(n,l))),!(s in o))return!t.includes(s);d.push(c.Link(n,l,q(a,n,l)));const m=o[s].marks.flatMap(k=>g.getChildren(k));d.push(...m.map(({from:k,to:f})=>c.LinkMark(k,f)));const u=g.getChild(o[s].url);let C=null;if(u!==null){const{from:k,to:f}=u;C=a.state.sliceDoc(k,f),d.push(c.URL(k,f,C))}if(g.getChild("Image")===null){const{text:k,from:f,to:F}=X(a,n,l);k!==null&&C!==null&&d.push(c.TextDec(f,F,C))}return!1}}),b.Decoration.set(d,!0)}const He=(a,r)=>a.ctrlKey?Oe(a.target):!1,Oe=a=>{if(a.nodeName==="A"&&a.href&&a.classList.contains("url"))return window.open(a.href,a.target),!0},Re=L.EditorView.baseTheme({".lk-mk, .link > .lk-url":{display:"none"},"&.cm-focused .link.sw .lk-mk, &.cm-focused .link.sw .lk-url":{display:"inherit"}}),We=(a={})=>{const{hideMarks:r=!0}=a;return[E(Se,{},{eventHandlers:{mousedown:He}}),Re]};class Pe extends b.WidgetType{constructor(r,t=null,o="[image]"){super(),this.img=r,this.url=t,this.alt=o}toDOM(){let r=document.createElement("img");if(r.src=this.img,r.alt=this.alt,r.style.minWidth="100px",this.url){let t=document.createElement("a");return t.href=this.url,t.target="_blank",t.classList.add("url"),t.appendChild(r),t}else return r}eq(r){return this.img===r.img}ignoreEvent(){return!1}}function Ie(a,r){const t=["FencedCode","Image"],o=[];return T(a,{enter:({type:{name:c},from:d,to:s,node:n})=>{if(c==="Image"&&!q(a,d,s)){const{from:l,to:g}=n.getChild("URL"),m=a.state.sliceDoc(l,g),{text:u}=X(a,d,s);o.push(b.Decoration.replace({widget:new Pe(m,$e(a,n),u)}).range(d,s))}return!t.includes(c)}}),b.Decoration.set(o,!1)}const $e=(a,r)=>{const o=r.parent.getChild("URL");if(o!==null){const{from:c,to:d}=o;return a.state.sliceDoc(c,d)}return null},ze=(a,r)=>a.ctrlKey?Ve(a.target):!1,Ve=a=>{const r=a.parentElement??!1;if(a.nodeName==="IMG"&&r&&r.nodeName==="A"&&r.classList.contains("url"))return!0},Ze=L.EditorView.baseTheme({}),Qe=(a={})=>{const{hideMarks:r=!0}=a;return[E(Ie,{},{eventHandlers:{mousedown:ze}}),Ze]};class J extends b.WidgetType{constructor(r,t=!1){super(),this.content=r,this.tag=t}toDOM(){const r=document.createElement("div");r.className="cm-html-widget",r.setAttribute("aria-hidden","true");const t=this.content.replace(/^```html\n?/,"").replace(/```$/,"").trim();return r.innerHTML=(this.tag?'<span class="cm-rendered-tag">RTAG</span>':"")+t,r.querySelectorAll("script").forEach(o=>{o.parentNode.removeChild(o)}),r}ignoreEvent(r){return r.type==="click"}eq(r){return r.content===this.content}}const h=O.StateEffect.define(),Ke=O.StateField.define({create(a){return b.Decoration.none},update(a,r){a=a.map(r.changes);for(let t of r.effects)if(t.is(h))return t.value;return a},provide:a=>b.EditorView.decorations.from(a)});function Ge(a){const r=[/<br>/,/<img .*\/>/],t={HTMLBlock:(c,d)=>{const s=a.state.doc.sliceString(c,d);return[b.Decoration.replace({widget:new J(s),inclusive:!1}).range(c,d)]},HTMLTag:(c,d)=>{const s=a.state.doc.sliceString(c,d);return console.log(s),r.some(n=>n.test(s))?(console.log(s),[b.Decoration.replace({widget:new J(s,!0),inclusive:!1}).range(c,d)]):[]}},o=[];return T(a,{enter:({type:c,from:d,to:s,node:n})=>{c.name in t&&(!q(a,d,s)||!a.hasFocus)&&o.push(...t[c.name](d,s))}}),b.Decoration.set(o)}const _e=L.EditorView.baseTheme({"& .cm-html-widget":{all:"unset"},"& .cm-html-widget > *":{paddingTop:"0",paddingBottom:"0",marginBottom:"0",marginTop:"0"},"& .cm-widgetBuffer":{display:"none"}}),je=b.EditorView.updateListener.of(a=>{if(a.selectionSet||a.docChanged||a.focusChanged||a.geometryChanged){const r=Ge(a.view);a.view.dispatch({effects:h.of(r)})}}),Ye=(a={})=>[Ke,je,_e],ee=(a={markdown:{}})=>{const{markdown:{defaultCodeLanguage:r,codeLanguages:t,addKeymap:o,base:c,completeHTMLTags:d,htmlTagLanguage:s,extensions:n=[]},inline:l,Heading:g,Hr:m,List:u,Code:C}=a,k={defaultCodeLanguage:r,codeLanguages:t||B.languages,addKeymap:o,base:c,completeHTMLTags:d,htmlTagLanguage:s,extensions:[...n,ae.GFM,te,Ae]};return[M.markdown(k),j.of(Y()),W(l),$(g),P(u),R(m),I(),We(),Qe(),Me(),Ye()]};typeof window<"u"&&(window.gnosis=ee,window.HrPlugin=R,window.ListPlugin=P,window.CodePlugin=I,window.InlinePlugin=W,window.HeadingPlugin=$),i.CodePlugin=I,i.HeadingPlugin=$,i.HrPlugin=R,i.InlinePlugin=W,i.ListPlugin=P,i.catppuccin=Y,i.gnosis=ee,i.themeVariant=j,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glifox/gnosis",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "author": "feraxhp",
5
5
  "license": "MIT",
6
6
  "main": "dist/gnosis.umd.js",