@pi-chamber/web 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.test.js +6 -8
- package/bin/lib/cli-tunnel-capabilities.js +0 -2
- package/dist/assets/{CommitSection-BQBmpPVE.js → CommitSection-BpbMC0et.js} +1 -1
- package/dist/assets/{DiagramEditor-Cp22TGpq.js → DiagramEditor-dFTMKHuO.js} +1 -1
- package/dist/assets/{DiagramView-E4HJ4ZPU.js → DiagramView-DVw_8Px1.js} +1 -1
- package/dist/assets/{DiffView-d23o9CKP.js → DiffView-CkoY1oAM.js} +2 -2
- package/dist/assets/FilesView-C0hyg2pa.js +14 -0
- package/dist/assets/{GitView-CkUONO1-.js → GitView-D36hpDsb.js} +4 -4
- package/dist/assets/{JsonTreeView-By2oGMNK.js → JsonTreeView-BF8S-bPN.js} +1 -1
- package/dist/assets/{MarkdownRendererImpl-DUghE55t.js → MarkdownRendererImpl-BVNChdig.js} +2 -2
- package/dist/assets/{PatchDiff-BjN6zMtK.js → PatchDiff-B--OaNB1.js} +1 -1
- package/dist/assets/{PierreDiffViewer-B38_7NnU.js → PierreDiffViewer-0Qkp9ICt.js} +2 -2
- package/dist/assets/{SessionSwitcherDropdown-NbVfnqQQ.js → SessionSwitcherDropdown-cFWgy1td.js} +101 -102
- package/dist/assets/SettingsView-D3ZZyjU3.js +4 -0
- package/dist/assets/SettingsWindow-BuJCvYoR.js +1 -0
- package/dist/assets/{ToolOutputDialog-DVesARmI.js → ToolOutputDialog-Bi9BoEe7.js} +5 -5
- package/dist/assets/{ToolPartDiffPreview-C2N_oIO-.js → ToolPartDiffPreview-DGX7N4zr.js} +1 -1
- package/dist/assets/{VirtualizedFileDiff-B7eVR6Pt.js → VirtualizedFileDiff-CxraYoDZ.js} +1 -1
- package/dist/assets/{collapsible-CPkWB1VR.js → collapsible-d4-HChej.js} +1 -1
- package/dist/assets/{computeVirtualFileMetrics-BsZulefS.js → computeVirtualFileMetrics-BuD14qFL.js} +2 -2
- package/dist/assets/{contextFileOpenGuard-BmmlK5E3.js → contextFileOpenGuard-DirV-hCs.js} +1 -1
- package/dist/assets/{index-C84KrQoy.js → index-BWmmf5yJ.js} +1 -1
- package/dist/assets/{index-BhXma4dv.js → index-DEYblXCW.js} +7 -7
- package/dist/assets/index-DLKBsLKY.css +1 -0
- package/dist/assets/{isDiffPlainText-DsuyxFXo.js → isDiffPlainText-LoMmNzmX.js} +1 -1
- package/dist/assets/{isFilePlainText-CCYoe7us.js → isFilePlainText-3Hj9i02t.js} +1 -1
- package/dist/assets/{main-ClYgYVm1.js → main-BsszlAdQ.js} +2 -2
- package/dist/assets/main-CUvZIN16.js +133 -0
- package/dist/assets/{markdownCore-D2uqals1.js → markdownCore-sGxk8jrc.js} +2 -2
- package/dist/assets/{miniChat-DmX9SjxM.js → miniChat-C6SDQL4G.js} +2 -2
- package/dist/assets/{mobile-C-PCxN62.js → mobile-DBW3XDmZ.js} +2 -2
- package/dist/assets/renderElectronMiniChatApp-B1_fTdN-.js +1 -0
- package/dist/assets/renderMobileApp-CFxZc_1a.js +14 -0
- package/dist/assets/{runtimeSurface-CouGjZ3A.js → runtimeSurface-9aJdtQbh.js} +1 -1
- package/dist/assets/{useInlineCommentController-buNJ3xB4.js → useInlineCommentController-Cl--s6vE.js} +2 -2
- package/dist/assets/usePanelSlide-D5ffPTGM.js +56 -0
- package/dist/assets/{useWindowTitle-CnF4pKz0.js → useWindowTitle-C-AZD713.js} +3 -3
- package/dist/assets/{vendor-base-ui-DwfTg5wD.js → vendor-base-ui-DL8r2fgQ.js} +1 -1
- package/dist/assets/{vendor-codemirror-autocomplete-3xMyV7a2.js → vendor-codemirror-autocomplete-BS2SpSAZ.js} +1 -1
- package/dist/assets/{vendor-codemirror-commands-Bzf12ODH.js → vendor-codemirror-commands-RrgJ8H_6.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-angular-0K6s6cvb.js → vendor-codemirror-lang-angular-ADhO_TUK.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-cpp-B0aL03z-.js → vendor-codemirror-lang-cpp-BGCWj7Om.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-css-C4jEScp7.js → vendor-codemirror-lang-css-Ba8JZ6fp.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-go-CgrfVBPr.js → vendor-codemirror-lang-go-DyTiHXo4.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-html-C1Svvdey.js → vendor-codemirror-lang-html-DK27qQri.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-java-DNPz7_Bx.js → vendor-codemirror-lang-java-CvFfnhPQ.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-javascript-CrbeaEAU.js → vendor-codemirror-lang-javascript-BUlYhQ3o.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-jinja-DL8BR_RG.js → vendor-codemirror-lang-jinja-wBMtAEvT.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-json-BTvAjwkJ.js → vendor-codemirror-lang-json-CqayksDf.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-less-CPABt6NZ.js → vendor-codemirror-lang-less-Ct3-H1PB.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-liquid-BLOLOBMg.js → vendor-codemirror-lang-liquid-XspREksq.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-markdown-BloD9GN-.js → vendor-codemirror-lang-markdown-CvO36Y1p.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-php-FIZMTuWM.js → vendor-codemirror-lang-php-BlUF9cCe.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-python-CR2g6ukK.js → vendor-codemirror-lang-python-_2bIYTiJ.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-rust-lsPqn4k4.js → vendor-codemirror-lang-rust-BdTYih_U.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-sass-CtECMwzH.js → vendor-codemirror-lang-sass-E6MhfOFk.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-sql-BtmZrrZH.js → vendor-codemirror-lang-sql-B1BRhQSF.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-vue-Br6DrntY.js → vendor-codemirror-lang-vue-BYQJRa1Q.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-wast-DT7IlCnb.js → vendor-codemirror-lang-wast-D706yuyC.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-xml-wNr-LZOf.js → vendor-codemirror-lang-xml--MfWU6Dj.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-yaml-BTKFwfc2.js → vendor-codemirror-lang-yaml-CRUFIbRX.js} +1 -1
- package/dist/assets/{vendor-codemirror-language-BuDklWi8.js → vendor-codemirror-language-E2vgV9K3.js} +1 -1
- package/dist/assets/{vendor-codemirror-language-data-qBLdzwMc.js → vendor-codemirror-language-data-HC9JT4I3.js} +2 -2
- package/dist/assets/{vendor-codemirror-search-BzyfPoRb.js → vendor-codemirror-search-8kyQdB3f.js} +1 -1
- package/dist/assets/{vendor-codemirror-state-Wdz6Qsow.js → vendor-codemirror-state-CNWM3Q8V.js} +1 -1
- package/dist/assets/{vendor-codemirror-view-pXtfpqbT.js → vendor-codemirror-view-DSzLbZiS.js} +1 -1
- package/dist/assets/{vendor-replit-codemirror-vim-BUqe2Slv.js → vendor-replit-codemirror-vim-BJY5fGLS.js} +1 -1
- package/dist/assets/{web-components-BhO08KaW.js → web-components-skJ_VpnT.js} +4 -4
- package/dist/index.html +4 -4
- package/dist/mini-chat.html +3 -3
- package/dist/mobile.html +3 -3
- package/package.json +1 -1
- package/server/lib/package-manager.js +0 -34
- package/server/lib/pi/routes.js +32 -2
- package/server/lib/pi/session-daemon/DOCUMENTATION.md +1 -1
- package/server/lib/pi/session-daemon/runtime-registry.js +3 -0
- package/server/lib/pi/session-daemon/session-daemon.js +150 -10
- package/server/lib/pi/session-daemon/session-daemon.test.js +22 -0
- package/server/lib/tunnels/DOCUMENTATION.md +6 -7
- package/server/lib/tunnels/executable-search.test.js +4 -4
- package/server/lib/tunnels/install-help.js +0 -10
- package/server/lib/tunnels/install-help.test.js +0 -9
- package/server/lib/tunnels/types.js +0 -1
- package/dist/assets/FilesView-DIDB-xK7.js +0 -14
- package/dist/assets/SettingsView-C2dCv0r7.js +0 -3
- package/dist/assets/SettingsWindow-DsMhdX5H.js +0 -1
- package/dist/assets/index-BZXqJcua.css +0 -1
- package/dist/assets/main-CmrF_CaW.js +0 -133
- package/dist/assets/renderElectronMiniChatApp-BhXZtZlU.js +0 -1
- package/dist/assets/renderMobileApp-DUSTAPWw.js +0 -23
- package/dist/assets/usePanelSlide-BRwyEEzi.js +0 -47
- package/server/lib/ngrok-tunnel.js +0 -343
- package/server/lib/ngrok-tunnel.test.js +0 -50
- package/server/lib/tunnels/providers/ngrok.js +0 -32
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{N as g,P as ot,a as L,T as d,I as Q,b as Bt,c as N}from"./vendor-lezer-common-B3-cUCR_.js";import{F as y,E as O,P as Lt,k as Et,l as Ft,S as E,i as at,c as Mt}from"./vendor-codemirror-state-Wdz6Qsow.js";import{E as P,V as lt,D as b,l as Rt,W as ht,a as X}from"./vendor-codemirror-view-pXtfpqbT.js";import{t as Wt,h as Vt,a as f,s as Ht}from"./vendor-lezer-highlight-CDMHUZ74.js";import{S as Y}from"./vendor-style-mod-NZ5MEPvj.js";var R;const v=new g;function ut(r){return y.define({combine:r?t=>t.concat(r):void 0})}const Ut=new g;class p{constructor(t,e,n=[],s=""){this.data=t,this.name=s,O.prototype.hasOwnProperty("tree")||Object.defineProperty(O.prototype,"tree",{get(){return k(this)}}),this.parser=e,this.extension=[C.of(this),O.languageData.of((i,o,l)=>{let a=Z(i,o,l),h=a.type.prop(v);if(!h)return[];let u=i.facet(h),c=a.type.prop(Ut);if(c){let w=a.resolve(o-a.from,l);for(let m of c)if(m.test(w,i)){let S=i.facet(m.facet);return m.type=="replace"?S:S.concat(u)}}return u})].concat(n)}isActiveAt(t,e,n=-1){return Z(t,e,n).type.prop(v)==this.data}findRegions(t){let e=t.facet(C);if(e?.data==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let n=[],s=(i,o)=>{if(i.prop(v)==this.data){n.push({from:o,to:o+i.length});return}let l=i.prop(g.mounted);if(l){if(l.tree.prop(v)==this.data){if(l.overlay)for(let a of l.overlay)n.push({from:a.from+o,to:a.to+o});else n.push({from:o,to:o+i.length});return}else if(l.overlay){let a=n.length;if(s(l.tree,l.overlay[0].from+o),n.length>a)return}}for(let a=0;a<i.children.length;a++){let h=i.children[a];h instanceof d&&s(h,i.positions[a]+o)}};return s(k(t),0),n}get allowsNesting(){return!0}}p.setState=E.define();function Z(r,t,e){let n=r.facet(C),s=k(r).topNode;if(!n||n.allowsNesting)for(let i=s;i;i=i.enter(t,e,Q.ExcludeBuffers|Q.EnterBracketed))i.type.isTop&&(s=i);return s}class U extends p{constructor(t,e,n){super(t,e,[],n),this.parser=e}static define(t){let e=ut(t.languageData);return new U(e,t.parser.configure({props:[v.add(n=>n.isTop?e:void 0)]}),t.name)}configure(t,e){return new U(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function k(r){let t=r.field(p.state,!1);return t?t.tree:d.empty}function $t(r,t,e=50){var n;let s=(n=r.field(p.state,!1))===null||n===void 0?void 0:n.context;if(!s)return null;let i=s.viewport;s.updateViewport({from:0,to:t});let o=s.isDone(t)||s.work(e,t)?s.tree:null;return s.updateViewport(i),o}function Oe(r,t=r.viewport.to,e=100){let n=$t(r.state,t,e);return n!=k(r.state)&&r.dispatch({}),!!n}class jt{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let n=this.cursorPos-this.string.length;return t<n||e>=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-n,e-n)}}let I=null;class x{constructor(t,e,n=[],s,i,o,l,a){this.parser=t,this.state=e,this.fragments=n,this.tree=s,this.treeLen=i,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(t,e,n){return new x(t,e,[],d.empty,0,n,[],null)}startParse(){return this.parser.startParse(new jt(this.state.doc),this.fragments)}work(t,e){return e!=null&&e>=this.state.doc.length&&(e=void 0),this.tree!=d.empty&&this.isDone(e??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if(typeof t=="number"){let s=Date.now()+t;t=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),e!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&e<this.state.doc.length&&this.parse.stopAt(e);;){let s=this.parse.advance();if(s)if(this.fragments=this.withoutTempSkipped(N.addTree(s,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(n=this.parse.stoppedAt)!==null&&n!==void 0?n:this.state.doc.length,this.tree=s,this.parse=null,this.treeLen<(e??this.state.doc.length))this.parse=this.startParse();else return!0;if(t())return!1}})}takeTree(){let t,e;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(e=this.parse.advance()););}),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(N.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=I;I=this;try{return t()}finally{I=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=_(t,e.from,e.to);return t}changes(t,e){let{fragments:n,tree:s,treeLen:i,viewport:o,skipped:l}=this;if(this.takeTree(),!t.empty){let a=[];if(t.iterChangedRanges((h,u,c,w)=>a.push({fromA:h,toA:u,fromB:c,toB:w})),n=N.applyChanges(n,a),s=d.empty,i=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){l=[];for(let h of this.skipped){let u=t.mapPos(h.from,1),c=t.mapPos(h.to,-1);u<c&&l.push({from:u,to:c})}}}return new x(this.parser,e,n,s,i,o,l,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let e=this.skipped.length;for(let n=0;n<this.skipped.length;n++){let{from:s,to:i}=this.skipped[n];s<t.to&&i>t.from&&(this.fragments=_(this.fragments,s,i),this.skipped.splice(n--,1))}return this.skipped.length>=e?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends ot{createParse(e,n,s){let i=s[0].from,o=s[s.length-1].to;return{parsedPos:i,advance(){let a=I;if(a){for(let h of s)a.tempSkipped.push(h);t&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,t]):t)}return this.parsedPos=o,new d(L.none,[],[],o-i)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&e[0].from==0&&e[0].to>=t}static get(){return I}}function _(r,t,e){return N.applyChanges(r,[{fromA:t,toA:e,fromB:t,toB:e}])}class A{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),n=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,n)||e.takeTree(),new A(e)}static init(t){let e=Math.min(3e3,t.doc.length),n=x.create(t.facet(C).parser,t,{from:0,to:e});return n.work(20,e)||n.takeTree(),new A(n)}}p.state=at.define({create:A.init,update(r,t){for(let e of t.effects)if(e.is(p.setState))return e.value;return t.startState.facet(C)!=t.state.facet(C)?A.init(t.state):r.apply(t)}});let ft=r=>{let t=setTimeout(()=>r(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<"u"&&(ft=r=>{let t=-1,e=setTimeout(()=>{t=requestIdleCallback(r,{timeout:400})},100);return()=>t<0?clearTimeout(e):cancelIdleCallback(t)});const W=typeof navigator<"u"&&(!((R=navigator.scheduling)===null||R===void 0)&&R.isInputPending)?()=>navigator.scheduling.isInputPending():null,zt=lt.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(p.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(p.state);(e.tree!=e.context.tree||!e.context.isDone(t.doc.length))&&(this.working=ft(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEnd<e&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=e+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:s}}=this.view,i=n.field(p.state);if(i.tree==i.context.tree&&i.context.isDone(s+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,t&&!W?Math.max(25,t.timeRemaining()-5):1e9),l=i.context.treeLen<s&&n.doc.length>s+1e3,a=i.context.work(()=>W&&W()||Date.now()>o,s+(l?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:p.setState.of(new A(i.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(e=>Rt(this.view.state,e)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),C=y.define({combine(r){return r.length?r[0]:null},enables:r=>[p.state,zt,P.contentAttributes.compute([r],t=>{let e=t.facet(r);return e&&e.name?{"data-language":e.name}:{}})]});class Le{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}class ct{constructor(t,e,n,s,i,o=void 0){this.name=t,this.alias=e,this.extensions=n,this.filename=s,this.loadFunc=i,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(t=>this.support=t,t=>{throw this.loading=null,t}))}static of(t){let{load:e,support:n}=t;if(!e){if(!n)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");e=()=>Promise.resolve(n)}return new ct(t.name,(t.alias||[]).concat(t.name).map(s=>s.toLowerCase()),t.extensions||[],t.filename,e,n)}static matchFilename(t,e){for(let s of t)if(s.filename&&s.filename.test(e))return s;let n=/\.([^.]+)$/.exec(e);if(n){for(let s of t)if(s.extensions.indexOf(n[1])>-1)return s}return null}static matchLanguageName(t,e,n=!0){e=e.toLowerCase();for(let s of t)if(s.alias.some(i=>i==e))return s;if(n)for(let s of t)for(let i of s.alias){let o=e.indexOf(i);if(o>-1&&(i.length>2||!/\w/.test(e[o-1])&&!/\w/.test(e[o+i.length])))return s}return null}}const qt=y.define(),dt=y.define({combine:r=>{if(!r.length)return" ";let t=r[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(r[0]));return t}});function B(r){let t=r.facet(dt);return t.charCodeAt(0)==9?r.tabSize*t.length:t.length}function Ee(r,t){let e="",n=r.tabSize,s=r.facet(dt)[0];if(s==" "){for(;t>=n;)e+=" ",t-=n;s=" "}for(let i=0;i<t;i++)e+=s;return e}function Fe(r,t){r instanceof O&&(r=new pt(r));for(let n of r.state.facet(qt)){let s=n(r,t);if(s!==void 0)return s}let e=k(r.state);return e.length>=t?Jt(r,e,t):null}class pt{constructor(t,e={}){this.state=t,this.options=e,this.unit=B(t)}lineAt(t,e=1){let n=this.state.doc.lineAt(t),{simulateBreak:s,simulateDoubleBreak:i}=this.options;return s!=null&&s>=n.from&&s<=n.to?i&&s==t?{text:"",from:t}:(e<0?s<t:s<=t)?{text:n.text.slice(s-n.from),from:s}:{text:n.text.slice(0,s-n.from),from:n.from}:n}textAfterPos(t,e=1){if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";let{text:n,from:s}=this.lineAt(t,e);return n.slice(t-s,Math.min(n.length,t+100-s))}column(t,e=1){let{text:n,from:s}=this.lineAt(t,e),i=this.countColumn(n,t-s),o=this.options.overrideIndentation?this.options.overrideIndentation(s):-1;return o>-1&&(i+=o-this.countColumn(n,n.search(/\S|$/))),i}countColumn(t,e=t.length){return Ft(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:n,from:s}=this.lineAt(t,e),i=this.options.overrideIndentation;if(i){let o=i(s);if(o>-1)return o}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const gt=new g;function Jt(r,t,e){let n=t.resolveStack(e),s=t.resolveInner(e,-1).resolve(e,0).enterUnfinishedNodesBefore(e);if(s!=n.node){let i=[];for(let o=s;o&&!(o.from<n.node.from||o.to>n.node.to||o.from==n.node.from&&o.type==n.node.type);o=o.parent)i.push(o);for(let o=i.length-1;o>=0;o--)n={node:i[o],next:n}}return mt(n,r,e)}function mt(r,t,e){for(let n=r;n;n=n.next){let s=Kt(n.node);if(s)return s(q.create(t,e,n))}return 0}function Gt(r){return r.pos==r.options.simulateBreak&&r.options.simulateDoubleBreak}function Kt(r){let t=r.type.prop(gt);if(t)return t;let e=r.firstChild,n;if(e&&(n=e.type.prop(g.closedBy))){let s=r.lastChild,i=s&&n.indexOf(s.name)>-1;return o=>kt(o,!0,1,void 0,i&&!Gt(o)?s.from:void 0)}return r.parent==null?Qt:null}function Qt(){return 0}class q extends pt{constructor(t,e,n){super(t.state,t.options),this.base=t,this.pos=e,this.context=n}get node(){return this.context.node}static create(t,e,n){return new q(t,e,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let n=t.resolve(e.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(Xt(n,t))break;e=this.state.doc.lineAt(n.from)}return this.lineIndent(e.from)}continue(){return mt(this.context.next,this.base,this.pos)}}function Xt(r,t){for(let e=t;e;e=e.parent)if(r==e)return!0;return!1}function Yt(r){let t=r.node,e=t.childAfter(t.from),n=t.lastChild;if(!e)return null;let s=r.options.simulateBreak,i=r.state.doc.lineAt(e.from),o=s==null||s<=i.from?i.to:Math.min(i.to,s);for(let l=e.to;;){let a=t.childAfter(l);if(!a||a==n)return null;if(!a.type.isSkipped){if(a.from>=o)return null;let h=/^ */.exec(i.text.slice(e.to-i.from))[0].length;return{from:e.from,to:e.to+h}}l=a.to}}function Me({closing:r,align:t=!0,units:e=1}){return n=>kt(n,t,e,r)}function kt(r,t,e,n,s){let i=r.textAfter,o=i.match(/^\s*/)[0].length,l=n&&i.slice(o,o+n.length)==n||s==r.pos+o,a=t?Yt(r):null;return a?l?r.column(a.from):r.column(a.to):r.baseIndent+(l?0:r.unit*e)}const Re=r=>r.baseIndent;function We({except:r,units:t=1}={}){return e=>{let n=r&&r.test(e.textAfter);return e.baseIndent+(n?0:t*e.unit)}}const Zt=y.define(),_t=new g;function Ve(r){let t=r.firstChild,e=r.lastChild;return t&&t.to<e.from?{from:t.to,to:e.type.isError?r.to:e.from}:null}function te(r,t,e){let n=k(r);if(n.length<e)return null;let s=n.resolveStack(e,1),i=null;for(let o=s;o;o=o.next){let l=o.node;if(l.to<=e||l.from>e)continue;if(i&&l.from<t)break;let a=l.type.prop(_t);if(a&&(l.to<n.length-50||n.length==r.doc.length||!ee(l))){let h=a(l,r);h&&h.from<=e&&h.from>=t&&h.to>e&&(i=h)}}return i}function ee(r){let t=r.lastChild;return t&&t.to==r.to&&t.type.isError}function ne(r,t,e){for(let n of r.facet(Zt)){let s=n(r,t,e);if(s)return s}return te(r,t,e)}function wt(r,t){let e=t.mapPos(r.from,1),n=t.mapPos(r.to,-1);return e>=n?void 0:{from:e,to:n}}const bt=E.define({map:wt}),yt=E.define({map:wt});function re(r){let t=[];for(let{head:e}of r.state.selection.ranges)t.some(n=>n.from<=e&&n.to>=e)||t.push(r.lineBlockAt(e));return t}const J=at.define({create(){return b.none},update(r,t){t.isUserEvent("delete")&&t.changes.iterChangedRanges((e,n)=>r=tt(r,e,n)),r=r.map(t.changes);for(let e of t.effects)if(e.is(bt)&&!ie(r,e.value.from,e.value.to)){let{preparePlaceholder:n}=t.state.facet(vt),s=n?b.replace({widget:new ue(n(t.state,e.value))}):et;r=r.update({add:[s.range(e.value.from,e.value.to)]})}else e.is(yt)&&(r=r.update({filter:(n,s)=>e.value.from!=n||e.value.to!=s,filterFrom:e.value.from,filterTo:e.value.to}));return t.selection&&(r=tt(r,t.selection.main.head)),r},provide:r=>P.decorations.from(r),toJSON(r,t){let e=[];return r.between(0,t.doc.length,(n,s)=>{e.push(n,s)}),e},fromJSON(r){if(!Array.isArray(r)||r.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let e=0;e<r.length;){let n=r[e++],s=r[e++];if(typeof n!="number"||typeof s!="number")throw new RangeError("Invalid JSON for fold state");t.push(et.range(n,s))}return b.set(t,!0)}});function tt(r,t,e=t){let n=!1;return r.between(t,e,(s,i)=>{s<e&&i>t&&(n=!0)}),n?r.update({filterFrom:t,filterTo:e,filter:(s,i)=>s>=e||i<=t}):r}function se(r,t,e){var n;let s=null;return(n=r.field(J,!1))===null||n===void 0||n.between(t,e,(i,o)=>{(!s||s.from>i)&&(s={from:i,to:o})}),s}function ie(r,t,e){let n=!1;return r.between(t,t,(s,i)=>{s==t&&i==e&&(n=!0)}),n}function oe(r,t){return r.field(J,!1)?t:t.concat(E.appendConfig.of(he()))}const He=r=>{for(let t of re(r)){let e=ne(r.state,t.from,t.to);if(e)return r.dispatch({effects:oe(r.state,[bt.of(e),ae(r,e)])}),!0}return!1};function ae(r,t,e=!0){let n=r.state.doc.lineAt(t.from).number,s=r.state.doc.lineAt(t.to).number;return P.announce.of(`${r.state.phrase(e?"Folded lines":"Unfolded lines")} ${n} ${r.state.phrase("to")} ${s}.`)}const le={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},vt=y.define({combine(r){return Mt(r,le)}});function he(r){return[J,fe]}function Pt(r,t){let{state:e}=r,n=e.facet(vt),s=o=>{let l=r.lineBlockAt(r.posAtDOM(o.target)),a=se(r.state,l.from,l.to);a&&r.dispatch({effects:yt.of(a)}),o.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(r,s,t);let i=document.createElement("span");return i.textContent=n.placeholderText,i.setAttribute("aria-label",e.phrase("folded code")),i.title=e.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=s,i}const et=b.replace({widget:new class extends ht{toDOM(r){return Pt(r,null)}}});class ue extends ht{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return Pt(t,this.value)}}const fe=P.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class F{constructor(t,e){this.specs=t;let n;function s(l){let a=Y.newName();return(n||(n=Object.create(null)))["."+a]=l,a}const i=typeof e.all=="string"?e.all:e.all?s(e.all):void 0,o=e.scope;this.scope=o instanceof p?l=>l.prop(v)==o.data:o?l=>l==o:void 0,this.style=Wt(t.map(l=>({tag:l.tag,class:l.class||s(Object.assign({},l,{tag:null}))})),{all:i}).style,this.module=n?new Y(n):null,this.themeType=e.themeType}static define(t,e){return new F(t,e||{})}}const $=y.define(),St=y.define({combine(r){return r.length?[r[0]]:null}});function V(r){let t=r.facet($);return t.length?t:r.facet(St)}function Ue(r,t){let e=[de],n;return r instanceof F&&(r.module&&e.push(P.styleModule.of(r.module)),n=r.themeType),t?.fallback?e.push(St.of(r)):n?e.push($.computeN([P.darkTheme],s=>s.facet(P.darkTheme)==(n=="dark")?[r]:[])):e.push($.of(r)),e}class ce{constructor(t){this.markCache=Object.create(null),this.tree=k(t.state),this.decorations=this.buildDeco(t,V(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=k(t.state),n=V(t.state),s=n!=V(t.startState),{viewport:i}=t.view,o=t.changes.mapPos(this.decoratedTo,1);e.length<i.to&&!s&&e.type==this.tree.type&&o>=i.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=o):(e!=this.tree||t.viewportChanged||s)&&(this.tree=e,this.decorations=this.buildDeco(t.view,n),this.decoratedTo=i.to)}buildDeco(t,e){if(!e||!this.tree.length)return b.none;let n=new Et;for(let{from:s,to:i}of t.visibleRanges)Vt(this.tree,e,(o,l,a)=>{n.add(o,l,this.markCache[a]||(this.markCache[a]=b.mark({class:a})))},s,i);return n.finish()}}const de=Lt.high(lt.fromClass(ce,{decorations:r=>r.decorations})),$e=F.define([{tag:f.meta,color:"#404740"},{tag:f.link,textDecoration:"underline"},{tag:f.heading,textDecoration:"underline",fontWeight:"bold"},{tag:f.emphasis,fontStyle:"italic"},{tag:f.strong,fontWeight:"bold"},{tag:f.strikethrough,textDecoration:"line-through"},{tag:f.keyword,color:"#708"},{tag:[f.atom,f.bool,f.url,f.contentSeparator,f.labelName],color:"#219"},{tag:[f.literal,f.inserted],color:"#164"},{tag:[f.string,f.deleted],color:"#a11"},{tag:[f.regexp,f.escape,f.special(f.string)],color:"#e40"},{tag:f.definition(f.variableName),color:"#00f"},{tag:f.local(f.variableName),color:"#30a"},{tag:[f.typeName,f.namespace],color:"#085"},{tag:f.className,color:"#167"},{tag:[f.special(f.variableName),f.macroName],color:"#256"},{tag:f.definition(f.propertyName),color:"#00c"},{tag:f.comment,color:"#940"},{tag:f.invalid,color:"#f00"}]),pe=1e4,ge="()[]{}",me=new g;function j(r,t,e){let n=r.prop(t<0?g.openedBy:g.closedBy);if(n)return n;if(r.name.length==1){let s=e.indexOf(r.name);if(s>-1&&s%2==(t<0?1:0))return[e[s+t]]}return null}function z(r){let t=r.type.prop(me);return t?t(r.node):r}function je(r,t,e,n={}){let s=n.maxScanDistance||pe,i=n.brackets||ge,o=k(r),l=o.resolveInner(t,e);for(let a=l;a;a=a.parent){let h=j(a.type,e,i);if(h&&a.from<a.to){let u=z(a);if(u&&(e>0?t>=u.from&&t<u.to:t>u.from&&t<=u.to))return ke(r,t,e,a,u,h,i)}}return we(r,t,e,o,l.type,s,i)}function ke(r,t,e,n,s,i,o){let l=n.parent,a={from:s.from,to:s.to},h=0,u=l?.cursor();if(u&&(e<0?u.childBefore(n.from):u.childAfter(n.to)))do if(e<0?u.to<=n.from:u.from>=n.to){if(h==0&&i.indexOf(u.type.name)>-1&&u.from<u.to){let c=z(u);return{start:a,end:c?{from:c.from,to:c.to}:void 0,matched:!0}}else if(j(u.type,e,o))h++;else if(j(u.type,-e,o)){if(h==0){let c=z(u);return{start:a,end:c&&c.from<c.to?{from:c.from,to:c.to}:void 0,matched:!1}}h--}}while(e<0?u.prevSibling():u.nextSibling());return{start:a,matched:!1}}function we(r,t,e,n,s,i,o){let l=e<0?r.sliceDoc(t-1,t):r.sliceDoc(t,t+1),a=o.indexOf(l);if(a<0||a%2==0!=e>0)return null;let h={from:e<0?t-1:t,to:e>0?t+1:t},u=r.doc.iterRange(t,e>0?r.doc.length:0),c=0;for(let w=0;!u.next().done&&w<=i;){let m=u.value;e<0&&(w+=m.length);let S=t+w*e;for(let T=e>0?0:m.length-1,Ot=e>0?m.length:-1;T!=Ot;T+=e){let M=o.indexOf(m[T]);if(!(M<0||n.resolveInner(S+T,1).type!=s))if(M%2==0==e>0)c++;else{if(c==1)return{start:h,end:{from:S+T,to:S+T+1},matched:M>>1==a>>1};c--}}e>0&&(w+=m.length)}return u.done?{start:h,matched:!1}:null}function nt(r,t,e,n=0,s=0){t==null&&(t=r.search(/[^\s\u00a0]/),t==-1&&(t=r.length));let i=s;for(let o=n;o<t;o++)r.charCodeAt(o)==9?i+=e-i%e:i++;return i}class Tt{constructor(t,e,n,s){this.string=t,this.tabSize=e,this.indentUnit=n,this.overrideIndent=s,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(t){let e=this.string.charAt(this.pos),n;if(typeof t=="string"?n=e==t:n=e&&(t instanceof RegExp?t.test(e):t(e)),n)return++this.pos,e}eatWhile(t){let e=this.pos;for(;this.eat(t););return this.pos>e}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=nt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){var t;return(t=this.overrideIndent)!==null&&t!==void 0?t:nt(this.string,null,this.tabSize)}match(t,e,n){if(typeof t=="string"){let s=o=>n?o.toLowerCase():o,i=this.string.substr(this.pos,t.length);return s(i)==s(t)?(e!==!1&&(this.pos+=t.length),!0):null}else{let s=this.string.slice(this.pos).match(t);return s&&s.index>0?null:(s&&e!==!1&&(this.pos+=s[0].length),s)}}current(){return this.string.slice(this.start,this.pos)}}function be(r){return{name:r.name||"",token:r.token,blankLine:r.blankLine||(()=>{}),startState:r.startState||(()=>!0),copyState:r.copyState||ye,indent:r.indent||(()=>null),languageData:r.languageData||{},tokenTable:r.tokenTable||K,mergeTokens:r.mergeTokens!==!1}}function ye(r){if(typeof r!="object")return r;let t={};for(let e in r){let n=r[e];t[e]=n instanceof Array?n.slice():n}return t}const rt=new WeakMap;class xt extends p{constructor(t){let e=ut(t.languageData),n=be(t),s,i=new class extends ot{createParse(o,l,a){return new Pe(s,o,l,a)}};super(e,i,[],t.name),this.topNode=xe(e,this),s=this,this.streamParser=n,this.stateAfter=new g({perNode:!0}),this.tokenTable=t.tokenTable?new Dt(n.tokenTable):Te}static define(t){return new xt(t)}getIndent(t){let e,{overrideIndentation:n}=t.options;n&&(e=rt.get(t.state),e!=null&&e<t.pos-1e4&&(e=void 0));let s=G(this,t.node.tree,t.node.from,t.node.from,e??t.pos),i,o;if(s?(o=s.state,i=s.pos+1):(o=this.streamParser.startState(t.unit),i=t.node.from),t.pos-i>1e4)return null;for(;i<t.pos;){let a=t.state.doc.lineAt(i),h=Math.min(t.pos,a.to);if(a.length){let u=n?n(a.from):-1,c=new Tt(a.text,t.state.tabSize,t.unit,u<0?void 0:u);for(;c.pos<h-a.from;)Ct(this.streamParser.token,c,o)}else this.streamParser.blankLine(o,t.unit);if(h==t.pos)break;i=a.to+1}let l=t.lineAt(t.pos);return n&&e==null&&rt.set(t.state,l.from),this.streamParser.indent(o,/^\s*(.*)/.exec(l.text)[1],t)}get allowsNesting(){return!1}}function G(r,t,e,n,s){let i=e>=n&&e+t.length<=s&&t.prop(r.stateAfter);if(i)return{state:r.streamParser.copyState(i),pos:e+t.length};for(let o=t.children.length-1;o>=0;o--){let l=t.children[o],a=e+t.positions[o],h=l instanceof d&&a<s&&G(r,l,a,n,s);if(h)return h}return null}function At(r,t,e,n,s){if(s&&e<=0&&n>=t.length)return t;!s&&e==0&&t.type==r.topNode&&(s=!0);for(let i=t.children.length-1;i>=0;i--){let o=t.positions[i],l=t.children[i],a;if(o<n&&l instanceof d){if(!(a=At(r,l,e-o,n-o,s)))break;return s?new d(t.type,t.children.slice(0,i).concat(a),t.positions.slice(0,i+1),o+a.length):a}}return null}function ve(r,t,e,n,s){for(let i of t){let o=i.from+(i.openStart?25:0),l=i.to-(i.openEnd?25:0),a=o<=e&&l>e&&G(r,i.tree,0-i.offset,e,l),h;if(a&&a.pos<=n&&(h=At(r,i.tree,e+i.offset,a.pos+i.offset,!1)))return{state:a.state,tree:h}}return{state:r.streamParser.startState(s?B(s):4),tree:d.empty}}class Pe{constructor(t,e,n,s){this.lang=t,this.input=e,this.fragments=n,this.ranges=s,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=s[s.length-1].to;let i=x.get(),o=s[0].from,{state:l,tree:a}=ve(t,n,o,this.to,i?.state);this.state=l,this.parsedPos=this.chunkStart=o+a.length;for(let h=0;h<a.children.length;h++)this.chunks.push(a.children[h]),this.chunkPos.push(a.positions[h]);i&&this.parsedPos<i.viewport.from-1e5&&s.some(h=>h.from<=i.viewport.from&&h.to>=i.viewport.from)&&(this.state=this.lang.streamParser.startState(B(i.state)),i.skipUntilInView(this.parsedPos,i.viewport.from),this.parsedPos=i.viewport.from),this.moveRangeIndex()}advance(){let t=x.get(),e=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),n=Math.min(e,this.chunkStart+512);for(t&&(n=Math.min(n,t.viewport.to));this.parsedPos<n;)this.parseLine(t);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=e?this.finish():t&&this.parsedPos>=t.viewport.to?(t.skipUntilInView(this.parsedPos,e),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let e=this.input.chunk(t);if(this.input.lineChunks)e==`
|
|
1
|
+
import{N as g,P as ot,a as L,T as d,I as Q,b as Bt,c as N}from"./vendor-lezer-common-B3-cUCR_.js";import{F as y,E as O,P as Lt,k as Et,l as Ft,S as E,i as at,e as Mt}from"./vendor-codemirror-state-CNWM3Q8V.js";import{E as P,V as lt,D as b,l as Rt,W as ht,a as X}from"./vendor-codemirror-view-DSzLbZiS.js";import{t as Wt,h as Vt,a as f,s as Ht}from"./vendor-lezer-highlight-CDMHUZ74.js";import{S as Y}from"./vendor-style-mod-NZ5MEPvj.js";var R;const v=new g;function ut(r){return y.define({combine:r?t=>t.concat(r):void 0})}const Ut=new g;class p{constructor(t,e,n=[],s=""){this.data=t,this.name=s,O.prototype.hasOwnProperty("tree")||Object.defineProperty(O.prototype,"tree",{get(){return k(this)}}),this.parser=e,this.extension=[C.of(this),O.languageData.of((i,o,l)=>{let a=Z(i,o,l),h=a.type.prop(v);if(!h)return[];let u=i.facet(h),c=a.type.prop(Ut);if(c){let w=a.resolve(o-a.from,l);for(let m of c)if(m.test(w,i)){let S=i.facet(m.facet);return m.type=="replace"?S:S.concat(u)}}return u})].concat(n)}isActiveAt(t,e,n=-1){return Z(t,e,n).type.prop(v)==this.data}findRegions(t){let e=t.facet(C);if(e?.data==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let n=[],s=(i,o)=>{if(i.prop(v)==this.data){n.push({from:o,to:o+i.length});return}let l=i.prop(g.mounted);if(l){if(l.tree.prop(v)==this.data){if(l.overlay)for(let a of l.overlay)n.push({from:a.from+o,to:a.to+o});else n.push({from:o,to:o+i.length});return}else if(l.overlay){let a=n.length;if(s(l.tree,l.overlay[0].from+o),n.length>a)return}}for(let a=0;a<i.children.length;a++){let h=i.children[a];h instanceof d&&s(h,i.positions[a]+o)}};return s(k(t),0),n}get allowsNesting(){return!0}}p.setState=E.define();function Z(r,t,e){let n=r.facet(C),s=k(r).topNode;if(!n||n.allowsNesting)for(let i=s;i;i=i.enter(t,e,Q.ExcludeBuffers|Q.EnterBracketed))i.type.isTop&&(s=i);return s}class U extends p{constructor(t,e,n){super(t,e,[],n),this.parser=e}static define(t){let e=ut(t.languageData);return new U(e,t.parser.configure({props:[v.add(n=>n.isTop?e:void 0)]}),t.name)}configure(t,e){return new U(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function k(r){let t=r.field(p.state,!1);return t?t.tree:d.empty}function $t(r,t,e=50){var n;let s=(n=r.field(p.state,!1))===null||n===void 0?void 0:n.context;if(!s)return null;let i=s.viewport;s.updateViewport({from:0,to:t});let o=s.isDone(t)||s.work(e,t)?s.tree:null;return s.updateViewport(i),o}function Oe(r,t=r.viewport.to,e=100){let n=$t(r.state,t,e);return n!=k(r.state)&&r.dispatch({}),!!n}class jt{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let n=this.cursorPos-this.string.length;return t<n||e>=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-n,e-n)}}let I=null;class x{constructor(t,e,n=[],s,i,o,l,a){this.parser=t,this.state=e,this.fragments=n,this.tree=s,this.treeLen=i,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(t,e,n){return new x(t,e,[],d.empty,0,n,[],null)}startParse(){return this.parser.startParse(new jt(this.state.doc),this.fragments)}work(t,e){return e!=null&&e>=this.state.doc.length&&(e=void 0),this.tree!=d.empty&&this.isDone(e??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if(typeof t=="number"){let s=Date.now()+t;t=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),e!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&e<this.state.doc.length&&this.parse.stopAt(e);;){let s=this.parse.advance();if(s)if(this.fragments=this.withoutTempSkipped(N.addTree(s,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(n=this.parse.stoppedAt)!==null&&n!==void 0?n:this.state.doc.length,this.tree=s,this.parse=null,this.treeLen<(e??this.state.doc.length))this.parse=this.startParse();else return!0;if(t())return!1}})}takeTree(){let t,e;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(e=this.parse.advance()););}),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(N.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=I;I=this;try{return t()}finally{I=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=_(t,e.from,e.to);return t}changes(t,e){let{fragments:n,tree:s,treeLen:i,viewport:o,skipped:l}=this;if(this.takeTree(),!t.empty){let a=[];if(t.iterChangedRanges((h,u,c,w)=>a.push({fromA:h,toA:u,fromB:c,toB:w})),n=N.applyChanges(n,a),s=d.empty,i=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){l=[];for(let h of this.skipped){let u=t.mapPos(h.from,1),c=t.mapPos(h.to,-1);u<c&&l.push({from:u,to:c})}}}return new x(this.parser,e,n,s,i,o,l,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let e=this.skipped.length;for(let n=0;n<this.skipped.length;n++){let{from:s,to:i}=this.skipped[n];s<t.to&&i>t.from&&(this.fragments=_(this.fragments,s,i),this.skipped.splice(n--,1))}return this.skipped.length>=e?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends ot{createParse(e,n,s){let i=s[0].from,o=s[s.length-1].to;return{parsedPos:i,advance(){let a=I;if(a){for(let h of s)a.tempSkipped.push(h);t&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,t]):t)}return this.parsedPos=o,new d(L.none,[],[],o-i)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&e[0].from==0&&e[0].to>=t}static get(){return I}}function _(r,t,e){return N.applyChanges(r,[{fromA:t,toA:e,fromB:t,toB:e}])}class A{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),n=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,n)||e.takeTree(),new A(e)}static init(t){let e=Math.min(3e3,t.doc.length),n=x.create(t.facet(C).parser,t,{from:0,to:e});return n.work(20,e)||n.takeTree(),new A(n)}}p.state=at.define({create:A.init,update(r,t){for(let e of t.effects)if(e.is(p.setState))return e.value;return t.startState.facet(C)!=t.state.facet(C)?A.init(t.state):r.apply(t)}});let ft=r=>{let t=setTimeout(()=>r(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<"u"&&(ft=r=>{let t=-1,e=setTimeout(()=>{t=requestIdleCallback(r,{timeout:400})},100);return()=>t<0?clearTimeout(e):cancelIdleCallback(t)});const W=typeof navigator<"u"&&(!((R=navigator.scheduling)===null||R===void 0)&&R.isInputPending)?()=>navigator.scheduling.isInputPending():null,zt=lt.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(p.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(p.state);(e.tree!=e.context.tree||!e.context.isDone(t.doc.length))&&(this.working=ft(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEnd<e&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=e+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:s}}=this.view,i=n.field(p.state);if(i.tree==i.context.tree&&i.context.isDone(s+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,t&&!W?Math.max(25,t.timeRemaining()-5):1e9),l=i.context.treeLen<s&&n.doc.length>s+1e3,a=i.context.work(()=>W&&W()||Date.now()>o,s+(l?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:p.setState.of(new A(i.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(e=>Rt(this.view.state,e)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),C=y.define({combine(r){return r.length?r[0]:null},enables:r=>[p.state,zt,P.contentAttributes.compute([r],t=>{let e=t.facet(r);return e&&e.name?{"data-language":e.name}:{}})]});class Le{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}class ct{constructor(t,e,n,s,i,o=void 0){this.name=t,this.alias=e,this.extensions=n,this.filename=s,this.loadFunc=i,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(t=>this.support=t,t=>{throw this.loading=null,t}))}static of(t){let{load:e,support:n}=t;if(!e){if(!n)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");e=()=>Promise.resolve(n)}return new ct(t.name,(t.alias||[]).concat(t.name).map(s=>s.toLowerCase()),t.extensions||[],t.filename,e,n)}static matchFilename(t,e){for(let s of t)if(s.filename&&s.filename.test(e))return s;let n=/\.([^.]+)$/.exec(e);if(n){for(let s of t)if(s.extensions.indexOf(n[1])>-1)return s}return null}static matchLanguageName(t,e,n=!0){e=e.toLowerCase();for(let s of t)if(s.alias.some(i=>i==e))return s;if(n)for(let s of t)for(let i of s.alias){let o=e.indexOf(i);if(o>-1&&(i.length>2||!/\w/.test(e[o-1])&&!/\w/.test(e[o+i.length])))return s}return null}}const qt=y.define(),dt=y.define({combine:r=>{if(!r.length)return" ";let t=r[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(r[0]));return t}});function B(r){let t=r.facet(dt);return t.charCodeAt(0)==9?r.tabSize*t.length:t.length}function Ee(r,t){let e="",n=r.tabSize,s=r.facet(dt)[0];if(s==" "){for(;t>=n;)e+=" ",t-=n;s=" "}for(let i=0;i<t;i++)e+=s;return e}function Fe(r,t){r instanceof O&&(r=new pt(r));for(let n of r.state.facet(qt)){let s=n(r,t);if(s!==void 0)return s}let e=k(r.state);return e.length>=t?Jt(r,e,t):null}class pt{constructor(t,e={}){this.state=t,this.options=e,this.unit=B(t)}lineAt(t,e=1){let n=this.state.doc.lineAt(t),{simulateBreak:s,simulateDoubleBreak:i}=this.options;return s!=null&&s>=n.from&&s<=n.to?i&&s==t?{text:"",from:t}:(e<0?s<t:s<=t)?{text:n.text.slice(s-n.from),from:s}:{text:n.text.slice(0,s-n.from),from:n.from}:n}textAfterPos(t,e=1){if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";let{text:n,from:s}=this.lineAt(t,e);return n.slice(t-s,Math.min(n.length,t+100-s))}column(t,e=1){let{text:n,from:s}=this.lineAt(t,e),i=this.countColumn(n,t-s),o=this.options.overrideIndentation?this.options.overrideIndentation(s):-1;return o>-1&&(i+=o-this.countColumn(n,n.search(/\S|$/))),i}countColumn(t,e=t.length){return Ft(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:n,from:s}=this.lineAt(t,e),i=this.options.overrideIndentation;if(i){let o=i(s);if(o>-1)return o}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const gt=new g;function Jt(r,t,e){let n=t.resolveStack(e),s=t.resolveInner(e,-1).resolve(e,0).enterUnfinishedNodesBefore(e);if(s!=n.node){let i=[];for(let o=s;o&&!(o.from<n.node.from||o.to>n.node.to||o.from==n.node.from&&o.type==n.node.type);o=o.parent)i.push(o);for(let o=i.length-1;o>=0;o--)n={node:i[o],next:n}}return mt(n,r,e)}function mt(r,t,e){for(let n=r;n;n=n.next){let s=Kt(n.node);if(s)return s(q.create(t,e,n))}return 0}function Gt(r){return r.pos==r.options.simulateBreak&&r.options.simulateDoubleBreak}function Kt(r){let t=r.type.prop(gt);if(t)return t;let e=r.firstChild,n;if(e&&(n=e.type.prop(g.closedBy))){let s=r.lastChild,i=s&&n.indexOf(s.name)>-1;return o=>kt(o,!0,1,void 0,i&&!Gt(o)?s.from:void 0)}return r.parent==null?Qt:null}function Qt(){return 0}class q extends pt{constructor(t,e,n){super(t.state,t.options),this.base=t,this.pos=e,this.context=n}get node(){return this.context.node}static create(t,e,n){return new q(t,e,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let n=t.resolve(e.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(Xt(n,t))break;e=this.state.doc.lineAt(n.from)}return this.lineIndent(e.from)}continue(){return mt(this.context.next,this.base,this.pos)}}function Xt(r,t){for(let e=t;e;e=e.parent)if(r==e)return!0;return!1}function Yt(r){let t=r.node,e=t.childAfter(t.from),n=t.lastChild;if(!e)return null;let s=r.options.simulateBreak,i=r.state.doc.lineAt(e.from),o=s==null||s<=i.from?i.to:Math.min(i.to,s);for(let l=e.to;;){let a=t.childAfter(l);if(!a||a==n)return null;if(!a.type.isSkipped){if(a.from>=o)return null;let h=/^ */.exec(i.text.slice(e.to-i.from))[0].length;return{from:e.from,to:e.to+h}}l=a.to}}function Me({closing:r,align:t=!0,units:e=1}){return n=>kt(n,t,e,r)}function kt(r,t,e,n,s){let i=r.textAfter,o=i.match(/^\s*/)[0].length,l=n&&i.slice(o,o+n.length)==n||s==r.pos+o,a=t?Yt(r):null;return a?l?r.column(a.from):r.column(a.to):r.baseIndent+(l?0:r.unit*e)}const Re=r=>r.baseIndent;function We({except:r,units:t=1}={}){return e=>{let n=r&&r.test(e.textAfter);return e.baseIndent+(n?0:t*e.unit)}}const Zt=y.define(),_t=new g;function Ve(r){let t=r.firstChild,e=r.lastChild;return t&&t.to<e.from?{from:t.to,to:e.type.isError?r.to:e.from}:null}function te(r,t,e){let n=k(r);if(n.length<e)return null;let s=n.resolveStack(e,1),i=null;for(let o=s;o;o=o.next){let l=o.node;if(l.to<=e||l.from>e)continue;if(i&&l.from<t)break;let a=l.type.prop(_t);if(a&&(l.to<n.length-50||n.length==r.doc.length||!ee(l))){let h=a(l,r);h&&h.from<=e&&h.from>=t&&h.to>e&&(i=h)}}return i}function ee(r){let t=r.lastChild;return t&&t.to==r.to&&t.type.isError}function ne(r,t,e){for(let n of r.facet(Zt)){let s=n(r,t,e);if(s)return s}return te(r,t,e)}function wt(r,t){let e=t.mapPos(r.from,1),n=t.mapPos(r.to,-1);return e>=n?void 0:{from:e,to:n}}const bt=E.define({map:wt}),yt=E.define({map:wt});function re(r){let t=[];for(let{head:e}of r.state.selection.ranges)t.some(n=>n.from<=e&&n.to>=e)||t.push(r.lineBlockAt(e));return t}const J=at.define({create(){return b.none},update(r,t){t.isUserEvent("delete")&&t.changes.iterChangedRanges((e,n)=>r=tt(r,e,n)),r=r.map(t.changes);for(let e of t.effects)if(e.is(bt)&&!ie(r,e.value.from,e.value.to)){let{preparePlaceholder:n}=t.state.facet(vt),s=n?b.replace({widget:new ue(n(t.state,e.value))}):et;r=r.update({add:[s.range(e.value.from,e.value.to)]})}else e.is(yt)&&(r=r.update({filter:(n,s)=>e.value.from!=n||e.value.to!=s,filterFrom:e.value.from,filterTo:e.value.to}));return t.selection&&(r=tt(r,t.selection.main.head)),r},provide:r=>P.decorations.from(r),toJSON(r,t){let e=[];return r.between(0,t.doc.length,(n,s)=>{e.push(n,s)}),e},fromJSON(r){if(!Array.isArray(r)||r.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let e=0;e<r.length;){let n=r[e++],s=r[e++];if(typeof n!="number"||typeof s!="number")throw new RangeError("Invalid JSON for fold state");t.push(et.range(n,s))}return b.set(t,!0)}});function tt(r,t,e=t){let n=!1;return r.between(t,e,(s,i)=>{s<e&&i>t&&(n=!0)}),n?r.update({filterFrom:t,filterTo:e,filter:(s,i)=>s>=e||i<=t}):r}function se(r,t,e){var n;let s=null;return(n=r.field(J,!1))===null||n===void 0||n.between(t,e,(i,o)=>{(!s||s.from>i)&&(s={from:i,to:o})}),s}function ie(r,t,e){let n=!1;return r.between(t,t,(s,i)=>{s==t&&i==e&&(n=!0)}),n}function oe(r,t){return r.field(J,!1)?t:t.concat(E.appendConfig.of(he()))}const He=r=>{for(let t of re(r)){let e=ne(r.state,t.from,t.to);if(e)return r.dispatch({effects:oe(r.state,[bt.of(e),ae(r,e)])}),!0}return!1};function ae(r,t,e=!0){let n=r.state.doc.lineAt(t.from).number,s=r.state.doc.lineAt(t.to).number;return P.announce.of(`${r.state.phrase(e?"Folded lines":"Unfolded lines")} ${n} ${r.state.phrase("to")} ${s}.`)}const le={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},vt=y.define({combine(r){return Mt(r,le)}});function he(r){return[J,fe]}function Pt(r,t){let{state:e}=r,n=e.facet(vt),s=o=>{let l=r.lineBlockAt(r.posAtDOM(o.target)),a=se(r.state,l.from,l.to);a&&r.dispatch({effects:yt.of(a)}),o.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(r,s,t);let i=document.createElement("span");return i.textContent=n.placeholderText,i.setAttribute("aria-label",e.phrase("folded code")),i.title=e.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=s,i}const et=b.replace({widget:new class extends ht{toDOM(r){return Pt(r,null)}}});class ue extends ht{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return Pt(t,this.value)}}const fe=P.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class F{constructor(t,e){this.specs=t;let n;function s(l){let a=Y.newName();return(n||(n=Object.create(null)))["."+a]=l,a}const i=typeof e.all=="string"?e.all:e.all?s(e.all):void 0,o=e.scope;this.scope=o instanceof p?l=>l.prop(v)==o.data:o?l=>l==o:void 0,this.style=Wt(t.map(l=>({tag:l.tag,class:l.class||s(Object.assign({},l,{tag:null}))})),{all:i}).style,this.module=n?new Y(n):null,this.themeType=e.themeType}static define(t,e){return new F(t,e||{})}}const $=y.define(),St=y.define({combine(r){return r.length?[r[0]]:null}});function V(r){let t=r.facet($);return t.length?t:r.facet(St)}function Ue(r,t){let e=[de],n;return r instanceof F&&(r.module&&e.push(P.styleModule.of(r.module)),n=r.themeType),t?.fallback?e.push(St.of(r)):n?e.push($.computeN([P.darkTheme],s=>s.facet(P.darkTheme)==(n=="dark")?[r]:[])):e.push($.of(r)),e}class ce{constructor(t){this.markCache=Object.create(null),this.tree=k(t.state),this.decorations=this.buildDeco(t,V(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=k(t.state),n=V(t.state),s=n!=V(t.startState),{viewport:i}=t.view,o=t.changes.mapPos(this.decoratedTo,1);e.length<i.to&&!s&&e.type==this.tree.type&&o>=i.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=o):(e!=this.tree||t.viewportChanged||s)&&(this.tree=e,this.decorations=this.buildDeco(t.view,n),this.decoratedTo=i.to)}buildDeco(t,e){if(!e||!this.tree.length)return b.none;let n=new Et;for(let{from:s,to:i}of t.visibleRanges)Vt(this.tree,e,(o,l,a)=>{n.add(o,l,this.markCache[a]||(this.markCache[a]=b.mark({class:a})))},s,i);return n.finish()}}const de=Lt.high(lt.fromClass(ce,{decorations:r=>r.decorations})),$e=F.define([{tag:f.meta,color:"#404740"},{tag:f.link,textDecoration:"underline"},{tag:f.heading,textDecoration:"underline",fontWeight:"bold"},{tag:f.emphasis,fontStyle:"italic"},{tag:f.strong,fontWeight:"bold"},{tag:f.strikethrough,textDecoration:"line-through"},{tag:f.keyword,color:"#708"},{tag:[f.atom,f.bool,f.url,f.contentSeparator,f.labelName],color:"#219"},{tag:[f.literal,f.inserted],color:"#164"},{tag:[f.string,f.deleted],color:"#a11"},{tag:[f.regexp,f.escape,f.special(f.string)],color:"#e40"},{tag:f.definition(f.variableName),color:"#00f"},{tag:f.local(f.variableName),color:"#30a"},{tag:[f.typeName,f.namespace],color:"#085"},{tag:f.className,color:"#167"},{tag:[f.special(f.variableName),f.macroName],color:"#256"},{tag:f.definition(f.propertyName),color:"#00c"},{tag:f.comment,color:"#940"},{tag:f.invalid,color:"#f00"}]),pe=1e4,ge="()[]{}",me=new g;function j(r,t,e){let n=r.prop(t<0?g.openedBy:g.closedBy);if(n)return n;if(r.name.length==1){let s=e.indexOf(r.name);if(s>-1&&s%2==(t<0?1:0))return[e[s+t]]}return null}function z(r){let t=r.type.prop(me);return t?t(r.node):r}function je(r,t,e,n={}){let s=n.maxScanDistance||pe,i=n.brackets||ge,o=k(r),l=o.resolveInner(t,e);for(let a=l;a;a=a.parent){let h=j(a.type,e,i);if(h&&a.from<a.to){let u=z(a);if(u&&(e>0?t>=u.from&&t<u.to:t>u.from&&t<=u.to))return ke(r,t,e,a,u,h,i)}}return we(r,t,e,o,l.type,s,i)}function ke(r,t,e,n,s,i,o){let l=n.parent,a={from:s.from,to:s.to},h=0,u=l?.cursor();if(u&&(e<0?u.childBefore(n.from):u.childAfter(n.to)))do if(e<0?u.to<=n.from:u.from>=n.to){if(h==0&&i.indexOf(u.type.name)>-1&&u.from<u.to){let c=z(u);return{start:a,end:c?{from:c.from,to:c.to}:void 0,matched:!0}}else if(j(u.type,e,o))h++;else if(j(u.type,-e,o)){if(h==0){let c=z(u);return{start:a,end:c&&c.from<c.to?{from:c.from,to:c.to}:void 0,matched:!1}}h--}}while(e<0?u.prevSibling():u.nextSibling());return{start:a,matched:!1}}function we(r,t,e,n,s,i,o){let l=e<0?r.sliceDoc(t-1,t):r.sliceDoc(t,t+1),a=o.indexOf(l);if(a<0||a%2==0!=e>0)return null;let h={from:e<0?t-1:t,to:e>0?t+1:t},u=r.doc.iterRange(t,e>0?r.doc.length:0),c=0;for(let w=0;!u.next().done&&w<=i;){let m=u.value;e<0&&(w+=m.length);let S=t+w*e;for(let T=e>0?0:m.length-1,Ot=e>0?m.length:-1;T!=Ot;T+=e){let M=o.indexOf(m[T]);if(!(M<0||n.resolveInner(S+T,1).type!=s))if(M%2==0==e>0)c++;else{if(c==1)return{start:h,end:{from:S+T,to:S+T+1},matched:M>>1==a>>1};c--}}e>0&&(w+=m.length)}return u.done?{start:h,matched:!1}:null}function nt(r,t,e,n=0,s=0){t==null&&(t=r.search(/[^\s\u00a0]/),t==-1&&(t=r.length));let i=s;for(let o=n;o<t;o++)r.charCodeAt(o)==9?i+=e-i%e:i++;return i}class Tt{constructor(t,e,n,s){this.string=t,this.tabSize=e,this.indentUnit=n,this.overrideIndent=s,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(t){let e=this.string.charAt(this.pos),n;if(typeof t=="string"?n=e==t:n=e&&(t instanceof RegExp?t.test(e):t(e)),n)return++this.pos,e}eatWhile(t){let e=this.pos;for(;this.eat(t););return this.pos>e}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=nt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){var t;return(t=this.overrideIndent)!==null&&t!==void 0?t:nt(this.string,null,this.tabSize)}match(t,e,n){if(typeof t=="string"){let s=o=>n?o.toLowerCase():o,i=this.string.substr(this.pos,t.length);return s(i)==s(t)?(e!==!1&&(this.pos+=t.length),!0):null}else{let s=this.string.slice(this.pos).match(t);return s&&s.index>0?null:(s&&e!==!1&&(this.pos+=s[0].length),s)}}current(){return this.string.slice(this.start,this.pos)}}function be(r){return{name:r.name||"",token:r.token,blankLine:r.blankLine||(()=>{}),startState:r.startState||(()=>!0),copyState:r.copyState||ye,indent:r.indent||(()=>null),languageData:r.languageData||{},tokenTable:r.tokenTable||K,mergeTokens:r.mergeTokens!==!1}}function ye(r){if(typeof r!="object")return r;let t={};for(let e in r){let n=r[e];t[e]=n instanceof Array?n.slice():n}return t}const rt=new WeakMap;class xt extends p{constructor(t){let e=ut(t.languageData),n=be(t),s,i=new class extends ot{createParse(o,l,a){return new Pe(s,o,l,a)}};super(e,i,[],t.name),this.topNode=xe(e,this),s=this,this.streamParser=n,this.stateAfter=new g({perNode:!0}),this.tokenTable=t.tokenTable?new Dt(n.tokenTable):Te}static define(t){return new xt(t)}getIndent(t){let e,{overrideIndentation:n}=t.options;n&&(e=rt.get(t.state),e!=null&&e<t.pos-1e4&&(e=void 0));let s=G(this,t.node.tree,t.node.from,t.node.from,e??t.pos),i,o;if(s?(o=s.state,i=s.pos+1):(o=this.streamParser.startState(t.unit),i=t.node.from),t.pos-i>1e4)return null;for(;i<t.pos;){let a=t.state.doc.lineAt(i),h=Math.min(t.pos,a.to);if(a.length){let u=n?n(a.from):-1,c=new Tt(a.text,t.state.tabSize,t.unit,u<0?void 0:u);for(;c.pos<h-a.from;)Ct(this.streamParser.token,c,o)}else this.streamParser.blankLine(o,t.unit);if(h==t.pos)break;i=a.to+1}let l=t.lineAt(t.pos);return n&&e==null&&rt.set(t.state,l.from),this.streamParser.indent(o,/^\s*(.*)/.exec(l.text)[1],t)}get allowsNesting(){return!1}}function G(r,t,e,n,s){let i=e>=n&&e+t.length<=s&&t.prop(r.stateAfter);if(i)return{state:r.streamParser.copyState(i),pos:e+t.length};for(let o=t.children.length-1;o>=0;o--){let l=t.children[o],a=e+t.positions[o],h=l instanceof d&&a<s&&G(r,l,a,n,s);if(h)return h}return null}function At(r,t,e,n,s){if(s&&e<=0&&n>=t.length)return t;!s&&e==0&&t.type==r.topNode&&(s=!0);for(let i=t.children.length-1;i>=0;i--){let o=t.positions[i],l=t.children[i],a;if(o<n&&l instanceof d){if(!(a=At(r,l,e-o,n-o,s)))break;return s?new d(t.type,t.children.slice(0,i).concat(a),t.positions.slice(0,i+1),o+a.length):a}}return null}function ve(r,t,e,n,s){for(let i of t){let o=i.from+(i.openStart?25:0),l=i.to-(i.openEnd?25:0),a=o<=e&&l>e&&G(r,i.tree,0-i.offset,e,l),h;if(a&&a.pos<=n&&(h=At(r,i.tree,e+i.offset,a.pos+i.offset,!1)))return{state:a.state,tree:h}}return{state:r.streamParser.startState(s?B(s):4),tree:d.empty}}class Pe{constructor(t,e,n,s){this.lang=t,this.input=e,this.fragments=n,this.ranges=s,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=s[s.length-1].to;let i=x.get(),o=s[0].from,{state:l,tree:a}=ve(t,n,o,this.to,i?.state);this.state=l,this.parsedPos=this.chunkStart=o+a.length;for(let h=0;h<a.children.length;h++)this.chunks.push(a.children[h]),this.chunkPos.push(a.positions[h]);i&&this.parsedPos<i.viewport.from-1e5&&s.some(h=>h.from<=i.viewport.from&&h.to>=i.viewport.from)&&(this.state=this.lang.streamParser.startState(B(i.state)),i.skipUntilInView(this.parsedPos,i.viewport.from),this.parsedPos=i.viewport.from),this.moveRangeIndex()}advance(){let t=x.get(),e=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),n=Math.min(e,this.chunkStart+512);for(t&&(n=Math.min(n,t.viewport.to));this.parsedPos<n;)this.parseLine(t);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=e?this.finish():t&&this.parsedPos>=t.viewport.to?(t.skipUntilInView(this.parsedPos,e),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let e=this.input.chunk(t);if(this.input.lineChunks)e==`
|
|
2
2
|
`&&(e="");else{let n=e.indexOf(`
|
|
3
3
|
`);n>-1&&(e=e.slice(0,n))}return t+e.length<=this.to?e:e.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,e=this.lineAfter(t),n=t+e.length;for(let s=this.rangeIndex;;){let i=this.ranges[s].to;if(i>=n||(e=e.slice(0,i-(n-e.length)),s++,s==this.ranges.length))break;let o=this.ranges[s].from,l=this.lineAfter(o);e+=l,n=o+l.length}return{line:e,end:n}}skipGapsTo(t,e,n){for(;;){let s=this.ranges[this.rangeIndex].to,i=t+e;if(n>0?s>i:s>=i)break;let o=this.ranges[++this.rangeIndex].from;e+=o-s}return e}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(t,e,n,s){let i=4;if(this.ranges.length>1){s=this.skipGapsTo(e,s,1),e+=s;let l=this.chunk.length;s=this.skipGapsTo(n,s,-1),n+=s,i+=this.chunk.length-l}let o=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&i==4&&o>=0&&this.chunk[o]==t&&this.chunk[o+2]==e?this.chunk[o+2]=n:this.chunk.push(t,e,n,i),s}parseLine(t){let{line:e,end:n}=this.nextLine(),s=0,{streamParser:i}=this.lang,o=new Tt(e,t?t.state.tabSize:4,t?B(t.state):2);if(o.eol())i.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=Ct(i.token,o,this.state);if(l&&(s=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,s)),o.start>1e4)break}this.parsedPos=n,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let t=d.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:Se,topID:0,maxBufferLength:512,reused:this.chunkReused});t=new d(t.type,t.children,t.positions,t.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(t),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new d(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}}function Ct(r,t,e){t.start=t.pos;for(let n=0;n<10;n++){let s=r(t,e);if(t.pos>t.start)return s}throw new Error("Stream parser failed to advance stream.")}const K=Object.create(null),D=[L.none],Se=new Bt(D),st=[],it=Object.create(null),It=Object.create(null);for(let[r,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])It[r]=Nt(K,t);class Dt{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),It)}resolve(t){return t?this.table[t]||(this.table[t]=Nt(this.extra,t)):0}}const Te=new Dt(K);function H(r,t){st.indexOf(r)>-1||(st.push(r),console.warn(t))}function Nt(r,t){let e=[];for(let l of t.split(" ")){let a=[];for(let h of l.split(".")){let u=r[h]||f[h];u?typeof u=="function"?a.length?a=a.map(u):H(h,`Modifier ${h} used at start of tag`):a.length?H(h,`Tag ${h} used as modifier`):a=Array.isArray(u)?u:[u]:H(h,`Unknown highlighting tag ${h}`)}for(let h of a)e.push(h)}if(!e.length)return 0;let n=t.replace(/ /g,"_"),s=n+" "+e.map(l=>l.id),i=it[s];if(i)return i.id;let o=it[s]=L.define({id:D.length,name:n,props:[Ht({[n]:e})]});return D.push(o),o.id}function xe(r,t){let e=L.define({id:D.length,name:"Document",props:[v.add(()=>r),gt.add(()=>n=>t.getIndent(n))],top:!0});return D.push(e),e}X.RTL,X.LTR;export{F as H,pt as I,Le as L,x as P,xt as S,Ut as a,U as b,gt as c,We as d,Me as e,Re as f,_t as g,Ve as h,dt as i,ut as j,me as k,Zt as l,p as m,v as n,ct as o,Fe as p,Ee as q,je as r,k as s,B as t,He as u,$t as v,Tt as w,Ue as x,Oe as y,$e as z};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-codemirror-lang-sql-
|
|
2
|
-
import{_ as o}from"./vendor-vite-runtime-DD1OZmLC.js";import{o as t,L as i,S as a}from"./vendor-codemirror-language-BuDklWi8.js";function n(e){return new i(a.define(e))}function r(e){return o(()=>import("./vendor-codemirror-lang-sql-BtmZrrZH.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])).then(_=>_.sql({dialect:_[e]}))}const l=[t.of({name:"C",extensions:["c","h","ino"],load(){return o(()=>import("./vendor-codemirror-lang-cpp-B0aL03z-.js"),__vite__mapDeps([12,13,10,2,9,1,3,4,5,6,7,8])).then(e=>e.cpp())}}),t.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return o(()=>import("./vendor-codemirror-lang-cpp-B0aL03z-.js"),__vite__mapDeps([12,13,10,2,9,1,3,4,5,6,7,8])).then(e=>e.cpp())}}),t.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return r("Cassandra")}}),t.of({name:"CSS",extensions:["css"],load(){return o(()=>import("./vendor-codemirror-lang-css-C4jEScp7.js"),__vite__mapDeps([14,15,10,2,9,1,3,4,5,6,7,8])).then(e=>e.css())}}),t.of({name:"Go",extensions:["go"],load(){return o(()=>import("./vendor-codemirror-lang-go-CgrfVBPr.js"),__vite__mapDeps([16,17,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.go())}}),t.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return o(()=>import("./vendor-codemirror-lang-html-C1Svvdey.js"),__vite__mapDeps([18,19,10,2,9,14,15,1,3,4,5,6,7,8,20,21,11])).then(e=>e.html())}}),t.of({name:"Java",extensions:["java"],load(){return o(()=>import("./vendor-codemirror-lang-java-DNPz7_Bx.js"),__vite__mapDeps([22,23,10,2,9,1,3,4,5,6,7,8])).then(e=>e.java())}}),t.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-CrbeaEAU.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript())}}),t.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return o(()=>import("./vendor-codemirror-lang-jinja-DL8BR_RG.js"),__vite__mapDeps([24,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.jinja())}}),t.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return o(()=>import("./vendor-codemirror-lang-json-BTvAjwkJ.js"),__vite__mapDeps([25,26,10,2,9,1,3,4,5,6,7,8])).then(e=>e.json())}}),t.of({name:"JSX",extensions:["jsx"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-CrbeaEAU.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript({jsx:!0}))}}),t.of({name:"LESS",extensions:["less"],load(){return o(()=>import("./vendor-codemirror-lang-less-CPABt6NZ.js"),__vite__mapDeps([27,1,2,3,4,5,6,7,8,9,14,15,10])).then(e=>e.less())}}),t.of({name:"Liquid",extensions:["liquid"],load(){return o(()=>import("./vendor-codemirror-lang-liquid-BLOLOBMg.js"),__vite__mapDeps([28,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.liquid())}}),t.of({name:"MariaDB SQL",load(){return r("MariaSQL")}}),t.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return o(()=>import("./vendor-codemirror-lang-markdown-BloD9GN-.js"),__vite__mapDeps([29,3,4,5,6,7,8,1,2,9,11,30,18,19,10,14,15,20,21])).then(e=>e.markdown())}}),t.of({name:"MS SQL",load(){return r("MSSQL")}}),t.of({name:"MySQL",load(){return r("MySQL")}}),t.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return o(()=>import("./vendor-codemirror-lang-php-FIZMTuWM.js"),__vite__mapDeps([31,32,10,2,9,18,19,14,15,1,3,4,5,6,7,8,20,21,11])).then(e=>e.php())}}),t.of({name:"PLSQL",extensions:["pls"],load(){return r("PLSQL")}}),t.of({name:"PostgreSQL",load(){return r("PostgreSQL")}}),t.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return o(()=>import("./vendor-codemirror-lang-python-CR2g6ukK.js"),__vite__mapDeps([33,34,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.python())}}),t.of({name:"Rust",extensions:["rs"],load(){return o(()=>import("./vendor-codemirror-lang-rust-lsPqn4k4.js"),__vite__mapDeps([35,36,10,2,9,1,3,4,5,6,7,8])).then(e=>e.rust())}}),t.of({name:"Sass",extensions:["sass"],load(){return o(()=>import("./vendor-codemirror-lang-sass-CtECMwzH.js"),__vite__mapDeps([37,38,10,2,9,1,3,4,5,6,7,8,14,15])).then(e=>e.sass({indented:!0}))}}),t.of({name:"SCSS",extensions:["scss"],load(){return o(()=>import("./vendor-codemirror-lang-sass-CtECMwzH.js"),__vite__mapDeps([37,38,10,2,9,1,3,4,5,6,7,8,14,15])).then(e=>e.sass())}}),t.of({name:"SQL",extensions:["sql"],load(){return r("StandardSQL")}}),t.of({name:"SQLite",load(){return r("SQLite")}}),t.of({name:"TSX",extensions:["tsx"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-CrbeaEAU.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript({jsx:!0,typescript:!0}))}}),t.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-CrbeaEAU.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript({typescript:!0}))}}),t.of({name:"WebAssembly",extensions:["wat","wast"],load(){return o(()=>import("./vendor-codemirror-lang-wast-DT7IlCnb.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,8,9,10])).then(e=>e.wast())}}),t.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return o(()=>import("./vendor-codemirror-lang-xml-wNr-LZOf.js"),__vite__mapDeps([40,41,10,2,9,1,3,4,5,6,7,8])).then(e=>e.xml())}}),t.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return o(()=>import("./vendor-codemirror-lang-yaml-BTKFwfc2.js"),__vite__mapDeps([42,43,10,2,9,1,3,4,5,6,7,8])).then(e=>e.yaml())}}),t.of({name:"APL",extensions:["dyalog","apl"],load(){return o(()=>import("./apl-B4CMkyY2.js"),[]).then(e=>n(e.apl))}}),t.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return o(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(e=>n(e.asciiArmor))}}),t.of({name:"ASN.1",extensions:["asn","asn1"],load(){return o(()=>import("./asn1-EdZsLKOL.js"),[]).then(e=>n(e.asn1({})))}}),t.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return o(()=>import("./asterisk-B-8jnY81.js"),[]).then(e=>n(e.asterisk))}}),t.of({name:"Brainfuck",extensions:["b","bf"],load(){return o(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(e=>n(e.brainfuck))}}),t.of({name:"Cobol",extensions:["cob","cpy"],load(){return o(()=>import("./cobol-CWcv1MsR.js"),[]).then(e=>n(e.cobol))}}),t.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.csharp))}}),t.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return o(()=>import("./clojure-BMjYHr_A.js"),[]).then(e=>n(e.clojure))}}),t.of({name:"ClojureScript",extensions:["cljs"],load(){return o(()=>import("./clojure-BMjYHr_A.js"),[]).then(e=>n(e.clojure))}}),t.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return o(()=>import("./css-BnMrqG3P.js"),[]).then(e=>n(e.gss))}}),t.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return o(()=>import("./cmake-BQqOBYOt.js"),[]).then(e=>n(e.cmake))}}),t.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return o(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(e=>n(e.coffeeScript))}}),t.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return o(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(e=>n(e.commonLisp))}}),t.of({name:"Cypher",extensions:["cyp","cypher"],load(){return o(()=>import("./cypher-C_CwsFkJ.js"),[]).then(e=>n(e.cypher))}}),t.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return o(()=>import("./python-Cso5vRIg.js"),[]).then(e=>n(e.cython))}}),t.of({name:"Crystal",extensions:["cr"],load(){return o(()=>import("./crystal-SjHAIU92.js"),[]).then(e=>n(e.crystal))}}),t.of({name:"D",extensions:["d"],load(){return o(()=>import("./d-pRatUO7H.js"),[]).then(e=>n(e.d))}}),t.of({name:"Dart",extensions:["dart"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.dart))}}),t.of({name:"diff",extensions:["diff","patch"],load(){return o(()=>import("./diff-DbItnlRl.js"),[]).then(e=>n(e.diff))}}),t.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return o(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([44,45])).then(e=>n(e.dockerFile))}}),t.of({name:"DTD",extensions:["dtd"],load(){return o(()=>import("./dtd-DF_7sFjM.js"),[]).then(e=>n(e.dtd))}}),t.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return o(()=>import("./dylan-DwRh75JA.js"),[]).then(e=>n(e.dylan))}}),t.of({name:"EBNF",load(){return o(()=>import("./ebnf-CDyGwa7X.js"),[]).then(e=>n(e.ebnf))}}),t.of({name:"ECL",extensions:["ecl"],load(){return o(()=>import("./ecl-Cabwm37j.js"),[]).then(e=>n(e.ecl))}}),t.of({name:"edn",extensions:["edn"],load(){return o(()=>import("./clojure-BMjYHr_A.js"),[]).then(e=>n(e.clojure))}}),t.of({name:"Eiffel",extensions:["e"],load(){return o(()=>import("./eiffel-CnydiIhH.js"),[]).then(e=>n(e.eiffel))}}),t.of({name:"Elm",extensions:["elm"],load(){return o(()=>import("./elm-vLlmbW-K.js"),[]).then(e=>n(e.elm))}}),t.of({name:"Erlang",extensions:["erl"],load(){return o(()=>import("./erlang-BNw1qcRV.js"),[]).then(e=>n(e.erlang))}}),t.of({name:"Esper",load(){return o(()=>import("./sql-D0XecflT.js"),[]).then(e=>n(e.esper))}}),t.of({name:"Factor",extensions:["factor"],load(){return o(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([46,45])).then(e=>n(e.factor))}}),t.of({name:"FCL",load(){return o(()=>import("./fcl-Kvtd6kyn.js"),[]).then(e=>n(e.fcl))}}),t.of({name:"Forth",extensions:["forth","fth","4th"],load(){return o(()=>import("./forth-Ffai-XNe.js"),[]).then(e=>n(e.forth))}}),t.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return o(()=>import("./fortran-DYz_wnZ1.js"),[]).then(e=>n(e.fortran))}}),t.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return o(()=>import("./mllike-BO34x3tv.js"),[]).then(e=>n(e.fSharp))}}),t.of({name:"Gas",extensions:["s"],load(){return o(()=>import("./gas-Bneqetm1.js"),[]).then(e=>n(e.gas))}}),t.of({name:"Gherkin",extensions:["feature"],load(){return o(()=>import("./gherkin-heZmZLOM.js"),[]).then(e=>n(e.gherkin))}}),t.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return o(()=>import("./groovy-D9Dt4D0W.js"),[]).then(e=>n(e.groovy))}}),t.of({name:"Haskell",extensions:["hs"],load(){return o(()=>import("./haskell-Cw1EW3IL.js"),[]).then(e=>n(e.haskell))}}),t.of({name:"Haxe",extensions:["hx"],load(){return o(()=>import("./haxe-H-WmDvRZ.js"),[]).then(e=>n(e.haxe))}}),t.of({name:"HXML",extensions:["hxml"],load(){return o(()=>import("./haxe-H-WmDvRZ.js"),[]).then(e=>n(e.hxml))}}),t.of({name:"HTTP",load(){return o(()=>import("./http-DBlCnlav.js"),[]).then(e=>n(e.http))}}),t.of({name:"IDL",extensions:["pro"],load(){return o(()=>import("./idl-BEugSyMb.js"),[]).then(e=>n(e.idl))}}),t.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return o(()=>import("./javascript-BO_2ioGC.js"),[]).then(e=>n(e.jsonld))}}),t.of({name:"Julia",extensions:["jl"],load(){return o(()=>import("./julia-DuME0IfC.js"),[]).then(e=>n(e.julia))}}),t.of({name:"Kotlin",extensions:["kt","kts"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.kotlin))}}),t.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return o(()=>import("./livescript-BwQOo05w.js"),[]).then(e=>n(e.liveScript))}}),t.of({name:"Lua",extensions:["lua"],load(){return o(()=>import("./lua-BgMRiT3U.js"),[]).then(e=>n(e.lua))}}),t.of({name:"mIRC",extensions:["mrc"],load(){return o(()=>import("./mirc-CjQqDB4T.js"),[]).then(e=>n(e.mirc))}}),t.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return o(()=>import("./mathematica-DTrFuWx2.js"),[]).then(e=>n(e.mathematica))}}),t.of({name:"Modelica",extensions:["mo"],load(){return o(()=>import("./modelica-Dc1JOy9r.js"),[]).then(e=>n(e.modelica))}}),t.of({name:"MUMPS",extensions:["mps"],load(){return o(()=>import("./mumps-BT43cFF4.js"),[]).then(e=>n(e.mumps))}}),t.of({name:"Mbox",extensions:["mbox"],load(){return o(()=>import("./mbox-CNhZ1qSd.js"),[]).then(e=>n(e.mbox))}}),t.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return o(()=>import("./nginx-DdIZxoE0.js"),[]).then(e=>n(e.nginx))}}),t.of({name:"NSIS",extensions:["nsh","nsi"],load(){return o(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([47,45])).then(e=>n(e.nsis))}}),t.of({name:"NTriples",extensions:["nt","nq"],load(){return o(()=>import("./ntriples-BfvgReVJ.js"),[]).then(e=>n(e.ntriples))}}),t.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.objectiveC))}}),t.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.objectiveCpp))}}),t.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return o(()=>import("./mllike-BO34x3tv.js"),[]).then(e=>n(e.oCaml))}}),t.of({name:"Octave",extensions:["m"],load(){return o(()=>import("./octave-CWZ4xMHY.js"),[]).then(e=>n(e.octave))}}),t.of({name:"Oz",extensions:["oz"],load(){return o(()=>import("./oz-BzwKVEFT.js"),[]).then(e=>n(e.oz))}}),t.of({name:"Pascal",extensions:["p","pas"],load(){return o(()=>import("./pascal--L3eBynH.js"),[]).then(e=>n(e.pascal))}}),t.of({name:"Perl",extensions:["pl","pm"],load(){return o(()=>import("./perl-CdXCOZ3F.js"),[]).then(e=>n(e.perl))}}),t.of({name:"Pig",extensions:["pig"],load(){return o(()=>import("./pig-CevX1Tat.js"),[]).then(e=>n(e.pig))}}),t.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return o(()=>import("./powershell-CFHJl5sT.js"),[]).then(e=>n(e.powerShell))}}),t.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return o(()=>import("./properties-C78fOPTZ.js"),[]).then(e=>n(e.properties))}}),t.of({name:"ProtoBuf",extensions:["proto"],load(){return o(()=>import("./protobuf-ChK-085T.js"),[]).then(e=>n(e.protobuf))}}),t.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return o(()=>import("./pug-CIGw5rlb.js"),__vite__mapDeps([48,49])).then(e=>n(e.pug))}}),t.of({name:"Puppet",extensions:["pp"],load(){return o(()=>import("./puppet-DMA9R1ak.js"),[]).then(e=>n(e.puppet))}}),t.of({name:"Q",extensions:["q"],load(){return o(()=>import("./q-pXgVlZs6.js"),[]).then(e=>n(e.q))}}),t.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return o(()=>import("./r-B6wPVr8A.js"),[]).then(e=>n(e.r))}}),t.of({name:"RPM Changes",load(){return o(()=>import("./rpm-CTu-6PCP.js"),[]).then(e=>n(e.rpmChanges))}}),t.of({name:"RPM Spec",extensions:["spec"],load(){return o(()=>import("./rpm-CTu-6PCP.js"),[]).then(e=>n(e.rpmSpec))}}),t.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return o(()=>import("./ruby-B2Rjki9n.js"),[]).then(e=>n(e.ruby))}}),t.of({name:"SAS",extensions:["sas"],load(){return o(()=>import("./sas-B4kiWyti.js"),[]).then(e=>n(e.sas))}}),t.of({name:"Scala",extensions:["scala"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.scala))}}),t.of({name:"Scheme",extensions:["scm","ss"],load(){return o(()=>import("./scheme-C41bIUwD.js"),[]).then(e=>n(e.scheme))}}),t.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return o(()=>import("./SessionSwitcherDropdown-NbVfnqQQ.js").then(e=>e.f3),__vite__mapDeps([50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,1,2,3,4,5,6,7,8,9,20,21,10,11,25,26,14,15,18,19,29,30,33,34,94,95,96,97,98,99,100,101,102,103,104])).then(e=>n(e.shell))}}),t.of({name:"Sieve",extensions:["siv","sieve"],load(){return o(()=>import("./sieve-C3Gn_uJK.js"),[]).then(e=>n(e.sieve))}}),t.of({name:"Smalltalk",extensions:["st"],load(){return o(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(e=>n(e.smalltalk))}}),t.of({name:"Solr",load(){return o(()=>import("./solr-DehyRSwq.js"),[]).then(e=>n(e.solr))}}),t.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return o(()=>import("./mllike-BO34x3tv.js"),[]).then(e=>n(e.sml))}}),t.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return o(()=>import("./sparql-DkYu6x3z.js"),[]).then(e=>n(e.sparql))}}),t.of({name:"Spreadsheet",alias:["excel","formula"],load(){return o(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(e=>n(e.spreadsheet))}}),t.of({name:"Squirrel",extensions:["nut"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.squirrel))}}),t.of({name:"Stylus",extensions:["styl"],load(){return o(()=>import("./stylus-B533Al4x.js"),[]).then(e=>n(e.stylus))}}),t.of({name:"Swift",extensions:["swift"],load(){return o(()=>import("./swift-BzpIVaGY.js"),[]).then(e=>n(e.swift))}}),t.of({name:"sTeX",load(){return o(()=>import("./stex-C3f8Ysf7.js"),[]).then(e=>n(e.stex))}}),t.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return o(()=>import("./stex-C3f8Ysf7.js"),[]).then(e=>n(e.stex))}}),t.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return o(()=>import("./verilog-C6RDOZhf.js"),[]).then(e=>n(e.verilog))}}),t.of({name:"Tcl",extensions:["tcl"],load(){return o(()=>import("./tcl-DVfN8rqt.js"),[]).then(e=>n(e.tcl))}}),t.of({name:"Textile",extensions:["textile"],load(){return o(()=>import("./textile-CnDTJFAw.js"),[]).then(e=>n(e.textile))}}),t.of({name:"TiddlyWiki",load(){return o(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(e=>n(e.tiddlyWiki))}}),t.of({name:"Tiki wiki",load(){return o(()=>import("./tiki-DGYXhP31.js"),[]).then(e=>n(e.tiki))}}),t.of({name:"TOML",extensions:["toml"],load(){return o(()=>import("./toml-Bm5Em-hy.js"),[]).then(e=>n(e.toml))}}),t.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return o(()=>import("./troff-wAsdV37c.js"),[]).then(e=>n(e.troff))}}),t.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return o(()=>import("./ttcn-CfJYG6tj.js"),[]).then(e=>n(e.ttcn))}}),t.of({name:"TTCN_CFG",extensions:["cfg"],load(){return o(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(e=>n(e.ttcnCfg))}}),t.of({name:"Turtle",extensions:["ttl"],load(){return o(()=>import("./turtle-B1tBg_DP.js"),[]).then(e=>n(e.turtle))}}),t.of({name:"Web IDL",extensions:["webidl"],load(){return o(()=>import("./webidl-ZXfAyPTL.js"),[]).then(e=>n(e.webIDL))}}),t.of({name:"VB.NET",extensions:["vb"],load(){return o(()=>import("./vb-CmGdzxic.js"),[]).then(e=>n(e.vb))}}),t.of({name:"VBScript",extensions:["vbs"],load(){return o(()=>import("./vbscript-BuJXcnF6.js"),[]).then(e=>n(e.vbScript))}}),t.of({name:"Velocity",extensions:["vtl"],load(){return o(()=>import("./velocity-D8B20fx6.js"),[]).then(e=>n(e.velocity))}}),t.of({name:"Verilog",extensions:["v"],load(){return o(()=>import("./verilog-C6RDOZhf.js"),[]).then(e=>n(e.verilog))}}),t.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return o(()=>import("./vhdl-lSbBsy5d.js"),[]).then(e=>n(e.vhdl))}}),t.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return o(()=>import("./xquery-DzFWVndE.js"),[]).then(e=>n(e.xQuery))}}),t.of({name:"Yacas",extensions:["ys"],load(){return o(()=>import("./yacas-BJ4BC0dw.js"),[]).then(e=>n(e.yacas))}}),t.of({name:"Z80",extensions:["z80"],load(){return o(()=>import("./z80-Hz9HOZM7.js"),[]).then(e=>n(e.z80))}}),t.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return o(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(e=>n(e.mscgen))}}),t.of({name:"Xù",extensions:["xu"],load(){return o(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(e=>n(e.xu))}}),t.of({name:"MsGenny",extensions:["msgenny"],load(){return o(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(e=>n(e.msgenny))}}),t.of({name:"Vue",extensions:["vue"],load(){return o(()=>import("./vendor-codemirror-lang-vue-Br6DrntY.js"),__vite__mapDeps([105,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.vue())}}),t.of({name:"Angular Template",load(){return o(()=>import("./vendor-codemirror-lang-angular-0K6s6cvb.js"),__vite__mapDeps([106,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.angular())}})];export{l};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-codemirror-lang-sql-B1BRhQSF.js","assets/vendor-codemirror-language-E2vgV9K3.js","assets/vendor-lezer-common-B3-cUCR_.js","assets/vendor-codemirror-state-CNWM3Q8V.js","assets/vendor-marijn-find-cluster-break-DXwl3gUT.js","assets/vendor-codemirror-view-DSzLbZiS.js","assets/vendor-style-mod-NZ5MEPvj.js","assets/vendor-w3c-keyname-Vcq4gwWv.js","assets/vendor-crelt-C8TCjufn.js","assets/vendor-lezer-highlight-CDMHUZ74.js","assets/vendor-lezer-lr-bhwg1HMg.js","assets/vendor-codemirror-autocomplete-BS2SpSAZ.js","assets/vendor-codemirror-lang-cpp-BGCWj7Om.js","assets/vendor-lezer-cpp-BleAU9o-.js","assets/vendor-codemirror-lang-css-Ba8JZ6fp.js","assets/vendor-lezer-css-C5xB6jxd.js","assets/vendor-codemirror-lang-go-DyTiHXo4.js","assets/vendor-lezer-go-CXK1UKk8.js","assets/vendor-codemirror-lang-html-DK27qQri.js","assets/vendor-lezer-html-C0I1p52t.js","assets/vendor-codemirror-lang-javascript-BUlYhQ3o.js","assets/vendor-lezer-javascript-D7Tj24ot.js","assets/vendor-codemirror-lang-java-CvFfnhPQ.js","assets/vendor-lezer-java-D_zzj-NV.js","assets/vendor-codemirror-lang-jinja-wBMtAEvT.js","assets/vendor-codemirror-lang-json-CqayksDf.js","assets/vendor-lezer-json-Iaex0UN-.js","assets/vendor-codemirror-lang-less-Ct3-H1PB.js","assets/vendor-codemirror-lang-liquid-XspREksq.js","assets/vendor-codemirror-lang-markdown-CvO36Y1p.js","assets/vendor-lezer-markdown-C6g-d6P3.js","assets/vendor-codemirror-lang-php-BlUF9cCe.js","assets/vendor-lezer-php-_DHrbsZG.js","assets/vendor-codemirror-lang-python-_2bIYTiJ.js","assets/vendor-lezer-python-CvuFxeZl.js","assets/vendor-codemirror-lang-rust-BdTYih_U.js","assets/vendor-lezer-rust-Lqgd5SAo.js","assets/vendor-codemirror-lang-sass-E6MhfOFk.js","assets/vendor-lezer-sass-Dnm2lY4t.js","assets/vendor-codemirror-lang-wast-D706yuyC.js","assets/vendor-codemirror-lang-xml--MfWU6Dj.js","assets/vendor-lezer-xml-hUDuAyS5.js","assets/vendor-codemirror-lang-yaml-CRUFIbRX.js","assets/vendor-lezer-yaml-BNIl6S_O.js","assets/dockerfile-BKs6k2Af.js","assets/simple-mode-GW_nhZxv.js","assets/factor-kuTfRLto.js","assets/nsis-LdVXkNf5.js","assets/pug-CIGw5rlb.js","assets/javascript-BO_2ioGC.js","assets/SessionSwitcherDropdown-cFWgy1td.js","assets/index-DEYblXCW.js","assets/vendor-zustand-CnsBKjP5.js","assets/vendor-react-DYyjh7Q0.js","assets/vendor-scheduler-7OC5HNn7.js","assets/index-DLKBsLKY.css","assets/vendor-simplewebauthn-browser-VDA66rT_.js","assets/vendor-vite-runtime-DD1OZmLC.js","assets/vendor-base-ui-DL8r2fgQ.js","assets/vendor-floating-ui-utils-BzXdqYpP.js","assets/vendor-floating-ui-react-dom-sVFnuruh.js","assets/vendor-floating-ui-dom-Bkw82kL9.js","assets/vendor-floating-ui-core-CXmKXOXc.js","assets/vendor-use-sync-external-store-B7OScDIw.js","assets/runtimeSurface-9aJdtQbh.js","assets/vendor-dnd-kit-core-GipZW2tY.js","assets/vendor-dnd-kit-utilities-CrOcp0Bp.js","assets/vendor-dnd-kit-accessibility-Cv52zwWT.js","assets/vendor-dnd-kit-sortable-Ct2QxIHb.js","assets/vendor-cmdk-BCEUzcHE.js","assets/vendor-radix-ui-react-dialog-jX3Dld8c.js","assets/vendor-radix-ui-primitive-Dc_FVRD7.js","assets/vendor-radix-ui-react-compose-refs-D1GnwnP9.js","assets/vendor-radix-ui-react-context-CM4yFQ2I.js","assets/vendor-radix-ui-react-id-BcxRjnbX.js","assets/vendor-radix-ui-react-use-layout-effect-0fyGwS2_.js","assets/vendor-radix-ui-react-use-controllable-state-C_ecoh35.js","assets/vendor-radix-ui-react-dismissable-layer-M7LsH3yL.js","assets/vendor-radix-ui-react-primitive-CfpW6_IT.js","assets/vendor-radix-ui-react-slot-BxUc3Pvz.js","assets/vendor-radix-ui-react-use-callback-ref-UKEWHtoP.js","assets/vendor-radix-ui-react-use-escape-keydown-Co13lHGj.js","assets/vendor-radix-ui-react-focus-scope-C2K7lNPv.js","assets/vendor-radix-ui-react-portal-xlJWBfDg.js","assets/vendor-radix-ui-react-presence-Btn-Dp7L.js","assets/vendor-radix-ui-react-focus-guards-D5MZ0nQs.js","assets/vendor-react-remove-scroll-CfeMe0DL.js","assets/vendor-tslib-De9GV7Vy.js","assets/vendor-react-remove-scroll-bar-C9YRs2nU.js","assets/vendor-react-style-singleton-B1H4bWSG.js","assets/vendor-get-nonce-C-Z93AgS.js","assets/vendor-use-sidecar-C-AuTczP.js","assets/vendor-use-callback-ref-CJB0R85I.js","assets/vendor-aria-hidden-DvXkyWUv.js","assets/vendor-codemirror-commands-RrgJ8H_6.js","assets/vendor-class-variance-authority-5VPnzWs2.js","assets/vendor-clsx-B-dksMZM.js","assets/vendor-tanstack-react-virtual-IrbCBGJ4.js","assets/vendor-tanstack-virtual-core-Dubg10g5.js","assets/vendor-framer-motion-DJASDzNt.js","assets/vendor-motion-dom-DJLgZh4Q.js","assets/vendor-motion-utils-BGh8QBgx.js","assets/vendor-sonner-dWA7qvjr.js","assets/vendor-tailwind-merge-CPcsbTWB.js","assets/vendor-fuse.js-Dw8P0qyA.js","assets/vendor-codemirror-lang-vue-BYQJRa1Q.js","assets/vendor-codemirror-lang-angular-ADhO_TUK.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as o}from"./vendor-vite-runtime-DD1OZmLC.js";import{o as t,L as i,S as a}from"./vendor-codemirror-language-E2vgV9K3.js";function n(e){return new i(a.define(e))}function r(e){return o(()=>import("./vendor-codemirror-lang-sql-B1BRhQSF.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])).then(_=>_.sql({dialect:_[e]}))}const l=[t.of({name:"C",extensions:["c","h","ino"],load(){return o(()=>import("./vendor-codemirror-lang-cpp-BGCWj7Om.js"),__vite__mapDeps([12,13,10,2,9,1,3,4,5,6,7,8])).then(e=>e.cpp())}}),t.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return o(()=>import("./vendor-codemirror-lang-cpp-BGCWj7Om.js"),__vite__mapDeps([12,13,10,2,9,1,3,4,5,6,7,8])).then(e=>e.cpp())}}),t.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return r("Cassandra")}}),t.of({name:"CSS",extensions:["css"],load(){return o(()=>import("./vendor-codemirror-lang-css-Ba8JZ6fp.js"),__vite__mapDeps([14,15,10,2,9,1,3,4,5,6,7,8])).then(e=>e.css())}}),t.of({name:"Go",extensions:["go"],load(){return o(()=>import("./vendor-codemirror-lang-go-DyTiHXo4.js"),__vite__mapDeps([16,17,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.go())}}),t.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return o(()=>import("./vendor-codemirror-lang-html-DK27qQri.js"),__vite__mapDeps([18,19,10,2,9,14,15,1,3,4,5,6,7,8,20,21,11])).then(e=>e.html())}}),t.of({name:"Java",extensions:["java"],load(){return o(()=>import("./vendor-codemirror-lang-java-CvFfnhPQ.js"),__vite__mapDeps([22,23,10,2,9,1,3,4,5,6,7,8])).then(e=>e.java())}}),t.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-BUlYhQ3o.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript())}}),t.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return o(()=>import("./vendor-codemirror-lang-jinja-wBMtAEvT.js"),__vite__mapDeps([24,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.jinja())}}),t.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return o(()=>import("./vendor-codemirror-lang-json-CqayksDf.js"),__vite__mapDeps([25,26,10,2,9,1,3,4,5,6,7,8])).then(e=>e.json())}}),t.of({name:"JSX",extensions:["jsx"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-BUlYhQ3o.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript({jsx:!0}))}}),t.of({name:"LESS",extensions:["less"],load(){return o(()=>import("./vendor-codemirror-lang-less-Ct3-H1PB.js"),__vite__mapDeps([27,1,2,3,4,5,6,7,8,9,14,15,10])).then(e=>e.less())}}),t.of({name:"Liquid",extensions:["liquid"],load(){return o(()=>import("./vendor-codemirror-lang-liquid-XspREksq.js"),__vite__mapDeps([28,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.liquid())}}),t.of({name:"MariaDB SQL",load(){return r("MariaSQL")}}),t.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return o(()=>import("./vendor-codemirror-lang-markdown-CvO36Y1p.js"),__vite__mapDeps([29,3,4,5,6,7,8,1,2,9,11,30,18,19,10,14,15,20,21])).then(e=>e.markdown())}}),t.of({name:"MS SQL",load(){return r("MSSQL")}}),t.of({name:"MySQL",load(){return r("MySQL")}}),t.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return o(()=>import("./vendor-codemirror-lang-php-BlUF9cCe.js"),__vite__mapDeps([31,32,10,2,9,18,19,14,15,1,3,4,5,6,7,8,20,21,11])).then(e=>e.php())}}),t.of({name:"PLSQL",extensions:["pls"],load(){return r("PLSQL")}}),t.of({name:"PostgreSQL",load(){return r("PostgreSQL")}}),t.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return o(()=>import("./vendor-codemirror-lang-python-_2bIYTiJ.js"),__vite__mapDeps([33,34,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.python())}}),t.of({name:"Rust",extensions:["rs"],load(){return o(()=>import("./vendor-codemirror-lang-rust-BdTYih_U.js"),__vite__mapDeps([35,36,10,2,9,1,3,4,5,6,7,8])).then(e=>e.rust())}}),t.of({name:"Sass",extensions:["sass"],load(){return o(()=>import("./vendor-codemirror-lang-sass-E6MhfOFk.js"),__vite__mapDeps([37,38,10,2,9,1,3,4,5,6,7,8,14,15])).then(e=>e.sass({indented:!0}))}}),t.of({name:"SCSS",extensions:["scss"],load(){return o(()=>import("./vendor-codemirror-lang-sass-E6MhfOFk.js"),__vite__mapDeps([37,38,10,2,9,1,3,4,5,6,7,8,14,15])).then(e=>e.sass())}}),t.of({name:"SQL",extensions:["sql"],load(){return r("StandardSQL")}}),t.of({name:"SQLite",load(){return r("SQLite")}}),t.of({name:"TSX",extensions:["tsx"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-BUlYhQ3o.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript({jsx:!0,typescript:!0}))}}),t.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-BUlYhQ3o.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript({typescript:!0}))}}),t.of({name:"WebAssembly",extensions:["wat","wast"],load(){return o(()=>import("./vendor-codemirror-lang-wast-D706yuyC.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,8,9,10])).then(e=>e.wast())}}),t.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return o(()=>import("./vendor-codemirror-lang-xml--MfWU6Dj.js"),__vite__mapDeps([40,41,10,2,9,1,3,4,5,6,7,8])).then(e=>e.xml())}}),t.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return o(()=>import("./vendor-codemirror-lang-yaml-CRUFIbRX.js"),__vite__mapDeps([42,43,10,2,9,1,3,4,5,6,7,8])).then(e=>e.yaml())}}),t.of({name:"APL",extensions:["dyalog","apl"],load(){return o(()=>import("./apl-B4CMkyY2.js"),[]).then(e=>n(e.apl))}}),t.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return o(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(e=>n(e.asciiArmor))}}),t.of({name:"ASN.1",extensions:["asn","asn1"],load(){return o(()=>import("./asn1-EdZsLKOL.js"),[]).then(e=>n(e.asn1({})))}}),t.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return o(()=>import("./asterisk-B-8jnY81.js"),[]).then(e=>n(e.asterisk))}}),t.of({name:"Brainfuck",extensions:["b","bf"],load(){return o(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(e=>n(e.brainfuck))}}),t.of({name:"Cobol",extensions:["cob","cpy"],load(){return o(()=>import("./cobol-CWcv1MsR.js"),[]).then(e=>n(e.cobol))}}),t.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.csharp))}}),t.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return o(()=>import("./clojure-BMjYHr_A.js"),[]).then(e=>n(e.clojure))}}),t.of({name:"ClojureScript",extensions:["cljs"],load(){return o(()=>import("./clojure-BMjYHr_A.js"),[]).then(e=>n(e.clojure))}}),t.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return o(()=>import("./css-BnMrqG3P.js"),[]).then(e=>n(e.gss))}}),t.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return o(()=>import("./cmake-BQqOBYOt.js"),[]).then(e=>n(e.cmake))}}),t.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return o(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(e=>n(e.coffeeScript))}}),t.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return o(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(e=>n(e.commonLisp))}}),t.of({name:"Cypher",extensions:["cyp","cypher"],load(){return o(()=>import("./cypher-C_CwsFkJ.js"),[]).then(e=>n(e.cypher))}}),t.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return o(()=>import("./python-Cso5vRIg.js"),[]).then(e=>n(e.cython))}}),t.of({name:"Crystal",extensions:["cr"],load(){return o(()=>import("./crystal-SjHAIU92.js"),[]).then(e=>n(e.crystal))}}),t.of({name:"D",extensions:["d"],load(){return o(()=>import("./d-pRatUO7H.js"),[]).then(e=>n(e.d))}}),t.of({name:"Dart",extensions:["dart"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.dart))}}),t.of({name:"diff",extensions:["diff","patch"],load(){return o(()=>import("./diff-DbItnlRl.js"),[]).then(e=>n(e.diff))}}),t.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return o(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([44,45])).then(e=>n(e.dockerFile))}}),t.of({name:"DTD",extensions:["dtd"],load(){return o(()=>import("./dtd-DF_7sFjM.js"),[]).then(e=>n(e.dtd))}}),t.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return o(()=>import("./dylan-DwRh75JA.js"),[]).then(e=>n(e.dylan))}}),t.of({name:"EBNF",load(){return o(()=>import("./ebnf-CDyGwa7X.js"),[]).then(e=>n(e.ebnf))}}),t.of({name:"ECL",extensions:["ecl"],load(){return o(()=>import("./ecl-Cabwm37j.js"),[]).then(e=>n(e.ecl))}}),t.of({name:"edn",extensions:["edn"],load(){return o(()=>import("./clojure-BMjYHr_A.js"),[]).then(e=>n(e.clojure))}}),t.of({name:"Eiffel",extensions:["e"],load(){return o(()=>import("./eiffel-CnydiIhH.js"),[]).then(e=>n(e.eiffel))}}),t.of({name:"Elm",extensions:["elm"],load(){return o(()=>import("./elm-vLlmbW-K.js"),[]).then(e=>n(e.elm))}}),t.of({name:"Erlang",extensions:["erl"],load(){return o(()=>import("./erlang-BNw1qcRV.js"),[]).then(e=>n(e.erlang))}}),t.of({name:"Esper",load(){return o(()=>import("./sql-D0XecflT.js"),[]).then(e=>n(e.esper))}}),t.of({name:"Factor",extensions:["factor"],load(){return o(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([46,45])).then(e=>n(e.factor))}}),t.of({name:"FCL",load(){return o(()=>import("./fcl-Kvtd6kyn.js"),[]).then(e=>n(e.fcl))}}),t.of({name:"Forth",extensions:["forth","fth","4th"],load(){return o(()=>import("./forth-Ffai-XNe.js"),[]).then(e=>n(e.forth))}}),t.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return o(()=>import("./fortran-DYz_wnZ1.js"),[]).then(e=>n(e.fortran))}}),t.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return o(()=>import("./mllike-BO34x3tv.js"),[]).then(e=>n(e.fSharp))}}),t.of({name:"Gas",extensions:["s"],load(){return o(()=>import("./gas-Bneqetm1.js"),[]).then(e=>n(e.gas))}}),t.of({name:"Gherkin",extensions:["feature"],load(){return o(()=>import("./gherkin-heZmZLOM.js"),[]).then(e=>n(e.gherkin))}}),t.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return o(()=>import("./groovy-D9Dt4D0W.js"),[]).then(e=>n(e.groovy))}}),t.of({name:"Haskell",extensions:["hs"],load(){return o(()=>import("./haskell-Cw1EW3IL.js"),[]).then(e=>n(e.haskell))}}),t.of({name:"Haxe",extensions:["hx"],load(){return o(()=>import("./haxe-H-WmDvRZ.js"),[]).then(e=>n(e.haxe))}}),t.of({name:"HXML",extensions:["hxml"],load(){return o(()=>import("./haxe-H-WmDvRZ.js"),[]).then(e=>n(e.hxml))}}),t.of({name:"HTTP",load(){return o(()=>import("./http-DBlCnlav.js"),[]).then(e=>n(e.http))}}),t.of({name:"IDL",extensions:["pro"],load(){return o(()=>import("./idl-BEugSyMb.js"),[]).then(e=>n(e.idl))}}),t.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return o(()=>import("./javascript-BO_2ioGC.js"),[]).then(e=>n(e.jsonld))}}),t.of({name:"Julia",extensions:["jl"],load(){return o(()=>import("./julia-DuME0IfC.js"),[]).then(e=>n(e.julia))}}),t.of({name:"Kotlin",extensions:["kt","kts"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.kotlin))}}),t.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return o(()=>import("./livescript-BwQOo05w.js"),[]).then(e=>n(e.liveScript))}}),t.of({name:"Lua",extensions:["lua"],load(){return o(()=>import("./lua-BgMRiT3U.js"),[]).then(e=>n(e.lua))}}),t.of({name:"mIRC",extensions:["mrc"],load(){return o(()=>import("./mirc-CjQqDB4T.js"),[]).then(e=>n(e.mirc))}}),t.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return o(()=>import("./mathematica-DTrFuWx2.js"),[]).then(e=>n(e.mathematica))}}),t.of({name:"Modelica",extensions:["mo"],load(){return o(()=>import("./modelica-Dc1JOy9r.js"),[]).then(e=>n(e.modelica))}}),t.of({name:"MUMPS",extensions:["mps"],load(){return o(()=>import("./mumps-BT43cFF4.js"),[]).then(e=>n(e.mumps))}}),t.of({name:"Mbox",extensions:["mbox"],load(){return o(()=>import("./mbox-CNhZ1qSd.js"),[]).then(e=>n(e.mbox))}}),t.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return o(()=>import("./nginx-DdIZxoE0.js"),[]).then(e=>n(e.nginx))}}),t.of({name:"NSIS",extensions:["nsh","nsi"],load(){return o(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([47,45])).then(e=>n(e.nsis))}}),t.of({name:"NTriples",extensions:["nt","nq"],load(){return o(()=>import("./ntriples-BfvgReVJ.js"),[]).then(e=>n(e.ntriples))}}),t.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.objectiveC))}}),t.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.objectiveCpp))}}),t.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return o(()=>import("./mllike-BO34x3tv.js"),[]).then(e=>n(e.oCaml))}}),t.of({name:"Octave",extensions:["m"],load(){return o(()=>import("./octave-CWZ4xMHY.js"),[]).then(e=>n(e.octave))}}),t.of({name:"Oz",extensions:["oz"],load(){return o(()=>import("./oz-BzwKVEFT.js"),[]).then(e=>n(e.oz))}}),t.of({name:"Pascal",extensions:["p","pas"],load(){return o(()=>import("./pascal--L3eBynH.js"),[]).then(e=>n(e.pascal))}}),t.of({name:"Perl",extensions:["pl","pm"],load(){return o(()=>import("./perl-CdXCOZ3F.js"),[]).then(e=>n(e.perl))}}),t.of({name:"Pig",extensions:["pig"],load(){return o(()=>import("./pig-CevX1Tat.js"),[]).then(e=>n(e.pig))}}),t.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return o(()=>import("./powershell-CFHJl5sT.js"),[]).then(e=>n(e.powerShell))}}),t.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return o(()=>import("./properties-C78fOPTZ.js"),[]).then(e=>n(e.properties))}}),t.of({name:"ProtoBuf",extensions:["proto"],load(){return o(()=>import("./protobuf-ChK-085T.js"),[]).then(e=>n(e.protobuf))}}),t.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return o(()=>import("./pug-CIGw5rlb.js"),__vite__mapDeps([48,49])).then(e=>n(e.pug))}}),t.of({name:"Puppet",extensions:["pp"],load(){return o(()=>import("./puppet-DMA9R1ak.js"),[]).then(e=>n(e.puppet))}}),t.of({name:"Q",extensions:["q"],load(){return o(()=>import("./q-pXgVlZs6.js"),[]).then(e=>n(e.q))}}),t.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return o(()=>import("./r-B6wPVr8A.js"),[]).then(e=>n(e.r))}}),t.of({name:"RPM Changes",load(){return o(()=>import("./rpm-CTu-6PCP.js"),[]).then(e=>n(e.rpmChanges))}}),t.of({name:"RPM Spec",extensions:["spec"],load(){return o(()=>import("./rpm-CTu-6PCP.js"),[]).then(e=>n(e.rpmSpec))}}),t.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return o(()=>import("./ruby-B2Rjki9n.js"),[]).then(e=>n(e.ruby))}}),t.of({name:"SAS",extensions:["sas"],load(){return o(()=>import("./sas-B4kiWyti.js"),[]).then(e=>n(e.sas))}}),t.of({name:"Scala",extensions:["scala"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.scala))}}),t.of({name:"Scheme",extensions:["scm","ss"],load(){return o(()=>import("./scheme-C41bIUwD.js"),[]).then(e=>n(e.scheme))}}),t.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return o(()=>import("./SessionSwitcherDropdown-cFWgy1td.js").then(e=>e.f6),__vite__mapDeps([50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,1,2,3,4,5,6,7,8,9,20,21,10,11,25,26,14,15,18,19,29,30,33,34,94,95,96,97,98,99,100,101,102,103,104])).then(e=>n(e.shell))}}),t.of({name:"Sieve",extensions:["siv","sieve"],load(){return o(()=>import("./sieve-C3Gn_uJK.js"),[]).then(e=>n(e.sieve))}}),t.of({name:"Smalltalk",extensions:["st"],load(){return o(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(e=>n(e.smalltalk))}}),t.of({name:"Solr",load(){return o(()=>import("./solr-DehyRSwq.js"),[]).then(e=>n(e.solr))}}),t.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return o(()=>import("./mllike-BO34x3tv.js"),[]).then(e=>n(e.sml))}}),t.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return o(()=>import("./sparql-DkYu6x3z.js"),[]).then(e=>n(e.sparql))}}),t.of({name:"Spreadsheet",alias:["excel","formula"],load(){return o(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(e=>n(e.spreadsheet))}}),t.of({name:"Squirrel",extensions:["nut"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.squirrel))}}),t.of({name:"Stylus",extensions:["styl"],load(){return o(()=>import("./stylus-B533Al4x.js"),[]).then(e=>n(e.stylus))}}),t.of({name:"Swift",extensions:["swift"],load(){return o(()=>import("./swift-BzpIVaGY.js"),[]).then(e=>n(e.swift))}}),t.of({name:"sTeX",load(){return o(()=>import("./stex-C3f8Ysf7.js"),[]).then(e=>n(e.stex))}}),t.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return o(()=>import("./stex-C3f8Ysf7.js"),[]).then(e=>n(e.stex))}}),t.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return o(()=>import("./verilog-C6RDOZhf.js"),[]).then(e=>n(e.verilog))}}),t.of({name:"Tcl",extensions:["tcl"],load(){return o(()=>import("./tcl-DVfN8rqt.js"),[]).then(e=>n(e.tcl))}}),t.of({name:"Textile",extensions:["textile"],load(){return o(()=>import("./textile-CnDTJFAw.js"),[]).then(e=>n(e.textile))}}),t.of({name:"TiddlyWiki",load(){return o(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(e=>n(e.tiddlyWiki))}}),t.of({name:"Tiki wiki",load(){return o(()=>import("./tiki-DGYXhP31.js"),[]).then(e=>n(e.tiki))}}),t.of({name:"TOML",extensions:["toml"],load(){return o(()=>import("./toml-Bm5Em-hy.js"),[]).then(e=>n(e.toml))}}),t.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return o(()=>import("./troff-wAsdV37c.js"),[]).then(e=>n(e.troff))}}),t.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return o(()=>import("./ttcn-CfJYG6tj.js"),[]).then(e=>n(e.ttcn))}}),t.of({name:"TTCN_CFG",extensions:["cfg"],load(){return o(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(e=>n(e.ttcnCfg))}}),t.of({name:"Turtle",extensions:["ttl"],load(){return o(()=>import("./turtle-B1tBg_DP.js"),[]).then(e=>n(e.turtle))}}),t.of({name:"Web IDL",extensions:["webidl"],load(){return o(()=>import("./webidl-ZXfAyPTL.js"),[]).then(e=>n(e.webIDL))}}),t.of({name:"VB.NET",extensions:["vb"],load(){return o(()=>import("./vb-CmGdzxic.js"),[]).then(e=>n(e.vb))}}),t.of({name:"VBScript",extensions:["vbs"],load(){return o(()=>import("./vbscript-BuJXcnF6.js"),[]).then(e=>n(e.vbScript))}}),t.of({name:"Velocity",extensions:["vtl"],load(){return o(()=>import("./velocity-D8B20fx6.js"),[]).then(e=>n(e.velocity))}}),t.of({name:"Verilog",extensions:["v"],load(){return o(()=>import("./verilog-C6RDOZhf.js"),[]).then(e=>n(e.verilog))}}),t.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return o(()=>import("./vhdl-lSbBsy5d.js"),[]).then(e=>n(e.vhdl))}}),t.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return o(()=>import("./xquery-DzFWVndE.js"),[]).then(e=>n(e.xQuery))}}),t.of({name:"Yacas",extensions:["ys"],load(){return o(()=>import("./yacas-BJ4BC0dw.js"),[]).then(e=>n(e.yacas))}}),t.of({name:"Z80",extensions:["z80"],load(){return o(()=>import("./z80-Hz9HOZM7.js"),[]).then(e=>n(e.z80))}}),t.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return o(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(e=>n(e.mscgen))}}),t.of({name:"Xù",extensions:["xu"],load(){return o(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(e=>n(e.xu))}}),t.of({name:"MsGenny",extensions:["msgenny"],load(){return o(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(e=>n(e.msgenny))}}),t.of({name:"Vue",extensions:["vue"],load(){return o(()=>import("./vendor-codemirror-lang-vue-BYQJRa1Q.js"),__vite__mapDeps([105,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.vue())}}),t.of({name:"Angular Template",load(){return o(()=>import("./vendor-codemirror-lang-angular-ADhO_TUK.js"),__vite__mapDeps([106,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.angular())}})];export{l};
|
package/dist/assets/{vendor-codemirror-search-BzyfPoRb.js → vendor-codemirror-search-8kyQdB3f.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as le,E as g,g as J,b as ae,V as he,D as Q,r as ce}from"./vendor-codemirror-view-
|
|
1
|
+
import{s as le,E as g,g as J,b as ae,V as he,D as Q,r as ce}from"./vendor-codemirror-view-DSzLbZiS.js";import{i as oe,P as ue,F as fe,e as de,S as _,a as f,E as pe,k as me,g as ge,h as xe,n as Se,j as m,f as U}from"./vendor-codemirror-state-CNWM3Q8V.js";import{c as u}from"./vendor-crelt-C8TCjufn.js";const j=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class k{constructor(e,n,r=0,s=e.length,i,l){this.test=l,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,s),this.bufferStart=r,this.normalize=i?a=>i(j(a)):j,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ge(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=Se(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=xe(e);let s=this.normalize(n);if(s.length)for(let i=0,l=r;;i++){let a=s.charCodeAt(i),h=this.match(a,l,this.bufferPos+this.bufferStart);if(i==s.length-1){if(h)return this.value=h,this;break}l==r&&i<n.length&&n.charCodeAt(i)==a&&l++}}}match(e,n,r){let s=null;for(let i=0;i<this.matches.length;i+=2){let l=this.matches[i],a=!1;this.query.charCodeAt(l)==e&&(l==this.query.length-1?s={from:this.matches[i+1],to:r}:(this.matches[i]++,a=!0)),a||(this.matches.splice(i,2),i-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?s={from:n,to:r}:this.matches.push(1,n)),s&&this.test&&!this.test(s.from,s.to,this.buffer,this.bufferStart)&&(s=null),s}}typeof Symbol<"u"&&(k.prototype[Symbol.iterator]=function(){return this});const X={from:-1,to:-1,match:/.*/.exec("")},N="gm"+(/x/.unicode==null?"":"u");class Y{constructor(e,n,r,s=0,i=e.length){if(this.text=e,this.to=i,this.curLine="",this.done=!1,this.value=X,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new Z(e,n,r,s,i);this.re=new RegExp(n,N+(r?.ignoreCase?"i":"")),this.test=r?.test,this.iter=e.iter();let l=e.lineAt(s);this.curLineStart=l.from,this.matchPos=A(e,s),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,s=r+n[0].length;if(this.matchPos=A(this.text,s+(r==s?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<s||r>this.value.to)&&(!this.test||this.test(r,s,n)))return this.value={from:r,to:s,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const T=new WeakMap;class M{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let s=T.get(e);if(!s||s.from>=r||s.to<=n){let a=new M(n,e.sliceString(n,r));return T.set(e,a),a}if(s.from==n&&s.to==r)return s;let{text:i,from:l}=s;return l>n&&(i=e.sliceString(n,l)+i,l=n),s.to<r&&(i+=e.sliceString(s.to,r)),T.set(e,new M(l,i)),new M(n,i.slice(n-l,r-l))}}class Z{constructor(e,n,r,s,i){this.text=e,this.to=i,this.done=!1,this.value=X,this.matchPos=A(e,s),this.re=new RegExp(n,N+(r?.ignoreCase?"i":"")),this.test=r?.test,this.flat=M.get(e,s,this.chunkEnd(s+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,s=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,s,n)))return this.value={from:r,to:s,match:n},this.matchPos=A(this.text,s+(r==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=M.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(Y.prototype[Symbol.iterator]=Z.prototype[Symbol.iterator]=function(){return this});function ve(t){try{return new RegExp(t,N),!0}catch{return!1}}function A(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}const ye=t=>{let{state:e}=t,n=String(e.doc.lineAt(t.state.selection.main.head).number),{close:r,result:s}=ae(t,{label:e.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:e.phrase("go")});return s.then(i=>{let l=i&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(i.elements.line.value);if(!l){t.dispatch({effects:r});return}let a=e.doc.lineAt(e.selection.main.head),[,h,c,d,S]=l,E=d?+d.slice(1):0,b=c?+c:a.number;if(c&&S){let D=b/100;h&&(D=D*(h=="-"?-1:1)+a.number/e.doc.lines),b=Math.round(e.doc.lines*D)}else c&&h&&(b=b*(h=="-"?-1:1)+a.number);let K=e.doc.line(Math.max(1,Math.min(e.doc.lines,b))),H=f.cursor(K.from+Math.max(0,Math.min(E,K.length)));t.dispatch({effects:[r,g.scrollIntoView(H.from,{y:"center"})],selection:H})}),!0},Me=({state:t,dispatch:e})=>{let{selection:n}=t,r=f.create(n.ranges.map(s=>t.wordAt(s.head)||f.cursor(s.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function be(t,e){let{main:n,ranges:r}=t.selection,s=t.wordAt(n.head),i=s&&s.from==n.from&&s.to==n.to;for(let l=!1,a=new k(t.doc,e,r[r.length-1].to);;)if(a.next(),a.done){if(l)return null;a=new k(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),l=!0}else{if(l&&r.some(h=>h.from==a.value.from))continue;if(i){let h=t.wordAt(a.value.from);if(!h||h.from!=a.value.from||h.to!=a.value.to)continue}return a.value}}const ke=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(i=>i.from===i.to))return Me({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(i=>t.sliceDoc(i.from,i.to)!=r))return!1;let s=be(t,r);return s?(e(t.update({selection:t.selection.addRange(f.range(s.from,s.to),!1),effects:g.scrollIntoView(s.to)})),!0):!1},x=fe.define({combine(t){return de(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Te(e),scrollToMatch:e=>g.scrollIntoView(e)})}});function Ne(t){return t?[x.of(t),$]:$}class ee{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||ve(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
|
|
2
2
|
`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new Ae(this):new Ee(this)}getCursor(e,n=0,r){let s=e.doc?e:pe.create({doc:e});return r==null&&(r=s.doc.length),this.regexp?y(this,s,n,r):v(this,s,n,r)}}class te{constructor(e){this.spec=e}}function Ce(t,e,n){return(r,s,i,l)=>{if(n&&!n(r,s,i,l))return!1;let a=r>=l&&s<=l+i.length?i.slice(r-l,s-l):e.doc.sliceString(r,s);return t(a,e,r,s)}}function v(t,e,n,r){let s;return t.wholeWord&&(s=Le(e.doc,e.charCategorizer(e.selection.main.head))),t.test&&(s=Ce(t.test,e,s)),new k(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),s)}function Le(t,e){return(n,r,s,i)=>((i>n||i+s.length<r)&&(i=Math.max(0,n-2),s=t.sliceString(i,Math.min(t.length,r+2))),(e(R(s,n-i))!=m.Word||e(q(s,n-i))!=m.Word)&&(e(q(s,r-i))!=m.Word||e(R(s,r-i))!=m.Word))}class Ee extends te{constructor(e){super(e)}nextMatch(e,n,r){let s=v(this.spec,e,r,e.doc.length).nextOverlapping();if(s.done){let i=Math.min(e.doc.length,n+this.spec.unquoted.length);s=v(this.spec,e,0,i).nextOverlapping()}return s.done||s.value.from==n&&s.value.to==r?null:s.value}prevMatchInRange(e,n,r){for(let s=r;;){let i=Math.max(n,s-1e4-this.spec.unquoted.length),l=v(this.spec,e,i,s),a=null;for(;!l.nextOverlapping().done;)a=l.value;if(a)return a;if(i==n)return null;s-=1e4}}prevMatch(e,n,r){let s=this.prevMatchInRange(e,0,n);return s||(s=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),s&&(s.from!=n||s.to!=r)?s:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=v(this.spec,e,0,e.doc.length),s=[];for(;!r.next().done;){if(s.length>=n)return null;s.push(r.value)}return s}highlight(e,n,r,s){let i=v(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)s(i.value.from,i.value.to)}}function Fe(t,e,n){return(r,s,i)=>(!n||n(r,s,i))&&t(i[0],e,r,s)}function y(t,e,n,r){let s;return t.wholeWord&&(s=We(e.charCategorizer(e.selection.main.head))),t.test&&(s=Fe(t.test,e,s)),new Y(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:s},n,r)}function R(t,e){return t.slice(U(t,e,!1),e)}function q(t,e){return t.slice(e,U(t,e))}function We(t){return(e,n,r)=>!r[0].length||(t(R(r.input,r.index))!=m.Word||t(q(r.input,r.index))!=m.Word)&&(t(q(r.input,r.index+r[0].length))!=m.Word||t(R(r.input,r.index+r[0].length))!=m.Word)}class Ae extends te{nextMatch(e,n,r){let s=y(this.spec,e,r,e.doc.length).next();return s.done&&(s=y(this.spec,e,0,n).next()),s.done?null:s.value}prevMatchInRange(e,n,r){for(let s=1;;s++){let i=Math.max(n,r-s*1e4),l=y(this.spec,e,i,r),a=null;for(;!l.next().done;)a=l.value;if(a&&(i==n||a.from>i+10))return a;if(i==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let s=r.length;s>0;s--){let i=+r.slice(0,s);if(i>0&&i<e.match.length)return e.match[i]+r.slice(s)}return n})}matchAll(e,n){let r=y(this.spec,e,0,e.doc.length),s=[];for(;!r.next().done;){if(s.length>=n)return null;s.push(r.value)}return s}highlight(e,n,r,s){let i=y(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!i.next().done;)s(i.value.from,i.value.to)}}const C=_.define(),V=_.define(),p=oe.define({create(t){return new O(I(t).create(),null)},update(t,e){for(let n of e.effects)n.is(C)?t=new O(n.value.create(),t.panel):n.is(V)&&(t=new O(t.query,n.value?B:null));return t},provide:t=>le.from(t,e=>e.panel)});function Ve(t){let e=t.field(p,!1);return e?e.query.spec:I(t)}function Be(t){var e;return((e=t.field(p,!1))===null||e===void 0?void 0:e.panel)!=null}class O{constructor(e,n){this.query=e,this.panel=n}}const Re=Q.mark({class:"cm-searchMatch"}),qe=Q.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Pe=he.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(p))}update(t){let e=t.state.field(p);(e!=t.startState.field(p)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Q.none;let{view:n}=this,r=new me;for(let s=0,i=n.visibleRanges,l=i.length;s<l;s++){let{from:a,to:h}=i[s];for(;s<l-1&&h>i[s+1].from-500;)h=i[++s].to;t.highlight(n.state,a,h,(c,d)=>{let S=n.state.selection.ranges.some(E=>E.from==c&&E.to==d);r.add(c,d,S?qe:Re)})}return r.finish()}},{decorations:t=>t.decorations});function L(t){return e=>{let n=e.state.field(p,!1);return n&&n.query.spec.valid?t(e,n):se(e)}}const P=L((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let s=f.single(r.from,r.to),i=t.state.facet(x);return t.dispatch({selection:s,effects:[z(t,r),i.scrollToMatch(s.main,t)],userEvent:"select.search"}),ne(t),!0}),w=L((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,s=e.prevMatch(n,r,r);if(!s)return!1;let i=f.single(s.from,s.to),l=t.state.facet(x);return t.dispatch({selection:i,effects:[z(t,s),l.scrollToMatch(i.main,t)],userEvent:"select.search"}),ne(t),!0}),we=L((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:f.create(n.map(r=>f.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),Ie=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:s}=n.main,i=[],l=0;for(let a=new k(t.doc,t.sliceDoc(r,s));!a.next().done;){if(i.length>1e3)return!1;a.value.from==r&&(l=i.length),i.push(f.range(a.value.from,a.value.to))}return e(t.update({selection:f.create(i,l),userEvent:"select.search.matches"})),!0},G=L((t,{query:e})=>{let{state:n}=t,{from:r,to:s}=n.selection.main;if(n.readOnly)return!1;let i=e.nextMatch(n,r,r);if(!i)return!1;let l=i,a=[],h,c,d=[];l.from==r&&l.to==s&&(c=n.toText(e.getReplacement(l)),a.push({from:l.from,to:l.to,insert:c}),l=e.nextMatch(n,l.from,l.to),d.push(g.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let S=t.state.changes(a);return l&&(h=f.single(l.from,l.to).map(S),d.push(z(t,l)),d.push(n.facet(x).scrollToMatch(h.main,t))),t.dispatch({changes:S,selection:h,effects:d,userEvent:"input.replace"}),!0}),De=L((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(s=>{let{from:i,to:l}=s;return{from:i,to:l,insert:e.getReplacement(s)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:g.announce.of(r),userEvent:"input.replace.all"}),!0});function B(t){return t.state.facet(x).createPanel(t)}function I(t,e){var n,r,s,i,l;let a=t.selection.main,h=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!h)return e;let c=t.facet(x);return new ee({search:((n=e?.literal)!==null&&n!==void 0?n:c.literal)?h:h.replace(/\n/g,"\\n"),caseSensitive:(r=e?.caseSensitive)!==null&&r!==void 0?r:c.caseSensitive,literal:(s=e?.literal)!==null&&s!==void 0?s:c.literal,regexp:(i=e?.regexp)!==null&&i!==void 0?i:c.regexp,wholeWord:(l=e?.wholeWord)!==null&&l!==void 0?l:c.wholeWord})}function re(t){let e=J(t,B);return e&&e.dom.querySelector("[main-field]")}function ne(t){let e=re(t);e&&e==t.root.activeElement&&e.select()}const se=t=>{let e=t.state.field(p,!1);if(e&&e.panel){let n=re(t);if(n&&n!=t.root.activeElement){let r=I(t.state,e.query.spec);r.valid&&t.dispatch({effects:C.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[V.of(!0),e?C.of(I(t.state,e.query.spec)):_.appendConfig.of($)]});return!0},ie=t=>{let e=t.state.field(p,!1);if(!e||!e.panel)return!1;let n=J(t,B);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:V.of(!1)}),!0},ze=[{key:"Mod-f",run:se,scope:"editor search-panel"},{key:"F3",run:P,shift:w,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:P,shift:w,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:ie,scope:"editor search-panel"},{key:"Mod-Shift-l",run:Ie},{key:"Mod-Alt-g",run:ye},{key:"Mod-d",run:ke,preventDefault:!0}];class Te{constructor(e){this.view=e;let n=this.query=e.state.field(p).query.spec;this.commit=this.commit.bind(this),this.searchField=u("input",{value:n.search,placeholder:o(e,"Find"),"aria-label":o(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=u("input",{value:n.replace,placeholder:o(e,"Replace"),"aria-label":o(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=u("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=u("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=u("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(s,i,l){return u("button",{class:"cm-button",name:s,onclick:i,type:"button"},l)}this.dom=u("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,r("next",()=>P(e),[o(e,"next")]),r("prev",()=>w(e),[o(e,"previous")]),r("select",()=>we(e),[o(e,"all")]),u("label",null,[this.caseField,o(e,"match case")]),u("label",null,[this.reField,o(e,"regexp")]),u("label",null,[this.wordField,o(e,"by word")]),...e.state.readOnly?[]:[u("br"),this.replaceField,r("replace",()=>G(e),[o(e,"replace")]),r("replaceAll",()=>De(e),[o(e,"replace all")])],u("button",{name:"close",onclick:()=>ie(e),"aria-label":o(e,"close"),type:"button"},["×"])])}commit(){let e=new ee({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:C.of(e)}))}keydown(e){ce(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?w:P)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),G(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(C)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(x).top}}function o(t,e){return t.state.phrase(e)}const F=30,W=/[\s\.,:;?!]/;function z(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),s=t.state.doc.lineAt(n).to,i=Math.max(r.from,e-F),l=Math.min(s,n+F),a=t.state.sliceDoc(i,l);if(i!=r.from){for(let h=0;h<F;h++)if(!W.test(a[h+1])&&W.test(a[h])){a=a.slice(h);break}}if(l!=s){for(let h=a.length-1;h>a.length-F;h--)if(!W.test(a[h-1])&&W.test(a[h])){a=a.slice(0,h);break}}return g.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${r.number}.`)}const Oe=g.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),$=[p,ue.low(Pe),Oe];export{Y as R,ee as S,Be as a,Ne as b,ze as c,ie as d,Ve as g,se as o,C as s};
|
package/dist/assets/{vendor-codemirror-state-Wdz6Qsow.js → vendor-codemirror-state-CNWM3Q8V.js}
RENAMED
|
@@ -2,4 +2,4 @@ import{f as Ve}from"./vendor-marijn-find-cluster-break-DXwl3gUT.js";class x{line
|
|
|
2
2
|
`){[e,t]=J(this,e,t);let i="";for(let s=0,r=0;s<=t&&r<this.text.length;r++){let h=this.text[r],o=s+h.length;s>e&&r&&(i+=n),e<o&&t>s&&(i+=h.slice(Math.max(0,e-s),t-s)),s=o+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],i=-1;for(let s of e)n.push(s),i+=s.length+1,n.length==32&&(t.push(new m(n,i)),n=[],i=-1);return i>-1&&t.push(new m(n,i)),t}}class O extends x{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,t,n,i){for(let s=0;;s++){let r=this.children[s],h=i+r.length,o=n+r.lines-1;if((t?o:h)>=e)return r.lineInner(e,t,n,i);i=h+1,n=o+1}}decompose(e,t,n,i){for(let s=0,r=0;r<=t&&s<this.children.length;s++){let h=this.children[s],o=r+h.length;if(e<=o&&t>=r){let a=i&((r<=e?1:0)|(o>=t?2:0));r>=e&&o<=t&&!a?n.push(h):h.decompose(e-r,t-r,n,a)}r=o+1}}replace(e,t,n){if([e,t]=J(this,e,t),n.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let r=this.children[i],h=s+r.length;if(e>=s&&t<=h){let o=r.replace(e-s,t-s,n),a=this.lines-r.lines+o.lines;if(o.lines<a>>4&&o.lines>a>>6){let u=this.children.slice();return u[i]=o,new O(u,this.length-(t-e)+n.length)}return super.replace(s,h,o)}s=h+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n=`
|
|
3
3
|
`){[e,t]=J(this,e,t);let i="";for(let s=0,r=0;s<this.children.length&&r<=t;s++){let h=this.children[s],o=r+h.length;r>e&&s&&(i+=n),e<o&&t>r&&(i+=h.sliceString(e-r,t-r,n)),r=o+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof O))return 0;let n=0,[i,s,r,h]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,s+=t){if(i==r||s==h)return n;let o=this.children[i],a=e.children[s];if(o!=a)return n+o.scanIdentical(a,t);n+=o.length+1}}static from(e,t=e.reduce((n,i)=>n+i.length+1,-1)){let n=0;for(let c of e)n+=c.lines;if(n<32){let c=[];for(let g of e)g.flatten(c);return new m(c,t)}let i=Math.max(32,n>>5),s=i<<1,r=i>>1,h=[],o=0,a=-1,u=[];function f(c){let g;if(c.lines>s&&c instanceof O)for(let E of c.children)f(E);else c.lines>r&&(o>r||!o)?(d(),h.push(c)):c instanceof m&&o&&(g=u[u.length-1])instanceof m&&c.lines+g.lines<=32?(o+=c.lines,a+=c.length+1,u[u.length-1]=new m(g.text.concat(c.text),g.length+1+c.length)):(o+c.lines>i&&d(),o+=c.lines,a+=c.length+1,u.push(c))}function d(){o!=0&&(h.push(u.length==1?u[0]:O.from(u,a)),a=-1,o=u.length=0)}for(let c of e)f(c);return d(),h.length==1?h[0]:new O(h,t)}}x.empty=new m([""],0);function Ne(l){let e=-1;for(let t of l)e+=t.length+1;return e}function Q(l,e,t=0,n=1e9){for(let i=0,s=0,r=!0;s<l.length&&i<=n;s++){let h=l[s],o=i+h.length;o>=t&&(o>n&&(h=h.slice(0,n-i)),i<t&&(h=h.slice(t-i)),r?(e[e.length-1]+=h,r=!1):e.push(h)),i=o+1}return e}function ve(l,e,t){return Q(l,[""],e,t)}class D{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof m?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],s=this.offsets[n],r=s>>1,h=i instanceof m?i.text.length:i.children.length;if(r==(t>0?h:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
4
4
|
`,this;e--}else if(i instanceof m){let o=i.text[r+(t<0?-1:0)];if(this.offsets[n]+=t,o.length>Math.max(0,e))return this.value=e==0?o:t>0?o.slice(e):o.slice(0,o.length-e),this;e-=o.length}else{let o=i.children[r+(t<0?-1:0)];e>o.length?(e-=o.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(o),this.offsets.push(t>0?1:(o instanceof m?o.text.length:o.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Ie{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new D(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=n?i:t<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Pe{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(x.prototype[Symbol.iterator]=function(){return this.iter()},D.prototype[Symbol.iterator]=Ie.prototype[Symbol.iterator]=Pe.prototype[Symbol.iterator]=function(){return this});class De{constructor(e,t,n,i){this.from=e,this.to=t,this.number=n,this.text=i}get length(){return this.to-this.from}}function J(l,e,t){return e=Math.max(0,Math.min(l.length,e)),[e,Math.max(e,Math.min(l.length,t))]}function Y(l,e,t=!0,n=!0){return Ve(l,e,t,n)}function $e(l){return l>=56320&&l<57344}function ze(l){return l>=55296&&l<56320}function tt(l,e){let t=l.charCodeAt(e);if(!ze(t)||e+1==l.length)return t;let n=l.charCodeAt(e+1);return $e(n)?(t-55296<<10)+(n-56320)+65536:t}function nt(l){return l<=65535?String.fromCharCode(l):(l-=65536,String.fromCharCode((l>>10)+55296,(l&1023)+56320))}function it(l){return l<65536?1:2}const se=/\r\n?|\n/;var M=(function(l){return l[l.Simple=0]="Simple",l[l.TrackDel=1]="TrackDel",l[l.TrackBefore=2]="TrackBefore",l[l.TrackAfter=3]="TrackAfter",l})(M||(M={}));class C{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,i=0;t<this.sections.length;){let s=this.sections[t++],r=this.sections[t++];r<0?(e(n,i,s),i+=s):i+=r,n+=s}}iterChangedRanges(e,t=!1){re(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],i=this.sections[t++];i<0?e.push(n,i):e.push(i,n)}return new C(e)}composeDesc(e){return this.empty?e:e.empty?this:Ae(this,e)}mapDesc(e,t=!1){return e.empty?this:le(this,e,t)}mapPos(e,t=-1,n=M.Simple){let i=0,s=0;for(let r=0;r<this.sections.length;){let h=this.sections[r++],o=this.sections[r++],a=i+h;if(o<0){if(a>e)return s+(e-i);s+=h}else{if(n!=M.Simple&&a>=e&&(n==M.TrackDel&&i<e&&a>e||n==M.TrackBefore&&i<e||n==M.TrackAfter&&a>e))return null;if(a>e||a==e&&t<0&&!h)return e==i||t<0?s:s+o;s+=o}i=a}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,t=e){for(let n=0,i=0;n<this.sections.length&&i<=t;){let s=this.sections[n++],r=this.sections[n++],h=i+s;if(r>=0&&i<=t&&h>=e)return i<e&&h>t?"cover":!0;i=h}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],i=this.sections[t++];e+=(e?" ":"")+n+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new C(e)}static create(e){return new C(e)}}class y extends C{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return re(this,(t,n,i,s,r)=>e=e.replace(i,i+(n-t),r),!1),e}mapDesc(e,t=!1){return le(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let i=0,s=0;i<t.length;i+=2){let r=t[i],h=t[i+1];if(h>=0){t[i]=h,t[i+1]=r;let o=i>>1;for(;n.length<o;)n.push(x.empty);n.push(r?e.slice(s,s+r):x.empty)}s+=r}return new y(t,n)}compose(e){return this.empty?e:e.empty?this:Ae(this,e,!0)}map(e,t=!1){return e.empty?this:le(this,e,t,!0)}iterChanges(e,t=!1){re(this,e,t)}get desc(){return C.create(this.sections)}filter(e){let t=[],n=[],i=[],s=new z(this);e:for(let r=0,h=0;;){let o=r==e.length?1e9:e[r++];for(;h<o||h==o&&s.len==0;){if(s.done)break e;let u=Math.min(s.len,o-h);k(i,u,-1);let f=s.ins==-1?-1:s.off==0?s.ins:0;k(t,u,f),f>0&&b(n,t,s.text),s.forward(u),h+=u}let a=e[r++];for(;h<a;){if(s.done)break e;let u=Math.min(s.len,a-h);k(t,u,-1),k(i,u,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(u),h+=u}}return{changes:new y(t,n),filtered:C.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],i=this.sections[t+1];i<0?e.push(n):i==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let i=[],s=[],r=0,h=null;function o(u=!1){if(!u&&!i.length)return;r<t&&k(i,t-r,-1);let f=new y(i,s);h=h?h.compose(f.map(h)):f,i=[],s=[],r=0}function a(u){if(Array.isArray(u))for(let f of u)a(f);else if(u instanceof y){if(u.length!=t)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${t})`);o(),h=h?h.compose(u.map(h)):u}else{let{from:f,to:d=f,insert:c}=u;if(f>d||f<0||d>t)throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${t})`);let g=c?typeof c=="string"?x.of(c.split(n||se)):c:x.empty,E=g.length;if(f==d&&E==0)return;f<r&&o(),f>r&&k(i,f-r,-1),k(i,d-f,E),b(s,i,g),r=d}}return a(e),o(!h),h}static empty(e){return new y(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((r,h)=>h&&typeof r!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;n.length<i;)n.push(x.empty);n[i]=x.of(s.slice(1)),t.push(s[0],n[i].length)}}}return new y(t,n)}static createSet(e,t){return new y(e,t)}}function k(l,e,t,n=!1){if(e==0&&t<=0)return;let i=l.length-2;i>=0&&t<=0&&t==l[i+1]?l[i]+=e:i>=0&&e==0&&l[i]==0?l[i+1]+=t:n?(l[i]+=e,l[i+1]+=t):l.push(e,t)}function b(l,e,t){if(t.length==0)return;let n=e.length-2>>1;if(n<l.length)l[l.length-1]=l[l.length-1].append(t);else{for(;l.length<n;)l.push(x.empty);l.push(t)}}function re(l,e,t){let n=l.inserted;for(let i=0,s=0,r=0;r<l.sections.length;){let h=l.sections[r++],o=l.sections[r++];if(o<0)i+=h,s+=h;else{let a=i,u=s,f=x.empty;for(;a+=h,u+=o,o&&n&&(f=f.append(n[r-2>>1])),!(t||r==l.sections.length||l.sections[r+1]<0);)h=l.sections[r++],o=l.sections[r++];e(i,a,s,u,f),i=a,s=u}}}function le(l,e,t,n=!1){let i=[],s=n?[]:null,r=new z(l),h=new z(e);for(let o=-1;;){if(r.done&&h.len||h.done&&r.len)throw new Error("Mismatched change set lengths");if(r.ins==-1&&h.ins==-1){let a=Math.min(r.len,h.len);k(i,a,-1),r.forward(a),h.forward(a)}else if(h.ins>=0&&(r.ins<0||o==r.i||r.off==0&&(h.len<r.len||h.len==r.len&&!t))){let a=h.len;for(k(i,h.ins,-1);a;){let u=Math.min(r.len,a);r.ins>=0&&o<r.i&&r.len<=u&&(k(i,0,r.ins),s&&b(s,i,r.text),o=r.i),r.forward(u),a-=u}h.next()}else if(r.ins>=0){let a=0,u=r.len;for(;u;)if(h.ins==-1){let f=Math.min(u,h.len);a+=f,u-=f,h.forward(f)}else if(h.ins==0&&h.len<u)u-=h.len,h.next();else break;k(i,a,o<r.i?r.ins:0),s&&o<r.i&&b(s,i,r.text),o=r.i,r.forward(r.len-u)}else{if(r.done&&h.done)return s?y.createSet(i,s):C.create(i);throw new Error("Mismatched change set lengths")}}}function Ae(l,e,t=!1){let n=[],i=t?[]:null,s=new z(l),r=new z(e);for(let h=!1;;){if(s.done&&r.done)return i?y.createSet(n,i):C.create(n);if(s.ins==0)k(n,s.len,0,h),s.next();else if(r.len==0&&!r.done)k(n,0,r.ins,h),i&&b(i,n,r.text),r.next();else{if(s.done||r.done)throw new Error("Mismatched change set lengths");{let o=Math.min(s.len2,r.len),a=n.length;if(s.ins==-1){let u=r.ins==-1?-1:r.off?0:r.ins;k(n,o,u,h),i&&u&&b(i,n,r.text)}else r.ins==-1?(k(n,s.off?0:s.len,o,h),i&&b(i,n,s.textBit(o))):(k(n,s.off?0:s.len,r.off?0:r.ins,h),i&&!r.off&&b(i,n,r.text));h=(s.ins>o||r.ins>=0&&r.len>o)&&(h||n.length>a),s.forward2(o),r.forward(o)}}}}class z{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?x.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?x.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class B{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let n,i;return this.empty?n=i=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new B(n,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return p.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return p.range(this.anchor,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return p.range(e.anchor,e.head)}static create(e,t,n){return new B(e,t,n)}}class p{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:p.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new p([this.main],0)}addRange(e,t=!0){return p.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,p.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new p(e.ranges.map(t=>B.fromJSON(t)),e.main)}static single(e,t=e){return new p([p.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let n=0,i=0;i<e.length;i++){let s=e[i];if(s.empty?s.from<=n:s.from<n)return p.normalized(e.slice(),t);n=s.to}return new p(e,t)}static cursor(e,t=0,n,i){return B.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n))|(i??16777215)<<6)}static range(e,t,n,i){let s=(n??16777215)<<6|(i==null?7:Math.min(6,i));return t<e?B.create(t,e,48|s):B.create(e,t,(t>e?8:0)|s)}static normalized(e,t=0){let n=e[t];e.sort((i,s)=>i.from-s.from),t=e.indexOf(n);for(let i=1;i<e.length;i++){let s=e[i],r=e[i-1];if(s.empty?s.from<=r.to:s.from<r.to){let h=r.from,o=Math.max(s.to,r.to);i<=t&&t--,e.splice(--i,2,s.anchor>s.head?p.range(o,h):p.range(h,o))}}return new p(e,t)}}function Ee(l,e){for(let t of l.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let ge=0;class A{constructor(e,t,n,i,s){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=i,this.id=ge++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new A(e.combine||(t=>t),e.compareInput||((t,n)=>t===n),e.compare||(e.combine?(t,n)=>t===n:pe),!!e.static,e.enables)}of(e){return new X([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new X(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new X(e,this,2,t)}from(e,t){return t||(t=n=>n),this.compute([e],n=>t(n.field(e)))}}function pe(l,e){return l==e||l.length==e.length&&l.every((t,n)=>t===e[n])}class X{constructor(e,t,n,i){this.dependencies=e,this.facet=t,this.type=n,this.value=i,this.id=ge++}dynamicSlot(e){var t;let n=this.value,i=this.facet.compareInput,s=this.id,r=e[s]>>1,h=this.type==2,o=!1,a=!1,u=[];for(let f of this.dependencies)f=="doc"?o=!0:f=="selection"?a=!0:(((t=e[f.id])!==null&&t!==void 0?t:1)&1)==0&&u.push(e[f.id]);return{create(f){return f.values[r]=n(f),1},update(f,d){if(o&&d.docChanged||a&&(d.docChanged||d.selection)||he(f,u)){let c=n(f);if(h?!xe(c,f.values[r],i):!i(c,f.values[r]))return f.values[r]=c,1}return 0},reconfigure:(f,d)=>{let c,g=d.config.address[s];if(g!=null){let E=j(d,g);if(this.dependencies.every(v=>v instanceof A?d.facet(v)===f.facet(v):v instanceof L?d.field(v,!1)==f.field(v,!1):!0)||(h?xe(c=n(f),E,i):i(c=n(f),E)))return f.values[r]=E,0}else c=n(f);return f.values[r]=c,1}}}}function xe(l,e,t){if(l.length!=e.length)return!1;for(let n=0;n<l.length;n++)if(!t(l[n],e[n]))return!1;return!0}function he(l,e){let t=!1;for(let n of e)$(l,n)&1&&(t=!0);return t}function qe(l,e,t){let n=t.map(o=>l[o.id]),i=t.map(o=>o.type),s=n.filter(o=>!(o&1)),r=l[e.id]>>1;function h(o){let a=[];for(let u=0;u<n.length;u++){let f=j(o,n[u]);if(i[u]==2)for(let d of f)a.push(d);else a.push(f)}return e.combine(a)}return{create(o){for(let a of n)$(o,a);return o.values[r]=h(o),1},update(o,a){if(!he(o,s))return 0;let u=h(o);return e.compare(u,o.values[r])?0:(o.values[r]=u,1)},reconfigure(o,a){let u=he(o,n),f=a.config.facets[e.id],d=a.facet(e);if(f&&!u&&pe(t,f))return o.values[r]=d,0;let c=h(o);return e.compare(c,d)?(o.values[r]=d,0):(o.values[r]=c,1)}}}const G=A.define({static:!0});class L{constructor(e,t,n,i,s){this.id=e,this.createF=t,this.updateF=n,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let t=new L(ge++,e.create,e.update,e.compare||((n,i)=>n===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(G).find(n=>n.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:n=>(n.values[t]=this.create(n),1),update:(n,i)=>{let s=n.values[t],r=this.updateF(s,i);return this.compareF(s,r)?0:(n.values[t]=r,1)},reconfigure:(n,i)=>{let s=n.facet(G),r=i.facet(G),h;return(h=s.find(o=>o.field==this))&&h!=r.find(o=>o.field==this)?(n.values[t]=h.create(n),1):i.config.address[this.id]!=null?(n.values[t]=i.field(this),0):(n.values[t]=this.create(n),1)}}}init(e){return[this,G.of({field:this,create:e})]}get extension(){return this}}const T={lowest:4,low:3,default:2,high:1,highest:0};function V(l){return e=>new Oe(e,l)}const st={highest:V(T.highest),high:V(T.high),default:V(T.default),low:V(T.low),lowest:V(T.lowest)};class Oe{constructor(e,t){this.inner=e,this.prec=t}}class te{of(e){return new oe(this,e)}reconfigure(e){return te.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class oe{constructor(e,t){this.compartment=e,this.inner=t}}class Z{constructor(e,t,n,i,s,r){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=i,this.staticValues=s,this.facets=r,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,n){let i=[],s=Object.create(null),r=new Map;for(let d of We(e,t,r))d instanceof L?i.push(d):(s[d.facet.id]||(s[d.facet.id]=[])).push(d);let h=Object.create(null),o=[],a=[];for(let d of i)h[d.id]=a.length<<1,a.push(c=>d.slot(c));let u=n?.config.facets;for(let d in s){let c=s[d],g=c[0].facet,E=u&&u[d]||[];if(c.every(v=>v.type==0))if(h[g.id]=o.length<<1|1,pe(E,c))o.push(n.facet(g));else{let v=g.combine(c.map(ne=>ne.value));o.push(n&&g.compare(v,n.facet(g))?n.facet(g):v)}else{for(let v of c)v.type==0?(h[v.id]=o.length<<1|1,o.push(v.value)):(h[v.id]=a.length<<1,a.push(ne=>v.dynamicSlot(ne)));h[g.id]=a.length<<1,a.push(v=>qe(v,g,c))}}let f=a.map(d=>d(h));return new Z(e,r,f,h,o,s)}}function We(l,e,t){let n=[[],[],[],[],[]],i=new Map;function s(r,h){let o=i.get(r);if(o!=null){if(o<=h)return;let a=n[o].indexOf(r);a>-1&&n[o].splice(a,1),r instanceof oe&&t.delete(r.compartment)}if(i.set(r,h),Array.isArray(r))for(let a of r)s(a,h);else if(r instanceof oe){if(t.has(r.compartment))throw new RangeError("Duplicate use of compartment in extensions");let a=e.get(r.compartment)||r.inner;t.set(r.compartment,a),s(a,h)}else if(r instanceof Oe)s(r.inner,r.prec);else if(r instanceof L)n[h].push(r),r.provides&&s(r.provides,h);else if(r instanceof X)n[h].push(r),r.facet.extensions&&s(r.facet.extensions,T.default);else{let a=r.extension;if(!a)throw new Error(`Unrecognized extension value in extension set (${r}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(a,h)}}return s(l,T.default),n.reduce((r,h)=>r.concat(h))}function $(l,e){if(e&1)return 2;let t=e>>1,n=l.status[t];if(n==4)throw new Error("Cyclic dependency between fields and/or facets");if(n&2)return n;l.status[t]=4;let i=l.computeSlot(l,l.config.dynamicSlots[t]);return l.status[t]=2|i}function j(l,e){return e&1?l.config.staticValues[e>>1]:l.values[e>>1]}const Ce=A.define(),ae=A.define({combine:l=>l.some(e=>e),static:!0}),Me=A.define({combine:l=>l.length?l[0]:void 0,static:!0}),be=A.define(),Re=A.define(),Te=A.define(),Be=A.define({combine:l=>l.length?l[0]:!1});class U{constructor(e,t){this.type=e,this.value=t}static define(){return new Ue}}class Ue{of(e){return new U(this,e)}}class Ge{constructor(e){this.map=e}of(e){return new I(this,e)}}class I{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new I(this.type,t)}is(e){return this.type==e}static define(e={}){return new Ge(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let i of e){let s=i.map(t);s&&n.push(s)}return n}}I.reconfigure=I.define();I.appendConfig=I.define();class P{constructor(e,t,n,i,s,r){this.startState=e,this.changes=t,this.selection=n,this.effects=i,this.annotations=s,this.scrollIntoView=r,this._doc=null,this._state=null,n&&Ee(n,t.newLength),s.some(h=>h.type==P.time)||(this.annotations=s.concat(P.time.of(Date.now())))}static create(e,t,n,i,s,r){return new P(e,t,n,i,s,r)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(P.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}P.time=U.define();P.userEvent=U.define();P.addToHistory=U.define();P.remote=U.define();function He(l,e){let t=[];for(let n=0,i=0;;){let s,r;if(n<l.length&&(i==e.length||e[i]>=l[n]))s=l[n++],r=l[n++];else if(i<e.length)s=e[i++],r=e[i++];else return t;!t.length||t[t.length-1]<s?t.push(s,r):t[t.length-1]<r&&(t[t.length-1]=r)}}function Fe(l,e,t){var n;let i,s,r;return t?(i=e.changes,s=y.empty(e.changes.length),r=l.changes.compose(e.changes)):(i=e.changes.map(l.changes),s=l.changes.mapDesc(e.changes,!0),r=l.changes.compose(i)),{changes:r,selection:e.selection?e.selection.map(s):(n=l.selection)===null||n===void 0?void 0:n.map(i),effects:I.mapEffects(l.effects,i).concat(I.mapEffects(e.effects,s)),annotations:l.annotations.length?l.annotations.concat(e.annotations):e.annotations,scrollIntoView:l.scrollIntoView||e.scrollIntoView}}function ue(l,e,t){let n=e.selection,i=F(e.annotations);return e.userEvent&&(i=i.concat(P.userEvent.of(e.userEvent))),{changes:e.changes instanceof y?e.changes:y.of(e.changes||[],t,l.facet(Me)),selection:n&&(n instanceof p?n:p.single(n.anchor,n.head)),effects:F(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function Je(l,e,t){let n=ue(l,e.length?e[0]:{},l.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let r=!!e[s].sequential;n=Fe(n,ue(l,e[s],r?n.changes.newLength:l.doc.length),r)}let i=P.create(l,n.changes,n.selection,n.effects,n.annotations,n.scrollIntoView);return Qe(t?Ke(i):i)}function Ke(l){let e=l.startState,t=!0;for(let i of e.facet(be)){let s=i(l);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:He(t,s))}if(t!==!0){let i,s;if(t===!1)s=l.changes.invertedDesc,i=y.empty(e.doc.length);else{let r=l.changes.filter(t);i=r.changes,s=r.filtered.mapDesc(r.changes).invertedDesc}l=P.create(e,i,l.selection&&l.selection.map(s),I.mapEffects(l.effects,s),l.annotations,l.scrollIntoView)}let n=e.facet(Re);for(let i=n.length-1;i>=0;i--){let s=n[i](l);s instanceof P?l=s:Array.isArray(s)&&s.length==1&&s[0]instanceof P?l=s[0]:l=Je(e,F(s),!1)}return l}function Qe(l){let e=l.startState,t=e.facet(Te),n=l;for(let i=t.length-1;i>=0;i--){let s=t[i](l);s&&Object.keys(s).length&&(n=Fe(n,ue(e,s,l.changes.newLength),!0))}return n==l?l:P.create(e,l.changes,l.selection,n.effects,n.annotations,n.scrollIntoView)}const Xe=[];function F(l){return l==null?Xe:Array.isArray(l)?l:[l]}var R=(function(l){return l[l.Word=0]="Word",l[l.Space=1]="Space",l[l.Other=2]="Other",l})(R||(R={}));const Ye=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let fe;try{fe=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Ze(l){if(fe)return fe.test(l);for(let e=0;e<l.length;e++){let t=l[e];if(/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||Ye.test(t)))return!0}return!1}function je(l){return e=>{if(!/\S/.test(e))return R.Space;if(Ze(e))return R.Word;for(let t=0;t<l.length;t++)if(e.indexOf(l[t])>-1)return R.Word;return R.Other}}class w{constructor(e,t,n,i,s,r){this.config=e,this.doc=t,this.selection=n,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,r&&(r._state=this);for(let h=0;h<this.config.dynamicSlots.length;h++)$(this,h<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw new RangeError("Field is not present in this state");return}return $(this,n),j(this,n)}update(...e){return Je(this,e,!0)}applyTransaction(e){let t=this.config,{base:n,compartments:i}=t;for(let h of e.effects)h.is(te.reconfigure)?(t&&(i=new Map,t.compartments.forEach((o,a)=>i.set(a,o)),t=null),i.set(h.value.compartment,h.value.extension)):h.is(I.reconfigure)?(t=null,n=h.value):h.is(I.appendConfig)&&(t=null,n=F(n).concat(h.value));let s;t?s=e.startState.values.slice():(t=Z.resolve(n,i,this),s=new w(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(o,a)=>a.reconfigure(o,this),null).values);let r=e.startState.facet(ae)?e.newSelection:e.newSelection.asSingle();new w(t,e.newDoc,r,s,(h,o)=>o.update(h,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:p.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),i=this.changes(n.changes),s=[n.range],r=F(n.effects);for(let h=1;h<t.ranges.length;h++){let o=e(t.ranges[h]),a=this.changes(o.changes),u=a.map(i);for(let d=0;d<h;d++)s[d]=s[d].map(u);let f=i.mapDesc(a,!0);s.push(o.range.map(f)),i=i.compose(u),r=I.mapEffects(r,u).concat(I.mapEffects(F(o.effects),f))}return{changes:i,selection:p.create(s,t.mainIndex),effects:r}}changes(e=[]){return e instanceof y?e:y.of(e,this.doc.length,this.facet(w.lineSeparator))}toText(e){return x.of(e.split(this.facet(w.lineSeparator)||se))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:($(this,t),j(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let i=e[n];i instanceof L&&this.config.address[i.id]!=null&&(t[n]=i.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(n){for(let s in n)if(Object.prototype.hasOwnProperty.call(e,s)){let r=n[s],h=e[s];i.push(r.init(o=>r.spec.fromJSON(h,o)))}}return w.create({doc:e.doc,selection:p.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=Z.resolve(e.extensions||[],new Map),n=e.doc instanceof x?e.doc:x.of((e.doc||"").split(t.staticFacet(w.lineSeparator)||se)),i=e.selection?e.selection instanceof p?e.selection:p.single(e.selection.anchor,e.selection.head):p.single(0);return Ee(i,n.length),t.staticFacet(ae)||(i=i.asSingle()),new w(t,n,i,t.dynamicSlots.map(()=>null),(s,r)=>r.create(s),null)}get tabSize(){return this.facet(w.tabSize)}get lineBreak(){return this.facet(w.lineSeparator)||`
|
|
5
|
-
`}get readOnly(){return this.facet(Be)}phrase(e,...t){for(let n of this.facet(w.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(n,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>t.length?n:t[s-1]})),e}languageDataAt(e,t,n=-1){let i=[];for(let s of this.facet(Ce))for(let r of s(this,t,n))Object.prototype.hasOwnProperty.call(r,e)&&i.push(r[e]);return i}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return je(t.length?t[0]:"")}wordAt(e){let{text:t,from:n,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),r=e-n,h=e-n;for(;r>0;){let o=Y(t,r,!1);if(s(t.slice(o,r))!=R.Word)break;r=o}for(;h<i;){let o=Y(t,h);if(s(t.slice(h,o))!=R.Word)break;h=o}return r==h?null:p.range(r+n,h+n)}}w.allowMultipleSelections=ae;w.tabSize=A.define({combine:l=>l.length?l[0]:4});w.lineSeparator=Me;w.readOnly=Be;w.phrases=A.define({compare(l,e){let t=Object.keys(l),n=Object.keys(e);return t.length==n.length&&t.every(i=>l[i]==e[i])}});w.languageData=Ce;w.changeFilter=be;w.transactionFilter=Re;w.transactionExtender=Te;te.reconfigure=I.define();function rt(l,e,t={}){let n={};for(let i of l)for(let s of Object.keys(i)){let r=i[s],h=n[s];if(h===void 0)n[s]=r;else if(!(h===r||r===void 0))if(Object.hasOwnProperty.call(t,s))n[s]=t[s](h,r);else throw new Error("Config merge conflict for field "+s)}for(let i in e)n[i]===void 0&&(n[i]=e[i]);return n}class _{eq(e){return this==e}range(e,t=e){return q.create(e,t,this)}}_.prototype.startSide=_.prototype.endSide=0;_.prototype.point=!1;_.prototype.mapMode=M.TrackDel;function me(l,e){return l==e||l.constructor==e.constructor&&l.eq(e)}class q{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new q(e,t,n)}}function ce(l,e){return l.from-e.from||l.value.startSide-e.value.startSide}class we{constructor(e,t,n,i){this.from=e,this.to=t,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,i=0){let s=n?this.to:this.from;for(let r=i,h=s.length;;){if(r==h)return r;let o=r+h>>1,a=s[o]-e||(n?this.value[o].endSide:this.value[o].startSide)-t;if(o==r)return a>=0?r:h;a>=0?h=o:r=o+1}}between(e,t,n,i){for(let s=this.findIndex(t,-1e9,!0),r=this.findIndex(n,1e9,!1,s);s<r;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,t){let n=[],i=[],s=[],r=-1,h=-1;for(let o=0;o<this.value.length;o++){let a=this.value[o],u=this.from[o]+e,f=this.to[o]+e,d,c;if(u==f){let g=t.mapPos(u,a.startSide,a.mapMode);if(g==null||(d=c=g,a.startSide!=a.endSide&&(c=t.mapPos(u,a.endSide),c<d)))continue}else if(d=t.mapPos(u,a.startSide),c=t.mapPos(f,a.endSide),d>c||d==c&&a.startSide>0&&a.endSide<=0)continue;(c-d||a.endSide-a.startSide)<0||(r<0&&(r=d),a.point&&(h=Math.max(h,c-d)),n.push(a),i.push(d-r),s.push(c-r))}return{mapped:n.length?new we(i,s,n,h):null,pos:r}}}class S{constructor(e,t,n,i){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=i}static create(e,t,n,i){return new S(e,t,n,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:i=0,filterTo:s=this.length}=e,r=e.filter;if(t.length==0&&!r)return this;if(n&&(t=t.slice().sort(ce)),this.isEmpty)return t.length?S.of(t):this;let h=new Le(this,null,-1).goto(0),o=0,a=[],u=new ee;for(;h.value||o<t.length;)if(o<t.length&&(h.from-t[o].from||h.startSide-t[o].value.startSide)>=0){let f=t[o++];u.addInner(f.from,f.to,f.value)||a.push(f)}else h.rangeIndex==1&&h.chunkIndex<this.chunk.length&&(o==t.length||this.chunkEnd(h.chunkIndex)<t[o].from)&&(!r||i>this.chunkEnd(h.chunkIndex)||s<this.chunkPos[h.chunkIndex])&&u.addChunk(this.chunkPos[h.chunkIndex],this.chunk[h.chunkIndex])?h.nextChunk():((!r||i>h.to||s<h.from||r(h.from,h.to,h.value))&&(u.addInner(h.from,h.to,h.value)||a.push(q.create(h.from,h.to,h.value))),h.next());return u.finishInner(this.nextLayer.isEmpty&&!a.length?S.empty:this.nextLayer.update({add:a,filter:r,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],i=-1;for(let r=0;r<this.chunk.length;r++){let h=this.chunkPos[r],o=this.chunk[r],a=e.touchesRange(h,h+o.length);if(a===!1)i=Math.max(i,o.maxPoint),t.push(o),n.push(e.mapPos(h));else if(a===!0){let{mapped:u,pos:f}=o.map(h,e);u&&(i=Math.max(i,u.maxPoint),t.push(u),n.push(f))}}let s=this.nextLayer.map(e);return t.length==0?s:new S(n,t,s||S.empty,i)}between(e,t,n){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],r=this.chunk[i];if(t>=s&&e<=s+r.length&&r.between(s,e-s,t-s,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return W.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return W.from(e).goto(t)}static compare(e,t,n,i,s=-1){let r=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),h=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),o=ye(r,h,n),a=new N(r,o,s),u=new N(h,o,s);n.iterGaps((f,d,c)=>ke(a,f,u,d,c,i)),n.empty&&n.length==0&&ke(a,0,u,0,0,i)}static eq(e,t,n=0,i){i==null&&(i=999999999);let s=e.filter(u=>!u.isEmpty&&t.indexOf(u)<0),r=t.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(s.length!=r.length)return!1;if(!s.length)return!0;let h=ye(s,r),o=new N(s,h,0).goto(n),a=new N(r,h,0).goto(n);for(;;){if(o.to!=a.to||!de(o.active,a.active)||o.point&&(!a.point||!me(o.point,a.point)))return!1;if(o.to>i)return!0;o.next(),a.next()}}static spans(e,t,n,i,s=-1){let r=new N(e,null,s).goto(t),h=t,o=r.openStart;for(;;){let a=Math.min(r.to,n);if(r.point){let u=r.activeForPoint(r.to),f=r.pointFrom<t?u.length+1:r.point.startSide<0?u.length:Math.min(u.length,o);i.point(h,a,r.point,u,f,r.pointRank),o=Math.min(r.openEnd(a),u.length)}else a>h&&(i.span(h,a,r.active,o),o=r.openEnd(a));if(r.to>n)return o+(r.point&&r.to>n?1:0);h=r.to,r.next()}}static of(e,t=!1){let n=new ee;for(let i of e instanceof q?[e]:t?_e(e):e)n.add(i.from,i.to,i.value);return n.finish()}static join(e){if(!e.length)return S.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let i=e[n];i!=S.empty;i=i.nextLayer)t=new S(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}S.empty=new S([],[],null,-1);function _e(l){if(l.length>1)for(let e=l[0],t=1;t<l.length;t++){let n=l[t];if(ce(e,n)>0)return l.slice().sort(ce);e=n}return l}S.empty.nextLayer=S.empty;class ee{finishChunk(e){this.chunks.push(new we(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new ee)).add(e,t,n)}addInner(e,t,n){let i=e-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(S.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=S.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function ye(l,e,t){let n=new Map;for(let s of l)for(let r=0;r<s.chunk.length;r++)s.chunk[r].maxPoint<=0&&n.set(s.chunk[r],s.chunkPos[r]);let i=new Set;for(let s of e)for(let r=0;r<s.chunk.length;r++){let h=n.get(s.chunk[r]);h!=null&&(t?t.mapPos(h):h)==s.chunkPos[r]&&!t?.touchesRange(h,h+s.chunk[r].length)&&i.add(s.chunk[r])}return i}class Le{constructor(e,t,n,i=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class W{constructor(e){this.heap=e}static from(e,t=null,n=-1){let i=[];for(let s=0;s<e.length;s++)for(let r=e[s];!r.isEmpty;r=r.nextLayer)r.maxPoint>=n&&i.push(new Le(r,t,n,s));return i.length==1?i[0]:new W(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let n=this.heap.length>>1;n>=0;n--)ie(this.heap,n);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let n=this.heap.length>>1;n>=0;n--)ie(this.heap,n);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),ie(this.heap,0)}}}function ie(l,e){for(let t=l[e];;){let n=(e<<1)+1;if(n>=l.length)break;let i=l[n];if(n+1<l.length&&i.compare(l[n+1])>=0&&(i=l[n+1],n++),t.compare(i)<0)break;l[n]=t,l[e]=i,e=n}}class N{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=W.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){H(this.active,e),H(this.activeTo,e),H(this.activeRank,e),this.minActive=Se(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:i,rank:s}=this.cursor;for(;t<this.activeRank.length&&(s-this.activeRank[t]||i-this.activeTo[t])>0;)t++;K(this.active,t,n),K(this.activeTo,t,i),K(this.activeRank,t,s),e&&K(e,t,this.cursor.from),this.minActive=Se(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&H(n,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let i=n.length-1;i>=0&&n[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function ke(l,e,t,n,i,s){l.goto(e),t.goto(n);let r=n+i,h=n,o=n-e,a=!!s.boundChange;for(let u=!1;;){let f=l.to+o-t.to,d=f||l.endSide-t.endSide,c=d<0?l.to+o:t.to,g=Math.min(c,r);if(l.point||t.point?(l.point&&t.point&&me(l.point,t.point)&&de(l.activeForPoint(l.to),t.activeForPoint(t.to))||s.comparePoint(h,g,l.point,t.point),u=!1):(u&&s.boundChange(h),g>h&&!de(l.active,t.active)&&s.compareRange(h,g,l.active,t.active),a&&g<r&&(f||l.openEnd(c)!=t.openEnd(c))&&(u=!0)),c>r)break;h=c,d<=0&&l.next(),d>=0&&t.next()}}function de(l,e){if(l.length!=e.length)return!1;for(let t=0;t<l.length;t++)if(l[t]!=e[t]&&!me(l[t],e[t]))return!1;return!0}function H(l,e){for(let t=e,n=l.length-1;t<n;t++)l[t]=l[t+1];l.pop()}function K(l,e,t){for(let n=l.length-1;n>=e;n--)l[n+1]=l[n];l[e]=t}function Se(l,e){let t=-1,n=1e9;for(let i=0;i<e.length;i++)(e[i]-n||l[i].endSide-l[t].endSide)<0&&(t=i,n=e[i]);return t}function lt(l,e,t=l.length){let n=0;for(let i=0;i<t&&i<l.length;)l.charCodeAt(i)==9?(n+=e-n%e,i++):(n++,i=Y(l,i));return n}function ht(l,e,t,n){for(let i=0,s=0;;){if(s>=e)return i;if(i==l.length)break;s+=l.charCodeAt(i)==9?t-s%t:1,i=Y(l,i)}return l.length}export{U as A,y as C,w as E,A as F,M,st as P,S as R,I as S,P as T,p as a,x as b,rt as c,_ as d,ht as e,Y as f,tt as g,it as h,L as i,R as j,ee as k,lt as l,C as m,nt as n,te as o};
|
|
5
|
+
`}get readOnly(){return this.facet(Be)}phrase(e,...t){for(let n of this.facet(w.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(n,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>t.length?n:t[s-1]})),e}languageDataAt(e,t,n=-1){let i=[];for(let s of this.facet(Ce))for(let r of s(this,t,n))Object.prototype.hasOwnProperty.call(r,e)&&i.push(r[e]);return i}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return je(t.length?t[0]:"")}wordAt(e){let{text:t,from:n,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),r=e-n,h=e-n;for(;r>0;){let o=Y(t,r,!1);if(s(t.slice(o,r))!=R.Word)break;r=o}for(;h<i;){let o=Y(t,h);if(s(t.slice(h,o))!=R.Word)break;h=o}return r==h?null:p.range(r+n,h+n)}}w.allowMultipleSelections=ae;w.tabSize=A.define({combine:l=>l.length?l[0]:4});w.lineSeparator=Me;w.readOnly=Be;w.phrases=A.define({compare(l,e){let t=Object.keys(l),n=Object.keys(e);return t.length==n.length&&t.every(i=>l[i]==e[i])}});w.languageData=Ce;w.changeFilter=be;w.transactionFilter=Re;w.transactionExtender=Te;te.reconfigure=I.define();function rt(l,e,t={}){let n={};for(let i of l)for(let s of Object.keys(i)){let r=i[s],h=n[s];if(h===void 0)n[s]=r;else if(!(h===r||r===void 0))if(Object.hasOwnProperty.call(t,s))n[s]=t[s](h,r);else throw new Error("Config merge conflict for field "+s)}for(let i in e)n[i]===void 0&&(n[i]=e[i]);return n}class _{eq(e){return this==e}range(e,t=e){return q.create(e,t,this)}}_.prototype.startSide=_.prototype.endSide=0;_.prototype.point=!1;_.prototype.mapMode=M.TrackDel;function me(l,e){return l==e||l.constructor==e.constructor&&l.eq(e)}class q{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new q(e,t,n)}}function ce(l,e){return l.from-e.from||l.value.startSide-e.value.startSide}class we{constructor(e,t,n,i){this.from=e,this.to=t,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,i=0){let s=n?this.to:this.from;for(let r=i,h=s.length;;){if(r==h)return r;let o=r+h>>1,a=s[o]-e||(n?this.value[o].endSide:this.value[o].startSide)-t;if(o==r)return a>=0?r:h;a>=0?h=o:r=o+1}}between(e,t,n,i){for(let s=this.findIndex(t,-1e9,!0),r=this.findIndex(n,1e9,!1,s);s<r;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,t){let n=[],i=[],s=[],r=-1,h=-1;for(let o=0;o<this.value.length;o++){let a=this.value[o],u=this.from[o]+e,f=this.to[o]+e,d,c;if(u==f){let g=t.mapPos(u,a.startSide,a.mapMode);if(g==null||(d=c=g,a.startSide!=a.endSide&&(c=t.mapPos(u,a.endSide),c<d)))continue}else if(d=t.mapPos(u,a.startSide),c=t.mapPos(f,a.endSide),d>c||d==c&&a.startSide>0&&a.endSide<=0)continue;(c-d||a.endSide-a.startSide)<0||(r<0&&(r=d),a.point&&(h=Math.max(h,c-d)),n.push(a),i.push(d-r),s.push(c-r))}return{mapped:n.length?new we(i,s,n,h):null,pos:r}}}class S{constructor(e,t,n,i){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=i}static create(e,t,n,i){return new S(e,t,n,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:i=0,filterTo:s=this.length}=e,r=e.filter;if(t.length==0&&!r)return this;if(n&&(t=t.slice().sort(ce)),this.isEmpty)return t.length?S.of(t):this;let h=new Le(this,null,-1).goto(0),o=0,a=[],u=new ee;for(;h.value||o<t.length;)if(o<t.length&&(h.from-t[o].from||h.startSide-t[o].value.startSide)>=0){let f=t[o++];u.addInner(f.from,f.to,f.value)||a.push(f)}else h.rangeIndex==1&&h.chunkIndex<this.chunk.length&&(o==t.length||this.chunkEnd(h.chunkIndex)<t[o].from)&&(!r||i>this.chunkEnd(h.chunkIndex)||s<this.chunkPos[h.chunkIndex])&&u.addChunk(this.chunkPos[h.chunkIndex],this.chunk[h.chunkIndex])?h.nextChunk():((!r||i>h.to||s<h.from||r(h.from,h.to,h.value))&&(u.addInner(h.from,h.to,h.value)||a.push(q.create(h.from,h.to,h.value))),h.next());return u.finishInner(this.nextLayer.isEmpty&&!a.length?S.empty:this.nextLayer.update({add:a,filter:r,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],i=-1;for(let r=0;r<this.chunk.length;r++){let h=this.chunkPos[r],o=this.chunk[r],a=e.touchesRange(h,h+o.length);if(a===!1)i=Math.max(i,o.maxPoint),t.push(o),n.push(e.mapPos(h));else if(a===!0){let{mapped:u,pos:f}=o.map(h,e);u&&(i=Math.max(i,u.maxPoint),t.push(u),n.push(f))}}let s=this.nextLayer.map(e);return t.length==0?s:new S(n,t,s||S.empty,i)}between(e,t,n){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],r=this.chunk[i];if(t>=s&&e<=s+r.length&&r.between(s,e-s,t-s,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return W.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return W.from(e).goto(t)}static compare(e,t,n,i,s=-1){let r=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),h=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),o=ye(r,h,n),a=new N(r,o,s),u=new N(h,o,s);n.iterGaps((f,d,c)=>ke(a,f,u,d,c,i)),n.empty&&n.length==0&&ke(a,0,u,0,0,i)}static eq(e,t,n=0,i){i==null&&(i=999999999);let s=e.filter(u=>!u.isEmpty&&t.indexOf(u)<0),r=t.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(s.length!=r.length)return!1;if(!s.length)return!0;let h=ye(s,r),o=new N(s,h,0).goto(n),a=new N(r,h,0).goto(n);for(;;){if(o.to!=a.to||!de(o.active,a.active)||o.point&&(!a.point||!me(o.point,a.point)))return!1;if(o.to>i)return!0;o.next(),a.next()}}static spans(e,t,n,i,s=-1){let r=new N(e,null,s).goto(t),h=t,o=r.openStart;for(;;){let a=Math.min(r.to,n);if(r.point){let u=r.activeForPoint(r.to),f=r.pointFrom<t?u.length+1:r.point.startSide<0?u.length:Math.min(u.length,o);i.point(h,a,r.point,u,f,r.pointRank),o=Math.min(r.openEnd(a),u.length)}else a>h&&(i.span(h,a,r.active,o),o=r.openEnd(a));if(r.to>n)return o+(r.point&&r.to>n?1:0);h=r.to,r.next()}}static of(e,t=!1){let n=new ee;for(let i of e instanceof q?[e]:t?_e(e):e)n.add(i.from,i.to,i.value);return n.finish()}static join(e){if(!e.length)return S.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let i=e[n];i!=S.empty;i=i.nextLayer)t=new S(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}S.empty=new S([],[],null,-1);function _e(l){if(l.length>1)for(let e=l[0],t=1;t<l.length;t++){let n=l[t];if(ce(e,n)>0)return l.slice().sort(ce);e=n}return l}S.empty.nextLayer=S.empty;class ee{finishChunk(e){this.chunks.push(new we(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new ee)).add(e,t,n)}addInner(e,t,n){let i=e-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(S.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=S.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function ye(l,e,t){let n=new Map;for(let s of l)for(let r=0;r<s.chunk.length;r++)s.chunk[r].maxPoint<=0&&n.set(s.chunk[r],s.chunkPos[r]);let i=new Set;for(let s of e)for(let r=0;r<s.chunk.length;r++){let h=n.get(s.chunk[r]);h!=null&&(t?t.mapPos(h):h)==s.chunkPos[r]&&!t?.touchesRange(h,h+s.chunk[r].length)&&i.add(s.chunk[r])}return i}class Le{constructor(e,t,n,i=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class W{constructor(e){this.heap=e}static from(e,t=null,n=-1){let i=[];for(let s=0;s<e.length;s++)for(let r=e[s];!r.isEmpty;r=r.nextLayer)r.maxPoint>=n&&i.push(new Le(r,t,n,s));return i.length==1?i[0]:new W(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let n=this.heap.length>>1;n>=0;n--)ie(this.heap,n);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let n=this.heap.length>>1;n>=0;n--)ie(this.heap,n);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),ie(this.heap,0)}}}function ie(l,e){for(let t=l[e];;){let n=(e<<1)+1;if(n>=l.length)break;let i=l[n];if(n+1<l.length&&i.compare(l[n+1])>=0&&(i=l[n+1],n++),t.compare(i)<0)break;l[n]=t,l[e]=i,e=n}}class N{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=W.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){H(this.active,e),H(this.activeTo,e),H(this.activeRank,e),this.minActive=Se(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:i,rank:s}=this.cursor;for(;t<this.activeRank.length&&(s-this.activeRank[t]||i-this.activeTo[t])>0;)t++;K(this.active,t,n),K(this.activeTo,t,i),K(this.activeRank,t,s),e&&K(e,t,this.cursor.from),this.minActive=Se(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&H(n,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let i=n.length-1;i>=0&&n[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function ke(l,e,t,n,i,s){l.goto(e),t.goto(n);let r=n+i,h=n,o=n-e,a=!!s.boundChange;for(let u=!1;;){let f=l.to+o-t.to,d=f||l.endSide-t.endSide,c=d<0?l.to+o:t.to,g=Math.min(c,r);if(l.point||t.point?(l.point&&t.point&&me(l.point,t.point)&&de(l.activeForPoint(l.to),t.activeForPoint(t.to))||s.comparePoint(h,g,l.point,t.point),u=!1):(u&&s.boundChange(h),g>h&&!de(l.active,t.active)&&s.compareRange(h,g,l.active,t.active),a&&g<r&&(f||l.openEnd(c)!=t.openEnd(c))&&(u=!0)),c>r)break;h=c,d<=0&&l.next(),d>=0&&t.next()}}function de(l,e){if(l.length!=e.length)return!1;for(let t=0;t<l.length;t++)if(l[t]!=e[t]&&!me(l[t],e[t]))return!1;return!0}function H(l,e){for(let t=e,n=l.length-1;t<n;t++)l[t]=l[t+1];l.pop()}function K(l,e,t){for(let n=l.length-1;n>=e;n--)l[n+1]=l[n];l[e]=t}function Se(l,e){let t=-1,n=1e9;for(let i=0;i<e.length;i++)(e[i]-n||l[i].endSide-l[t].endSide)<0&&(t=i,n=e[i]);return t}function lt(l,e,t=l.length){let n=0;for(let i=0;i<t&&i<l.length;)l.charCodeAt(i)==9?(n+=e-n%e,i++):(n++,i=Y(l,i));return n}function ht(l,e,t,n){for(let i=0,s=0;;){if(s>=e)return i;if(i==l.length)break;s+=l.charCodeAt(i)==9?t-s%t:1,i=Y(l,i)}return l.length}export{U as A,y as C,w as E,A as F,M,st as P,S as R,I as S,P as T,p as a,x as b,_ as c,ht as d,rt as e,Y as f,tt as g,it as h,L as i,R as j,ee as k,lt as l,C as m,nt as n,te as o};
|