@i14ks/ccv 0.12.0 → 0.12.2
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/bundle/ccv.mjs +16 -1
- package/package.json +1 -1
- package/web/assets/{codemirror-Byu5BOry.js → codemirror-D11GWMsB.js} +1 -1
- package/web/assets/{index-BiJkY5lu.js → index-09MC_4AF.js} +1 -1
- package/web/assets/{index-DJN6swZl.js → index-4S0cl_O2.js} +1 -1
- package/web/assets/{index-DO6gKWcT.js → index-9Toz507b.js} +4 -4
- package/web/assets/{index-BednlsnR.js → index-BDuAzkOQ.js} +1 -1
- package/web/assets/{index-BhTNEiv0.js → index-BIhkivIg.js} +1 -1
- package/web/assets/{index-CQlHFJzv.js → index-BSEf83Uc.js} +1 -1
- package/web/assets/{index-DJPI4hL4.js → index-Bg0VD211.js} +1 -1
- package/web/assets/{index-DM4oBLe8.js → index-Bw0U50QY.js} +1 -1
- package/web/assets/{index-CPLRJruN.js → index-CZF-u-hv.js} +1 -1
- package/web/assets/{index-CmXpz6wO.js → index-CmCj0IE6.js} +1 -1
- package/web/assets/{index-DXYp3jsl.js → index-Czu0PbLS.js} +1 -1
- package/web/assets/{index-DG-5rv4t.js → index-D57ZXpBD.js} +1 -1
- package/web/assets/{index-DSzfAcOE.js → index-DABElhgt.js} +1 -1
- package/web/assets/{index-CNdrabZC.js → index-DO1FY4r1.js} +1 -1
- package/web/assets/{index-rekQBGDD.js → index-DdCJlB8h.js} +1 -1
- package/web/assets/{index-CsBX1VvC.js → index-Dn5EQ5YI.js} +1 -1
- package/web/assets/{index-Buinfinc.js → index-Iwl1w0_V.js} +1 -1
- package/web/assets/{index-CBtC705w.js → index-J2jvoYvL.js} +1 -1
- package/web/assets/{index-DNppE7jj.js → index-ZstREAcb.js} +1 -1
- package/web/assets/{index-CzPnlrTh.js → index-xSo7_4Td.js} +1 -1
- package/web/index.html +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{codePointAt as v,EditorSelection as C,codePointSize as T,StateField as _,RangeSet as Pe,Prec as ee,Facet as be,combineConfig as Le,fromCodePoint as xe,StateEffect as O,MapMode as G,RangeValue as Me,Annotation as ke,CharCategory as J,Transaction as Be,Text as Fe}from"./index-BHot-lnj.js";import{E as L,p as $e,V as We,q as Z,t as Ce,n as we,o as Ne,D as H,W as Ue}from"./index-891wE-Rj.js";import{e as q,j as je}from"./index-CzPnlrTh.js";class ve{constructor(e,t,n,s){this.state=e,this.pos=t,this.explicit=n,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=q(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),s=t.text.slice(n-t.from,this.pos-t.from),o=s.search(Se(e,!1));return o<0?null:{from:n+o,to:this.pos,text:s.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function ce(i){let e=Object.keys(i).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Ve(i){let e=Object.create(null),t=Object.create(null);for(let{label:s}of i){e[s[0]]=!0;for(let o=1;o<s.length;o++)t[s[o]]=!0}let n=ce(e)+ce(t)+"*$";return[new RegExp("^"+n),new RegExp(n)]}function He(i){let e=i.map(s=>typeof s=="string"?{label:s}:s),[t,n]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:Ve(e);return s=>{let o=s.matchBefore(n);return o||s.explicit?{from:o?o.from:s.pos,options:e,validFor:t}:null}}function Nt(i,e){return t=>{for(let n=q(t.state).resolveInner(t.pos,-1);n;n=n.parent){if(i.indexOf(n.name)>-1)return null;if(n.type.isTop)break}return e(t)}}class fe{constructor(e,t,n,s){this.completion=e,this.source=t,this.match=n,this.score=s}}function A(i){return i.selection.main.from}function Se(i,e){var t;let{source:n}=i,s=e&&n[0]!="^",o=n[n.length-1]!="$";return!s&&!o?i:new RegExp(`${s?"^":""}(?:${n})${o?"$":""}`,(t=i.flags)!==null&&t!==void 0?t:i.ignoreCase?"i":"")}const te=ke.define();function qe(i,e,t,n){let{main:s}=i.selection,o=t-s.from,l=n-s.from;return{...i.changeByRange(a=>{if(a!=s&&t!=n&&i.sliceDoc(a.from+o,a.from+l)!=i.sliceDoc(t,n))return{range:a};let r=i.toText(e);return{changes:{from:a.from+o,to:n==s.from?a.to:a.from+l,insert:r},range:C.cursor(a.from+o+r.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const he=new WeakMap;function ze(i){if(!Array.isArray(i))return i;let e=he.get(i);return e||he.set(i,e=He(i)),e}const j=O.define(),B=O.define();class Ke{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=v(e,t),s=T(n);this.chars.push(n);let o=e.slice(t,t+s),l=o.toUpperCase();this.folded.push(v(l==o?o.toLowerCase():l,0)),t+=s}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:s,precise:o,byWord:l}=this;if(t.length==1){let d=v(e,0),D=T(d),S=D==e.length?0:-100;if(d!=t[0])if(d==n[0])S+=-200;else return null;return this.ret(S,[0,D])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let r=t.length,h=0;if(a<0){for(let d=0,D=Math.min(e.length,200);d<D&&h<r;){let S=v(e,d);(S==t[h]||S==n[h])&&(s[h++]=d),d+=T(S)}if(h<r)return null}let c=0,f=0,p=!1,u=0,m=-1,y=-1,k=/[a-z]/.test(e),I=!0;for(let d=0,D=Math.min(e.length,200),S=0;d<D&&f<r;){let b=v(e,d);a<0&&(c<r&&b==t[c]&&(o[c++]=d),u<r&&(b==t[u]||b==n[u]?(u==0&&(m=d),y=d+1,u++):u=0));let N,K=b<255?b>=48&&b<=57||b>=97&&b<=122?2:b>=65&&b<=90?1:0:(N=xe(b))!=N.toLowerCase()?1:N!=N.toUpperCase()?2:0;(!d||K==1&&k||S==0&&K!=0)&&(t[f]==b||n[f]==b&&(p=!0)?l[f++]=d:l.length&&(I=!1)),S=K,d+=T(b)}return f==r&&l[0]==0&&I?this.result(-100+(p?-200:0),l,e):u==r&&m==0?this.ret(-200-e.length+(y==e.length?0:-100),[0,y]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):u==r?this.ret(-900-e.length,[m,y]):f==r?this.result(-100+(p?-200:0)+-700+(I?0:-1100),l,e):t.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,n){let s=[],o=0;for(let l of t){let a=l+(this.astral?T(v(n,l)):1);o&&s[o-1]==l?s[o-1]=a:(s[o++]=l,s[o++]=a)}return this.ret(e-n.length,s)}}class Qe{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}const g=be.define({combine(i){return Le(i,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Ye,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>pe(e(n),t(n)),optionClass:(e,t)=>n=>pe(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function pe(i,e){return i?e?i+" "+e:i:e}function Ye(i,e,t,n,s,o){let l=i.textDirection==Ne.RTL,a=l,r=!1,h="top",c,f,p=e.left-s.left,u=s.right-e.right,m=n.right-n.left,y=n.bottom-n.top;if(a&&p<Math.min(m,u)?a=!1:!a&&u<Math.min(m,p)&&(a=!0),m<=(a?p:u))c=Math.max(s.top,Math.min(t.top,s.bottom-y))-e.top,f=Math.min(400,a?p:u);else{r=!0,f=Math.min(400,(l?e.right:s.right-e.left)-30);let d=s.bottom-e.bottom;d>=y||d>e.top?c=t.bottom-e.top:(h="bottom",c=e.bottom-t.top)}let k=(e.bottom-e.top)/o.offsetHeight,I=(e.right-e.left)/o.offsetWidth;return{style:`${h}: ${c/k}px; max-width: ${f/I}px`,class:"cm-completionInfo-"+(r?l?"left-narrow":"right-narrow":a?"left":"right")}}const ie=O.define();function Xe(i){let e=i.addToOptions.slice();return i.icons&&e.push({render(t){let n=document.createElement("div");return n.classList.add("cm-completionIcon"),t.type&&n.classList.add(...t.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),n.setAttribute("aria-hidden","true"),n},position:20}),e.push({render(t,n,s,o){let l=document.createElement("span");l.className="cm-completionLabel";let a=t.displayLabel||t.label,r=0;for(let h=0;h<o.length;){let c=o[h++],f=o[h++];c>r&&l.appendChild(document.createTextNode(a.slice(r,c)));let p=l.appendChild(document.createElement("span"));p.appendChild(document.createTextNode(a.slice(c,f))),p.className="cm-completionMatchedText",r=f}return r<a.length&&l.appendChild(document.createTextNode(a.slice(r))),l},position:50},{render(t){if(!t.detail)return null;let n=document.createElement("span");return n.className="cm-completionDetail",n.textContent=t.detail,n},position:80}),e.sort((t,n)=>t.position-n.position).map(t=>t.render)}function Q(i,e,t){if(i<=t)return{from:0,to:i};if(e<0&&(e=0),e<=i>>1){let s=Math.floor(e/t);return{from:s*t,to:(s+1)*t}}let n=Math.ceil((i-e)/t);return{from:i-n*t,to:i-(n-1)*t}}class Ge{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:r=>this.placeInfo(r),key:this},this.space=null,this.currentClass="";let s=e.state.field(t),{options:o,selected:l}=s.open,a=e.state.facet(g);this.optionContent=Xe(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=Q(o.length,l,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",r=>{let{options:h}=e.state.field(t).open;for(let c=r.target,f;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(f=/-(\d+)$/.exec(c.id))&&+f[1]<h.length){this.applyCompletion(e,h[+f[1]]),r.preventDefault();return}if(r.target==this.list){let c=this.list.classList.contains("cm-completionListIncompleteTop")&&r.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains("cm-completionListIncompleteBottom")&&r.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;c!=null&&(e.dispatch({effects:ie.of(c)}),r.preventDefault())}}),this.dom.addEventListener("focusout",r=>{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(g).closeOnBlur&&r.relatedTarget!=e.contentDOM&&e.dispatch({effects:B.of(null)})}),this.showOptions(o,s.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),s=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=s){let{options:o,selected:l,disabled:a}=n.open;(!s.open||s.open.options!=o)&&(this.range=Q(o.length,l,e.state.facet(g).maxRenderedOptions),this.showOptions(o,n.id)),this.updateSel(),a!=((t=s.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of t.split(" "))n&&this.dom.classList.add(n);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=Q(t.options.length,t.selected,this.view.state.facet(g).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:s}=t.options[t.selected],{info:o}=s;if(!o)return;let l=typeof o=="string"?document.createTextNode(o):o(s);if(!l)return;"then"in l?l.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,s)}).catch(a=>Z(this.view.state,a,"completion info")):(this.addInfoPane(l,s),n.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",n.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:s,destroy:o}=e;n.appendChild(s),this.infoDestroy=o||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,s=this.range.from;n;n=n.nextSibling,s++)n.nodeName!="LI"||!n.id?s--:s==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&(n.removeAttribute("aria-selected"),n.removeAttribute("aria-describedby"));return t&&Ze(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),o=this.space;if(!o){let l=this.dom.ownerDocument.documentElement;o={left:0,top:0,right:l.clientWidth,bottom:l.clientHeight}}return s.top>Math.min(o.bottom,t.bottom)-10||s.bottom<Math.max(o.top,t.top)+10?null:this.view.state.facet(g).positionInfo(this.view,t,s,n,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){const s=document.createElement("ul");s.id=t,s.setAttribute("role","listbox"),s.setAttribute("aria-expanded","true"),s.setAttribute("aria-label",this.view.state.phrase("Completions")),s.addEventListener("mousedown",l=>{l.target==s&&l.preventDefault()});let o=null;for(let l=n.from;l<n.to;l++){let{completion:a,match:r}=e[l],{section:h}=a;if(h){let p=typeof h=="string"?h:h.name;if(p!=o&&(l>n.from||n.from==0))if(o=p,typeof h!="string"&&h.header)s.appendChild(h.header(h));else{let u=s.appendChild(document.createElement("completion-section"));u.textContent=p}}const c=s.appendChild(document.createElement("li"));c.id=t+"-"+l,c.setAttribute("role","option");let f=this.optionClass(a);f&&(c.className=f);for(let p of this.optionContent){let u=p(a,this.view.state,this.view,r);u&&c.appendChild(u)}}return n.from&&s.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&s.classList.add("cm-completionListIncompleteBottom"),s}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function Je(i,e){return t=>new Ge(t,i,e)}function Ze(i,e){let t=i.getBoundingClientRect(),n=e.getBoundingClientRect(),s=t.height/i.offsetHeight;n.top<t.top?i.scrollTop-=(t.top-n.top)/s:n.bottom>t.bottom&&(i.scrollTop+=(n.bottom-t.bottom)/s)}function ue(i){return(i.boost||0)*100+(i.apply?10:0)+(i.info?5:0)+(i.type?1:0)}function _e(i,e){let t=[],n=null,s=null,o=c=>{t.push(c);let{section:f}=c.completion;if(f){n||(n=[]);let p=typeof f=="string"?f:f.name;n.some(u=>u.name==p)||n.push(typeof f=="string"?{name:p}:f)}},l=e.facet(g);for(let c of i)if(c.hasResult()){let f=c.result.getMatch;if(c.result.filter===!1)for(let p of c.result.options)o(new fe(p,c.source,f?f(p):[],1e9-t.length));else{let p=e.sliceDoc(c.from,c.to),u,m=l.filterStrict?new Qe(p):new Ke(p);for(let y of c.result.options)if(u=m.match(y.label)){let k=y.displayLabel?f?f(y,u.matched):[]:u.matched,I=u.score+(y.boost||0);if(o(new fe(y,c.source,k,I)),typeof y.section=="object"&&y.section.rank==="dynamic"){let{name:d}=y.section;s||(s=Object.create(null)),s[d]=Math.max(I,s[d]||-1e9)}}}}if(n){let c=Object.create(null),f=0,p=(u,m)=>(u.rank==="dynamic"&&m.rank==="dynamic"?s[m.name]-s[u.name]:0)||(typeof u.rank=="number"?u.rank:1e9)-(typeof m.rank=="number"?m.rank:1e9)||(u.name<m.name?-1:1);for(let u of n.sort(p))f-=1e5,c[u.name]=f;for(let u of t){let{section:m}=u.completion;m&&(u.score+=c[typeof m=="string"?m:m.name])}}let a=[],r=null,h=l.compareCompletions;for(let c of t.sort((f,p)=>p.score-f.score||h(f.completion,p.completion))){let f=c.completion;!r||r.label!=f.label||r.detail!=f.detail||r.type!=null&&f.type!=null&&r.type!=f.type||r.apply!=f.apply||r.boost!=f.boost?a.push(c):ue(c.completion)>ue(r)&&(a[a.length-1]=c),r=c.completion}return a}class R{constructor(e,t,n,s,o,l){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=s,this.selected=o,this.disabled=l}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new R(this.options,de(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,s,o,l){if(s&&!l&&e.some(h=>h.isPending))return s.setDisabled();let a=_e(e,t);if(!a.length)return s&&e.some(h=>h.isPending)?s.setDisabled():null;let r=t.facet(g).selectOnOpen?0:-1;if(s&&s.selected!=r&&s.selected!=-1){let h=s.options[s.selected].completion;for(let c=0;c<a.length;c++)if(a[c].completion==h){r=c;break}}return new R(a,de(n,r),{pos:e.reduce((h,c)=>c.hasResult()?Math.min(h,c.from):h,1e8),create:ot,above:o.aboveCursor},s?s.timestamp:Date.now(),r,!1)}map(e){return new R(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new R(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class V{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new V(nt,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,n=t.facet(g),o=(n.override||t.languageDataAt("autocomplete",A(t)).map(ze)).map(r=>(this.active.find(c=>c.source==r)||new w(r,this.active.some(c=>c.state!=0)?1:0)).update(e,n));o.length==this.active.length&&o.every((r,h)=>r==this.active[h])&&(o=this.active);let l=this.open,a=e.effects.some(r=>r.is(ne));l&&e.docChanged&&(l=l.map(e.changes)),e.selection||o.some(r=>r.hasResult()&&e.changes.touchesRange(r.from,r.to))||!et(o,this.active)||a?l=R.build(o,t,this.id,l,n,a):l&&l.disabled&&!o.some(r=>r.isPending)&&(l=null),!l&&o.every(r=>!r.isPending)&&o.some(r=>r.hasResult())&&(o=o.map(r=>r.hasResult()?new w(r.source,0):r));for(let r of e.effects)r.is(ie)&&(l=l&&l.setSelected(r.value,this.id));return o==this.active&&l==this.open?this:new V(o,this.id,l)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?tt:it}}function et(i,e){if(i==e)return!0;for(let t=0,n=0;;){for(;t<i.length&&!i[t].hasResult();)t++;for(;n<e.length&&!e[n].hasResult();)n++;let s=t==i.length,o=n==e.length;if(s||o)return s==o;if(i[t++].result!=e[n++].result)return!1}}const tt={"aria-autocomplete":"list"},it={};function de(i,e){let t={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":i};return e>-1&&(t["aria-activedescendant"]=i+"-"+e),t}const nt=[];function Ie(i,e){if(i.isUserEvent("input.complete")){let n=i.annotation(te);if(n&&e.activateOnCompletion(n))return 12}let t=i.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:i.isUserEvent("delete.backward")?2:i.selection?8:i.docChanged?16:0}class w{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let n=Ie(e,t),s=this;(n&8||n&16&&this.touches(e))&&(s=new w(s.source,0)),n&4&&s.state==0&&(s=new w(this.source,1)),s=s.updateFor(e,n);for(let o of e.effects)if(o.is(j))s=new w(s.source,1,o.value);else if(o.is(B))s=new w(s.source,0);else if(o.is(ne))for(let l of o.value)l.source==s.source&&(s=l);return s}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(A(e.state))}}class P extends w{constructor(e,t,n,s,o,l){super(e,3,t),this.limit=n,this.result=s,this.from=o,this.to=l}hasResult(){return!0}updateFor(e,t){var n;if(!(t&3))return this.map(e.changes);let s=this.result;s.map&&!e.changes.empty&&(s=s.map(s,e.changes));let o=e.changes.mapPos(this.from),l=e.changes.mapPos(this.to,1),a=A(e.state);if(a>l||!s||t&2&&(A(e.startState)==this.from||a<this.limit))return new w(this.source,t&4?1:0);let r=e.changes.mapPos(this.limit);return st(s.validFor,e.state,o,l)?new P(this.source,this.explicit,r,s,o,l):s.update&&(s=s.update(s,o,l,new ve(e.state,a,!1)))?new P(this.source,this.explicit,r,s,s.from,(n=s.to)!==null&&n!==void 0?n:A(e.state)):new w(this.source,1,this.explicit)}map(e){if(e.empty)return this;let t=this.result.map?this.result.map(this.result,e):this.result;return t?new P(this.source,this.explicit,e.mapPos(this.limit),t,e.mapPos(this.from),e.mapPos(this.to,1)):new w(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function st(i,e,t,n){if(!i)return!1;let s=e.sliceDoc(t,n);return typeof i=="function"?i(s,t,n,e):Se(i,!0).test(s)}const ne=O.define({map(i,e){return i.map(t=>t.map(e))}}),x=_.define({create(){return V.start()},update(i,e){return i.update(e)},provide:i=>[$e.from(i,e=>e.tooltip),L.contentAttributes.from(i,e=>e.attrs)]});function se(i,e){const t=e.completion.apply||e.completion.label;let n=i.state.field(x).active.find(s=>s.source==e.source);return n instanceof P?(typeof t=="string"?i.dispatch({...qe(i.state,t,n.from,n.to),annotations:te.of(e.completion)}):t(i,e.completion,n.from,n.to),!0):!1}const ot=Je(x,se);function U(i,e="option"){return t=>{let n=t.state.field(x,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp<t.state.facet(g).interactionDelay)return!1;let s=1,o;e=="page"&&(o=Ce(t,n.open.tooltip))&&(s=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:l}=n.open.options,a=n.open.selected>-1?n.open.selected+s*(i?1:-1):i?0:l-1;return a<0?a=e=="page"?0:l-1:a>=l&&(a=e=="page"?l-1:0),t.dispatch({effects:ie.of(a)}),!0}}const lt=i=>{let e=i.state.field(x,!1);return i.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<i.state.facet(g).interactionDelay?!1:se(i,e.open.options[e.open.selected])},Y=i=>i.state.field(x,!1)?(i.dispatch({effects:j.of(!0)}),!0):!1,rt=i=>{let e=i.state.field(x,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(i.dispatch({effects:B.of(null)}),!0)};class at{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const ct=50,ft=1e3,ht=We.fromClass(class{constructor(i){this.view=i,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of i.state.field(x).active)e.isPending&&this.startQuery(e)}update(i){let e=i.state.field(x),t=i.state.facet(g);if(!i.selectionSet&&!i.docChanged&&i.startState.field(x)==e)return;let n=i.transactions.some(o=>{let l=Ie(o,t);return l&8||(o.selection||o.docChanged)&&!(l&3)});for(let o=0;o<this.running.length;o++){let l=this.running[o];if(n||l.context.abortOnDocChange&&i.docChanged||l.updates.length+i.transactions.length>ct&&Date.now()-l.time>ft){for(let a of l.context.abortListeners)try{a()}catch(r){Z(this.view.state,r)}l.context.abortListeners=null,this.running.splice(o--,1)}else l.updates.push(...i.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),i.transactions.some(o=>o.effects.some(l=>l.is(j)))&&(this.pendingStart=!0);let s=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.isPending&&!this.running.some(l=>l.active.source==o.source))?setTimeout(()=>this.startUpdate(),s):-1,this.composing!=0)for(let o of i.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:i}=this.view,e=i.field(x);for(let t of e.active)t.isPending&&!this.running.some(n=>n.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(g).updateSyncTime))}startQuery(i){let{state:e}=this.view,t=A(e),n=new ve(e,t,i.explicit,this.view),s=new at(i,n);this.running.push(s),Promise.resolve(i.source(n)).then(o=>{s.context.aborted||(s.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:B.of(null)}),Z(this.view.state,o)})}scheduleAccept(){this.running.every(i=>i.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(g).updateSyncTime))}accept(){var i;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(g),n=this.view.state.field(x);for(let s=0;s<this.running.length;s++){let o=this.running[s];if(o.done===void 0)continue;if(this.running.splice(s--,1),o.done){let a=A(o.updates.length?o.updates[0].startState:this.view.state),r=Math.min(a,o.done.from+(o.active.explicit?0:1)),h=new P(o.active.source,o.active.explicit,r,o.done,o.done.from,(i=o.done.to)!==null&&i!==void 0?i:a);for(let c of o.updates)h=h.update(c,t);if(h.hasResult()){e.push(h);continue}}let l=n.active.find(a=>a.source==o.active.source);if(l&&l.isPending)if(o.done==null){let a=new w(o.active.source,0);for(let r of o.updates)a=a.update(r,t);a.isPending||e.push(a)}else this.startQuery(l)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:ne.of(e)})}},{eventHandlers:{blur(i){let e=this.view.state.field(x,!1);if(e&&e.tooltip&&this.view.state.facet(g).closeOnBlur){let t=e.open&&Ce(this.view,e.open.tooltip);(!t||!t.dom.contains(i.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:B.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:j.of(!1)}),20),this.composing=0}}}),pt=typeof navigator=="object"&&/Win/.test(navigator.platform),ut=ee.highest(L.domEventHandlers({keydown(i,e){let t=e.state.field(x,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||i.key.length>1||i.ctrlKey&&!(pt&&i.altKey)||i.metaKey)return!1;let n=t.open.options[t.open.selected],s=t.active.find(l=>l.source==n.source),o=n.completion.commitCharacters||s.result.commitCharacters;return o&&o.indexOf(i.key)>-1&&se(e,n),!1}})),Te=L.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class dt{constructor(e,t,n,s){this.field=e,this.line=t,this.from=n,this.to=s}}class oe{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,G.TrackDel),n=e.mapPos(this.to,1,G.TrackDel);return t==null||n==null?null:new oe(this.field,t,n)}}class le{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],s=[t],o=e.doc.lineAt(t),l=/^\s*/.exec(o.text)[0];for(let r of this.lines){if(n.length){let h=l,c=/^\t*/.exec(r)[0].length;for(let f=0;f<c;f++)h+=e.facet(je);s.push(t+h.length-c),r=h+r.slice(c)}n.push(r),t+=r.length+1}let a=this.fieldPositions.map(r=>new oe(r.field,s[r.line]+r.from,s[r.line]+r.to));return{text:n,ranges:a}}static parse(e){let t=[],n=[],s=[],o;for(let l of e.split(/\r\n?|\n/)){for(;o=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(l);){let a=o[1]?+o[1]:null,r=o[2]||o[3]||"",h=-1;a===0&&(a=1e9);let c=r.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f<t.length;f++)(a!=null?t[f].seq==a:c&&t[f].name==c)&&(h=f);if(h<0){let f=0;for(;f<t.length&&(a==null||t[f].seq!=null&&t[f].seq<a);)f++;t.splice(f,0,{seq:a,name:c}),h=f;for(let p of s)p.field>=h&&p.field++}for(let f of s)if(f.line==n.length&&f.from>o.index){let p=o[2]?3+(o[1]||"").length:2;f.from-=p,f.to-=p}s.push(new dt(h,n.length,o.index,o.index+c.length)),l=l.slice(0,o.index)+r+l.slice(o.index+o[0].length)}l=l.replace(/\\([{}])/g,(a,r,h)=>{for(let c of s)c.line==n.length&&c.from>h&&(c.from--,c.to--);return r}),n.push(l)}return new le(n,s)}}let mt=H.widget({widget:new class extends Ue{toDOM(){let i=document.createElement("span");return i.className="cm-snippetFieldPosition",i}ignoreEvent(){return!1}}}),gt=H.mark({class:"cm-snippetField"});class M{constructor(e,t){this.ranges=e,this.active=t,this.deco=H.set(e.map(n=>(n.from==n.to?mt:gt).range(n.from,n.to)),!0)}map(e){let t=[];for(let n of this.ranges){let s=n.map(e);if(!s)return null;t.push(s)}return new M(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(n=>n.field==this.active&&n.from<=t.from&&n.to>=t.to))}}const W=O.define({map(i,e){return i&&i.map(e)}}),yt=O.define(),F=_.define({create(){return null},update(i,e){for(let t of e.effects){if(t.is(W))return t.value;if(t.is(yt)&&i)return new M(i.ranges,t.value)}return i&&e.docChanged&&(i=i.map(e.changes)),i&&e.selection&&!i.selectionInsideField(e.selection)&&(i=null),i},provide:i=>L.decorations.from(i,e=>e?e.deco:H.none)});function re(i,e){return C.create(i.filter(t=>t.field==e).map(t=>C.range(t.from,t.to)))}function bt(i){let e=le.parse(i);return(t,n,s,o)=>{let{text:l,ranges:a}=e.instantiate(t.state,s),{main:r}=t.state.selection,h={changes:{from:s,to:o==r.from?r.to:o,insert:Fe.of(l)},scrollIntoView:!0,annotations:n?[te.of(n),Be.userEvent.of("input.complete")]:void 0};if(a.length&&(h.selection=re(a,0)),a.some(c=>c.field>0)){let c=new M(a,0),f=h.effects=[W.of(c)];t.state.field(F,!1)===void 0&&f.push(O.appendConfig.of([F,St,It,Te]))}t.dispatch(t.state.update(h))}}function Oe(i){return({state:e,dispatch:t})=>{let n=e.field(F,!1);if(!n||i<0&&n.active==0)return!1;let s=n.active+i,o=i>0&&!n.ranges.some(l=>l.field==s+i);return t(e.update({selection:re(n.ranges,s),effects:W.of(o?null:new M(n.ranges,s)),scrollIntoView:!0})),!0}}const xt=({state:i,dispatch:e})=>i.field(F,!1)?(e(i.update({effects:W.of(null)})),!0):!1,Ct=Oe(1),wt=Oe(-1),vt=[{key:"Tab",run:Ct,shift:wt},{key:"Escape",run:xt}],me=be.define({combine(i){return i.length?i[0]:vt}}),St=ee.highest(we.compute([me],i=>i.facet(me)));function Ut(i,e){return{...e,apply:bt(i)}}const It=L.domEventHandlers({mousedown(i,e){let t=e.state.field(F,!1),n;if(!t||(n=e.posAtCoords({x:i.clientX,y:i.clientY}))==null)return!1;let s=t.ranges.find(o=>o.from<=n&&o.to>=n);return!s||s.field==t.active?!1:(e.dispatch({selection:re(t.ranges,s.field),effects:W.of(t.ranges.some(o=>o.field>s.field)?new M(t.ranges,s.field):null),scrollIntoView:!0}),!0)}}),$={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},E=O.define({map(i,e){let t=e.mapPos(i,-1,G.TrackAfter);return t??void 0}}),ae=new class extends Me{};ae.startSide=1;ae.endSide=-1;const Ee=_.define({create(){return Pe.empty},update(i,e){if(i=i.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);i=i.update({filter:n=>n>=t.from&&n<=t.to})}for(let t of e.effects)t.is(E)&&(i=i.update({add:[ae.range(t.value,t.value+1)]}));return i}});function jt(){return[Ot,Ee]}const X="()[]{}<>«»»«[]{}";function Ae(i){for(let e=0;e<X.length;e+=2)if(X.charCodeAt(e)==i)return X.charAt(e+1);return xe(i<128?i:i+1)}function De(i,e){return i.languageDataAt("closeBrackets",e)[0]||$}const Tt=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Ot=L.inputHandler.of((i,e,t,n)=>{if((Tt?i.composing:i.compositionStarted)||i.state.readOnly)return!1;let s=i.state.selection.main;if(n.length>2||n.length==2&&T(v(n,0))==1||e!=s.from||t!=s.to)return!1;let o=At(i.state,n);return o?(i.dispatch(o),!0):!1}),Et=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let n=De(i,i.selection.main.head).brackets||$.brackets,s=null,o=i.changeByRange(l=>{if(l.empty){let a=Dt(i.doc,l.head);for(let r of n)if(r==a&&z(i.doc,l.head)==Ae(v(r,0)))return{changes:{from:l.head-r.length,to:l.head+r.length},range:C.cursor(l.head-r.length)}}return{range:s=l}});return s||e(i.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!s},Vt=[{key:"Backspace",run:Et}];function At(i,e){let t=De(i,i.selection.main.head),n=t.brackets||$.brackets;for(let s of n){let o=Ae(v(s,0));if(e==s)return o==s?Lt(i,s,n.indexOf(s+s+s)>-1,t):Rt(i,s,o,t.before||$.before);if(e==o&&Re(i,i.selection.main.from))return Pt(i,s,o)}return null}function Re(i,e){let t=!1;return i.field(Ee).between(0,i.doc.length,n=>{n==e&&(t=!0)}),t}function z(i,e){let t=i.sliceString(e,e+2);return t.slice(0,T(v(t,0)))}function Dt(i,e){let t=i.sliceString(e-2,e);return T(v(t,0))==t.length?t:t.slice(1)}function Rt(i,e,t,n){let s=null,o=i.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:t,from:l.to}],effects:E.of(l.to+e.length),range:C.range(l.anchor+e.length,l.head+e.length)};let a=z(i.doc,l.head);return!a||/\s/.test(a)||n.indexOf(a)>-1?{changes:{insert:e+t,from:l.head},effects:E.of(l.head+e.length),range:C.cursor(l.head+e.length)}:{range:s=l}});return s?null:i.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Pt(i,e,t){let n=null,s=i.changeByRange(o=>o.empty&&z(i.doc,o.head)==t?{changes:{from:o.head,to:o.head+t.length,insert:t},range:C.cursor(o.head+t.length)}:n={range:o});return n?null:i.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Lt(i,e,t,n){let s=n.stringPrefixes||$.stringPrefixes,o=null,l=i.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:E.of(a.to+e.length),range:C.range(a.anchor+e.length,a.head+e.length)};let r=a.head,h=z(i.doc,r),c;if(h==e){if(ge(i,r))return{changes:{insert:e+e,from:r},effects:E.of(r+e.length),range:C.cursor(r+e.length)};if(Re(i,r)){let p=t&&i.sliceDoc(r,r+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:r,to:r+p.length,insert:p},range:C.cursor(r+p.length)}}}else{if(t&&i.sliceDoc(r-2*e.length,r)==e+e&&(c=ye(i,r-2*e.length,s))>-1&&ge(i,c))return{changes:{insert:e+e+e+e,from:r},effects:E.of(r+e.length),range:C.cursor(r+e.length)};if(i.charCategorizer(r)(h)!=J.Word&&ye(i,r,s)>-1&&!Mt(i,r,e,s))return{changes:{insert:e+e,from:r},effects:E.of(r+e.length),range:C.cursor(r+e.length)}}return{range:o=a}});return o?null:i.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function ge(i,e){let t=q(i).resolveInner(e+1);return t.parent&&t.from==e}function Mt(i,e,t,n){let s=q(i).resolveInner(e,-1),o=n.reduce((l,a)=>Math.max(l,a.length),0);for(let l=0;l<5;l++){let a=i.sliceDoc(s.from,Math.min(s.to,s.from+t.length+o)),r=a.indexOf(t);if(!r||r>-1&&n.indexOf(a.slice(0,r))>-1){let c=s.firstChild;for(;c&&c.from==s.from&&c.to-c.from>t.length+r;){if(i.sliceDoc(c.to-t.length,c.to)==t)return!1;c=c.firstChild}return!0}let h=s.to==e&&s.parent;if(!h)break;s=h}return!1}function ye(i,e,t){let n=i.charCategorizer(e);if(n(i.sliceDoc(e-1,e))!=J.Word)return e;for(let s of t){let o=e-s.length;if(i.sliceDoc(o,e)==s&&n(i.sliceDoc(o-1,o))!=J.Word)return o}return-1}function Ht(i={}){return[ut,x,g.of(i),ht,Bt,Te]}const kt=[{key:"Ctrl-Space",run:Y},{mac:"Alt-`",run:Y},{mac:"Alt-i",run:Y},{key:"Escape",run:rt},{key:"ArrowDown",run:U(!0)},{key:"ArrowUp",run:U(!1)},{key:"PageDown",run:U(!0,"page")},{key:"PageUp",run:U(!1,"page")},{key:"Enter",run:lt}],Bt=ee.highest(we.computeN([g],i=>i.facet(g).defaultKeymap?[kt]:[]));export{ve as C,Ht as a,Vt as b,jt as c,kt as d,He as e,Nt as i,Ut as s};
|
|
1
|
+
import{codePointAt as v,EditorSelection as C,codePointSize as T,StateField as _,RangeSet as Pe,Prec as ee,Facet as be,combineConfig as Le,fromCodePoint as xe,StateEffect as O,MapMode as G,RangeValue as Me,Annotation as ke,CharCategory as J,Transaction as Be,Text as Fe}from"./index-BHot-lnj.js";import{E as L,p as $e,V as We,q as Z,t as Ce,n as we,o as Ne,D as H,W as Ue}from"./index-891wE-Rj.js";import{e as q,j as je}from"./index-xSo7_4Td.js";class ve{constructor(e,t,n,s){this.state=e,this.pos=t,this.explicit=n,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=q(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),s=t.text.slice(n-t.from,this.pos-t.from),o=s.search(Se(e,!1));return o<0?null:{from:n+o,to:this.pos,text:s.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function ce(i){let e=Object.keys(i).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Ve(i){let e=Object.create(null),t=Object.create(null);for(let{label:s}of i){e[s[0]]=!0;for(let o=1;o<s.length;o++)t[s[o]]=!0}let n=ce(e)+ce(t)+"*$";return[new RegExp("^"+n),new RegExp(n)]}function He(i){let e=i.map(s=>typeof s=="string"?{label:s}:s),[t,n]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:Ve(e);return s=>{let o=s.matchBefore(n);return o||s.explicit?{from:o?o.from:s.pos,options:e,validFor:t}:null}}function Nt(i,e){return t=>{for(let n=q(t.state).resolveInner(t.pos,-1);n;n=n.parent){if(i.indexOf(n.name)>-1)return null;if(n.type.isTop)break}return e(t)}}class fe{constructor(e,t,n,s){this.completion=e,this.source=t,this.match=n,this.score=s}}function A(i){return i.selection.main.from}function Se(i,e){var t;let{source:n}=i,s=e&&n[0]!="^",o=n[n.length-1]!="$";return!s&&!o?i:new RegExp(`${s?"^":""}(?:${n})${o?"$":""}`,(t=i.flags)!==null&&t!==void 0?t:i.ignoreCase?"i":"")}const te=ke.define();function qe(i,e,t,n){let{main:s}=i.selection,o=t-s.from,l=n-s.from;return{...i.changeByRange(a=>{if(a!=s&&t!=n&&i.sliceDoc(a.from+o,a.from+l)!=i.sliceDoc(t,n))return{range:a};let r=i.toText(e);return{changes:{from:a.from+o,to:n==s.from?a.to:a.from+l,insert:r},range:C.cursor(a.from+o+r.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const he=new WeakMap;function ze(i){if(!Array.isArray(i))return i;let e=he.get(i);return e||he.set(i,e=He(i)),e}const j=O.define(),B=O.define();class Ke{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=v(e,t),s=T(n);this.chars.push(n);let o=e.slice(t,t+s),l=o.toUpperCase();this.folded.push(v(l==o?o.toLowerCase():l,0)),t+=s}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:s,precise:o,byWord:l}=this;if(t.length==1){let d=v(e,0),D=T(d),S=D==e.length?0:-100;if(d!=t[0])if(d==n[0])S+=-200;else return null;return this.ret(S,[0,D])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let r=t.length,h=0;if(a<0){for(let d=0,D=Math.min(e.length,200);d<D&&h<r;){let S=v(e,d);(S==t[h]||S==n[h])&&(s[h++]=d),d+=T(S)}if(h<r)return null}let c=0,f=0,p=!1,u=0,m=-1,y=-1,k=/[a-z]/.test(e),I=!0;for(let d=0,D=Math.min(e.length,200),S=0;d<D&&f<r;){let b=v(e,d);a<0&&(c<r&&b==t[c]&&(o[c++]=d),u<r&&(b==t[u]||b==n[u]?(u==0&&(m=d),y=d+1,u++):u=0));let N,K=b<255?b>=48&&b<=57||b>=97&&b<=122?2:b>=65&&b<=90?1:0:(N=xe(b))!=N.toLowerCase()?1:N!=N.toUpperCase()?2:0;(!d||K==1&&k||S==0&&K!=0)&&(t[f]==b||n[f]==b&&(p=!0)?l[f++]=d:l.length&&(I=!1)),S=K,d+=T(b)}return f==r&&l[0]==0&&I?this.result(-100+(p?-200:0),l,e):u==r&&m==0?this.ret(-200-e.length+(y==e.length?0:-100),[0,y]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):u==r?this.ret(-900-e.length,[m,y]):f==r?this.result(-100+(p?-200:0)+-700+(I?0:-1100),l,e):t.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,n){let s=[],o=0;for(let l of t){let a=l+(this.astral?T(v(n,l)):1);o&&s[o-1]==l?s[o-1]=a:(s[o++]=l,s[o++]=a)}return this.ret(e-n.length,s)}}class Qe{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}const g=be.define({combine(i){return Le(i,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Ye,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>pe(e(n),t(n)),optionClass:(e,t)=>n=>pe(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function pe(i,e){return i?e?i+" "+e:i:e}function Ye(i,e,t,n,s,o){let l=i.textDirection==Ne.RTL,a=l,r=!1,h="top",c,f,p=e.left-s.left,u=s.right-e.right,m=n.right-n.left,y=n.bottom-n.top;if(a&&p<Math.min(m,u)?a=!1:!a&&u<Math.min(m,p)&&(a=!0),m<=(a?p:u))c=Math.max(s.top,Math.min(t.top,s.bottom-y))-e.top,f=Math.min(400,a?p:u);else{r=!0,f=Math.min(400,(l?e.right:s.right-e.left)-30);let d=s.bottom-e.bottom;d>=y||d>e.top?c=t.bottom-e.top:(h="bottom",c=e.bottom-t.top)}let k=(e.bottom-e.top)/o.offsetHeight,I=(e.right-e.left)/o.offsetWidth;return{style:`${h}: ${c/k}px; max-width: ${f/I}px`,class:"cm-completionInfo-"+(r?l?"left-narrow":"right-narrow":a?"left":"right")}}const ie=O.define();function Xe(i){let e=i.addToOptions.slice();return i.icons&&e.push({render(t){let n=document.createElement("div");return n.classList.add("cm-completionIcon"),t.type&&n.classList.add(...t.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),n.setAttribute("aria-hidden","true"),n},position:20}),e.push({render(t,n,s,o){let l=document.createElement("span");l.className="cm-completionLabel";let a=t.displayLabel||t.label,r=0;for(let h=0;h<o.length;){let c=o[h++],f=o[h++];c>r&&l.appendChild(document.createTextNode(a.slice(r,c)));let p=l.appendChild(document.createElement("span"));p.appendChild(document.createTextNode(a.slice(c,f))),p.className="cm-completionMatchedText",r=f}return r<a.length&&l.appendChild(document.createTextNode(a.slice(r))),l},position:50},{render(t){if(!t.detail)return null;let n=document.createElement("span");return n.className="cm-completionDetail",n.textContent=t.detail,n},position:80}),e.sort((t,n)=>t.position-n.position).map(t=>t.render)}function Q(i,e,t){if(i<=t)return{from:0,to:i};if(e<0&&(e=0),e<=i>>1){let s=Math.floor(e/t);return{from:s*t,to:(s+1)*t}}let n=Math.ceil((i-e)/t);return{from:i-n*t,to:i-(n-1)*t}}class Ge{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:r=>this.placeInfo(r),key:this},this.space=null,this.currentClass="";let s=e.state.field(t),{options:o,selected:l}=s.open,a=e.state.facet(g);this.optionContent=Xe(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=Q(o.length,l,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",r=>{let{options:h}=e.state.field(t).open;for(let c=r.target,f;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(f=/-(\d+)$/.exec(c.id))&&+f[1]<h.length){this.applyCompletion(e,h[+f[1]]),r.preventDefault();return}if(r.target==this.list){let c=this.list.classList.contains("cm-completionListIncompleteTop")&&r.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains("cm-completionListIncompleteBottom")&&r.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;c!=null&&(e.dispatch({effects:ie.of(c)}),r.preventDefault())}}),this.dom.addEventListener("focusout",r=>{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(g).closeOnBlur&&r.relatedTarget!=e.contentDOM&&e.dispatch({effects:B.of(null)})}),this.showOptions(o,s.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),s=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=s){let{options:o,selected:l,disabled:a}=n.open;(!s.open||s.open.options!=o)&&(this.range=Q(o.length,l,e.state.facet(g).maxRenderedOptions),this.showOptions(o,n.id)),this.updateSel(),a!=((t=s.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of t.split(" "))n&&this.dom.classList.add(n);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=Q(t.options.length,t.selected,this.view.state.facet(g).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:s}=t.options[t.selected],{info:o}=s;if(!o)return;let l=typeof o=="string"?document.createTextNode(o):o(s);if(!l)return;"then"in l?l.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,s)}).catch(a=>Z(this.view.state,a,"completion info")):(this.addInfoPane(l,s),n.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",n.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:s,destroy:o}=e;n.appendChild(s),this.infoDestroy=o||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,s=this.range.from;n;n=n.nextSibling,s++)n.nodeName!="LI"||!n.id?s--:s==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&(n.removeAttribute("aria-selected"),n.removeAttribute("aria-describedby"));return t&&Ze(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),o=this.space;if(!o){let l=this.dom.ownerDocument.documentElement;o={left:0,top:0,right:l.clientWidth,bottom:l.clientHeight}}return s.top>Math.min(o.bottom,t.bottom)-10||s.bottom<Math.max(o.top,t.top)+10?null:this.view.state.facet(g).positionInfo(this.view,t,s,n,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){const s=document.createElement("ul");s.id=t,s.setAttribute("role","listbox"),s.setAttribute("aria-expanded","true"),s.setAttribute("aria-label",this.view.state.phrase("Completions")),s.addEventListener("mousedown",l=>{l.target==s&&l.preventDefault()});let o=null;for(let l=n.from;l<n.to;l++){let{completion:a,match:r}=e[l],{section:h}=a;if(h){let p=typeof h=="string"?h:h.name;if(p!=o&&(l>n.from||n.from==0))if(o=p,typeof h!="string"&&h.header)s.appendChild(h.header(h));else{let u=s.appendChild(document.createElement("completion-section"));u.textContent=p}}const c=s.appendChild(document.createElement("li"));c.id=t+"-"+l,c.setAttribute("role","option");let f=this.optionClass(a);f&&(c.className=f);for(let p of this.optionContent){let u=p(a,this.view.state,this.view,r);u&&c.appendChild(u)}}return n.from&&s.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&s.classList.add("cm-completionListIncompleteBottom"),s}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function Je(i,e){return t=>new Ge(t,i,e)}function Ze(i,e){let t=i.getBoundingClientRect(),n=e.getBoundingClientRect(),s=t.height/i.offsetHeight;n.top<t.top?i.scrollTop-=(t.top-n.top)/s:n.bottom>t.bottom&&(i.scrollTop+=(n.bottom-t.bottom)/s)}function ue(i){return(i.boost||0)*100+(i.apply?10:0)+(i.info?5:0)+(i.type?1:0)}function _e(i,e){let t=[],n=null,s=null,o=c=>{t.push(c);let{section:f}=c.completion;if(f){n||(n=[]);let p=typeof f=="string"?f:f.name;n.some(u=>u.name==p)||n.push(typeof f=="string"?{name:p}:f)}},l=e.facet(g);for(let c of i)if(c.hasResult()){let f=c.result.getMatch;if(c.result.filter===!1)for(let p of c.result.options)o(new fe(p,c.source,f?f(p):[],1e9-t.length));else{let p=e.sliceDoc(c.from,c.to),u,m=l.filterStrict?new Qe(p):new Ke(p);for(let y of c.result.options)if(u=m.match(y.label)){let k=y.displayLabel?f?f(y,u.matched):[]:u.matched,I=u.score+(y.boost||0);if(o(new fe(y,c.source,k,I)),typeof y.section=="object"&&y.section.rank==="dynamic"){let{name:d}=y.section;s||(s=Object.create(null)),s[d]=Math.max(I,s[d]||-1e9)}}}}if(n){let c=Object.create(null),f=0,p=(u,m)=>(u.rank==="dynamic"&&m.rank==="dynamic"?s[m.name]-s[u.name]:0)||(typeof u.rank=="number"?u.rank:1e9)-(typeof m.rank=="number"?m.rank:1e9)||(u.name<m.name?-1:1);for(let u of n.sort(p))f-=1e5,c[u.name]=f;for(let u of t){let{section:m}=u.completion;m&&(u.score+=c[typeof m=="string"?m:m.name])}}let a=[],r=null,h=l.compareCompletions;for(let c of t.sort((f,p)=>p.score-f.score||h(f.completion,p.completion))){let f=c.completion;!r||r.label!=f.label||r.detail!=f.detail||r.type!=null&&f.type!=null&&r.type!=f.type||r.apply!=f.apply||r.boost!=f.boost?a.push(c):ue(c.completion)>ue(r)&&(a[a.length-1]=c),r=c.completion}return a}class R{constructor(e,t,n,s,o,l){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=s,this.selected=o,this.disabled=l}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new R(this.options,de(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,s,o,l){if(s&&!l&&e.some(h=>h.isPending))return s.setDisabled();let a=_e(e,t);if(!a.length)return s&&e.some(h=>h.isPending)?s.setDisabled():null;let r=t.facet(g).selectOnOpen?0:-1;if(s&&s.selected!=r&&s.selected!=-1){let h=s.options[s.selected].completion;for(let c=0;c<a.length;c++)if(a[c].completion==h){r=c;break}}return new R(a,de(n,r),{pos:e.reduce((h,c)=>c.hasResult()?Math.min(h,c.from):h,1e8),create:ot,above:o.aboveCursor},s?s.timestamp:Date.now(),r,!1)}map(e){return new R(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new R(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class V{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new V(nt,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,n=t.facet(g),o=(n.override||t.languageDataAt("autocomplete",A(t)).map(ze)).map(r=>(this.active.find(c=>c.source==r)||new w(r,this.active.some(c=>c.state!=0)?1:0)).update(e,n));o.length==this.active.length&&o.every((r,h)=>r==this.active[h])&&(o=this.active);let l=this.open,a=e.effects.some(r=>r.is(ne));l&&e.docChanged&&(l=l.map(e.changes)),e.selection||o.some(r=>r.hasResult()&&e.changes.touchesRange(r.from,r.to))||!et(o,this.active)||a?l=R.build(o,t,this.id,l,n,a):l&&l.disabled&&!o.some(r=>r.isPending)&&(l=null),!l&&o.every(r=>!r.isPending)&&o.some(r=>r.hasResult())&&(o=o.map(r=>r.hasResult()?new w(r.source,0):r));for(let r of e.effects)r.is(ie)&&(l=l&&l.setSelected(r.value,this.id));return o==this.active&&l==this.open?this:new V(o,this.id,l)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?tt:it}}function et(i,e){if(i==e)return!0;for(let t=0,n=0;;){for(;t<i.length&&!i[t].hasResult();)t++;for(;n<e.length&&!e[n].hasResult();)n++;let s=t==i.length,o=n==e.length;if(s||o)return s==o;if(i[t++].result!=e[n++].result)return!1}}const tt={"aria-autocomplete":"list"},it={};function de(i,e){let t={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":i};return e>-1&&(t["aria-activedescendant"]=i+"-"+e),t}const nt=[];function Ie(i,e){if(i.isUserEvent("input.complete")){let n=i.annotation(te);if(n&&e.activateOnCompletion(n))return 12}let t=i.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:i.isUserEvent("delete.backward")?2:i.selection?8:i.docChanged?16:0}class w{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let n=Ie(e,t),s=this;(n&8||n&16&&this.touches(e))&&(s=new w(s.source,0)),n&4&&s.state==0&&(s=new w(this.source,1)),s=s.updateFor(e,n);for(let o of e.effects)if(o.is(j))s=new w(s.source,1,o.value);else if(o.is(B))s=new w(s.source,0);else if(o.is(ne))for(let l of o.value)l.source==s.source&&(s=l);return s}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(A(e.state))}}class P extends w{constructor(e,t,n,s,o,l){super(e,3,t),this.limit=n,this.result=s,this.from=o,this.to=l}hasResult(){return!0}updateFor(e,t){var n;if(!(t&3))return this.map(e.changes);let s=this.result;s.map&&!e.changes.empty&&(s=s.map(s,e.changes));let o=e.changes.mapPos(this.from),l=e.changes.mapPos(this.to,1),a=A(e.state);if(a>l||!s||t&2&&(A(e.startState)==this.from||a<this.limit))return new w(this.source,t&4?1:0);let r=e.changes.mapPos(this.limit);return st(s.validFor,e.state,o,l)?new P(this.source,this.explicit,r,s,o,l):s.update&&(s=s.update(s,o,l,new ve(e.state,a,!1)))?new P(this.source,this.explicit,r,s,s.from,(n=s.to)!==null&&n!==void 0?n:A(e.state)):new w(this.source,1,this.explicit)}map(e){if(e.empty)return this;let t=this.result.map?this.result.map(this.result,e):this.result;return t?new P(this.source,this.explicit,e.mapPos(this.limit),t,e.mapPos(this.from),e.mapPos(this.to,1)):new w(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function st(i,e,t,n){if(!i)return!1;let s=e.sliceDoc(t,n);return typeof i=="function"?i(s,t,n,e):Se(i,!0).test(s)}const ne=O.define({map(i,e){return i.map(t=>t.map(e))}}),x=_.define({create(){return V.start()},update(i,e){return i.update(e)},provide:i=>[$e.from(i,e=>e.tooltip),L.contentAttributes.from(i,e=>e.attrs)]});function se(i,e){const t=e.completion.apply||e.completion.label;let n=i.state.field(x).active.find(s=>s.source==e.source);return n instanceof P?(typeof t=="string"?i.dispatch({...qe(i.state,t,n.from,n.to),annotations:te.of(e.completion)}):t(i,e.completion,n.from,n.to),!0):!1}const ot=Je(x,se);function U(i,e="option"){return t=>{let n=t.state.field(x,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp<t.state.facet(g).interactionDelay)return!1;let s=1,o;e=="page"&&(o=Ce(t,n.open.tooltip))&&(s=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:l}=n.open.options,a=n.open.selected>-1?n.open.selected+s*(i?1:-1):i?0:l-1;return a<0?a=e=="page"?0:l-1:a>=l&&(a=e=="page"?l-1:0),t.dispatch({effects:ie.of(a)}),!0}}const lt=i=>{let e=i.state.field(x,!1);return i.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<i.state.facet(g).interactionDelay?!1:se(i,e.open.options[e.open.selected])},Y=i=>i.state.field(x,!1)?(i.dispatch({effects:j.of(!0)}),!0):!1,rt=i=>{let e=i.state.field(x,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(i.dispatch({effects:B.of(null)}),!0)};class at{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const ct=50,ft=1e3,ht=We.fromClass(class{constructor(i){this.view=i,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of i.state.field(x).active)e.isPending&&this.startQuery(e)}update(i){let e=i.state.field(x),t=i.state.facet(g);if(!i.selectionSet&&!i.docChanged&&i.startState.field(x)==e)return;let n=i.transactions.some(o=>{let l=Ie(o,t);return l&8||(o.selection||o.docChanged)&&!(l&3)});for(let o=0;o<this.running.length;o++){let l=this.running[o];if(n||l.context.abortOnDocChange&&i.docChanged||l.updates.length+i.transactions.length>ct&&Date.now()-l.time>ft){for(let a of l.context.abortListeners)try{a()}catch(r){Z(this.view.state,r)}l.context.abortListeners=null,this.running.splice(o--,1)}else l.updates.push(...i.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),i.transactions.some(o=>o.effects.some(l=>l.is(j)))&&(this.pendingStart=!0);let s=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.isPending&&!this.running.some(l=>l.active.source==o.source))?setTimeout(()=>this.startUpdate(),s):-1,this.composing!=0)for(let o of i.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:i}=this.view,e=i.field(x);for(let t of e.active)t.isPending&&!this.running.some(n=>n.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(g).updateSyncTime))}startQuery(i){let{state:e}=this.view,t=A(e),n=new ve(e,t,i.explicit,this.view),s=new at(i,n);this.running.push(s),Promise.resolve(i.source(n)).then(o=>{s.context.aborted||(s.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:B.of(null)}),Z(this.view.state,o)})}scheduleAccept(){this.running.every(i=>i.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(g).updateSyncTime))}accept(){var i;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(g),n=this.view.state.field(x);for(let s=0;s<this.running.length;s++){let o=this.running[s];if(o.done===void 0)continue;if(this.running.splice(s--,1),o.done){let a=A(o.updates.length?o.updates[0].startState:this.view.state),r=Math.min(a,o.done.from+(o.active.explicit?0:1)),h=new P(o.active.source,o.active.explicit,r,o.done,o.done.from,(i=o.done.to)!==null&&i!==void 0?i:a);for(let c of o.updates)h=h.update(c,t);if(h.hasResult()){e.push(h);continue}}let l=n.active.find(a=>a.source==o.active.source);if(l&&l.isPending)if(o.done==null){let a=new w(o.active.source,0);for(let r of o.updates)a=a.update(r,t);a.isPending||e.push(a)}else this.startQuery(l)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:ne.of(e)})}},{eventHandlers:{blur(i){let e=this.view.state.field(x,!1);if(e&&e.tooltip&&this.view.state.facet(g).closeOnBlur){let t=e.open&&Ce(this.view,e.open.tooltip);(!t||!t.dom.contains(i.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:B.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:j.of(!1)}),20),this.composing=0}}}),pt=typeof navigator=="object"&&/Win/.test(navigator.platform),ut=ee.highest(L.domEventHandlers({keydown(i,e){let t=e.state.field(x,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||i.key.length>1||i.ctrlKey&&!(pt&&i.altKey)||i.metaKey)return!1;let n=t.open.options[t.open.selected],s=t.active.find(l=>l.source==n.source),o=n.completion.commitCharacters||s.result.commitCharacters;return o&&o.indexOf(i.key)>-1&&se(e,n),!1}})),Te=L.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class dt{constructor(e,t,n,s){this.field=e,this.line=t,this.from=n,this.to=s}}class oe{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,G.TrackDel),n=e.mapPos(this.to,1,G.TrackDel);return t==null||n==null?null:new oe(this.field,t,n)}}class le{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],s=[t],o=e.doc.lineAt(t),l=/^\s*/.exec(o.text)[0];for(let r of this.lines){if(n.length){let h=l,c=/^\t*/.exec(r)[0].length;for(let f=0;f<c;f++)h+=e.facet(je);s.push(t+h.length-c),r=h+r.slice(c)}n.push(r),t+=r.length+1}let a=this.fieldPositions.map(r=>new oe(r.field,s[r.line]+r.from,s[r.line]+r.to));return{text:n,ranges:a}}static parse(e){let t=[],n=[],s=[],o;for(let l of e.split(/\r\n?|\n/)){for(;o=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(l);){let a=o[1]?+o[1]:null,r=o[2]||o[3]||"",h=-1;a===0&&(a=1e9);let c=r.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f<t.length;f++)(a!=null?t[f].seq==a:c&&t[f].name==c)&&(h=f);if(h<0){let f=0;for(;f<t.length&&(a==null||t[f].seq!=null&&t[f].seq<a);)f++;t.splice(f,0,{seq:a,name:c}),h=f;for(let p of s)p.field>=h&&p.field++}for(let f of s)if(f.line==n.length&&f.from>o.index){let p=o[2]?3+(o[1]||"").length:2;f.from-=p,f.to-=p}s.push(new dt(h,n.length,o.index,o.index+c.length)),l=l.slice(0,o.index)+r+l.slice(o.index+o[0].length)}l=l.replace(/\\([{}])/g,(a,r,h)=>{for(let c of s)c.line==n.length&&c.from>h&&(c.from--,c.to--);return r}),n.push(l)}return new le(n,s)}}let mt=H.widget({widget:new class extends Ue{toDOM(){let i=document.createElement("span");return i.className="cm-snippetFieldPosition",i}ignoreEvent(){return!1}}}),gt=H.mark({class:"cm-snippetField"});class M{constructor(e,t){this.ranges=e,this.active=t,this.deco=H.set(e.map(n=>(n.from==n.to?mt:gt).range(n.from,n.to)),!0)}map(e){let t=[];for(let n of this.ranges){let s=n.map(e);if(!s)return null;t.push(s)}return new M(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(n=>n.field==this.active&&n.from<=t.from&&n.to>=t.to))}}const W=O.define({map(i,e){return i&&i.map(e)}}),yt=O.define(),F=_.define({create(){return null},update(i,e){for(let t of e.effects){if(t.is(W))return t.value;if(t.is(yt)&&i)return new M(i.ranges,t.value)}return i&&e.docChanged&&(i=i.map(e.changes)),i&&e.selection&&!i.selectionInsideField(e.selection)&&(i=null),i},provide:i=>L.decorations.from(i,e=>e?e.deco:H.none)});function re(i,e){return C.create(i.filter(t=>t.field==e).map(t=>C.range(t.from,t.to)))}function bt(i){let e=le.parse(i);return(t,n,s,o)=>{let{text:l,ranges:a}=e.instantiate(t.state,s),{main:r}=t.state.selection,h={changes:{from:s,to:o==r.from?r.to:o,insert:Fe.of(l)},scrollIntoView:!0,annotations:n?[te.of(n),Be.userEvent.of("input.complete")]:void 0};if(a.length&&(h.selection=re(a,0)),a.some(c=>c.field>0)){let c=new M(a,0),f=h.effects=[W.of(c)];t.state.field(F,!1)===void 0&&f.push(O.appendConfig.of([F,St,It,Te]))}t.dispatch(t.state.update(h))}}function Oe(i){return({state:e,dispatch:t})=>{let n=e.field(F,!1);if(!n||i<0&&n.active==0)return!1;let s=n.active+i,o=i>0&&!n.ranges.some(l=>l.field==s+i);return t(e.update({selection:re(n.ranges,s),effects:W.of(o?null:new M(n.ranges,s)),scrollIntoView:!0})),!0}}const xt=({state:i,dispatch:e})=>i.field(F,!1)?(e(i.update({effects:W.of(null)})),!0):!1,Ct=Oe(1),wt=Oe(-1),vt=[{key:"Tab",run:Ct,shift:wt},{key:"Escape",run:xt}],me=be.define({combine(i){return i.length?i[0]:vt}}),St=ee.highest(we.compute([me],i=>i.facet(me)));function Ut(i,e){return{...e,apply:bt(i)}}const It=L.domEventHandlers({mousedown(i,e){let t=e.state.field(F,!1),n;if(!t||(n=e.posAtCoords({x:i.clientX,y:i.clientY}))==null)return!1;let s=t.ranges.find(o=>o.from<=n&&o.to>=n);return!s||s.field==t.active?!1:(e.dispatch({selection:re(t.ranges,s.field),effects:W.of(t.ranges.some(o=>o.field>s.field)?new M(t.ranges,s.field):null),scrollIntoView:!0}),!0)}}),$={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},E=O.define({map(i,e){let t=e.mapPos(i,-1,G.TrackAfter);return t??void 0}}),ae=new class extends Me{};ae.startSide=1;ae.endSide=-1;const Ee=_.define({create(){return Pe.empty},update(i,e){if(i=i.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);i=i.update({filter:n=>n>=t.from&&n<=t.to})}for(let t of e.effects)t.is(E)&&(i=i.update({add:[ae.range(t.value,t.value+1)]}));return i}});function jt(){return[Ot,Ee]}const X="()[]{}<>«»»«[]{}";function Ae(i){for(let e=0;e<X.length;e+=2)if(X.charCodeAt(e)==i)return X.charAt(e+1);return xe(i<128?i:i+1)}function De(i,e){return i.languageDataAt("closeBrackets",e)[0]||$}const Tt=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Ot=L.inputHandler.of((i,e,t,n)=>{if((Tt?i.composing:i.compositionStarted)||i.state.readOnly)return!1;let s=i.state.selection.main;if(n.length>2||n.length==2&&T(v(n,0))==1||e!=s.from||t!=s.to)return!1;let o=At(i.state,n);return o?(i.dispatch(o),!0):!1}),Et=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let n=De(i,i.selection.main.head).brackets||$.brackets,s=null,o=i.changeByRange(l=>{if(l.empty){let a=Dt(i.doc,l.head);for(let r of n)if(r==a&&z(i.doc,l.head)==Ae(v(r,0)))return{changes:{from:l.head-r.length,to:l.head+r.length},range:C.cursor(l.head-r.length)}}return{range:s=l}});return s||e(i.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!s},Vt=[{key:"Backspace",run:Et}];function At(i,e){let t=De(i,i.selection.main.head),n=t.brackets||$.brackets;for(let s of n){let o=Ae(v(s,0));if(e==s)return o==s?Lt(i,s,n.indexOf(s+s+s)>-1,t):Rt(i,s,o,t.before||$.before);if(e==o&&Re(i,i.selection.main.from))return Pt(i,s,o)}return null}function Re(i,e){let t=!1;return i.field(Ee).between(0,i.doc.length,n=>{n==e&&(t=!0)}),t}function z(i,e){let t=i.sliceString(e,e+2);return t.slice(0,T(v(t,0)))}function Dt(i,e){let t=i.sliceString(e-2,e);return T(v(t,0))==t.length?t:t.slice(1)}function Rt(i,e,t,n){let s=null,o=i.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:t,from:l.to}],effects:E.of(l.to+e.length),range:C.range(l.anchor+e.length,l.head+e.length)};let a=z(i.doc,l.head);return!a||/\s/.test(a)||n.indexOf(a)>-1?{changes:{insert:e+t,from:l.head},effects:E.of(l.head+e.length),range:C.cursor(l.head+e.length)}:{range:s=l}});return s?null:i.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Pt(i,e,t){let n=null,s=i.changeByRange(o=>o.empty&&z(i.doc,o.head)==t?{changes:{from:o.head,to:o.head+t.length,insert:t},range:C.cursor(o.head+t.length)}:n={range:o});return n?null:i.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Lt(i,e,t,n){let s=n.stringPrefixes||$.stringPrefixes,o=null,l=i.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:E.of(a.to+e.length),range:C.range(a.anchor+e.length,a.head+e.length)};let r=a.head,h=z(i.doc,r),c;if(h==e){if(ge(i,r))return{changes:{insert:e+e,from:r},effects:E.of(r+e.length),range:C.cursor(r+e.length)};if(Re(i,r)){let p=t&&i.sliceDoc(r,r+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:r,to:r+p.length,insert:p},range:C.cursor(r+p.length)}}}else{if(t&&i.sliceDoc(r-2*e.length,r)==e+e&&(c=ye(i,r-2*e.length,s))>-1&&ge(i,c))return{changes:{insert:e+e+e+e,from:r},effects:E.of(r+e.length),range:C.cursor(r+e.length)};if(i.charCategorizer(r)(h)!=J.Word&&ye(i,r,s)>-1&&!Mt(i,r,e,s))return{changes:{insert:e+e,from:r},effects:E.of(r+e.length),range:C.cursor(r+e.length)}}return{range:o=a}});return o?null:i.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function ge(i,e){let t=q(i).resolveInner(e+1);return t.parent&&t.from==e}function Mt(i,e,t,n){let s=q(i).resolveInner(e,-1),o=n.reduce((l,a)=>Math.max(l,a.length),0);for(let l=0;l<5;l++){let a=i.sliceDoc(s.from,Math.min(s.to,s.from+t.length+o)),r=a.indexOf(t);if(!r||r>-1&&n.indexOf(a.slice(0,r))>-1){let c=s.firstChild;for(;c&&c.from==s.from&&c.to-c.from>t.length+r;){if(i.sliceDoc(c.to-t.length,c.to)==t)return!1;c=c.firstChild}return!0}let h=s.to==e&&s.parent;if(!h)break;s=h}return!1}function ye(i,e,t){let n=i.charCategorizer(e);if(n(i.sliceDoc(e-1,e))!=J.Word)return e;for(let s of t){let o=e-s.length;if(i.sliceDoc(o,e)==s&&n(i.sliceDoc(o-1,o))!=J.Word)return o}return-1}function Ht(i={}){return[ut,x,g.of(i),ht,Bt,Te]}const kt=[{key:"Ctrl-Space",run:Y},{mac:"Alt-`",run:Y},{mac:"Alt-i",run:Y},{key:"Escape",run:rt},{key:"ArrowDown",run:U(!0)},{key:"ArrowUp",run:U(!1)},{key:"PageDown",run:U(!0,"page")},{key:"PageUp",run:U(!1,"page")},{key:"Enter",run:lt}],Bt=ee.highest(we.computeN([g],i=>i.facet(g).defaultKeymap?[kt]:[]));export{ve as C,Ht as a,Vt as b,jt as c,kt as d,He as e,Nt as i,Ut as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as w,E as $,a as R}from"./index-BhTNEiv0.js";import{s as W,t,d as z,I as k}from"./index-DO6gKWcT.js";import{L as x,k as T,l as G,n as U,o as _,p as q,e as F}from"./index-CzPnlrTh.js";import"./index-BHot-lnj.js";import"./index-891wE-Rj.js";const Z=145,j=1,E=146,C=147,f=2,N=148,V=3,I=4,X=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],D=58,K=40,b=95,B=91,c=45,A=46,J=35,L=37,H=38,M=92,ee=10,Oe=42;function Q(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function m(e){return e>=48&&e<=57}function g(e){return m(e)||e>=97&&e<=102||e>=65&&e<=70}const v=(e,r,i)=>(O,a)=>{for(let o=!1,l=0,n=0;;n++){let{next:s}=O;if(Q(s)||s==c||s==b||o&&m(s))!o&&(s!=c||n>0)&&(o=!0),l===n&&s==c&&l++,O.advance();else if(s==M&&O.peek(1)!=ee){if(O.advance(),g(O.next)){do O.advance();while(g(O.next));O.next==32&&O.advance()}else O.next>-1&&O.advance();o=!0}else{o&&O.acceptToken(l==2&&a.canShift(f)?r:s==K?i:e);break}}},ae=new $(v(E,f,C),{contextual:!0}),re=new $(v(N,V,I),{contextual:!0}),te=new $(e=>{if(X.includes(e.peek(-1))){let{next:r}=e;(Q(r)||r==b||r==J||r==A||r==Oe||r==B||r==D&&Q(e.peek(1))||r==c||r==H)&&e.acceptToken(Z)}}),oe=new $(e=>{if(!X.includes(e.peek(-1))){let{next:r}=e;if(r==L&&(e.advance(),e.acceptToken(j)),Q(r)){do e.advance();while(Q(e.next)||m(e.next));e.acceptToken(j)}}}),le=W({"AtKeyword import charset namespace keyframes media supports font-feature-values":t.definitionKeyword,"from to selector scope MatchFlag":t.keyword,NamespaceName:t.namespace,KeyframeName:t.labelName,KeyframeRangeName:t.operatorKeyword,TagName:t.tagName,ClassName:t.className,PseudoClassName:t.constant(t.className),IdName:t.labelName,"FeatureName PropertyName":t.propertyName,AttributeName:t.attributeName,NumberLiteral:t.number,KeywordQuery:t.keyword,UnaryQueryOp:t.operatorKeyword,"CallTag ValueName FontName":t.atom,VariableName:t.variableName,Callee:t.operatorKeyword,Unit:t.unit,"UniversalSelector NestingSelector":t.definitionOperator,"MatchOp CompareOp":t.compareOperator,"ChildOp SiblingOp, LogicOp":t.logicOperator,BinOp:t.arithmeticOperator,Important:t.modifier,Comment:t.blockComment,ColorLiteral:t.color,"ParenthesizedContent StringLiteral":t.string,":":t.punctuation,"PseudoOp #":t.derefOperator,"; , |":t.separator,"( )":t.paren,"[ ]":t.squareBracket,"{ }":t.brace}),ie={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:152,"url-prefix":152,domain:152,regexp:152},ne={__proto__:null,or:104,and:104,not:112,only:112,layer:206},se={__proto__:null,selector:118,style:124,layer:202},de={__proto__:null,"@import":198,"@media":210,"@charset":214,"@namespace":218,"@keyframes":224,"@supports":236,"@scope":240,"@font-feature-values":246},Qe={__proto__:null,to:243},ce=w.deserialize({version:14,states:"MlQYQdOOO#}QdOOP$UO`OOO%OQaO'#CfOOQP'#Ce'#CeO%VQdO'#CgO%[Q`O'#CgO%aQaO'#FnO&XQdO'#CkO&xQaO'#CcO'SQdO'#CnO'_QdO'#EOO'dQdO'#EQO'oQdO'#EXO'oQdO'#E[OOQP'#Fn'#FnO)RQhO'#E}OOQS'#Fm'#FmOOQS'#FQ'#FQQYQdOOO)YQdO'#EbO*iQhO'#EhO)YQdO'#EjO*pQdO'#ElO*{QdO'#EoO)}QhO'#EuO+TQdO'#EwO+`QdO'#EzO+eQaO'#CfO+lQ`O'#E_O+qQ`O'#F{O+|QdO'#F{QOQ`OOP,WO&jO'#CaPOOO)CA])CA]OOQP'#Ci'#CiOOQP,59R,59RO%VQdO,59ROOQP'#Cm'#CmOOQP,59V,59VO&XQdO,59VO,cQdO,59YO'_QdO,5:jO'dQdO,5:lO'oQdO,5:sO'oQdO,5:uO'oQdO,5:vO'oQdO'#FXO,nQ`O,58}O,vQdO'#E^OOQS,58},58}OOQP'#Cq'#CqOOQO'#D|'#D|OOQP,59Y,59YO,}Q`O,59YO-SQ`O,59YOOQP'#EP'#EPOOQP,5:j,5:jO-XQpO'#ERO-dQdO'#ESO-iQ`O'#ESO-nQpO,5:lO.XQaO,5:sO.oQaO,5:vOOQW'#D^'#D^O/nQhO'#DgO0RQhO,5;iO)}QhO'#DeO0`Q`O'#DnO0eQhO'#DxOOQW'#Ft'#FtOOQS,5;i,5;iO0jQ`O'#D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Names:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NamespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector StyleQuery style ParenthesedQuery CallQuery ArgList , UnaryQuery ParenthesedQuery BinaryQuery ParenthesedQuery ParenthesedQuery StyleFeature StyleRange PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",maxTerm:172,nodeProps:[["isolate",-2,5,39,""],["openedBy",23,"(",31,"[",34,"{"],["closedBy",24,")",32,"]",35,"}"]],propSources:[le],skippedNodes:[0,5,127],repeatNodeCount:17,tokenData:"K`~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu2Xuv%Zvw3Rwx3dxy5Ryz5dz{5i{|6S|}:u}!O;W!O!P;u!P!Q<^!Q![=V![!]>Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf#p#qIw#q#rJ`#r#sJq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{<%lO%jbFoU!o`Oy%jz#f%j#f#gGR#g;'S%j;'S;=`%{<%lO%jbGWU!o`Oy%jz#h%j#h#iGj#i;'S%j;'S;=`%{<%lO%jbGoU!o`Oy%jz#T%j#T#UHR#U;'S%j;'S;=`%{<%lO%jbHWU!o`Oy%jz#b%j#b#cHj#c;'S%j;'S;=`%{<%lO%jbHoU!o`Oy%jz#h%j#h#iIR#i;'S%j;'S;=`%{<%lO%jbIYS$pQ!o`Oy%jz;'S%j;'S;=`%{<%lO%jjIkSsYOy%jz;'S%j;'S;=`%{<%lO%jfI|U$cUOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jjJeSrYOy%jz;'S%j;'S;=`%{<%lO%jfJvU#PQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",tokenizers:[te,oe,ae,re,1,2,3,4,new R("m~RRYZ[z{a~~g~aO$_~~dP!P!Qg~lO$`~~",28,152)],topRules:{StyleSheet:[0,6],Styles:[1,126]},dynamicPrecedences:{94:1},specialized:[{term:147,get:e=>ie[e]||-1},{term:148,get:e=>ne[e]||-1},{term:4,get:e=>se[e]||-1},{term:28,get:e=>de[e]||-1},{term:146,get:e=>Qe[e]||-1}],tokenPrec:2405});let u=null;function p(){if(!u&&typeof document=="object"&&document.body){let{style:e}=document.body,r=[],i=new Set;for(let O in e)O!="cssText"&&O!="cssFloat"&&typeof e[O]=="string"&&(/[A-Z]/.test(O)&&(O=O.replace(/[A-Z]/g,a=>"-"+a.toLowerCase())),i.has(O)||(r.push(O),i.add(O)));u=r.sort().map(O=>({type:"property",label:O,apply:O+": "}))}return u||[]}const S=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),h=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),$e=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),ue=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(e=>({type:"keyword",label:e})),d=/^(\w[\w-]*|-\w[\w-]*|)$/,pe=/^-(-[\w-]*)?$/;function me(e,r){var i;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let O=(i=e.parent)===null||i===void 0?void 0:i.firstChild;return(O==null?void 0:O.name)!="Callee"?!1:r.sliceString(O.from,O.to)=="var"}const y=new z,je=["Declaration"];function ge(e){for(let r=e;;){if(r.type.isTop)return r;if(!(r=r.parent))return e}}function Y(e,r,i){if(r.to-r.from>4096){let O=y.get(r);if(O)return O;let a=[],o=new Set,l=r.cursor(k.IncludeAnonymous);if(l.firstChild())do for(let n of Y(e,l.node,i))o.has(n.label)||(o.add(n.label),a.push(n));while(l.nextSibling());return y.set(r,a),a}else{let O=[],a=new Set;return r.cursor().iterate(o=>{var l;if(i(o)&&o.matchContext(je)&&((l=o.node.nextSibling)===null||l===void 0?void 0:l.name)==":"){let n=e.sliceString(o.from,o.to);a.has(n)||(a.add(n),O.push({label:n,type:"variable"}))}}),O}}const Se=e=>r=>{let{state:i,pos:O}=r,a=F(i).resolveInner(O,-1),o=a.type.isError&&a.from==a.to-1&&i.doc.sliceString(a.from,a.to)=="-";if(a.name=="PropertyName"||(o||a.name=="TagName")&&/^(Block|Styles)$/.test(a.resolve(a.to).name))return{from:a.from,options:p(),validFor:d};if(a.name=="ValueName")return{from:a.from,options:h,validFor:d};if(a.name=="PseudoClassName")return{from:a.from,options:S,validFor:d};if(e(a)||(r.explicit||o)&&me(a,i.doc))return{from:e(a)||o?a.from:O,options:Y(i.doc,ge(a),e),validFor:pe};if(a.name=="TagName"){for(let{parent:s}=a;s;s=s.parent)if(s.name=="Block")return{from:a.from,options:p(),validFor:d};return{from:a.from,options:$e,validFor:d}}if(a.name=="AtKeyword")return{from:a.from,options:ue,validFor:d};if(!r.explicit)return null;let l=a.resolve(O),n=l.childBefore(O);return n&&n.name==":"&&l.name=="PseudoClassSelector"?{from:O,options:S,validFor:d}:n&&n.name==":"&&l.name=="Declaration"||l.name=="ArgList"?{from:O,options:h,validFor:d}:l.name=="Block"||l.name=="Styles"?{from:O,options:p(),validFor:d}:null},he=Se(e=>e.name=="VariableName"),P=T.define({name:"css",parser:ce.configure({props:[G.add({Declaration:U()}),_.add({"Block KeyframeList":q})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function ve(){return new x(P,P.data.of({autocomplete:he}))}export{ve as css,he as cssCompletionSource,P as cssLanguage,Se as defineCSSCompletionSource};
|
|
1
|
+
import{L as w,E as $,a as R}from"./index-BIhkivIg.js";import{s as W,t,d as z,I as k}from"./index-9Toz507b.js";import{L as x,k as T,l as G,n as U,o as _,p as q,e as F}from"./index-xSo7_4Td.js";import"./index-BHot-lnj.js";import"./index-891wE-Rj.js";const Z=145,j=1,E=146,C=147,f=2,N=148,V=3,I=4,X=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],D=58,K=40,b=95,B=91,c=45,A=46,J=35,L=37,H=38,M=92,ee=10,Oe=42;function Q(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function m(e){return e>=48&&e<=57}function g(e){return m(e)||e>=97&&e<=102||e>=65&&e<=70}const v=(e,r,i)=>(O,a)=>{for(let o=!1,l=0,n=0;;n++){let{next:s}=O;if(Q(s)||s==c||s==b||o&&m(s))!o&&(s!=c||n>0)&&(o=!0),l===n&&s==c&&l++,O.advance();else if(s==M&&O.peek(1)!=ee){if(O.advance(),g(O.next)){do O.advance();while(g(O.next));O.next==32&&O.advance()}else O.next>-1&&O.advance();o=!0}else{o&&O.acceptToken(l==2&&a.canShift(f)?r:s==K?i:e);break}}},ae=new $(v(E,f,C),{contextual:!0}),re=new $(v(N,V,I),{contextual:!0}),te=new $(e=>{if(X.includes(e.peek(-1))){let{next:r}=e;(Q(r)||r==b||r==J||r==A||r==Oe||r==B||r==D&&Q(e.peek(1))||r==c||r==H)&&e.acceptToken(Z)}}),oe=new $(e=>{if(!X.includes(e.peek(-1))){let{next:r}=e;if(r==L&&(e.advance(),e.acceptToken(j)),Q(r)){do e.advance();while(Q(e.next)||m(e.next));e.acceptToken(j)}}}),le=W({"AtKeyword import charset namespace keyframes media supports font-feature-values":t.definitionKeyword,"from to selector scope MatchFlag":t.keyword,NamespaceName:t.namespace,KeyframeName:t.labelName,KeyframeRangeName:t.operatorKeyword,TagName:t.tagName,ClassName:t.className,PseudoClassName:t.constant(t.className),IdName:t.labelName,"FeatureName PropertyName":t.propertyName,AttributeName:t.attributeName,NumberLiteral:t.number,KeywordQuery:t.keyword,UnaryQueryOp:t.operatorKeyword,"CallTag ValueName FontName":t.atom,VariableName:t.variableName,Callee:t.operatorKeyword,Unit:t.unit,"UniversalSelector NestingSelector":t.definitionOperator,"MatchOp CompareOp":t.compareOperator,"ChildOp SiblingOp, LogicOp":t.logicOperator,BinOp:t.arithmeticOperator,Important:t.modifier,Comment:t.blockComment,ColorLiteral:t.color,"ParenthesizedContent StringLiteral":t.string,":":t.punctuation,"PseudoOp #":t.derefOperator,"; , |":t.separator,"( )":t.paren,"[ ]":t.squareBracket,"{ }":t.brace}),ie={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:152,"url-prefix":152,domain:152,regexp:152},ne={__proto__:null,or:104,and:104,not:112,only:112,layer:206},se={__proto__:null,selector:118,style:124,layer:202},de={__proto__:null,"@import":198,"@media":210,"@charset":214,"@namespace":218,"@keyframes":224,"@supports":236,"@scope":240,"@font-feature-values":246},Qe={__proto__:null,to:243},ce=w.deserialize({version:14,states:"MlQYQdOOO#}QdOOP$UO`OOO%OQaO'#CfOOQP'#Ce'#CeO%VQdO'#CgO%[Q`O'#CgO%aQaO'#FnO&XQdO'#CkO&xQaO'#CcO'SQdO'#Cn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P'[V&Y$r&]'[R#YkQ#`qR%S#`QcOSoP!RU!lco%PR%P#[Q%]#q[&l%]&r'i'q'r(aQ&r%aQ'i&mQ'q&wQ'r&yR(a(UQ$[!nQ$^!oQ$`!pV%v$[$^$`Q&Q$iR'X&QQ&v%iS'p&v(VR(V'qQ&n%]R'j&nQ&j%YR'h&jQ!QXR#m!QQ&d${R'c&dQ#]nS%Q#]%RR%R#^Q'y'RR(['yQ$m!yR&U$mQ&]$rR'_&]Q']&[R(Q']Q#XkR$y#XQ$P!dR%f$P_bOPco!R#[%P^XOPco!R#[%PQ!`]Q!a^Q#i|Q#j}Q#k!OQ#l!PQ$u#SQ%Y#pR'g&iR%^#qQ!rdQ!{f[$X!n!o!p$[$^$`Q${#Zh%[#q%]%a&m&r&w&y'i'q'r(U(aQ%`#vQ%z$cS&b${&dQ&h%WQ'b&cR'{'T]$Z!n!o!p$[$^$`Q!d`U!ye!r$gQ#RiQ#y!cS#|!d$PQ$R!eQ%d#}Q%e$OQ%i$SS&O$i&QQ&T$lR'n&uQ#{!cW%r$W%m&{'uQ&t%bQ'w'OQ(T'mR(c(YQ%u$WQ&z%mQ't&{R(X'uX%t$W%m&{'uR%k$SR%Z#pQpPR#o!RQ!zeQ$f!rR%}$g",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NamespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector StyleQuery style ParenthesedQuery CallQuery ArgList , UnaryQuery ParenthesedQuery BinaryQuery ParenthesedQuery ParenthesedQuery StyleFeature StyleRange PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",maxTerm:172,nodeProps:[["isolate",-2,5,39,""],["openedBy",23,"(",31,"[",34,"{"],["closedBy",24,")",32,"]",35,"}"]],propSources:[le],skippedNodes:[0,5,127],repeatNodeCount:17,tokenData:"K`~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu2Xuv%Zvw3Rwx3dxy5Ryz5dz{5i{|6S|}:u}!O;W!O!P;u!P!Q<^!Q![=V![!]>Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf#p#qIw#q#rJ`#r#sJq#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$KW&R$KW&FU%Z&FU&FV&R&FV;'S%Z;'S;=`KY<%lO%Z`%^SOy%jz;'S%j;'S;=`%{<%lO%j`%oS!o`Oy%jz;'S%j;'S;=`%{<%lO%j`&OP;=`<%l%j~&Wh$[~OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'r$JO$JT%j$JT$JU'r$JU$KV%j$KV$KW'r$KW&FU%j&FU&FV'r&FV;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z!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",tokenizers:[te,oe,ae,re,1,2,3,4,new R("m~RRYZ[z{a~~g~aO$_~~dP!P!Qg~lO$`~~",28,152)],topRules:{StyleSheet:[0,6],Styles:[1,126]},dynamicPrecedences:{94:1},specialized:[{term:147,get:e=>ie[e]||-1},{term:148,get:e=>ne[e]||-1},{term:4,get:e=>se[e]||-1},{term:28,get:e=>de[e]||-1},{term:146,get:e=>Qe[e]||-1}],tokenPrec:2405});let u=null;function p(){if(!u&&typeof document=="object"&&document.body){let{style:e}=document.body,r=[],i=new Set;for(let O in e)O!="cssText"&&O!="cssFloat"&&typeof e[O]=="string"&&(/[A-Z]/.test(O)&&(O=O.replace(/[A-Z]/g,a=>"-"+a.toLowerCase())),i.has(O)||(r.push(O),i.add(O)));u=r.sort().map(O=>({type:"property",label:O,apply:O+": "}))}return u||[]}const S=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),h=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),$e=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),ue=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(e=>({type:"keyword",label:e})),d=/^(\w[\w-]*|-\w[\w-]*|)$/,pe=/^-(-[\w-]*)?$/;function me(e,r){var i;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let O=(i=e.parent)===null||i===void 0?void 0:i.firstChild;return(O==null?void 0:O.name)!="Callee"?!1:r.sliceString(O.from,O.to)=="var"}const y=new z,je=["Declaration"];function ge(e){for(let r=e;;){if(r.type.isTop)return r;if(!(r=r.parent))return e}}function Y(e,r,i){if(r.to-r.from>4096){let O=y.get(r);if(O)return O;let a=[],o=new Set,l=r.cursor(k.IncludeAnonymous);if(l.firstChild())do for(let n of Y(e,l.node,i))o.has(n.label)||(o.add(n.label),a.push(n));while(l.nextSibling());return y.set(r,a),a}else{let O=[],a=new Set;return r.cursor().iterate(o=>{var l;if(i(o)&&o.matchContext(je)&&((l=o.node.nextSibling)===null||l===void 0?void 0:l.name)==":"){let n=e.sliceString(o.from,o.to);a.has(n)||(a.add(n),O.push({label:n,type:"variable"}))}}),O}}const Se=e=>r=>{let{state:i,pos:O}=r,a=F(i).resolveInner(O,-1),o=a.type.isError&&a.from==a.to-1&&i.doc.sliceString(a.from,a.to)=="-";if(a.name=="PropertyName"||(o||a.name=="TagName")&&/^(Block|Styles)$/.test(a.resolve(a.to).name))return{from:a.from,options:p(),validFor:d};if(a.name=="ValueName")return{from:a.from,options:h,validFor:d};if(a.name=="PseudoClassName")return{from:a.from,options:S,validFor:d};if(e(a)||(r.explicit||o)&&me(a,i.doc))return{from:e(a)||o?a.from:O,options:Y(i.doc,ge(a),e),validFor:pe};if(a.name=="TagName"){for(let{parent:s}=a;s;s=s.parent)if(s.name=="Block")return{from:a.from,options:p(),validFor:d};return{from:a.from,options:$e,validFor:d}}if(a.name=="AtKeyword")return{from:a.from,options:ue,validFor:d};if(!r.explicit)return null;let l=a.resolve(O),n=l.childBefore(O);return n&&n.name==":"&&l.name=="PseudoClassSelector"?{from:O,options:S,validFor:d}:n&&n.name==":"&&l.name=="Declaration"||l.name=="ArgList"?{from:O,options:h,validFor:d}:l.name=="Block"||l.name=="Styles"?{from:O,options:p(),validFor:d}:null},he=Se(e=>e.name=="VariableName"),P=T.define({name:"css",parser:ce.configure({props:[G.add({Declaration:U()}),_.add({"Block KeyframeList":q})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function ve(){return new x(P,P.data.of({autocomplete:he}))}export{ve as css,he as cssCompletionSource,P as cssLanguage,Se as defineCSSCompletionSource};
|