TYPO3 v15 dev-main snapshot ()

This commit is contained in:
wappler committed 2026-08-10 22:31:00 +02:00
commit f9941541b7
1178 files changed
+135377

No files matched your search

@@ -0,0 +1 @@
import{Annotation as Qe,StateEffect as I,EditorSelection as v,codePointAt as C,codePointSize as O,fromCodePoint as ce,Facet as fe,combineConfig as Xe,StateField as X,Prec as Y,Text as Ye,Transaction as Ge,MapMode as G,RangeValue as Je,RangeSet as Ze,CharCategory as J}from"@codemirror/state";import{Direction as _e,logException as Z,showTooltip as et,EditorView as R,ViewPlugin as tt,getTooltip as he,Decoration as U,WidgetType as it,keymap as pe}from"@codemirror/view";import{syntaxTree as B,indentUnit as nt}from"@codemirror/language";class _{constructor(e,t,n,o){this.state=e,this.pos=t,this.explicit=n,this.view=o,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=B(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),o=t.text.slice(n-t.from,this.pos-t.from),s=o.search(ge(e,!1));return s<0?null:{from:n+s,to:this.pos,text:o.slice(s)}}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 ue(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 ot(i){let e=Object.create(null),t=Object.create(null);for(let{label:o}of i){e[o[0]]=!0;for(let s=1;s<o.length;s++)t[o[s]]=!0}let n=ue(e)+ue(t)+"*$";return[new RegExp("^"+n),new RegExp(n)]}function de(i){let e=i.map(o=>typeof o=="string"?{label:o}:o),[t,n]=e.every(o=>/^\w+$/.test(o.label))?[/\w*$/,/\w+$/]:ot(e);return o=>{let s=o.matchBefore(n);return s||o.explicit?{from:s?s.from:o.pos,options:e,validFor:t}:null}}function st(i,e){return t=>{for(let n=B(t.state).resolveInner(t.pos,-1);n;n=n.parent){if(i.indexOf(n.name)>-1)return e(t);if(n.type.isTop)break}return null}}function lt(i,e){return t=>{for(let n=B(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 me{constructor(e,t,n,o){this.completion=e,this.source=t,this.match=n,this.score=o}}function T(i){return i.selection.main.from}function ge(i,e){var t;let{source:n}=i,o=e&&n[0]!="^",s=n[n.length-1]!="$";return!o&&!s?i:new RegExp(`${o?"^":""}(?:${n})${s?"$":""}`,(t=i.flags)!==null&&t!==void 0?t:i.ignoreCase?"i":"")}const V=Qe.define();function ye(i,e,t,n){let{main:o}=i.selection,s=t-o.from,l=n-o.from;return Object.assign(Object.assign({},i.changeByRange(r=>r!=o&&t!=n&&i.sliceDoc(r.from+s,r.from+l)!=i.sliceDoc(t,n)?{range:r}:{changes:{from:r.from+s,to:n==o.from?r.to:r.from+l,insert:e},range:v.cursor(r.from+s+e.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}const be=new WeakMap;function rt(i){if(!Array.isArray(i))return i;let e=be.get(i);return e||be.set(i,e=de(i)),e}const H=I.define(),F=I.define();class at{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=C(e,t),o=O(n);this.chars.push(n);let s=e.slice(t,t+o),l=s.toUpperCase();this.folded.push(C(l==s?s.toLowerCase():l,0)),t+=o}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:o,precise:s,byWord:l}=this;if(t.length==1){let d=C(e,0),A=O(d),S=A==e.length?0:-100;if(d!=t[0])if(d==n[0])S+=-200;else return null;return this.ret(S,[0,A])}let r=e.indexOf(this.pattern);if(r==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=t.length,c=0;if(r<0){for(let d=0,A=Math.min(e.length,200);d<A&&c<a;){let S=C(e,d);(S==t[c]||S==n[c])&&(o[c++]=d),d+=O(S)}if(c<a)return null}let f=0,h=0,p=!1,u=0,g=-1,x=-1,K=/[a-z]/.test(e),k=!0;for(let d=0,A=Math.min(e.length,200),S=0;d<A&&h<a;){let b=C(e,d);r<0&&(f<a&&b==t[f]&&(s[f++]=d),u<a&&(b==t[u]||b==n[u]?(u==0&&(g=d),x=d+1,u++):u=0));let N,Q=b<255?b>=48&&b<=57||b>=97&&b<=122?2:b>=65&&b<=90?1:0:(N=ce(b))!=N.toLowerCase()?1:N!=N.toUpperCase()?2:0;(!d||Q==1&&K||S==0&&Q!=0)&&(t[h]==b||n[h]==b&&(p=!0)?l[h++]=d:l.length&&(k=!1)),S=Q,d+=O(b)}return h==a&&l[0]==0&&k?this.result(-100+(p?-200:0),l,e):u==a&&g==0?this.ret(-200-e.length+(x==e.length?0:-100),[0,x]):r>-1?this.ret(-700-e.length,[r,r+this.pattern.length]):u==a?this.ret(-900-e.length,[g,x]):h==a?this.result(-100+(p?-200:0)+-700+(k?0:-1100),l,e):t.length==2?null:this.result((o[0]?-700:0)+-200+-1100,o,e)}result(e,t,n){let o=[],s=0;for(let l of t){let r=l+(this.astral?O(C(n,l)):1);s&&o[s-1]==l?o[s-1]=r:(o[s++]=l,o[s++]=r)}return this.ret(e-n.length,o)}}class ct{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:Line truncated
@@ -0,0 +1 @@
import{Annotation as Me,Facet as be,combineConfig as qt,StateField as Kt,Transaction as X,ChangeSet as $t,ChangeDesc as _t,EditorSelection as h,StateEffect as Qt,Text as Ee,findClusterBreak as O,countColumn as Y,CharCategory as L}from"@codemirror/state";import{EditorView as M,Direction as Xt}from"@codemirror/view";import{IndentContext as Te,getIndentation as Oe,indentString as U,matchBrackets as b,syntaxTree as Z,getIndentUnit as j,indentUnit as Yt}from"@codemirror/language";import{NodeProp as ee}from"@lezer/common";const Ie=e=>{let{state:t}=e,r=t.doc.lineAt(t.selection.main.from),n=te(e.state,r.from);return n.line?Re(e):n.block?Ue(e):!1};function D(e,t){return({state:r,dispatch:n})=>{if(r.readOnly)return!1;let l=e(t,r);return l?(n(r.update(l)),!0):!1}}const Re=D(ne,0),Zt=D(ne,1),jt=D(ne,2),ve=D(N,0),en=D(N,1),tn=D(N,2),Ue=D((e,t)=>N(e,t,rn(t)),0);function te(e,t){let r=e.languageDataAt("commentTokens",t);return r.length?r[0]:{}}const I=50;function nn(e,{open:t,close:r},n,l){let o=e.sliceDoc(n-I,n),c=e.sliceDoc(l,l+I),s=/\s*$/.exec(o)[0].length,i=/^\s*/.exec(c)[0].length,f=o.length-s;if(o.slice(f-t.length,f)==t&&c.slice(i,i+r.length)==r)return{open:{pos:n-s,margin:s&&1},close:{pos:l+i,margin:i&&1}};let u,a;l-n<=2*I?u=a=e.sliceDoc(n,l):(u=e.sliceDoc(n,n+I),a=e.sliceDoc(l-I,l));let d=/^\s*/.exec(u)[0].length,B=/\s*$/.exec(a)[0].length,g=a.length-B-r.length;return u.slice(d,d+t.length)==t&&a.slice(g,g+r.length)==r?{open:{pos:n+d+t.length,margin:/\s/.test(u.charAt(d+t.length))?1:0},close:{pos:l-B-r.length,margin:/\s/.test(a.charAt(g-1))?1:0}}:null}function rn(e){let t=[];for(let r of e.selection.ranges){let n=e.doc.lineAt(r.from),l=r.to<=n.to?n:e.doc.lineAt(r.to),o=t.length-1;o>=0&&t[o].to>n.from?t[o].to=l.to:t.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:l.to})}return t}function N(e,t,r=t.selection.ranges){let n=r.map(o=>te(t,o.from).block);if(!n.every(o=>o))return null;let l=r.map((o,c)=>nn(t,n[c],o.from,o.to));if(e!=2&&!l.every(o=>o))return{changes:t.changes(r.map((o,c)=>l[c]?[]:[{from:o.from,insert:n[c].open+" "},{from:o.to,insert:" "+n[c].close}]))};if(e!=1&&l.some(o=>o)){let o=[];for(let c=0,s;c<l.length;c++)if(s=l[c]){let i=n[c],{open:f,close:u}=s;o.push({from:f.pos-i.open.length,to:f.pos+f.margin},{from:u.pos-u.margin,to:u.pos+i.close.length})}return{changes:o}}return null}function ne(e,t,r=t.selection.ranges){let n=[],l=-1;for(let{from:o,to:c}of r){let s=n.length,i=1e9,f=te(t,o).line;if(f){for(let u=o;u<=c;){let a=t.doc.lineAt(u);if(a.from>l&&(o==c||c>a.from)){l=a.from;let d=/^\s*/.exec(a.text)[0].length,B=d==a.length,g=a.text.slice(d,d+f.length)==f?d:-1;d<a.text.length&&d<i&&(i=d),n.push({line:a,comment:g,token:f,indent:d,empty:B,single:!1})}u=a.to+1}if(i<1e9)for(let u=s;u<n.length;u++)n[u].indent<n[u].line.text.length&&(n[u].indent=i);n.length==s+1&&(n[s].single=!0)}}if(e!=2&&n.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:s,token:i,indent:f,empty:u,single:a}of n)(a||!u)&&o.push({from:s.from+f,insert:i+" "});let c=t.changes(o);return{changes:c,selection:t.selection.map(c,1)}}else if(e!=1&&n.some(o=>o.comment>=0)){let o=[];for(let{line:c,comment:s,token:i}of n)if(s>=0){let f=c.from+s,u=f+i.length;c.text[u-c.from]==" "&&u++,o.push({from:f,to:u})}return{changes:o}}return null}const re=Me.define(),Ne=Me.define(),Ve=be.define(),Fe=be.define({combine(e){return qt(e,{minDepth:100,newGroupDelay:500,joinToEvent:(t,r)=>r},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,r)=>(n,l)=>t(n,l)||r(n,l)})}}),V=Kt.define({create(){return C.empty},update(e,t){let r=t.state.facet(Fe),n=t.annotation(re);if(n){let i=p.fromTransaction(t,n.selection),f=n.side,u=f==0?e.undone:e.done;return i?u=P(u,u.length,r.minDepth,i):u=ze(u,t.startState.selection),new C(f==0?n.rest:u,f==0?u:n.rest)}let l=t.annotation(Ne);if((l=="full"||l=="before")&&(e=e.isolate()),t.annotation(X.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let o=p.fromTransaction(t),c=t.annotation(X.time),s=t.annotation(X.userEvent);return o?e=e.addChanges(o,c,s,r,t):t.selection&&(e=e.addSelection(t.startState.selection,c,s,r.newGroupDelay)),(l=="full"||l=="after")&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(t=>t.toJSON()),undone:e.undone.map(t=>t.toJSON())}},fromJSON(e){return new C(e.done.map(p.fromJSON),e.undone.map(p.fromJSON))}});function on(e={}){return[V,Fe.of(e),M.domEventHandlers({beforeinput(t,r){let n=t.inputType=="historyUndo"?oe:t.inputType=="historyRedo"?G:null;return n?(t.preventDefault(),n(r)):!1}})]}const ln=V;function F(e,t){return function({state:r,dispatch:n}){if(!t&&r.readOnly)return!1;let l=r.field(V,!1);if(!l)return!1;let o=l.pop(e,r,t);return o?(n(o),!0):!1}}const oe=F(0,!1),G=F(1,!1),Ge=F(0,!0),Pe=F(1,!0);function Je(e){return function(t){let r=t.field(V,!1);if(!r)return 0;let n=e==0?r.done:r.undone;return n.length-(n.length&&!n[0].changes?1:0)}}const cn=Je(0),sn=Je(1);class p{constructor(t,r,n,l,o){this.changes=t,this.effects=r,this.mapped=n,this.startSelection=l,this.selectiLine truncated
@@ -0,0 +1 @@
import{parser as v}from"@lezer/css";import{syntaxTree as y,LRLanguage as k,indentNodeProp as x,continuedIndent as z,foldNodeProp as S,foldInside as q,LanguageSupport as C}from"@codemirror/language";import{NodeWeakMap as F,IterMode as N}from"@lezer/common";let c=null;function u(){if(!c&&typeof document=="object"&&document.body){let{style:r}=document.body,a=[],o=new Set;for(let t in r)t!="cssText"&&t!="cssFloat"&&typeof r[t]=="string"&&(/[A-Z]/.test(t)&&(t=t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())),o.has(t)||(a.push(t),o.add(t)));c=a.sort().map(t=>({type:"property",label:t}))}return c||[]}const m=["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(r=>({type:"class",label:r})),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","skeLine truncated
@@ -0,0 +1 @@
import{parser as W,configureNesting as L}from"@lezer/html";import{cssLanguage as I,css as J}from"@codemirror/lang-css";import{javascriptLanguage as S,typescriptLanguage as K,jsxLanguage as Q,tsxLanguage as X,javascript as Y}from"@codemirror/lang-javascript";import{EditorView as Z}from"@codemirror/view";import{EditorSelection as ee}from"@codemirror/state";import{syntaxTree as q,LRLanguage as te,indentNodeProp as le,foldNodeProp as ae,bracketMatchingHandle as ne,LanguageSupport as re}from"@codemirror/language";const T=["_blank","_self","_top","_parent"],N=["ascii","utf-8","utf-16","latin1","latin1"],j=["get","post","put","delete"],E=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],p=["true","false"],l={},se={a:{attrs:{href:null,ping:null,type:null,media:null,target:T,hreflang:null}},abbr:l,address:l,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:l,aside:l,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:l,base:{attrs:{href:null,target:T}},bdi:l,bdo:l,blockquote:{attrs:{cite:null}},body:l,br:l,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:E,formmethod:j,formnovalidate:["novalidate"],formtarget:T,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:l,center:l,cite:l,code:l,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:l,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:l,div:l,dl:l,dt:l,em:l,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:l,figure:l,footer:l,form:{attrs:{action:null,name:null,"accept-charset":N,autocomplete:["on","off"],enctype:E,method:j,novalidate:["novalidate"],target:T}},h1:l,h2:l,h3:l,h4:l,h5:l,h6:l,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:l,hgroup:l,hr:l,html:{attrs:{manifest:null}},i:l,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:E,formmethod:j,formnovalidate:["novalidate"],formtarget:T,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:l,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:l,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:l,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:N,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:l,noscript:l,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:l,param:{attrs:{name:null,value:null}},pre:l,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:l,rt:l,ruby:l,samp:l,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:N}},section:l,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:l,source:{attrs:{srcLine truncated
@@ -0,0 +1,13 @@
import{parser as M}from"@lezer/javascript";import{syntaxTree as S,LRLanguage as _,indentNodeProp as R,continuedIndent as $,flatIndent as W,delimitedIndent as Z,foldNodeProp as z,foldInside as H,defineLanguageFacet as K,sublanguageProp as T,LanguageSupport as q}from"@codemirror/language";import{EditorSelection as G}from"@codemirror/state";import{EditorView as Q}from"@codemirror/view";import{snippetCompletion as p,ifNotIn as U,completeFromList as Y}from"@codemirror/autocomplete";import{NodeWeakMap as ee,IterMode as te}from"@lezer/common";const w=[p("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),p("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),p("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),p("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),p("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),p(`try {
\${}
} catch (\${error}) {
\${}
}`,{label:"try",detail:"/ catch block",type:"keyword"}),p("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),p(`if (\${}) {
\${}
} else {
\${}
}`,{label:"if",detail:"/ else block",type:"keyword"}),p(`class \${name} {
constructor(\${params}) {
\${}
}
}`,{label:"class",detail:"definition",type:"keyword"}),p('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),p('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],I=w.concat([p("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),p("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),p("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),x=new ee,D=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function y(e){return(t,r)=>{let n=t.node.getChild("VariableDefinition");return n&&r(n,e),!0}}const ne=["FunctionDeclaration"],re={FunctionDeclaration:y("function"),ClassDeclaration:y("class"),ClassExpression:()=>!0,EnumDeclaration:y("constant"),TypeAliasDeclaration:y("type"),NamespaceDeclaration:y("namespace"),VariableDefinition(e,t){e.matchContext(ne)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function J(e,t){let r=x.get(t);if(r)return r;let n=[],a=!0;function i(o,l){let c=e.sliceString(o.from,o.to);n.push({label:c,type:l})}return t.cursor(te.IncludeAnonymous).iterate(o=>{if(a)a=!1;else if(o.name){let l=re[o.name];if(l&&l(o,i)||D.has(o.name))return!1}else if(o.to-o.from>8192){for(let l of J(e,o.node))n.push(l);return!1}}),x.set(t,n),n}const h=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,k=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function X(e){let t=S(e.state).resolveInner(e.pos,-1);if(k.indexOf(t.name)>-1)return null;let r=t.name=="VariableName"||t.to-t.from<20&&h.test(e.state.sliceDoc(t.from,t.to));if(!r&&!e.explicit)return null;let n=[];for(let a=t;a;a=a.parent)D.has(a.name)&&(n=n.concat(J(e.state.doc,a)));return{options:n,from:r?t.from:e.pos,validFor:h}}function v(e,t,r){var n;let a=[];for(;;){let i=t.firstChild,o;if(i?.name=="VariableName")return a.push(e(i)),{path:a.reverse(),name:r};if(i?.name=="MemberExpression"&&((n=o=i.lastChild)===null||n===void 0?void 0:n.name)=="PropertyName")a.push(e(o)),t=i;else return null}}function E(e){let t=n=>e.state.doc.sliceString(n.from,n.to),r=S(e.state).resolveInner(e.pos,-1);return r.name=="PropertyName"?v(t,r.parent,t(r)):(r.name=="."||r.name=="?.")&&r.parent.name=="MemberExpression"?v(t,r.parent,""):k.indexOf(r.name)>-1?null:r.name=="VariableName"||r.to-r.from<20&&h.test(t(r))?{path:[],name:t(r)}:r.name=="MemberExpression"?v(t,r,""):e.explicit?{path:[],name:""}:null}function oe(e,t){let r=[],n=new Set;for(let a=0;;a++){for(let o of(Object.getOwnPropertyNames||Object.keys)(e)){if(!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(o)||n.has(o))continue;n.add(o);let l;try{l=e[o]}catch{continue}r.push({label:o,type:typeof l=="function"?/^[A-Z]/.test(o)?"class":t?"function":"method":t?"variable":"property",boost:-a})}let i=Object.getPrototypeOf(e);if(!i)return r;e=i}}function ae(e){let t=new Map;return r=>{let n=E(r);if(!n)return null;let a=e;for(let o of n.path)if(a=a[o],!a)return null;let i=t.get(a);return i||t.set(a,i=oe(a,!n.path.length)),{from:r.pos-n.name.length,options:i,validFor:h}}}const m=_.define({name:"javascript",parser:M.configure({props:[R.add({IfStatement:$({except:/^\s*({|else\b)/}),TryStatement:$({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:W,SwitchBody:e=>{let t=e.textAfter,r=/^\s*\}/.test(t),n=/^\s*(case|default)\b/.test(t);return e.baseIndent+(r?0:n?1:2)*e.unit},Block:Z({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":$({except:/^{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),z.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":H,BlockComment(e){return{from:e.from+2,to:e.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),N={test:e=>/^JSX/.test(e.name),facet:K({commentTokens:{block:{open:"{/*",close:"*/}"}}})},P=m.configure({dialect:"ts"},"typescript"),A=m.configure({dialect:"jsx",props:[T.add(e=>e.isTop?[N]:void 0)]}),L=m.configure({dialect:"jsx ts",props:[T.add(e=>e.isTop?[N]:void 0)]},"typescript");let O=e=>({label:e,type:"keyword"});const F="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(O),ie=F.concat(["declare","implements","private","protected","public"].map(O));function le(e={}){let t=e.jsx?e.typescript?L:A:e.typescript?P:m,r=e.typescript?I.concat(ie):w.co Line truncated
@@ -0,0 +1 @@
import{parser as a}from"@lezer/json";import{LRLanguage as s,indentNodeProp as i,continuedIndent as r,foldNodeProp as c,foldInside as d,LanguageSupport as g}from"@codemirror/language";const m=()=>n=>{try{JSON.parse(n.state.doc.toString())}catch(e){if(!(e instanceof SyntaxError))throw e;const t=p(e,n.state.doc);return[{from:t,message:e.message,severity:"error",to:t}]}return[]};function p(n,e){let t;return(t=n.message.match(/at position (\d+)/))?Math.min(+t[1],e.length):(t=n.message.match(/at line (\d+) column (\d+)/))?Math.min(e.line(+t[1]).from+ +t[2]-1,e.length):0}const o=s.define({name:"json",parser:a.configure({props:[i.add({Object:r({except:/^\s*\}/}),Array:r({except:/^\s*\]/})}),c.add({"Object Array":d})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function u(){return new g(o)}export{u as json,o as jsonLanguage,m as jsonParseLinter};
@@ -0,0 +1 @@
import{parser as l}from"@lezer/php";import{parseMixed as i}from"@lezer/common";import{html as p}from"@codemirror/lang-html";import{LRLanguage as u,indentNodeProp as d,continuedIndent as r,delimitedIndent as m,foldNodeProp as f,foldInside as c,LanguageSupport as g}from"@codemirror/language";const a=u.define({name:"php",parser:l.configure({props:[d.add({IfStatement:r({except:/^\s*({|else\b|elseif\b|endif\b)/}),TryStatement:r({except:/^\s*({|catch\b|finally\b)/}),SwitchBody:e=>{let o=e.textAfter,t=/^\s*\}/.test(o),n=/^\s*(case|default)\b/.test(o);return e.baseIndent+(t?0:n?1:2)*e.unit},ColonBlock:e=>e.baseIndent+e.unit,"Block EnumBody DeclarationList":m({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"String BlockComment":()=>null,Statement:r({except:/^({|end(for|foreach|switch|while)\b)/})}),f.add({"Block EnumBody DeclarationList SwitchBody ArrayExpression ValueList":c,ColonBlock(e){return{from:e.from+1,to:e.to}},BlockComment(e){return{from:e.from+2,to:e.to-2}}})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*(?:case |default:|end(?:if|for(?:each)?|switch|while)|else(?:if)?|\{|\})$/,wordChars:"$",closeBrackets:{stringPrefixes:["b","B"]}}});function h(e={}){let o=[],t;if(e.baseLanguage!==null)if(e.baseLanguage)t=e.baseLanguage;else{let n=p({matchClosingTags:!1});o.push(n.support),t=n.language}return new g(a.configure({wrap:t&&i(n=>n.type.isTop?{parser:t.parser,overlay:s=>s.name=="Text"}:null),top:e.plain?"Program":"Template"}),o)}export{h as php,a as phpLanguage};
@@ -0,0 +1,2 @@
import{syntaxTree as ie,indentNodeProp as se,continuedIndent as oe,foldNodeProp as le,LRLanguage as ce,LanguageSupport as de}from"@codemirror/language";import{styleTags as me,tags as i}from"@lezer/highlight";import{ExternalTokenizer as ue,LRParser as fe}from"@lezer/lr";import{ifNotIn as pe,completeFromList as ge}from"@codemirror/autocomplete";const he=36,X=1,_e=2,b=3,S=4,be=5,ve=6,ye=7,ke=8,xe=9,Oe=10,we=11,Qe=12,Ce=13,Se=14,Pe=15,qe=16,Te=17,I=18,Ue=19,R=20,j=21,D=22,ze=23,Be=24;function P(t){return t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57}function Le(t){return t>=48&&t<=57||t>=97&&t<=102||t>=65&&t<=70}function p(t,e,r){for(let a=!1;;){if(t.next<0)return;if(t.next==e&&!a){t.advance();return}a=r&&!a&&t.next==92,t.advance()}}function Xe(t,e){e:for(;;){if(t.next<0)return console.log("exit at end",t.pos);if(t.next==36){t.advance();for(let r=0;r<e.length;r++){if(t.next!=e.charCodeAt(r))continue e;t.advance()}if(t.next==36){t.advance();return}}else t.advance()}}function Ie(t,e){let r="[{<(".indexOf(String.fromCharCode(e)),a=r<0?e:"]}>)".charCodeAt(r);for(;;){if(t.next<0)return;if(t.next==a&&t.peek(1)==39){t.advance(2);return}t.advance()}}function q(t,e){for(;!(t.next!=95&&!P(t.next));)e!=null&&(e+=String.fromCharCode(t.next)),t.advance();return e}function Re(t){if(t.next==39||t.next==34||t.next==96){let e=t.next;t.advance(),p(t,e,!1)}else q(t)}function Z(t,e){for(;t.next==48||t.next==49;)t.advance();e&&t.next==e&&t.advance()}function N(t,e){for(;;){if(t.next==46){if(e)break;e=!0}else if(t.next<48||t.next>57)break;t.advance()}if(t.next==69||t.next==101)for(t.advance(),(t.next==43||t.next==45)&&t.advance();t.next>=48&&t.next<=57;)t.advance()}function V(t){for(;!(t.next<0||t.next==10);)t.advance()}function g(t,e){for(let r=0;r<e.length;r++)if(e.charCodeAt(r)==t)return!0;return!1}const T=` \r
`;function $(t,e,r){let a=Object.create(null);a.true=a.false=be,a.null=a.unknown=ve;for(let n of t.split(" "))n&&(a[n]=R);for(let n of e.split(" "))n&&(a[n]=j);for(let n of(r||"").split(" "))n&&(a[n]=Be);return a}const h="array binary bit boolean char character clob date decimal double float int integer interval large national nchar nclob numeric object precision real smallint time timestamp varchar varying ",_="absolute action add after all allocate alter and any are as asc assertion at authorization before begin between both breadth by call cascade cascaded case cast catalog check close collate collation column commit condition connect connection constraint constraints constructor continue corresponding count create cross cube current current_date current_default_transform_group current_transform_group_for_type current_path current_role current_time current_timestamp current_user cursor cycle data day deallocate declare default deferrable deferred delete depth deref desc describe descriptor deterministic diagnostics disconnect distinct do domain drop dynamic each else elseif end end-exec equals escape except exception exec execute exists exit external fetch first for foreign found from free full function general get global go goto grant group grouping handle having hold hour identity if immediate in indicator initially inner inout input insert intersect into is isolation join key language last lateral leading leave left level like limit local localtime localtimestamp locator loop map match method minute modifies module month names natural nesting new next no none not of old on only open option or order ordinality out outer output overlaps pad parameter partial path prepare preserve primary prior privileges procedure public read reads recursive redo ref references referencing relative release repeat resignal restrict result return returns revoke right role rollback rollup routine row rows savepoint schema scroll search second section select session session_user set sets signal similar size some space specific specifictype sql sqlexception sqlstate sqlwarning start state static system_user table temporary then timezone_hour timezone_minute to trailing transaction translation treat trigger under undo union unique unnest until update usage user using value values view when whenever where while with without work write year zone ",U={backslashEscapes:!1,hashComments:!1,spaceAfterDashes:!1,slashComments:!1,doubleQuotedStrings:!1,doubleDollarQuotedStrings:!1,unquotedBitLiterals:!1,treatBitsAsBytes:!1,charSetCasts:!1,plsqlQuotingMechanism:!1,operatorChars:"*+-%<>!=&|~^/",specialVar:"?",identifierQuotes:'"',caseInsensitiveIdentifiers:!1,words:$(_,h)};function je(t,e,r,a){let n={};for(let s in U)n[s]=(t.hasOwnProperty(s)?t:U)[s];return e&&(n.words=$(e,r||"",a)),n}function A(t){return new ue(e=>{var r;let{next:a}=e;if(e.advance(),g(a,T)){for(;g(e.next,T);)e.advance();e.acceptToken(he)}else if(a==36&&t.doubleDollarQuotedStrings){let n=q(e,"");e.next==36&&(e.advance(),Xe(e,n),e.acceptToken(b))}else if(a==39||a==34&&t.doubleQuotedStrings)p(e,a,t.backslashEscapes),e.acceptToken(b);else if(a==35&&t.hashComments||a==47&&e.next==47&&t.slashComments)V(e),e.acceptToken(X);else if(a==45&&e.next==45&&(!t.spaceAfterDashes||e.peek(1)==32))V(e),e.acceptToken(X);else if(a==47&&e.next==42){e.advance();for(let n=1;;){let s=e.next;if(e.next<0)break;if(e.advance(),s==42&&e.next==47){if(n--,e.advance(),!n)break}else s==47&&e.next==42&&(n++,e.advance())}e.acceptToken(_e)}else if((a==101||a==69)&&e.next==39)e.advance(),p(e,39,!0),e.acceptToken(b);else if((a==110||a==78)&&e.next==39&&t.charSetCasts)e.advance(),p(e,39,t.backslashEscapes),e.acceptToken(b);else if(a==95&&t.charSetCasts)for(let n=0;;n++){if(e.next==39&&n>1){e.advance(),p(e,39,t.backslashEscapes),e.acceptToken(b);break}if(!P(e.next))break;e.advance()}else if(t.plsqlQuotingMechanism&&(a==113||a==81)&&e.next==39&&e.peek(1)>0&&!g(e.peek(1),T)){let n=e.peek(1);e.advance(2),Ie(e,n),e.acceptToken(b)}else if(a==40)e.acceptToken(ye);else if(a==41)e.acceptToken(ke);else if(a==123)e.acceptToken(xe);else if(a==125)e.acceptToken(Oe);else if(a==91)e.acceptToken(we);else if(a==93)e.acceptToken(Qe);else if(a==59)e.acceptToken(Ce);else if(t.unquotedBitLiterals&&a==48&&e.next==98)e.advance(),Z(e),e.acceptToken(D);else if((a==98||a==66)&&(e.next==39||e.next==34)){const n=e.next;e.advance(),t.treatBitsAsBytes?(p(e,n,t.backslashEscapes),e.acceptToken(ze)):(Z(e,n),e.acceptToken(D))}else if(a==48&&(e.next==120||e.next==88)||(a==120||a==88)&&e.next==39){let n=e.next==39;for(e.advance();Le(e.next);)e.advance();n&&e.next==39&&e.advance(),e.acceptToken(S)}else if(a==46&&e.next>=48&&e.next<=57)N(e,!0),e.acceptToken(S);else if(a==46)e.acceptToken(Se);else if(a>=48&&a<=57)N(e,!1),e.acceptToken(S);else if(g(a,t.operatorChars)){for(;g(e.next,t.operatorChars);)e.advance();e.acceptToken(Pe)}else if(g(a,t.specialVar))e.next==a&&e.advance(),Re(e),e.acceptToken(Te);else if(g(a,t.identifierQuotes))p(e,a,!1),e.acc Line truncated
@@ -0,0 +1 @@
import{parser as L}from"@lezer/xml";import{syntaxTree as E,LRLanguage as _,indentNodeProp as w,foldNodeProp as x,bracketMatchingHandle as M,LanguageSupport as k}from"@codemirror/language";import{EditorSelection as D}from"@codemirror/state";import{EditorView as P}from"@codemirror/view";function v(e,t){let i=t&&t.getChild("TagName");return i?e.sliceString(i.from,i.to):""}function N(e,t){let i=t&&t.firstChild;return!i||i.name!="OpenTag"?"":v(e,i)}function B(e,t,i){let n=t&&t.getChildren("Attribute").find(o=>o.from<=i&&o.to>=i),a=n&&n.getChild("AttributeName");return a?e.sliceString(a.from,a.to):""}function S(e){for(let t=e&&e.parent;t;t=t.parent)if(t.name=="Element")return t;return null}function H(e,t){var i;let n=E(e).resolveInner(t,-1),a=null;for(let o=n;!a&&o.parent;o=o.parent)(o.name=="OpenTag"||o.name=="CloseTag"||o.name=="SelfClosingTag"||o.name=="MismatchedCloseTag")&&(a=o);if(a&&(a.to>t||a.lastChild.type.isError)){let o=a.parent;if(n.name=="TagName")return a.name=="CloseTag"||a.name=="MismatchedCloseTag"?{type:"closeTag",from:n.from,context:o}:{type:"openTag",from:n.from,context:S(o)};if(n.name=="AttributeName")return{type:"attrName",from:n.from,context:a};if(n.name=="AttributeValue")return{type:"attrValue",from:n.from,context:a};let s=n==a||n.name=="Attribute"?n.childBefore(t):n;return s?.name=="StartTag"?{type:"openTag",from:t,context:S(o)}:s?.name=="StartCloseTag"&&s.to<=t?{type:"closeTag",from:t,context:o}:s?.name=="Is"?{type:"attrValue",from:t,context:a}:s?{type:"attrName",from:t,context:a}:null}else if(n.name=="StartCloseTag")return{type:"closeTag",from:t,context:n.parent};for(;n.parent&&n.to==t&&!(!((i=n.lastChild)===null||i===void 0)&&i.type.isError);)n=n.parent;return n.name=="Element"||n.name=="Text"||n.name=="Document"?{type:"tag",from:t,context:n.name=="Element"?n:S(n)}:null}class R{constructor(t,i,n){this.attrs=i,this.attrValues=n,this.children=[],this.name=t.name,this.completion=Object.assign(Object.assign({type:"type"},t.completion||{}),{label:this.name}),this.openCompletion=Object.assign(Object.assign({},this.completion),{label:"<"+this.name}),this.closeCompletion=Object.assign(Object.assign({},this.completion),{label:"</"+this.name+">",boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+">"}),this.text=t.textContent?t.textContent.map(a=>({label:a,type:"text"})):[]}}const j=/^[:\-\.\w\u00b7-\uffff]*$/;function A(e){return Object.assign(Object.assign({type:"property"},e.completion||{}),{label:e.name})}function V(e){return typeof e=="string"?{label:`"${e}"`,type:"constant"}:/^"/.test(e.label)?e:Object.assign(Object.assign({},e),{label:`"${e.label}"`})}function $(e,t){let i=[],n=[],a=Object.create(null);for(let l of t){let p=A(l);i.push(p),l.global&&n.push(p),l.values&&(a[l.name]=l.values.map(V))}let o=[],s=[],h=Object.create(null);for(let l of e){let p=n,u=a;l.attributes&&(p=p.concat(l.attributes.map(r=>typeof r=="string"?i.find(b=>b.label==r)||{label:r,type:"property"}:(r.values&&(u==a&&(u=Object.create(u)),u[r.name]=r.values.map(V)),A(r)))));let d=new R(l,p,u);h[d.name]=d,o.push(d),l.top&&s.push(d)}s.length||(s=o);for(let l=0;l<o.length;l++){let p=e[l],u=o[l];if(p.children)for(let d of p.children)h[d]&&u.children.push(h[d]);else u.children=o}return l=>{var p;let{doc:u}=l.state,d=H(l.state,l.pos);if(!d||d.type=="tag"&&!l.explicit)return null;let{type:r,from:b,context:c}=d;if(r=="openTag"){let m=s,f=N(u,c);if(f){let g=h[f];m=g?.children||o}return{from:b,options:m.map(g=>g.completion),validFor:j}}else if(r=="closeTag"){let m=N(u,c);return m?{from:b,to:l.pos+(u.sliceString(l.pos,l.pos+1)==">"?1:0),options:[((p=h[m])===null||p===void 0?void 0:p.closeNameCompletion)||{label:m+">",type:"type"}],validFor:j}:null}else if(r=="attrName"){let m=h[v(u,c)];return{from:b,options:m?.attrs||n,validFor:j}}else if(r=="attrValue"){let m=B(u,c,b);if(!m)return null;let f=h[v(u,c)],g=(f?.attrValues||a)[m];return!g||!g.length?null:{from:b,to:l.pos+(u.sliceString(l.pos,l.pos+1)=='"'?1:0),options:g,validFor:/^"[^"]*"?$/}}else if(r=="tag"){let m=N(u,c),f=h[m],g=[],C=c&&c.lastChild;m&&(!C||C.name!="CloseTag"||v(u,C)!=m)&&g.push(f?f.closeCompletion:{label:"</"+m+">",type:"type",boost:2});let O=g.concat((f?.children||(c?o:s)).map(T=>T.openCompletion));if(c&&f?.text.length){let T=c.firstChild;T.to>l.pos-20&&!/\S/.test(l.state.sliceDoc(T.to,l.pos))&&(O=O.concat(f.text))}return{from:b,options:O,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}else return null}}const y=_.define({name:"xml",parser:L.configure({props:[w.add({Element(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),x.add({Element(e){let t=e.firstChild,i=e.lastChild;return!t||t.name!="OpenTag"?null:{from:t.to,to:i.name=="CloseTag"?i.from:e.to}}}),M.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/$/}});function q(e={}){Line truncated
@@ -0,0 +1,3 @@
import{NodeProp as y,IterMode as he,Tree as b,TreeFragment as H,Parser as yt,NodeType as U,NodeSet as fe}from"@lezer/common";import{StateEffect as j,StateField as Q,Facet as v,EditorState as L,countColumn as ue,combineConfig as vt,RangeSet as xt,RangeSetBuilder as X,Prec as St}from"@codemirror/state";import{ViewPlugin as V,logException as ce,EditorView as w,Decoration as p,WidgetType as Tt,gutter as de,GutterMarker as pe,Direction as $}from"@codemirror/view";import{tags as u,tagHighlighter as ge,highlightTree as me,styleTags as ke}from"@lezer/highlight";import{StyleModule as Pt}from"style-mod";var Y;const P=new y;function Z(n){return v.define({combine:n?t=>t.concat(n):void 0})}const At=new y;class g{constructor(t,e,r=[],i=""){this.data=t,this.name=i,L.prototype.hasOwnProperty("tree")||Object.defineProperty(L.prototype,"tree",{get(){return m(this)}}),this.parser=e,this.extension=[S.of(this),L.languageData.of((s,o,l)=>{let a=Ct(s,o,l),h=a.type.prop(P);if(!h)return[];let f=s.facet(h),c=a.type.prop(At);if(c){let k=a.resolve(o-a.from,l);for(let d of c)if(d.test(k,s)){let x=s.facet(d.facet);return d.type=="replace"?x:x.concat(f)}}return f})].concat(r)}isActiveAt(t,e,r=-1){return Ct(t,e,r).type.prop(P)==this.data}findRegions(t){let e=t.facet(S);if(e?.data==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let r=[],i=(s,o)=>{if(s.prop(P)==this.data){r.push({from:o,to:o+s.length});return}let l=s.prop(y.mounted);if(l){if(l.tree.prop(P)==this.data){if(l.overlay)for(let a of l.overlay)r.push({from:a.from+o,to:a.to+o});else r.push({from:o,to:o+s.length});return}else if(l.overlay){let a=r.length;if(i(l.tree,l.overlay[0].from+o),r.length>a)return}}for(let a=0;a<s.children.length;a++){let h=s.children[a];h instanceof b&&i(h,s.positions[a]+o)}};return i(m(t),0),r}get allowsNesting(){return!0}}g.setState=j.define();function Ct(n,t,e){let r=n.facet(S),i=m(n).topNode;if(!r||r.allowsNesting)for(let s=i;s;s=s.enter(t,e,he.ExcludeBuffers))s.type.isTop&&(i=s);return i}class J extends g{constructor(t,e,r){super(t,e,[],r),this.parser=e}static define(t){let e=Z(t.languageData);return new J(e,t.parser.configure({props:[P.add(r=>r.isTop?e:void 0)]}),t.name)}configure(t,e){return new J(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function m(n){let t=n.field(g.state,!1);return t?t.tree:b.empty}function It(n,t,e=50){var r;let i=(r=n.field(g.state,!1))===null||r===void 0?void 0:r.context;if(!i)return null;let s=i.viewport;i.updateViewport({from:0,to:t});let o=i.isDone(t)||i.work(e,t)?i.tree:null;return i.updateViewport(s),o}function be(n,t=n.doc.length){var e;return((e=n.field(g.state,!1))===null||e===void 0?void 0:e.context.isDone(t))||!1}function we(n,t=n.viewport.to,e=100){let r=It(n.state,t,e);return r!=m(n.state)&&n.dispatch({}),!!r}function ye(n){var t;return((t=n.plugin(Lt))===null||t===void 0?void 0:t.isWorking())||!1}class Dt{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let r=this.cursorPos-this.string.length;return t<r||e>=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-r,e-r)}}let N=null;class C{constructor(t,e,r=[],i,s,o,l,a){this.parser=t,this.state=e,this.fragments=r,this.tree=i,this.treeLen=s,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(t,e,r){return new C(t,e,[],b.empty,0,r,[],null)}startParse(){return this.parser.startParse(new Dt(this.state.doc),this.fragments)}work(t,e){return e!=null&&e>=this.state.doc.length&&(e=void 0),this.tree!=b.empty&&this.isDone(e??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof t=="number"){let i=Date.now()+t;t=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),e!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&e<this.state.doc.length&&this.parse.stopAt(e);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(H.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(e??this.state.doc.length))this.parse=this.startParse();else return!0;if(t())return!1}})}takeTree(){let t,e;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(e=this.parse.advance()););}),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(H.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=N;N=this;try{return t()}finally{N=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=Ot(t,e.from,e.to);return t}changes(t,e){let{fragments:r,tree:i,treeLen:s,viLine truncated
`&&(e="");else{let r=e.indexOf(`
`);r>-1&&(e=e.slice(0,r))}return t+e.length<=this.to?e:e.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,e=this.lineAfter(t),r=t+e.length;for(let i=this.rangeIndex;;){let s=this.ranges[i].to;if(s>=r||(e=e.slice(0,s-(r-e.length)),i++,i==this.ranges.length))break;let o=this.ranges[i].from,l=this.lineAfter(o);e+=l,r=o+l.length}return{line:e,end:r}}skipGapsTo(t,e,r){for(;;){let i=this.ranges[this.rangeIndex].to,s=t+e;if(r>0?i>s:i>=s)break;let o=this.ranges[++this.rangeIndex].from;e+=o-i}return e}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(t,e,r,i,s){if(this.ranges.length>1){s=this.skipGapsTo(e,s,1),e+=s;let o=this.chunk.length;s=this.skipGapsTo(r,s,-1),r+=s,i+=this.chunk.length-o}return this.chunk.push(t,e,r,i),s}parseLine(t){let{line:e,end:r}=this.nextLine(),i=0,{streamParser:s}=this.lang,o=new dt(e,t?t.state.tabSize:4,t?B(t.state):2);if(o.eol())s.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=Zt(s.token,o,this.state);if(l&&(i=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,4,i)),o.start>1e4)break}this.parsedPos=r,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let t=b.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:cn,topID:0,maxBufferLength:2048,reused:this.chunkReused});t=new b(t.type,t.children,t.positions,t.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(t),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new b(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}}function Zt(n,t,e){t.start=t.pos;for(let r=0;r<10;r++){let i=n(t,e);if(t.pos>t.start)return i}throw new Error("Stream parser failed to advance stream.")}const gt=Object.create(null),E=[U.none],cn=new fe(E),te=[],ee=Object.create(null),ne=Object.create(null);for(let[n,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])ne[n]=ie(gt,t);class re{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),ne)}resolve(t){return t?this.table[t]||(this.table[t]=ie(this.extra,t)):0}}const dn=new re(gt);function mt(n,t){te.indexOf(n)>-1||(te.push(n),console.warn(t))}function ie(n,t){let e=[];for(let l of t.split(" ")){let a=[];for(let h of l.split(".")){let f=n[h]||u[h];f?typeof f=="function"?a.length?a=a.map(f):mt(h,`Modifier ${h} used at start of tag`):a.length?mt(h,`Tag ${h} used as modifier`):a=Array.isArray(f)?f:[f]:mt(h,`Unknown highlighting tag ${h}`)}for(let h of a)e.push(h)}if(!e.length)return 0;let r=t.replace(/ /g,"_"),i=r+" "+e.map(l=>l.id),s=ee[i];if(s)return s.id;let o=ee[i]=U.define({id:E.length,name:r,props:[ke({[r]:e})]});return E.push(o),o.id}function pn(n){let t=U.define({id:E.length,name:"Document",props:[P.add(()=>n)],top:!0});return E.push(t),t}function se(n){return n.length<=4096&&/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/.test(n)}function oe(n){for(let t=n.iter();!t.next().done;)if(se(t.value))return!0;return!1}function gn(n){let t=!1;return n.iterChanges((e,r,i,s,o)=>{!t&&oe(o)&&(t=!0)}),t}const kt=v.define({combine:n=>n.some(t=>t)});function mn(n={}){let t=[kn];return n.alwaysIsolate&&t.push(kt.of(!0)),t}const kn=V.fromClass(class{constructor(n){this.always=n.state.facet(kt)||n.textDirection!=$.LTR||n.state.facet(w.perLineTextDirection),this.hasRTL=!this.always&&oe(n.state.doc),this.tree=m(n.state),this.decorations=this.always||this.hasRTL?le(n,this.tree,this.always):p.none}update(n){let t=n.state.facet(kt)||n.view.textDirection!=$.LTR||n.state.facet(w.perLineTextDirection);if(!t&&!this.hasRTL&&gn(n.changes)&&(this.hasRTL=!0),!t&&!this.hasRTL)return;let e=m(n.state);(t!=this.always||e!=this.tree||n.docChanged||n.viewportChanged)&&(this.tree=e,this.always=t,this.decorations=le(n.view,e,t))}},{provide:n=>{function t(e){var r,i;return(i=(r=e.plugin(n))===null||r===void 0?void 0:r.decorations)!==null&&i!==void 0?i:p.none}return[w.outerDecorations.of(t),St.lowest(w.bidiIsolatedRanges.of(t))]}});function le(n,t,e){let r=new X,i=n.visibleRanges;e||(i=bn(i,n.state.doc));for(let{from:s,to:o}of i)t.iterate({enter:l=>{let a=l.type.prop(y.isolate);a&&r.add(l.from,l.to,wn[a])},from:s,to:o});return r.finish()}function bn(n,t){let e=t.iter(),r=0,i=[],s=null;for(let{from:o,to:l}of n)if(!(s&&s.to>o&&(o=s.to,o>=l)))for(r+e.value.length<o&&(e.next(o-(r+e.value.length)),r=o);;){let a=r,h=r+e.value.length;if(!e.lineBreak&&se(e.value)&&(s&&s.to>a-10?s.to=Math.min(l,h):i.push(s={from:a,to:Math.min(l,h)})),h>=l)break;r=h,e.next()}return i}const wn={rtl:p.mark({class:"cm-iso",inclusive:!0,att Line truncated
@@ -0,0 +1 @@
import{Decoration as h,showPanel as K,EditorView as y,ViewPlugin as U,logException as X,gutter as J,showTooltip as Q,hoverTooltip as ee,getPanel as te,WidgetType as ie,GutterMarker as ne}from"@codemirror/view";import{StateEffect as k,StateField as S,Facet as M,combineConfig as A,RangeSet as R}from"@codemirror/state";import u from"crelt";class se{constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class g{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let s=e,o=i.facet(m).markerFilter;o&&(s=o(s,i));let l=h.set(s.map(r=>r.from==r.to||r.from==r.to-1&&i.doc.lineAt(r.from).to==r.from?h.widget({widget:new ue(r),diagnostic:r}).range(r.from):h.mark({attributes:{class:"cm-lintRange cm-lintRange-"+r.severity+(r.markClass?" "+r.markClass:"")},diagnostic:r}).range(r.from,r.to)),!0);return new g(l,n,b(l))}}function b(t,e=null,n=0){let i=null;return t.between(n,1e9,(s,o,{spec:l})=>{if(!(e&&l.diagnostic!=e))return i=new se(s,o,l.diagnostic),!1}),i}function F(t,e){let n=e.pos,i=e.end||n,s=t.state.facet(m).hideOn(t,n,i);if(s!=null)return s;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(l=>l.is(w))||t.changes.touchesRange(o.from,Math.max(o.to,i)))}function E(t,e){return t.field(f,!1)?e:e.concat(k.appendConfig.of(W))}function B(t,e){return{effects:E(t,[w.of(e)])}}const w=k.define(),D=k.define(),O=k.define(),f=S.define({create(){return new g(h.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),i=null,s=t.panel;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);i=b(n,t.selected.diagnostic,o)||b(n,null,o)}!n.size&&s&&e.state.facet(m).autoPanel&&(s=null),t=new g(n,s,i)}for(let n of e.effects)if(n.is(w)){let i=e.state.facet(m).autoPanel?n.value.length?x.open:null:t.panel;t=g.init(n.value,i,e.state)}else n.is(D)?t=new g(t.diagnostics,n.value?x.open:null,t.selected):n.is(O)&&(t=new g(t.diagnostics,t.panel,n.value));return t},provide:t=>[K.from(t,e=>e.panel),y.decorations.from(t,e=>e.diagnostics)]});function oe(t){let e=t.field(f,!1);return e?e.diagnostics.size:0}const le=h.mark({class:"cm-lintRange cm-lintRange-active"});function re(t,e,n){let{diagnostics:i}=t.state.field(f),s=[],o=2e8,l=0;i.between(e-(n<0?1:0),e+(n>0?1:0),(a,c,{spec:d})=>{e>=a&&e<=c&&(a==c||(e>a||n>0)&&(e<c||n<0))&&(s.push(d.diagnostic),o=Math.min(a,o),l=Math.max(c,l))});let r=t.state.facet(m).tooltipFilter;return r&&(s=r(s,t.state)),s.length?{pos:o,end:l,above:t.state.doc.lineAt(o).to<l,create(){return{dom:G(t,s)}}}:null}function G(t,e){return u("ul",{class:"cm-tooltip-lint"},e.map(n=>V(t,n,!1)))}const j=t=>{let e=t.state.field(f,!1);(!e||!e.panel)&&t.dispatch({effects:E(t.state,[D.of(!0)])});let n=te(t,x.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},L=t=>{let e=t.state.field(f,!1);return!e||!e.panel?!1:(t.dispatch({effects:D.of(!1)}),!0)},z=t=>{let e=t.state.field(f,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},ae=t=>{let{state:e}=t,n=e.field(f,!1);if(!n)return!1;let i=e.selection.main,s,o,l,r;return n.diagnostics.between(0,e.doc.length,(a,c)=>{c<i.to&&(s==null||s<a)&&(s=a,o=c),(l==null||a>l)&&(l=a,r=c)}),l==null||s==null&&l==i.from?!1:(t.dispatch({selection:{anchor:s??l,head:o??r},scrollIntoView:!0}),!0)},ce=[{key:"Mod-Shift-m",run:j,preventDefault:!0},{key:"F8",run:z}],H=U.fromClass(class{constructor(t){this.view=t,this.timeout=-1,this.set=!0;let{delay:e}=t.state.facet(m);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let t=Date.now();if(t<this.lintTime-10)this.timeout=setTimeout(this.run,this.lintTime-t);else{this.set=!1;let{state:e}=this.view,{sources:n}=e.facet(m);n.length&&Promise.all(n.map(i=>Promise.resolve(i(this.view)))).then(i=>{let s=i.reduce((o,l)=>o.concat(l));this.view.state.doc==e.doc&&this.view.dispatch(B(this.view.state,s))},i=>{X(this.view.state,i)})}}update(t){let e=t.state.facet(m);(t.docChanged||e!=t.startState.facet(m)||e.needsRefresh&&e.needsRefresh(t))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),m=M.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},A(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n}))}});function de(t,e={}){return[m.of({source:t,config:e}),H,W]}function fe(t){let e=t.plugin(H);e&&e.force()}function $(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;i<n.length;i++){let s=n[i];if(/[a-zA-Z]/.test(s)&&!e.some(o=>o.toLowerCase()==s.toLowerCase())){e.push(s);continue e}}e.push("")}return e}function V(t,e,n){var i;let s=n?$(e.actions):[];return Line truncated
@@ -0,0 +1,2 @@
import{showPanel as te,EditorView as S,getPanel as R,Decoration as f,ViewPlugin as re,runScopeHandlers as ve}from"@codemirror/view";import{codePointAt as be,fromCodePoint as Ce,codePointSize as ke,StateEffect as W,StateField as ne,EditorSelection as p,Facet as ie,combineConfig as se,CharCategory as m,RangeSetBuilder as Le,Prec as We,EditorState as Fe,findClusterBreak as le}from"@codemirror/state";import h from"crelt";const oe=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class y{constructor(e,r,n=0,i=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,i),this.bufferStart=n,this.normalize=s?l=>s(oe(l)):oe,this.query=this.normalize(r)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return be(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let r=Ce(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=ke(e);let i=this.normalize(r);for(let s=0,o=n;;s++){let l=i.charCodeAt(s),c=this.match(l,o,this.bufferPos+this.bufferStart);if(s==i.length-1){if(c)return this.value=c,this;break}o==n&&s<r.length&&r.charCodeAt(s)==l&&o++}}}match(e,r,n){let i=null;for(let s=0;s<this.matches.length;s+=2){let o=this.matches[s],l=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?i={from:this.matches[s+1],to:n}:(this.matches[s]++,l=!0)),l||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:r,to:n}:this.matches.push(1,r)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(y.prototype[Symbol.iterator]=function(){return this});const ce={from:-1,to:-1,match:/.*/.exec("")},_="gm"+(/x/.unicode==null?"":"u");class z{constructor(e,r,n,i=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=ce,/\\[sWDnr]|\n|\r|\[\^/.test(r))return new ae(e,r,n,i,s);this.re=new RegExp(r,_+(n?.ignoreCase?"i":"")),this.test=n?.test,this.iter=e.iter();let o=e.lineAt(i);this.curLineStart=o.from,this.matchPos=q(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let r=this.matchPos<=this.to&&this.re.exec(this.curLine);if(r){let n=this.curLineStart+r.index,i=n+r[0].length;if(this.matchPos=q(this.text,i+(n==i?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<i||n>this.value.to)&&(!this.test||this.test(n,i,r)))return this.value={from:n,to:i,match:r},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const B=new WeakMap;class k{constructor(e,r){this.from=e,this.text=r}get to(){return this.from+this.text.length}static get(e,r,n){let i=B.get(e);if(!i||i.from>=n||i.to<=r){let l=new k(r,e.sliceString(r,n));return B.set(e,l),l}if(i.from==r&&i.to==n)return i;let{text:s,from:o}=i;return o>r&&(s=e.sliceString(r,o)+s,o=r),i.to<n&&(s+=e.sliceString(i.to,n)),B.set(e,new k(o,s)),new k(r,s.slice(r-o,n-o))}}class ae{constructor(e,r,n,i,s){this.text=e,this.to=s,this.done=!1,this.value=ce,this.matchPos=q(e,i),this.re=new RegExp(r,_+(n?.ignoreCase?"i":"")),this.test=n?.test,this.flat=k.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,r=this.re.exec(this.flat.text);if(r&&!r[0]&&r.index==e&&(this.re.lastIndex=e+1,r=this.re.exec(this.flat.text)),r){let n=this.flat.from+r.index,i=n+r[0].length;if((this.flat.to>=this.to||r.index+r[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,i,r)))return this.value={from:n,to:i,match:r},this.matchPos=q(this.text,i+(n==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=k.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(z.prototype[Symbol.iterator]=ae.prototype[Symbol.iterator]=function(){return this});function Ae(t){try{return new RegExp(t,_),!0}catch{return!1}}function q(t,e){if(e>=t.length)return e;let r=t.lineAt(e),n;for(;e<r.to&&(n=r.text.charCodeAt(e-r.from))>=56320&&n<57344;)e++;return e}function N(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),r=h("input",{class:"cm-textfield",name:"line",value:e}),n=h("form",{class:"cm-gotoLine",onkeydown:s=>{s.keyCode==27?(s.preventDefault(),t.dispatch({effects:P.of(!1)}),t.focus()):s.keyCodLine truncated
`:n=="r"?"\r":n=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Ne(this):new ze(this)}getCursor(e,r=0,n){let i=e.doc?e:Fe.create({doc:e});return n==null&&(n=i.doc.length),this.regexp?b(this,i,r,n):v(this,i,r,n)}}class pe{constructor(e){this.spec=e}}function v(t,e,r,n){return new y(e.doc,t.unquoted,r,n,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?_e(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function _e(t,e){return(r,n,i,s)=>((s>r||s+i.length<n)&&(s=Math.max(0,r-2),i=t.sliceString(s,Math.min(t.length,n+2))),(e(T(i,r-s))!=m.Word||e(I(i,r-s))!=m.Word)&&(e(I(i,n-s))!=m.Word||e(T(i,n-s))!=m.Word))}class ze extends pe{constructor(e){super(e)}nextMatch(e,r,n){let i=v(this.spec,e,n,e.doc.length).nextOverlapping();return i.done&&(i=v(this.spec,e,0,r).nextOverlapping()),i.done?null:i.value}prevMatchInRange(e,r,n){for(let i=n;;){let s=Math.max(r,i-1e4-this.spec.unquoted.length),o=v(this.spec,e,s,i),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(s==r)return null;i-=1e4}}prevMatch(e,r,n){return this.prevMatchInRange(e,0,r)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,r){let n=v(this.spec,e,0,e.doc.length),i=[];for(;!n.next().done;){if(i.length>=r)return null;i.push(n.value)}return i}highlight(e,r,n,i){let s=v(this.spec,e,Math.max(0,r-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}function b(t,e,r,n){return new z(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?Be(e.charCategorizer(e.selection.main.head)):void 0},r,n)}function T(t,e){return t.slice(le(t,e,!1),e)}function I(t,e){return t.slice(e,le(t,e))}function Be(t){return(e,r,n)=>!n[0].length||(t(T(n.input,n.index))!=m.Word||t(I(n.input,n.index))!=m.Word)&&(t(I(n.input,n.index+n[0].length))!=m.Word||t(T(n.input,n.index+n[0].length))!=m.Word)}class Ne extends pe{nextMatch(e,r,n){let i=b(this.spec,e,n,e.doc.length).next();return i.done&&(i=b(this.spec,e,0,r).next()),i.done?null:i.value}prevMatchInRange(e,r,n){for(let i=1;;i++){let s=Math.max(r,n-i*1e4),o=b(this.spec,e,s,n),l=null;for(;!o.next().done;)l=o.value;if(l&&(s==r||l.from>s+10))return l;if(s==r)return null}}prevMatch(e,r,n){return this.prevMatchInRange(e,0,r)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(r,n)=>n=="$"?"$":n=="&"?e.match[0]:n!="0"&&+n<e.match.length?e.match[n]:r)}matchAll(e,r){let n=b(this.spec,e,0,e.doc.length),i=[];for(;!n.next().done;){if(i.length>=r)return null;i.push(n.value)}return i}highlight(e,r,n,i){let s=b(this.spec,e,Math.max(0,r-250),Math.min(n+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}const C=W.define(),H=W.define(),g=ne.define({create(t){return new K(w(t).create(),null)},update(t,e){for(let r of e.effects)r.is(C)?t=new K(r.value.create(),t.panel):r.is(H)&&(t=new K(t.query,r.value?j:null));return t},provide:t=>te.from(t,e=>e.panel)});function Ve(t){let e=t.field(g,!1);return e?e.query.spec:w(t)}function He(t){var e;return((e=t.field(g,!1))===null||e===void 0?void 0:e.panel)!=null}class K{constructor(e,r){this.query=e,this.panel=r}}const Ke=f.mark({class:"cm-searchMatch"}),Ge=f.mark({class:"cm-searchMatch cm-searchMatch-selected"}),je=re.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(g))}update(t){let e=t.state.field(g);(e!=t.startState.field(g)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return f.none;let{view:r}=this,n=new Le;for(let i=0,s=r.visibleRanges,o=s.length;i<o;i++){let{from:l,to:c}=s[i];for(;i<o-1&&c>s[i+1].from-2*250;)c=s[++i].to;t.highlight(r.state,l,c,(a,u)=>{let x=r.state.selection.ranges.some(E=>E.from==a&&E.to==u);n.add(a,u,x?Ge:Ke)})}return n.finish()}},{decorations:t=>t.decorations});function F(t){return e=>{let r=e.state.field(g,!1);return r&&r.query.spec.valid?t(e,r):J(e)}}const A=F((t,{query:e})=>{let{to:r}=t.state.selection.main,n=e.nextMatch(t.state,r,r);if(!n)return!1;let i=p.single(n.from,n.to),s=t.state.facet(M);return t.dispatch({selection:i,effects:[X(t,n),s.scrollToMatch(i.main,t)],userEvent:"select.search"}),Me(t),!0}),D=F((t,{query:e})=>{let{state:r}=t,{from:n}=r.selection.main,i=e.prevMatch(r,n,n);if(!i)return!1;let s=p.single(i.from,i.to),o=t.state.facet(M);return t.dispatch({selection:s,effects:[X(t,i),o.scrollToMatch(s.main,t)],userEvent:"select.search"}),Me(t),!0}),ge=F((t,{query:e})=>{let r=e.matchAll(t.state,1e3);return!r||!r.length?!1:(t.dispatch({selection:p.create(r.map(n=>p.range(n.from,n.to))),userEvent:"select.search.matches"}),!0)}),xe=({state:t,dispatch:e})=>{let r=t.selection;if(r.ranges.length>1||r.main.empty)return!1;let{from:n,to:i}=r.main,s=[],o=0;fo Line truncated
@@ -0,0 +1,5 @@
class v{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=J(this,e,t);let i=[];return this.decompose(0,e,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(t,this.length,i,1),E.from(i,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=J(this,e,t);let n=[];return this.decompose(e,t,n,0),E.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),i=new q(this),s=new q(e);for(let r=t,h=t;;){if(i.next(r),s.next(r),r=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(h+=i.value.length,i.done||h>=n)return!0}}iter(e=1){return new q(this,e)}iterRange(e,t=this.length){return new ke(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;n=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new ye(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?v.empty:e.length<=32?new m(e):E.from(m.split(e,[]))}}class m extends v{constructor(e,t=He(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,i){for(let s=0;;s++){let r=this.text[s],h=i+r.length;if((t?n:h)>=e)return new Se(i,h,n,r);i=h+1,n++}}decompose(e,t,n,i){let s=e<=0&&t>=this.length?this:new m(xe(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let r=n.pop(),h=Q(s.text,r.text.slice(),0,s.length);if(h.length<=32)n.push(new m(h,r.length+s.length));else{let a=h.length>>1;n.push(new m(h.slice(0,a)),new m(h.slice(a)))}}else n.push(s)}replace(e,t,n){if(!(n instanceof m))return super.replace(e,t,n);[e,t]=J(this,e,t);let i=Q(this.text,Q(n.text,xe(this.text,0,e)),t),s=this.length+n.length-(t-e);return i.length<=32?new m(i,s):E.from(m.split(i,[]),s)}sliceString(e,t=this.length,n=`
`){[e,t]=J(this,e,t);let i="";for(let s=0,r=0;s<=t&&r<this.text.length;r++){let h=this.text[r],a=s+h.length;s>e&&r&&(i+=n),e<a&&t>s&&(i+=h.slice(Math.max(0,e-s),t-s)),s=a+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],i=-1;for(let s of e)n.push(s),i+=s.length+1,n.length==32&&(t.push(new m(n,i)),n=[],i=-1);return i>-1&&t.push(new m(n,i)),t}}class E extends v{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,t,n,i){for(let s=0;;s++){let r=this.children[s],h=i+r.length,a=n+r.lines-1;if((t?a:h)>=e)return r.lineInner(e,t,n,i);i=h+1,n=a+1}}decompose(e,t,n,i){for(let s=0,r=0;r<=t&&s<this.children.length;s++){let h=this.children[s],a=r+h.length;if(e<=a&&t>=r){let o=i&((r<=e?1:0)|(a>=t?2:0));r>=e&&a<=t&&!o?n.push(h):h.decompose(e-r,t-r,n,o)}r=a+1}}replace(e,t,n){if([e,t]=J(this,e,t),n.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let r=this.children[i],h=s+r.length;if(e>=s&&t<=h){let a=r.replace(e-s,t-s,n),o=this.lines-r.lines+a.lines;if(a.lines<o>>4&&a.lines>o>>6){let f=this.children.slice();return f[i]=a,new E(f,this.length-(t-e)+n.length)}return super.replace(s,h,a)}s=h+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n=`
`){[e,t]=J(this,e,t);let i="";for(let s=0,r=0;s<this.children.length&&r<=t;s++){let h=this.children[s],a=r+h.length;r>e&&s&&(i+=n),e<a&&t>r&&(i+=h.sliceString(e-r,t-r,n)),r=a+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof E))return 0;let n=0,[i,s,r,h]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,s+=t){if(i==r||s==h)return n;let a=this.children[i],o=e.children[s];if(a!=o)return n+a.scanIdentical(o,t);n+=a.length+1}}static from(e,t=e.reduce((n,i)=>n+i.length+1,-1)){let n=0;for(let c of e)n+=c.lines;if(n<32){let c=[];for(let p of e)p.flatten(c);return new m(c,t)}let i=Math.max(32,n>>5),s=i<<1,r=i>>1,h=[],a=0,o=-1,f=[];function u(c){let p;if(c.lines>s&&c instanceof E)for(let b of c.children)u(b);else c.lines>r&&(a>r||!a)?(d(),h.push(c)):c instanceof m&&a&&(p=f[f.length-1])instanceof m&&c.lines+p.lines<=32?(a+=c.lines,o+=c.length+1,f[f.length-1]=new m(p.text.concat(c.text),p.length+1+c.length)):(a+c.lines>i&&d(),a+=c.lines,o+=c.length+1,f.push(c))}function d(){a!=0&&(h.push(f.length==1?f[0]:E.from(f,o)),o=-1,a=f.length=0)}for(let c of e)u(c);return d(),h.length==1?h[0]:new E(h,t)}}v.empty=new m([""],0);function He(l){let e=-1;for(let t of l)e+=t.length+1;return e}function Q(l,e,t=0,n=1e9){for(let i=0,s=0,r=!0;s<l.length&&i<=n;s++){let h=l[s],a=i+h.length;a>=t&&(a>n&&(h=h.slice(0,n-i)),i<t&&(h=h.slice(t-i)),r?(e[e.length-1]+=h,r=!1):e.push(h)),i=a+1}return e}function xe(l,e,t){return Q(l,[""],e,t)}class q{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof m?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],s=this.offsets[n],r=s>>1,h=i instanceof m?i.text.length:i.children.length;if(r==(t>0?h:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
`,this;e--}else if(i instanceof m){let a=i.text[r+(t<0?-1:0)];if(this.offsets[n]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=i.children[r+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof m?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class ke{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new q(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=n?i:t<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class ye{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(v.prototype[Symbol.iterator]=function(){return this.iter()},q.prototype[Symbol.iterator]=ke.prototype[Symbol.iterator]=ye.prototype[Symbol.iterator]=function(){return this});class Se{constructor(e,t,n,i){this.from=e,this.to=t,this.number=n,this.text=i}get length(){return this.to-this.from}}function J(l,e,t){return e=Math.max(0,Math.min(l.length,e)),[e,Math.max(e,Math.min(l.length,t))]}let L="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(l=>l?parseInt(l,36):1);for(let l=1;l<L.length;l++)L[l]+=L[l-1];function Ze(l){for(let e=1;e<L.length;e+=2)if(L[e]>l)return L[e-1]<=l;return!1}function Ie(l){return l>=127462&&l<=127487}const Pe=8205;function $(l,e,t=!0,n=!0){return(t?Ae:Ke)(l,e,n)}function Ae(l,e,t){if(e==l.length)return e;e&&be(l.charCodeAt(e))&&Oe(l.charCodeAt(e-1))&&e--;let n=X(l,e);for(e+=se(n);e<l.length;){let i=X(l,e);if(n==Pe||i==Pe||t&&Ze(i))e+=se(i),n=i;else if(Ie(i)){let s=0,r=e-2;for(;r>=0&&Ie(X(l,r));)s++,r-=2;if(s%2==0)break;e+=2}else break}return e}function Ke(l,e,t){for(;e>0;){let n=Ae(l,e-2,t);if(n<e)return n;e--}return 0}function be(l){return l>=56320&&l<57344}function Oe(l){return l>=55296&&l<56320}function X(l,e){let t=l.charCodeAt(e);if(!Oe(t)||e+1==l.length)return t;let n=l.charCodeAt(e+1);return be(n)?(t-55296<<10)+(n-56320)+65536:t}function Qe(l){return l<=65535?String.fromCharCode(l):(l-=65536,String.fromCharCode((l>>10)+55296,(l&1023)+56320))}function se(l){return l<65536?1:2}const re=/\r\n?|\n/;var C=function(l){return l[l.Simple=0]="Simple",l[l.TrackDel=1]="TrackDel",l[l.TrackBefore=2]="TrackBefore",l[l.TrackAfter=3]="TrackAfter",l}(C||(C={}));class O{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,i=0;t<this.sections.length;){let s=this.sections[t++],r=this.sections[t++];r<0?(e(n,i,s),i+=s):i+=r,n+=s}}iterChangedRanges(e,t=!1){le(this,e,t)}ge Line truncated
`}get readOnly(){return this.facet(Ne)}phrase(e,...t){for(let n of this.facet(w.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(n,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>t.length?n:t[s-1]})),e}languageDataAt(e,t,n=-1){let i=[];for(let s of this.facet(Be))for(let r of s(this,t,n))Object.prototype.hasOwnProperty.call(r,e)&&i.push(r[e]);return i}charCategorizer(e){return lt(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),r=e-n,h=e-n;for(;r>0;){let a=$(t,r,!1);if(s(t.slice(a,r))!=M.Word)break;r=a}for(;h<i;){let a=$(t,h);if(s(t.slice(h,a))!=M.Word)break;h=a}return r==h?null:g.range(r+n,h+n)}}w.allowMultipleSelections=ce,w.tabSize=A.define({combine:l=>l.length?l[0]:4}),w.lineSeparator=Fe,w.readOnly=Ne,w.phrases=A.define({compare(l,e){let t=Object.keys(l),n=Object.keys(e);return t.length==n.length&&t.every(i=>l[i]==e[i])}}),w.languageData=Be,w.changeFilter=Je,w.transactionFilter=Le,w.transactionExtender=Ve,H.reconfigure=S.define();function ht(l,e,t={}){let n={};for(let i of l)for(let s of Object.keys(i)){let r=i[s],h=n[s];if(h===void 0)n[s]=r;else if(!(h===r||r===void 0))if(Object.hasOwnProperty.call(t,s))n[s]=t[s](h,r);else throw new Error("Config merge conflict for field "+s)}for(let i in e)n[i]===void 0&&(n[i]=e[i]);return n}class j{eq(e){return this==e}range(e,t=e){return D.create(e,t,this)}}j.prototype.startSide=j.prototype.endSide=0,j.prototype.point=!1,j.prototype.mapMode=C.TrackDel;class D{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new D(e,t,n)}}function pe(l,e){return l.from-e.from||l.value.startSide-e.value.startSide}class ve{constructor(e,t,n,i){this.from=e,this.to=t,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,i=0){let s=n?this.to:this.from;for(let r=i,h=s.length;;){if(r==h)return r;let a=r+h>>1,o=s[a]-e||(n?this.value[a].endSide:this.value[a].startSide)-t;if(a==r)return o>=0?r:h;o>=0?h=a:r=a+1}}between(e,t,n,i){for(let s=this.findIndex(t,-1e9,!0),r=this.findIndex(n,1e9,!1,s);s<r;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,t){let n=[],i=[],s=[],r=-1,h=-1;for(let a=0;a<this.value.length;a++){let o=this.value[a],f=this.from[a]+e,u=this.to[a]+e,d,c;if(f==u){let p=t.mapPos(f,o.startSide,o.mapMode);if(p==null||(d=c=p,o.startSide!=o.endSide&&(c=t.mapPos(f,o.endSide),c<d)))continue}else if(d=t.mapPos(f,o.startSide),c=t.mapPos(u,o.endSide),d>c||d==c&&o.startSide>0&&o.endSide<=0)continue;(c-d||o.endSide-o.startSide)<0||(r<0&&(r=d),o.point&&(h=Math.max(h,c-d)),n.push(o),i.push(d-r),s.push(c-r))}return{mapped:n.length?new ve(i,s,n,h):null,pos:r}}}class P{constructor(e,t,n,i){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=i}static create(e,t,n,i){return new P(e,t,n,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:i=0,filterTo:s=this.length}=e,r=e.filter;if(t.length==0&&!r)return this;if(n&&(t=t.slice().sort(pe)),this.isEmpty)return t.length?P.of(t):this;let h=new Ue(this,null,-1).goto(0),a=0,o=[],f=new Z;for(;h.value||a<t.length;)if(a<t.length&&(h.from-t[a].from||h.startSide-t[a].value.startSide)>=0){let u=t[a++];f.addInner(u.from,u.to,u.value)||o.push(u)}else h.rangeIndex==1&&h.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(h.chunkIndex)<t[a].from)&&(!r||i>this.chunkEnd(h.chunkIndex)||s<this.chunkPos[h.chunkIndex])&&f.addChunk(this.chunkPos[h.chunkIndex],this.chunk[h.chunkIndex])?h.nextChunk():((!r||i>h.to||s<h.from||r(h.from,h.to,h.value))&&(f.addInner(h.from,h.to,h.value)||o.push(D.create(h.from,h.to,h.value))),h.next());return f.finishInner(this.nextLayer.isEmpty&&!o.length?P.empty:this.nextLayer.update({add:o,filter:r,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],i=-1;for(let r=0;r<this.chunk.length;r++){let h=this.chunkPos[r],a=this.chunk[r],o=e.touchesRange(h,h+a.length);if(o===!1)i=Math.max(i,a.maxPoint),t.push(a),n.push(e.mapPos(h));else if(o===!0){let{mapped:f,pos:u}=a.map(h,e);f&&(i=Math.max(i,f.maxPoint),t.push(f),n.push(u))}}let s=this.nextLayer.map(e);return t.length==0?s:new P(n,t,s||P.empty,i)}between(e,t,n){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],r=this.chunk[i];if(t>=s&&e<=s+r.length&&r.between(s,e-s,t-s,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return K.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return K.from(e).goto(t)}static compare(e,t,n,i,s=-1){let r=e.filter(u=>u.maxPoint>0||!u.isEmpty&&u.maxPoint>=s),h=t.filter(u=>u.maxPoint>0||!u.isEmpty&&u.maxPoint>=s),a=We(r,h,n),o=new G(r,a,s),f=new G(h,a,s);n.iterGaps((u, Line truncated
@@ -0,0 +1 @@
import{EditorView as C}from"@codemirror/view";import{HighlightStyle as y,syntaxHighlighting as B}from"@codemirror/language";import{tags as o}from"@lezer/highlight";const d="#e5c07b",c="#e06c75",m="#56b6c2",g="#ffffff",r="#abb2bf",e="#7d8799",s="#61afef",b="#98c379",a="#d19a66",p="#c678dd",f="#21252b",l="#2c313a",n="#282c34",t="#353a42",u="#3E4451",i="#528bff",v={chalky:d,coral:c,cyan:m,invalid:g,ivory:r,stone:e,malibu:s,sage:b,whiskey:a,violet:p,darkBackground:f,highlightBackground:l,background:n,tooltipBackground:t,selection:u,cursor:i},k=C.theme({"&":{color:r,backgroundColor:n},".cm-content":{caretColor:i},".cm-cursor, .cm-dropCursor":{borderLeftColor:i},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:u},".cm-panels":{backgroundColor:f,color:r},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:n,color:e,border:"none"},".cm-activeLineGutter":{backgroundColor:l},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:t},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:t,borderBottomColor:t},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:l,color:r}}},{dark:!0}),h=y.define([{tag:o.keyword,color:p},{tag:[o.name,o.deleted,o.character,o.propertyName,o.macroName],color:c},{tag:[o.function(o.variableName),o.labelName],color:s},{tag:[o.color,o.constant(o.name),o.standard(o.name)],color:a},{tag:[o.definition(o.name),o.separator],color:r},{tag:[o.typeName,o.className,o.number,o.changed,o.annotation,o.modifier,o.self,o.namespace],color:d},{tag:[o.operator,o.operatorKeyword,o.url,o.escape,o.regexp,o.link,o.special(o.string)],color:m},{tag:[o.meta,o.comment],color:e},{tag:o.strong,fontWeight:"bold"},{tag:o.emphasis,fontStyle:"italic"},{tag:o.strikethrough,textDecoration:"line-through"},{tag:o.link,color:e,textDecoration:"underline"},{tag:o.heading,fontWeight:"bold",color:c},{tag:[o.atom,o.bool,o.special(o.variableName)],color:a},{tag:[o.processingInstruction,o.string,o.inserted],color:b},{tag:o.invalid,color:g}]),x=[k,B(h)];export{v as color,x as oneDark,h as oneDarkHighlightStyle,k as oneDarkTheme};
@@ -0,0 +1,5 @@
import{Text as Y,RangeSet as V,MapMode as yt,RangeValue as xi,findClusterBreak as wt,EditorSelection as M,Facet as k,StateEffect as xt,ChangeSet as vi,findColumn as ke,CharCategory as Ln,EditorState as Lt,Annotation as Bn,Transaction as Pn,Prec as Ae,codePointAt as Si,codePointSize as Hn,combineConfig as De,StateField as Ci,RangeSetBuilder as Nn,countColumn as Mi}from"@codemirror/state";import{StyleModule as vt}from"style-mod";import{keyName as Vn,base as Fn,shift as Wn}from"w3c-keyname";function Bt(n){let t;return n.nodeType==11?t=n.getSelection?n:n.ownerDocument:t=n,t.getSelection()}function Oe(n,t){return t?n==t||n.contains(t.nodeType!=1?t.parentNode:t):!1}function zn(n){let t=n.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function Zt(n,t){if(!t.anchorNode)return!1;try{return Oe(n,t.anchorNode)}catch{return!1}}function St(n){return n.nodeType==3?ut(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Pt(n,t,e,i){return e?ki(n,t,e,i,-1)||ki(n,t,e,i,1):!1}function dt(n){for(var t=0;;t++)if(n=n.previousSibling,!n)return t}function te(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function ki(n,t,e,i,s){for(;;){if(n==e&&t==i)return!0;if(t==(s<0?0:Z(n))){if(n.nodeName=="DIV")return!1;let o=n.parentNode;if(!o||o.nodeType!=1)return!1;t=dt(n)+(s<0?0:1),n=o}else if(n.nodeType==1){if(n=n.childNodes[t+(s<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;t=s<0?Z(n):0}else return!1}}function Z(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Ht(n,t){let e=t?n.left:n.right;return{left:e,right:e,top:n.top,bottom:n.bottom}}function In(n){let t=n.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function Ai(n,t){let e=t.width/n.offsetWidth,i=t.height/n.offsetHeight;return(e>.995&&e<1.005||!isFinite(e)||Math.abs(t.width-n.offsetWidth)<1)&&(e=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(t.height-n.offsetHeight)<1)&&(i=1),{scaleX:e,scaleY:i}}function Kn(n,t,e,i,s,o,r,l){let h=n.ownerDocument,c=h.defaultView||window;for(let a=n,f=!1;a&&!f;)if(a.nodeType==1){let d,u=a==h.body,g=1,p=1;if(u)d=In(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(a).position)&&(f=!0),a.scrollHeight<=a.clientHeight&&a.scrollWidth<=a.clientWidth){a=a.assignedSlot||a.parentNode;continue}let w=a.getBoundingClientRect();({scaleX:g,scaleY:p}=Ai(a,w)),d={left:w.left,right:w.left+a.clientWidth*g,top:w.top,bottom:w.top+a.clientHeight*p}}let b=0,m=0;if(s=="nearest")t.top<d.top?(m=-(d.top-t.top+r),e>0&&t.bottom>d.bottom+m&&(m=t.bottom-d.bottom+m+r)):t.bottom>d.bottom&&(m=t.bottom-d.bottom+r,e<0&&t.top-m<d.top&&(m=-(d.top+m-t.top+r)));else{let w=t.bottom-t.top,v=d.bottom-d.top;m=(s=="center"&&w<=v?t.top+w/2-v/2:s=="start"||s=="center"&&e<0?t.top-r:t.bottom-v+r)-d.top}if(i=="nearest"?t.left<d.left?(b=-(d.left-t.left+o),e>0&&t.right>d.right+b&&(b=t.right-d.right+b+o)):t.right>d.right&&(b=t.right-d.right+o,e<0&&t.left<d.left+b&&(b=-(d.left+b-t.left+o))):b=(i=="center"?t.left+(t.right-t.left)/2-(d.right-d.left)/2:i=="start"==l?t.left-o:t.right-(d.right-d.left)+o)-d.left,b||m)if(u)c.scrollBy(b,m);else{let w=0,v=0;if(m){let x=a.scrollTop;a.scrollTop+=m/p,v=(a.scrollTop-x)*p}if(b){let x=a.scrollLeft;a.scrollLeft+=b/g,w=(a.scrollLeft-x)*g}t={left:t.left-w,top:t.top-v,right:t.right-w,bottom:t.bottom-v},w&&Math.abs(w-b)<1&&(i="nearest"),v&&Math.abs(v-m)<1&&(s="nearest")}if(u)break;a=a.assignedSlot||a.parentNode}else if(a.nodeType==11)a=a.host;else break}function qn(n){let t=n.ownerDocument,e,i;for(let s=n.parentNode;s&&!(s==t.body||e&&i);)if(s.nodeType==1)!i&&s.scrollHeight>s.clientHeight&&(i=s),!e&&s.scrollWidth>s.clientWidth&&(e=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:e,y:i}}class jn{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:e,focusNode:i}=t;this.set(e,Math.min(t.anchorOffset,e?Z(e):0),i,Math.min(t.focusOffset,i?Z(i):0))}set(t,e,i,s){this.anchorNode=t,this.anchorOffset=e,this.focusNode=i,this.focusOffset=s}}let Ct=null;function Di(n){if(n.setActive)return n.setActive();if(Ct)return n.focus(Ct);let t=[];for(let e=n;e&&(t.push(e,e.scrollTop,e.scrollLeft),e!=e.ownerDocument);e=e.parentNode);if(n.focus(Ct==null?{get preventScroll(){return Ct={preventScroll:!0},!0}}:void 0),!Ct){Ct=!1;for(let e=0;e<t.length;){let i=t[e++],s=t[e++],o=t[e++];i.scrollTop!=s&&(i.scrollTop=s),i.scrollLeft!=o&&(i.scrollLeft=o)}}}let Oi;function ut(n,t,e=t){let i=Oi||(Oi=document.createRange());return i.setEnd(n,e),i.setStart(n,t),i}function Mt(n,t,e,i){let s={key:t,code:t,keyCode:e,which:e,cancelable:!0};i&&({altKey:s.altKey,ctrlKey:s.ctrlKey,shiftKey:s.shiftKey,metaKey:s.metaKey}=i);let o=new KeyboardEvent("keydown",Line truncated
`,s=n.state.doc.line(s.number+(e?1:-1)),o=n.bidiSpans(s),c=n.visualLineSide(s,!e)}if(h){if(!h(a))return l}else{if(!i)return c;h=i(a)}l=c}}function xo(n,t,e){let i=n.state.charCategorizer(t),s=i(e);return o=>{let r=i(o);return s==Ln.Space&&(s=r),s==r}}function vo(n,t,e,i){let s=t.head,o=e?1:-1;if(s==(e?n.state.doc.length:0))return M.cursor(s,t.assoc);let r=t.goalColumn,l,h=n.contentDOM.getBoundingClientRect(),c=n.coordsAtPos(s,t.assoc||-1),a=n.documentTop;if(c)r==null&&(r=c.left-h.left),l=o<0?c.top:c.bottom;else{let u=n.viewState.lineBlockAt(s);r==null&&(r=Math.min(h.right-h.left,n.defaultCharacterWidth*(s-u.from))),l=(o<0?u.top:u.bottom)+a}let f=h.left+r,d=i??n.viewState.heightOracle.textHeight>>1;for(let u=0;;u+=10){let g=l+(d+u)*o,p=vs(n,{x:f,y:g},!1,o);if(g<h.top||g>h.bottom||(o<0?p<s:p>s)){let b=n.docView.coordsForChar(p),m=!b||g<b.top?-1:1;return M.cursor(p,m,void 0,r)}}}function re(n,t,e){for(;;){let i=0;for(let s of n)s.between(t-1,t+1,(o,r,l)=>{if(t>o&&t<r){let h=i||e||(t-o<r-t?-1:1);t=h<0?o:r,i=h}});if(!i)return t}}function Ge(n,t,e){let i=re(n.state.facet(je).map(s=>s(n)),e.from,t.head>e.from?-1:1);return i==e.from?e:M.cursor(i,i<e.from?1:-1)}const Wt="\uFFFF";class So{constructor(t,e){this.points=t,this.text="",this.lineSeparator=e.facet(Lt.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=Wt}readRange(t,e){if(!t)return this;let i=t.parentNode;for(let s=t;;){this.findPointBefore(i,s);let o=this.text.length;this.readNode(s);let r=s.nextSibling;if(r==e)break;let l=O.get(s),h=O.get(r);(l&&h?l.breakAfter:(l?l.breakAfter:te(s))||te(r)&&(s.nodeName!="BR"||s.cmIgnore)&&this.text.length>o)&&this.lineBreak(),s=r}return this.findPointBefore(i,e),this}readTextNode(t){let e=t.nodeValue;for(let i of this.points)i.node==t&&(i.pos=this.text.length+Math.min(i.offset,e.length));for(let i=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,r=1,l;if(this.lineSeparator?(o=e.indexOf(this.lineSeparator,i),r=this.lineSeparator.length):(l=s.exec(e))&&(o=l.index,r=l[0].length),this.append(e.slice(i,o<0?e.length:o)),o<0)break;if(this.lineBreak(),r>1)for(let h of this.points)h.node==t&&h.pos>this.text.length&&(h.pos-=r-1);i=o+r}}readNode(t){if(t.cmIgnore)return;let e=O.get(t),i=e&&e.overrideDOMText;if(i!=null){this.findPointInside(t,i.length);for(let s=i.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else t.nodeType==3?this.readTextNode(t):t.nodeName=="BR"?t.nextSibling&&this.lineBreak():t.nodeType==1&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let i of this.points)i.node==t&&t.childNodes[i.offset]==e&&(i.pos=this.text.length)}findPointInside(t,e){for(let i of this.points)(t.nodeType==3?i.node==t:t.contains(i.node))&&(i.pos=this.text.length+(Co(t,i.node,i.offset)?e:0))}}function Co(n,t,e){for(;;){if(!t||e<Z(t))return!1;if(t==n)return!0;e=dt(t)+1,t=t.parentNode}}class Ms{constructor(t,e){this.node=t,this.offset=e,this.pos=-1}}class Mo{constructor(t,e,i,s){this.typeOver=s,this.bounds=null,this.text="",this.domChanged=e>-1;let{impreciseHead:o,impreciseAnchor:r}=t.docView;if(t.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=t.docView.domBoundsAround(e,i,0))){let l=o||r?[]:Do(t),h=new So(l,t.state);h.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=h.text,this.newSel=Oo(l,this.bounds.from)}else{let l=t.observer.selectionRange,h=o&&o.node==l.focusNode&&o.offset==l.focusOffset||!Oe(t.contentDOM,l.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(l.focusNode,l.focusOffset),c=r&&r.node==l.anchorNode&&r.offset==l.anchorOffset||!Oe(t.contentDOM,l.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(l.anchorNode,l.anchorOffset),a=t.viewport;if((y.ios||y.chrome)&&t.state.selection.main.empty&&h!=c&&(a.from>0||a.to<t.state.doc.length)){let f=Math.min(h,c),d=Math.max(h,c),u=a.from-f,g=a.to-d;(u==0||u==1||f==0)&&(g==0||g==-1||d==t.state.doc.length)&&(h=0,c=t.state.doc.length)}this.newSel=M.single(c,h)}}}function ks(n,t){let e,{newSel:i}=t,s=n.state.selection.main,o=n.inputState.lastKeyTime>Date.now()-100?n.inputState.lastKeyCode:-1;if(t.bounds){let{from:r,to:l}=t.bounds,h=s.from,c=null;(o===8||y.android&&t.text.length<l-r)&&(h=s.to,c="end");let a=Ao(n.state.doc.sliceString(r,l,Wt),t.text,h-r,c);a&&(y.chrome&&o==13&&a.toB==a.from+2&&t.text.slice(a.from,a.toB)==Wt+Wt&&a.toB--,e={from:r+a.from,to:r+a.toA,insert:Y.of(t.text.slice(a.from,a.toB).split(Wt))})}else i&&(!n.hasFocus&&n.state.facet(rt)||i.main.eq(s))&&(i=null);if(!e&&!i)return!1;if(!e&&t.typeOver&&!s.empty&&i&&i.main.empty?e={from:s.from,to:s.to,insert:n.state.doc.slice(s.from,s.to)}:e&&e.from>=s.from&&e.to<=s.to&&(e.from!=s.from||e.to!=s.to)&&s.to-s.from-(e.to-e.from)<=4?e={from:s.from,to:s.to,insert:n.state.doc.slice(s.from,e.from).append(e.insert).append(n.state.doc.slice(e.to,s.to))}:(y.mac||y.android)&&e&&e.from==e.to&&e.from==s.head-1&&/^\. ?$/.test(e.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(i&&e.insert.length==2&&(i=M.single(i.main.anchor-1,i.main Line truncated
`&&n.lineWrapping&&(i&&(i=M.single(i.main.anchor-1,i.main.head-1)),e={from:s.from,to:s.to,insert:Y.of([" "])}),e)return $e(n,e,i,o);if(i&&!i.main.eq(s)){let r=!1,l="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(r=!0),l=n.inputState.lastSelectionOrigin),n.dispatch({selection:i,scrollIntoView:r,userEvent:l}),!0}else return!1}function $e(n,t,e,i=-1){if(y.ios&&n.inputState.flushIOSKey(t))return!0;let s=n.state.selection.main;if(y.android&&(t.to==s.to&&(t.from==s.from||t.from==s.from-1&&n.state.sliceDoc(t.from,s.from)==" ")&&t.insert.length==1&&t.insert.lines==2&&Mt(n.contentDOM,"Enter",13)||(t.from==s.from-1&&t.to==s.to&&t.insert.length==0||i==8&&t.insert.length<t.to-t.from&&t.to>s.head)&&Mt(n.contentDOM,"Backspace",8)||t.from==s.from&&t.to==s.to+1&&t.insert.length==0&&Mt(n.contentDOM,"Delete",46)))return!0;let o=t.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let r,l=()=>r||(r=ko(n,t,e));return n.state.facet(ns).some(h=>h(n,t.from,t.to,o,l))||n.dispatch(l()),!0}function ko(n,t,e){let i,s=n.state,o=s.selection.main;if(t.from>=o.from&&t.to<=o.to&&t.to-t.from>=(o.to-o.from)/3&&(!e||e.main.empty&&e.main.from==t.from+t.insert.length)&&n.inputState.composing<0){let l=o.from<t.from?s.sliceDoc(o.from,t.from):"",h=o.to>t.to?s.sliceDoc(t.to,o.to):"";i=s.replaceSelection(n.state.toText(l+t.insert.sliceString(0,void 0,n.state.lineBreak)+h))}else{let l=s.changes(t),h=e&&e.main.to<=l.newLength?e.main:void 0;if(s.selection.ranges.length>1&&n.inputState.composing>=0&&t.to<=o.to&&t.to>=o.to-10){let c=n.state.sliceDoc(t.from,t.to),a,f=e&&bs(n,e.main.head);if(f){let g=t.insert.length-(t.to-t.from);a={from:f.from,to:f.to-g}}else a=n.state.doc.lineAt(o.head);let d=o.to-t.to,u=o.to-o.from;i=s.changeByRange(g=>{if(g.from==o.from&&g.to==o.to)return{changes:l,range:h||g.map(l)};let p=g.to-d,b=p-c.length;if(g.to-g.from!=u||n.state.sliceDoc(b,p)!=c||g.to>=a.from&&g.from<=a.to)return{range:g};let m=s.changes({from:b,to:p,insert:t.insert}),w=g.to-o.to;return{changes:m,range:h?M.range(Math.max(0,h.anchor+w),Math.max(0,h.head+w)):g.map(m)}})}else i={changes:l,selection:h&&s.selection.replaceRange(h)}}let r="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,r+=".compose",n.inputState.compositionFirstChange&&(r+=".start",n.inputState.compositionFirstChange=!1)),s.update(i,{userEvent:r,scrollIntoView:!0})}function Ao(n,t,e,i){let s=Math.min(n.length,t.length),o=0;for(;o<s&&n.charCodeAt(o)==t.charCodeAt(o);)o++;if(o==s&&n.length==t.length)return null;let r=n.length,l=t.length;for(;r>0&&l>0&&n.charCodeAt(r-1)==t.charCodeAt(l-1);)r--,l--;if(i=="end"){let h=Math.max(0,o-Math.min(r,l));e-=r+h-o}if(r<o&&n.length<t.length){let h=e<=o&&e>=r?o-e:0;o-=h,l=o+(l-r),r=o}else if(l<o){let h=e<=o&&e>=l?o-e:0;o-=h,r=o+(r-l),l=o}return{from:o,toA:r,toB:l}}function Do(n){let t=[];if(n.root.activeElement!=n.contentDOM)return t;let{anchorNode:e,anchorOffset:i,focusNode:s,focusOffset:o}=n.observer.selectionRange;return e&&(t.push(new Ms(e,i)),(s!=e||o!=i)&&t.push(new Ms(s,o))),t}function Oo(n,t){if(n.length==0)return null;let e=n[0].pos,i=n.length==2?n[1].pos:e;return e>-1&&i>-1?M.single(e+t,i+t):null}class To{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,y.safari&&t.contentDOM.addEventListener("input",()=>null),y.gecko&&Yo(t.contentDOM.ownerDocument)}handleEvent(t){!Vo(this.view,t)||this.ignoreDuringComposition(t)||t.type=="keydown"&&this.keydown(t)||this.runHandlers(t.type,t)}runHandlers(t,e){let i=this.handlers[t];if(i){for(let s of i.observers)s(this.view,e);for(let s of i.handlers){if(e.defaultPrevented)break;if(s(this.view,e)){e.preventDefault();break}}}}ensureHandlers(t){let e=Ro(t),i=this.handlers,s=this.view.contentDOM;for(let o in e)if(o!="scroll"){let r=!e[o].handlers.length,l=i[o];l&&r!=!l.handlers.length&&(s.removeEventListener(o,this.handleEvent),l=null),l||s.addEventListener(o,this.handleEvent,{passive:r})}for(let o in i)o!="scroll"&&!e[o]&&s.removeEventListener(o,this.handleEvent);this.handlers=e}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&t.keyCode!=27&&Os.indexOf(t.keyCode)<0&&(this.tab Line truncated
`))};o.from==this.from&&s<this.from?o.from=s:o.to==this.to&&s>this.to&&(o.to=s),!(o.from==o.to&&!o.insert.length)&&(this.pendingContextChange=o,t.state.readOnly||$e(t,o,M.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd))),this.pendingContextChange&&(this.revertPending(t.state),this.setSelection(t.state)))},this.handlers.characterboundsupdate=i=>{let s=[],o=null;for(let r=this.toEditorPos(i.rangeStart),l=this.toEditorPos(i.rangeEnd);r<l;r++){let h=t.coordsForChar(r);o=h&&new DOMRect(h.left,h.top,h.right-h.left,h.bottom-h.top)||o||new DOMRect,s.push(o)}e.updateCharacterBounds(i.rangeStart,s)},this.handlers.textformatupdate=i=>{let s=[];for(let o of i.getTextFormats()){let r=o.underlineStyle,l=o.underlineThickness;if(r!="None"&&l!="None"){let h=`text-decoration: underline ${r=="Dashed"?"dashed ":r=="Squiggle"?"wavy ":""}${l=="Thin"?1:2}px`;s.push(R.mark({attributes:{style:h}}).range(this.toEditorPos(o.rangeStart),this.toEditorPos(o.rangeEnd)))}}t.dispatch({effects:as.of(R.set(s))})},this.handlers.compositionstart=()=>{t.inputState.composing<0&&(t.inputState.composing=0,t.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{t.inputState.composing=-1,t.inputState.compositionFirstChange=null};for(let i in this.handlers)e.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let s=Bt(i.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let e=0,i=!1,s=this.pendingContextChange;return t.changes.iterChanges((o,r,l,h,c)=>{if(i)return;let a=c.length-(r-o);if(s&&r>=s.to)if(s.from==o&&s.to==r&&s.insert.eq(c)){s=this.pendingContextChange=null,e+=a,this.to+=a;return}else s=null,this.revertPending(t.state);if(o+=e,r+=e,r<=this.from)this.from+=a,this.to+=a;else if(o<this.to){if(o<this.from||r>this.to||this.to-this.from+c.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(o),this.toContextPos(r),c.toString()),this.to+=a}e+=a}),s&&!i&&this.revertPending(t.state),!i}update(t){let e=this.pendingContextChange;!this.applyEdits(t)||!this.rangeIsValid(t.state)?(this.pendingContextChange=null,this.resetRange(t.state),this.editContext.updateText(0,this.editContext.text.length,t.state.doc.sliceString(this.from,this.to)),this.setSelection(t.state)):(t.docChanged||t.selectionSet||e)&&this.setSelection(t.state),(t.geometryChanged||t.docChanged||t.selectionSet)&&t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:e}=t.selection.main;this.from=Math.max(0,e-1e4),this.to=Math.min(t.doc.length,e+1e4)}revertPending(t){let e=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(e.from),this.toContextPos(e.from+e.insert.length),t.doc.sliceString(e.from,e.to))}setSelection(t){let{main:e}=t.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,e.anchor))),s=this.toContextPos(e.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(i,s)}rangeIsValid(t){let{head:e}=t.selection.main;return!(this.from>0&&e-this.from<500||this.to<t.doc.length&&this.to-e<500||this.to-this.from>1e4*3)}toEditorPos(t){return t+this.from}toContextPos(t){return t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class A{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var e;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:i}=t;this.dispatchTransactions=t.dispatchTransactions||i&&(s=>s.forEach(o=>i(o,this)))||(s=>this.update(s)),this.dispatch=this.dispatch.bind(this),this._root=t.root||Yn(t.parent)||document,this.viewState=new Gs(t.state||Lt.create(t)),t.scrollTo&&t.scrollTo.is(ne)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Nt).map(s=>new qe(s));for(let s of this.plugins)s.update(this);this.observer=new sr(this),this.inputState=new To(this),th Line truncated
-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,ri),kr={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let li=null;function Ar(){var n;if(li==null&&typeof document<"u"&&document.body){let t=document.body.style;li=((n=t.tabSize)!==null&&n!==void 0?n:t.MozTabSize)!=null}return li||!1}const ye=k.define({combine(n){let t=De(n,{render:null,specialChars:Mr,addSpecialChars:null});return(t.replaceTabs=!Ar())&&(t.specialChars=new RegExp(" |"+t.specialChars.source,ri)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,ri)),t}});function Dr(n={}){return[ye.of(n),Or()]}let pn=null;function Or(){return pn||(pn=P.fromClass(class{constructor(n){this.view=n,this.decorations=R.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(ye)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new be({regexp:n.specialChars,decoration:(t,e,i)=>{let{doc:s}=e.state,o=Si(t[0],0);if(o==9){let r=s.lineAt(i),l=e.state.tabSize,h=Mi(r.text,l,i-r.from);return R.replace({widget:new Lr((l-h%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=R.replace({widget:new Er(n,o)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let t=n.state.facet(ye);n.startState.facet(ye)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const Tr="\u2022";function Rr(n){return n>=32?Tr:n==10?"\u2424":String.fromCharCode(9216+n)}class Er extends gt{constructor(t,e){super(),this.options=t,this.code=e}eq(t){return t.code==this.code}toDOM(t){let e=Rr(this.code),i=t.state.phrase("Control character")+" "+(kr[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,e);if(s)return s;let o=document.createElement("span");return o.textContent=e,o.title=i,o.setAttribute("aria-label",i),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class Lr extends gt{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent=" ",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}const mn=P.fromClass(class{constructor(){this.height=1e3,this.attrs={style:"padding-bottom: 1000px"}}update(n){let{view:t}=n,e=t.viewState.editorHeight-t.defaultLineHeight-t.documentPadding.top-.5;e>=0&&e!=this.height&&(this.height=e,this.attrs={style:`padding-bottom: ${e}px`})}});function Br(){return[mn,oe.of(n=>{var t;return((t=n.plugin(mn))===null||t===void 0?void 0:t.attrs)||null})]}function Pr(){return Nr}const Hr=R.line({class:"cm-activeLine"}),Nr=P.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let t=-1,e=[];for(let i of n.state.selection.ranges){let s=n.lineBlockAt(i.head);s.from>t&&(e.push(Hr.range(s.from)),t=s.from)}return R.set(e)}},{decorations:n=>n.decorations});class Vr extends gt{constructor(t){super(),this.content=t}toDOM(){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?t.setAttribute("aria-label","placeholder "+this.content):t.setAttribute("aria-hidden","true"),t}coordsAt(t){let e=t.firstChild?St(t.firstChild):[];if(!e.length)return null;let i=window.getComputedStyle(t.parentNode),s=Ht(e[0],i.direction!="rtl"),o=parseInt(i.lineHeight);return s.bottom-s.top>o*1.5?{left:s.left,right:s.right,top:s.top,bottom:s.top+o}:s}ignoreEvent(){return!1}}function Fr(n){return P.fromClass(class{constructor(t){this.view=t,this.placeholder=n?R.set([R.widget({widget:new Vr(n),side:1}).range(0)]):R.none}get decorations(){return this.view.state.doc.length?R.none:this.placeholder}},{decorations:t=>t.decorations})}const hi=2e3;function Wr(n,t,e){let i=Math.min(t.line,e.line),s=Math.max(t.line,e.line),o=[];if(t.off>hi||e.off>hi||t.col<0||e.col<0){let r=Math.min(t.off,e.off),l=Math.max(t.off,e.off);for(let h=i;h<=s;h++){let c=n.doc.line(h);c.length<=l&&o.push(M.range(c.from+r,c.to+l))}}else{let r=Math.min(t.col,e.col),l=Math.max(t.col,e.col);for(let h=i;h<=s;h++){let c=n.doc.line(h),a=ke(c.text,r,n.tabSize,!0);if(a<0)o.push(M.cursor(c.to));else{let f=ke(c.text,l,n.tabSize);o.push(M.range(c.from+a,c.from+f))} Line truncated
@@ -0,0 +1 @@
const ve=1024;let ke=0;class T{constructor(e,t){this.from=e,this.to=t}}class v{constructor(e={}){this.id=ke++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=O.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}v.closedBy=new v({deserialize:l=>l.split(" ")}),v.openedBy=new v({deserialize:l=>l.split(" ")}),v.group=new v({deserialize:l=>l.split(" ")}),v.isolate=new v({deserialize:l=>{if(l&&l!="rtl"&&l!="ltr"&&l!="auto")throw new RangeError("Invalid value for isolate: "+l);return l||"auto"}}),v.contextHash=new v({perNode:!0}),v.lookAhead=new v({perNode:!0}),v.mounted=new v({perNode:!0});class q{constructor(e,t,r){this.tree=e,this.overlay=t,this.parser=r}static get(e){return e&&e.props&&e.props[v.mounted.id]}}const Ce=Object.create(null);class O{constructor(e,t,r,n=0){this.name=e,this.props=t,this.id=r,this.flags=n}static define(e){let t=e.props&&e.props.length?Object.create(null):Ce,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),n=new O(e.name||"",t,e.id,r);if(e.props){for(let i of e.props)if(Array.isArray(i)||(i=i(n)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[i[0].id]=i[1]}}return n}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(v.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let n of r.split(" "))t[n]=e[r];return r=>{for(let n=r.prop(v.group),i=-1;i<(n?n.length:0);i++){let s=t[i<0?r.name:n[i]];if(s)return s}}}}O.none=new O("",Object.create(null),0,8);class se{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let r of this.types){let n=null;for(let i of e){let s=i(r);s&&(n||(n=Object.assign({},r.props)),n[s[0].id]=s[1])}t.push(n?new O(r.name,n,r.id,r.flags):r)}return new se(t)}}const Z=new WeakMap,oe=new WeakMap;var C;(function(l){l[l.ExcludeBuffers=1]="ExcludeBuffers",l[l.IncludeAnonymous=2]="IncludeAnonymous",l[l.IgnoreMounts=4]="IgnoreMounts",l[l.IgnoreOverlays=8]="IgnoreOverlays"})(C||(C={}));class z{constructor(e,t,r,n,i){if(this.type=e,this.children=t,this.positions=r,this.length=n,this.props=null,i&&i.length){this.props=Object.create(null);for(let[s,f]of i)this.props[typeof s=="number"?s:s.id]=f}}toString(){let e=q.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let r of this.children){let n=r.toString();n&&(t&&(t+=","),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new X(this.topNode,e)}cursorAt(e,t=0,r=0){let n=Z.get(this)||this.topNode,i=new X(n);return i.moveTo(e,t),Z.set(this,i._tree),i}get topNode(){return new P(this,0,0,null)}resolve(e,t=0){let r=Q(Z.get(this)||this.topNode,e,t,!1);return Z.set(this,r),r}resolveInner(e,t=0){let r=Q(oe.get(this)||this.topNode,e,t,!0);return oe.set(this,r),r}resolveStack(e,t=0){return _e(this,e,t)}iterate(e){let{enter:t,leave:r,from:n=0,to:i=this.length}=e,s=e.mode||0,f=(s&C.IncludeAnonymous)>0;for(let h=this.cursor(s|C.IncludeAnonymous);;){let a=!1;if(h.from<=i&&h.to>=n&&(!f&&h.type.isAnonymous||t(h)!==!1)){if(h.firstChild())continue;a=!0}for(;a&&r&&(f||!h.type.isAnonymous)&&r(h),!h.nextSibling();){if(!h.parent())return;a=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:ne(O.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,n)=>new z(this.type,t,r,n,this.propValues),e.makeTree||((t,r,n)=>new z(O.none,t,r,n)))}static build(e){return Ie(e)}}z.empty=new z(O.none,[],[],0);class le{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new le(this.buffer,this.index)}}class U{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return O.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],r=this.buffer[e+3],n=this.set.types[t],i=n.name;if(/\W/.test(i)&&!n.isError&&(i=JSON.stringify(i)),e+=4,r==e)return i;let s=[];for(;e<r;)s.push(this.childString(e)),e=this.buffer[e+3];return i+"("+s.join(",")+")"}finLine truncated
@@ -0,0 +1 @@
import{ExternalTokenizer as P,LRParser as c}from"@lezer/lr";import{styleTags as W,tags as O}from"@lezer/highlight";const X=94,$=1,y=95,p=96,i=2,n=[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],m=58,d=40,s=95,f=91,a=45,z=46,R=35,g=37;function t(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function U(e){return e>=48&&e<=57}const u=new P((e,Q)=>{for(let o=!1,r=0,l=0;;l++){let{next:S}=e;if(t(S)||S==a||S==s||o&&U(S))!o&&(S!=a||l>0)&&(o=!0),r===l&&S==a&&r++,e.advance();else{o&&e.acceptToken(S==d?y:r==2&&Q.canShift(i)?i:p);break}}}),T=new P(e=>{if(n.includes(e.peek(-1))){let{next:Q}=e;(t(Q)||Q==s||Q==R||Q==z||Q==f||Q==m||Q==a)&&e.acceptToken(X)}}),h=new P(e=>{if(!n.includes(e.peek(-1))){let{next:Q}=e;if(Q==g&&(e.advance(),e.acceptToken($)),t(Q)){do e.advance();while(t(e.next));e.acceptToken($)}}}),b=W({"AtKeyword import charset namespace keyframes media supports":O.definitionKeyword,"from to selector":O.keyword,NamespaceName:O.namespace,KeyframeName:O.labelName,TagName:O.tagName,ClassName:O.className,PseudoClassName:O.constant(O.className),IdName:O.labelName,"FeatureName PropertyName":O.propertyName,AttributeName:O.attributeName,NumberLiteral:O.number,KeywordQuery:O.keyword,UnaryQueryOp:O.operatorKeyword,"CallTag ValueName":O.atom,VariableName:O.variableName,Callee:O.operatorKeyword,Unit:O.unit,"UniversalSelector NestingSelector":O.definitionOperator,MatchOp:O.compareOperator,"ChildOp SiblingOp, LogicOp":O.logicOperator,BinOp:O.arithmeticOperator,Important:O.modifier,Comment:O.blockComment,ParenthesizedContent:O.special(O.name),ColorLiteral:O.color,StringLiteral:O.string,":":O.punctuation,"PseudoOp #":O.derefOperator,"; ,":O.separator,"( )":O.paren,"[ ]":O.squareBracket,"{ }":O.brace}),_={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},V={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},Y={__proto__:null,not:128,only:128,from:158,to:160},G=c.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO.ZQ`O1G/ZO.tQXO1G/_O/[QXO1G/aO/rQXO1G/bO0YQWO,59zO0_Q[O'#DOO0fQdO'#CoOOQP1G/Z1G/ZO$vQdO1G/ZO0mQpO,59]OOQS,59_,59_O$vQdO,59aO0uQWO1G/kOOQS,59c,59cO0zQ!bO,59eO1SQWO'#DhO1_QWO,5:TO1dQWO,5:ZO&TQ[O,5:VO&TQ[O'#EZO1lQWO,5;VO1wQWO,5:XO'yQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2YQWO1G/|O2_QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2mQtO1G/gOOQO,5:t,5:tO3TQ[O,5:tOOQO-E8W-E8WO3bQWO1G0pOOQP7+$Y7+$YOOQP7+$u7+$uO$vQdO7+$uOOQS1G/f1G/fO3mQXO'#EiO3tQWO,59jO3yQtO'#EUO4nQdO'#EfO4xQWO,59ZO4}QpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5VQWO1G/PO$vQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5[QWO,5:uOOQO-E8X-E8XO5jQXO1G/vOOQS7+%h7+%hO5qQYO'#CsO(hQWO'#E[O5yQdO,5:hOOQS,5:h,5:hO6XQtO'#EXO$vQdO'#EXO7VQdO7+%ROOQO7+%R7+%ROOQO1G0`1G0`O7jQpO<<HaO7rQWO,5;TOOQP1G/U1G/UOOQS-E8S-E8SO$vQdO'#EVO7zQWO,5;QOOQT1G.u1G.uOOQP<<Ha<<HaOOQS7+$k7+$kO8SQdO7+%ZOOQO7+%b7+%bOOQS,5:v,5:vOOQS-E8Y-E8YOOQS1G0S1G0SO8ZQtO,5:sOOQS-E8V-E8VOOQO<<Hm<<HmOOQPAN={AN={O9XQdO,5:qOOQO-E8T-E8TOOQO<<Hu<<Hu",stateData:"9i~O#UOSROS~OUXOXXO]UO^UOtVOxWO!Y`O!ZYO!gZO!i[O!k]O!n^O!t_O#SQO#XSO~OQeOUXOXXO]UO^UOtVOxWO!Y`O!ZYO!gZO!i[O!k]O!n^O!t_O#SdO#XSO~O#P#^P~P!ZO#SiO~O]nO^nOplOtoOxpO|qO!PsO#QrO#XkO~O!RtO~P#kO`zO#RwO#SvO~O#S{O~O#S}O~OQ!WOb!QOf!WOh!WOn!VO#R!TO#S!PO#[!RO~Ob!YO!b![O!e!]O#S!XO!R#_P~Oh!bOn!VO#S!aO~O#S!dO~Ob!YO!b![O!e!]O#S!XO~O!W#_P~P%bO]WX]!UX^WXpWXtWXxWX|WX!PWX!RWX#QWX#XWX~O]!iO~O!W!jO#P#^X!Q#^X~O#P#^X!Q#^X~P!ZOUXOXXO]UO^UOtVOxWO#SQO#XSO~OplO!RtO~O`!sO#RwO#SvO~O!Q#^P~P!ZOb!zO~Ob!{O~Ov!|Oz!}O~OP#PObgXjgX!WgX!bgX!egX#SgXagXQgXfgXhgXngXpgX!VgX#PgX#RgX#[gXvgX!QgX~Ob!YOj#QO!b![O!e!]O#S!XO!W#_P~Ob#TO~Ob!YO!b![O!e!]O#S#UO~Op#YO!`#XO!R#_X!W#_X~Ob#]O~Oj#QO!W#_O~O!W#`O~Oh#aOn!VO~O!R#bO~O!RtO!`#XO~O!RtO!W#eO~O!W!|X#P!|X!Q!|X~P!ZO!W!jO#P#^a!Q#^a~O]nO^nOtoOxpO|qO!PsO#QrO#XkO~Op!za!R!zaa!za~P-bOv#lOz#mO~O]nO^nOtoOxpO#XkO~Op{i|{i!P{i!R{i#Q{ia{i~P.cOp}i|}i!P}i!R}i#Q}ia}i~P.cOp!Oi|!Oi!P!Oi!R!Oi#Q!Oia!Oi~P.cO!Q#nO~Oa#]P~P'yOa#YP~P$vOa#uOj#QO~O!W#wO~Oh#xOo#xO~O]!^Xa![X!`![X~O]#yO~Oa#zO!`#XO~Op#YO!R#_a!W#_a~O!`#XOp!aa!R!aa!W!aaLine truncated
@@ -0,0 +1,2 @@
import{NodeProp as D}from"@lezer/common";let Q=0;class m{constructor(t,a,i){this.set=t,this.base=a,this.modified=i,this.id=Q++}static define(t){if(t?.base)throw new Error("Can not derive from a modified tag");let a=new m([],null,[]);if(a.set.push(a),t)for(let i of t.set)a.set.push(i);return a}static defineModifier(){let t=new B;return a=>a.modified.indexOf(t)>-1?a:B.get(a.base||a,a.modified.concat(t).sort((i,l)=>i.id-l.id))}}let U=0;class B{constructor(){this.instances=[],this.id=U++}static get(t,a){if(!a.length)return t;let i=a[0].instances.find(r=>r.base==t&&W(a,r.modified));if(i)return i;let l=[],s=new m(l,t,a);for(let r of a)r.instances.push(s);let c=X(a);for(let r of t.set)if(!r.modified.length)for(let d of c)l.push(B.get(r,d));return s}}function W(o,t){return o.length==t.length&&o.every((a,i)=>a==t[i])}function X(o){let t=[[]];for(let a=0;a<o.length;a++)for(let i=0,l=t.length;i<l;i++)t.push(t[i].concat(o[a]));return t.sort((a,i)=>i.length-a.length)}function Y(o){let t=Object.create(null);for(let a in o){let i=o[a];Array.isArray(i)||(i=[i]);for(let l of a.split(" "))if(l){let s=[],c=2,r=l;for(let f=0;;){if(r=="..."&&f>0&&f+3==l.length){c=1;break}let h=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(r);if(!h)throw new RangeError("Invalid path: "+l);if(s.push(h[0]=="*"?"":h[0][0]=='"'?JSON.parse(h[0]):h[0]),f+=h[0].length,f==l.length)break;let p=l[f++];if(f==l.length&&p=="!"){c=0;break}if(p!="/")throw new RangeError("Invalid path: "+l);r=l.slice(f)}let d=s.length-1,g=s[d];if(!g)throw new RangeError("Invalid path: "+l);let b=new A(i,c,d>0?s.slice(0,d):null);t[g]=b.sort(t[g])}}return F.add(t)}const F=new D;class A{constructor(t,a,i,l){this.tags=t,this.mode=a,this.context=i,this.next=l}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}}A.empty=new A([],2,null);function J(o,t){let a=Object.create(null);for(let s of o)if(!Array.isArray(s.tag))a[s.tag.id]=s.class;else for(let c of s.tag)a[c.id]=s.class;let{scope:i,all:l=null}=t||{};return{style:s=>{let c=l;for(let r of s)for(let d of r.set){let g=a[d.id];if(g){c=c?c+" "+g:g;break}}return c},scope:i}}function Z(o,t){let a=null;for(let i of o){let l=i.style(t);l&&(a=a?a+" "+l:l)}return a}function V(o,t,a,i=0,l=o.length){let s=new _(i,Array.isArray(t)?t:[t],a);s.highlightRange(o.cursor(),i,l,"",s.highlighters),s.flush(l)}function $(o,t,a,i,l,s=0,c=o.length){let r=s;function d(g,b){if(!(g<=r)){for(let f=o.slice(r,g),h=0;;){let p=f.indexOf(`
`,h),R=p<0?f.length:p;if(R>h&&i(f.slice(h,R),b),p<0)break;l(),h=p+1}r=g}}V(t,a,(g,b,f)=>{d(g,""),d(b,f)},s,c),d(c,"")}class _{constructor(t,a,i){this.at=t,this.highlighters=a,this.span=i,this.class=""}startSpan(t,a){a!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=a)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,a,i,l,s){let{type:c,from:r,to:d}=t;if(r>=i||d<=a)return;c.isTop&&(s=this.highlighters.filter(p=>!p.scope||p.scope(c)));let g=l,b=z(t)||A.empty,f=Z(s,b.tags);if(f&&(g&&(g+=" "),g+=f,b.mode==1&&(l+=(l?" ":"")+f)),this.startSpan(Math.max(a,r),g),b.opaque)return;let h=t.tree&&t.tree.prop(D.mounted);if(h&&h.overlay){let p=t.node.enter(h.overlay[0].from+r,1),R=this.highlighters.filter(v=>!v.scope||v.scope(h.tree.type)),j=t.firstChild();for(let v=0,M=r;;v++){let O=v<h.overlay.length?h.overlay[v]:null,E=O?O.from+r:d,P=Math.max(a,M),T=Math.min(i,E);if(P<T&&j)for(;t.from<T&&(this.highlightRange(t,P,T,l,s),this.startSpan(Math.min(T,t.to),g),!(t.to>=E||!t.nextSibling())););if(!O||E>i)break;M=O.to+r,M>a&&(this.highlightRange(p.cursor(),Math.max(a,O.from+r),Math.min(i,M),"",R),this.startSpan(Math.min(i,M),g))}j&&t.parent()}else if(t.firstChild()){h&&(l="");do if(!(t.to<=a)){if(t.from>=i)break;this.highlightRange(t,a,i,l,s),this.startSpan(Math.min(i,t.to),g)}while(t.nextSibling());t.parent()}}}function z(o){let t=o.type.prop(F);for(;t&&t.context&&!o.matchContext(t.context);)t=t.next;return t||null}const e=m.define,C=e(),N=e(),G=e(N),L=e(N),x=e(),I=e(x),H=e(x),u=e(),w=e(u),k=e(),y=e(),K=e(),S=e(K),q=e(),n={comment:C,lineComment:e(C),blockComment:e(C),docComment:e(C),name:N,variableName:e(N),typeName:G,tagName:e(G),propertyName:L,attributeName:e(L),className:e(N),labelName:e(N),namespace:e(N),macroName:e(N),literal:x,string:I,docString:e(I),character:e(I),attributeValue:e(I),number:H,integer:e(H),float:e(H),bool:e(x),regexp:e(x),escape:e(x),color:e(x),url:e(x),keyword:k,self:e(k),null:e(k),atom:e(k),unit:e(k),modifier:e(k),operatorKeyword:e(k),controlKeyword:e(k),definitionKeyword:e(k),moduleKeyword:e(k),operator:y,derefOperator:e(y),arithmeticOperator:e(y),logicOperator:e(y),bitwiseOperator:e(y),compareOperator:e(y),updateOperator:e(y),definitionOperator:e(y),typeOperator:e(y),controlOperator:e(y),punctuation:K,separator:e(K),bracket:S,angleBracket:e(S),squareBracket:e(S),paren:e(S),brace:e(S),content:u,heading:w,heading1:e(w),heading2:e(w),heading3:e(w),heading4:e(w),heading5:e(w),heading6:e(w),contentSeparator:e(u),list:e(u),quote:e(u),emphasis:e(u),strong:e(u),link:e(u),monospace:e(u),strikethrough:e(u),inserted:e(),deleted:e(),changed:e(),invalid:e(),meta:q,documentMeta:e(q),annotation:e(q),processingInstruction:e(q),definition:m.defineModifier(),constant:m.defineModifier(),function:m.defineModifier(),standard:m.defineModifier(),local:m.defineModifier(),special:m.defineModifier()},tt=J([{tag:n.link,class:"tok-link"},{tag:n.heading,class:"tok-heading"},{tag:n.emphasis,class:"tok-emphasis"},{tag:n.strong,class:"tok-strong"},{tag:n.keyword,class:"tok-keyword"},{tag:n.atom,class:"tok-atom"},{tag:n.bool,class:"tok-bool"},{tag:n.url,class:"tok-url"},{tag:n.labelName,class:"tok-labelName"},{tag:n.inserted,class:"tok-inserted"},{tag:n.deleted,class:"tok-deleted"},{tag:n.literal,class:"tok-literal"},{tag:n.string,class:"tok-string"},{tag:n.number,class:"tok-number"},{tag:[n.regexp,n.escape,n.special(n.string)],class:"tok-string2"},{tag:n.variableName,class:"tok-variableName"},{tag:n.local(n.variableName),class:"tok-variableName tok-local"},{tag:n.definition(n.variableName),class:"tok-variableName tok-definition"},{tag:n.special(n.variableName),class:"tok-variableName2"},{tag:n.definition(n.propertyName),class:"tok-propertyName tok-definition"},{tag:n.typeName,class:"tok-typeName"},{tag:n.namespace,class:"tok-namespace"},{tag:n.className,class:"tok-className"},{tag:n.macroName,class:"tok-macroName"},{tag:n.propertyName,class:"tok-propertyName"},{tag:n.operator,class:"tok-operator"},{tag:n.comment,class:"tok-comment"},{tag:n.meta,class:"tok-meta"},{tag:n.invalid,class:"tok-invalid"},{tag:n.punctuation,class:"tok-punctuation"}]);export{m as Tag,tt as classHighlighter,z as getStyleTags,$ as highlightCode,V as highlightTree,Y as styleTags,J as tagHighlighter,n as tags};
@@ -0,0 +1 @@
import{ContextTracker as U,ExternalTokenizer as T,LRParser as I}from"@lezer/lr";import{styleTags as J,tags as S}from"@lezer/highlight";import{parseMixed as j}from"@lezer/common";const z=54,L=1,F=55,K=2,ee=56,Oe=3,w=4,te=5,q=6,A=7,C=8,y=9,Y=10,re=11,ae=12,ne=13,d=57,se=14,b=58,m=20,le=22,M=23,Se=24,$=26,k=27,Pe=28,pe=31,oe=34,ce=36,he=37,fe=0,Ve=1,_e={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Te={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},B={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function qe(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function G(e){return e==9||e==10||e==13||e==32}let Z=null,R=null,E=0;function i(e,O){let a=e.pos+O;if(E==a&&R==e)return Z;let r=e.peek(O);for(;G(r);)r=e.peek(++O);let t="";for(;qe(r);)t+=String.fromCharCode(r),r=e.peek(++O);return R=e,E=a,Z=t?t.toLowerCase():r==xe||r==de?void 0:null}const D=60,x=62,Q=47,xe=63,de=33,$e=45;function W(e,O){this.name=e,this.parent=O,this.hash=O?O.hash:0;for(let a=0;a<e.length;a++)this.hash+=(this.hash<<4)+e.charCodeAt(a)+(e.charCodeAt(a)<<8)}const ie=[q,Y,A,C,y],Qe=new U({start:null,shift(e,O,a,r){return ie.indexOf(O)>-1?new W(i(r,1)||"",e):e},reduce(e,O){return O==m&&e?e.parent:e},reuse(e,O,a,r){let t=O.type.id;return t==q||t==ce?new W(i(r,1)||"",e):e},hash(e){return e?e.hash:0},strict:!1}),ue=new T((e,O)=>{if(e.next!=D){e.next<0&&O.context&&e.acceptToken(d);return}e.advance();let a=e.next==Q;a&&e.advance();let r=i(e,0);if(r===void 0)return;if(!r)return e.acceptToken(a?se:q);let t=O.context?O.context.name:null;if(a){if(r==t)return e.acceptToken(re);if(t&&Te[t])return e.acceptToken(d,-2);if(O.dialectEnabled(fe))return e.acceptToken(ae);for(let n=O.context;n;n=n.parent)if(n.name==r)return;e.acceptToken(ne)}else{if(r=="script")return e.acceptToken(A);if(r=="style")return e.acceptToken(C);if(r=="textarea")return e.acceptToken(y);if(_e.hasOwnProperty(r))return e.acceptToken(Y);t&&B[t]&&B[t][r]?e.acceptToken(d,-1):e.acceptToken(q)}},{contextual:!0}),Xe=new T(e=>{for(let O=0,a=0;;a++){if(e.next<0){a&&e.acceptToken(b);break}if(e.next==$e)O++;else if(e.next==x&&O>=2){a>3&&e.acceptToken(b,-2);break}else O=0;e.advance()}});function ge(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const ve=new T((e,O)=>{if(e.next==Q&&e.peek(1)==x){let a=O.dialectEnabled(Ve)||ge(O.context);e.acceptToken(a?te:w,2)}else e.next==x&&e.acceptToken(w,1)});function u(e,O,a){let r=2+e.length;return new T(t=>{for(let n=0,P=0,s=0;;s++){if(t.next<0){s&&t.acceptToken(O);break}if(n==0&&t.next==D||n==1&&t.next==Q||n>=2&&n<r&&t.next==e.charCodeAt(n-2))n++,P++;else if((n==2||n==r)&&G(t.next))P++;else if(n==r&&t.next==x){s>P?t.acceptToken(O,-P):t.acceptToken(a,-(P-2));break}else if((t.next==10||t.next==13)&&s){t.acceptToken(O,1);break}else n=P=0;t.advance()}})}const we=u("script",z,L),Ae=u("style",F,K),Ce=u("textarea",ee,Oe),ye=J({"Text RawText":S.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":S.angleBracket,TagName:S.tagName,"MismatchedCloseTag/TagName":[S.tagName,S.invalid],AttributeName:S.attributeName,"AttributeValue UnquotedAttributeValue":S.attributeValue,Is:S.definitionOperator,"EntityReference CharacterReference":S.character,Comment:S.blockComment,ProcessingInst:S.processingInstruction,DoctypeDecl:S.documentMeta}),Ye=I.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O)gQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rOOO`7+$t7+$tO)rQ#|O,59eO)wQ#|O,59hO)|Q#|O,59kOOO`1G/X1G/XO*RO7[O'#CvO*dOMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O*uO7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+WOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:"+s~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~O Line truncated
@@ -0,0 +1 @@
import{ContextTracker as n,ExternalTokenizer as $,LRParser as t,LocalTokenGroup as e}from"@lezer/lr";import{styleTags as Y,tags as O}from"@lezer/highlight";const c=309,o=1,X=2,l=3,s=310,W=312,w=313,d=4,j=5,g=0,r=[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],S=125,f=59,P=47,k=42,b=43,y=45,m=60,x=44,q=new n({start:!1,shift(Q,i){return i==d||i==j||i==W?Q:i==w},strict:!1}),_=new $((Q,i)=>{let{next:a}=Q;(a==S||a==-1||i.context)&&Q.acceptToken(s)},{contextual:!0,fallback:!0}),h=new $((Q,i)=>{let{next:a}=Q,Z;r.indexOf(a)>-1||a==P&&((Z=Q.peek(1))==P||Z==k)||a!=S&&a!=f&&a!=-1&&!i.context&&Q.acceptToken(c)},{contextual:!0}),G=new $((Q,i)=>{let{next:a}=Q;if((a==b||a==y)&&(Q.advance(),a==Q.next)){Q.advance();let Z=!i.context&&i.canShift(o);Q.acceptToken(Z?o:X)}},{contextual:!0});function p(Q,i){return Q>=65&&Q<=90||Q>=97&&Q<=122||Q==95||Q>=192||!i&&Q>=48&&Q<=57}const R=new $((Q,i)=>{if(Q.next!=m||!i.dialectEnabled(g)||(Q.advance(),Q.next==P))return;let a=0;for(;r.indexOf(Q.next)>-1;)Q.advance(),a++;if(p(Q.next,!0)){for(Q.advance(),a++;p(Q.next,!1);)Q.advance(),a++;for(;r.indexOf(Q.next)>-1;)Q.advance(),a++;if(Q.next==x)return;for(let Z=0;;Z++){if(Z==7){if(!p(Q.next,!0))return;break}if(Q.next!="extends".charCodeAt(Z))break;Q.advance(),a++}}Q.acceptToken(l,-a)}),T=Y({"get set async static":O.modifier,"for while do if else switch try catch finally return throw break continue default case":O.controlKeyword,"in of await yield void typeof delete instanceof":O.operatorKeyword,"let var const using function class extends":O.definitionKeyword,"import export from":O.moduleKeyword,"with debugger as new":O.keyword,TemplateString:O.special(O.string),super:O.atom,BooleanLiteral:O.bool,this:O.self,null:O.null,Star:O.modifier,VariableName:O.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":O.function(O.variableName),VariableDefinition:O.definition(O.variableName),Label:O.labelName,PropertyName:O.propertyName,PrivatePropertyName:O.special(O.propertyName),"CallExpression/MemberExpression/PropertyName":O.function(O.propertyName),"FunctionDeclaration/VariableDefinition":O.function(O.definition(O.variableName)),"ClassDeclaration/VariableDefinition":O.definition(O.className),PropertyDefinition:O.definition(O.propertyName),PrivatePropertyDefinition:O.definition(O.special(O.propertyName)),UpdateOp:O.updateOperator,"LineComment Hashbang":O.lineComment,BlockComment:O.blockComment,Number:O.number,String:O.string,Escape:O.escape,ArithOp:O.arithmeticOperator,LogicOp:O.logicOperator,BitOp:O.bitwiseOperator,CompareOp:O.compareOperator,RegExp:O.regexp,Equals:O.definitionOperator,Arrow:O.function(O.punctuation),": Spread":O.punctuation,"( )":O.paren,"[ ]":O.squareBracket,"{ }":O.brace,"InterpolationStart InterpolationEnd":O.special(O.brace),".":O.derefOperator,", ;":O.separator,"@":O.meta,TypeName:O.typeName,TypeDefinition:O.definition(O.typeName),"type enum interface implements namespace module declare":O.definitionKeyword,"abstract global Privacy readonly override":O.modifier,"is keyof unique infer":O.operatorKeyword,JSXAttributeValue:O.attributeValue,JSXText:O.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":O.angleBracket,"JSXIdentifier JSXNameSpacedName":O.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":O.attributeName,"JSXBuiltin/JSXIdentifier":O.standard(O.tagName)}),V={__proto__:null,export:18,as:23,from:31,default:34,async:39,function:40,extends:52,this:56,true:64,false:64,null:76,void:80,typeof:84,super:102,new:136,delete:152,yield:161,await:165,class:170,public:227,private:227,protected:227,readonly:229,instanceof:248,satisfies:251,in:252,const:254,import:286,keyof:339,unique:343,infer:349,is:385,abstract:405,implements:407,type:409,let:412,var:414,using:417,interface:423,enum:427,namespace:433,module:435,declare:439,global:443,for:462,of:471,while:474,with:478,do:482,if:486,else:488,switch:492,case:498,try:504,catch:508,finally:512,return:516,throw:520,break:524,continue:528,debugger:532},U={__proto__:null,async:123,get:125,set:127,declare:187,public:189,private:189,protected:189,static:191,abstract:193,override:195,readonly:201,accessor:203,new:389},u={__proto__:null,"<":143},z=t.deserialize({version:14,states:"$<UO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ08SO'#ChO+RO!bO'#CiO+aO#tO'#CiO+oO?MpO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DyO0fQ^O'#EROOQ07b'#EZ'#EZO1PQWO'#EWOOQO'#El'#ElOOQO'#Ie'#IeO1XQWO'#GmO1dQWO'#EkO1iQWO'#EkO3kQ08SO'#JiO6[Q08SO'#JjO6xQWO'#FZO6}Q&jO'#FqOOQ07b'#Fc'#FcO7YO,YO'#FcO7hQ7[O'#FxO9UQWO'#FwOOQ07b'#Jj'#JjOOQ07`'#Ji'#JiO9ZQWO'#GqOOQU'#KU'#KUO9fQWO'#IRO9kQ07hO'#ISOOQU'#JW'#JWOOQU'#IW'#IWQ`Q^OOO`Q^OOO%[Q^O'#DqO9sQ^O'#D}O9zQ^O'#EPO9aQWO'#GmO:RQ7[O'#CnO:aQWO'#EjO:lQWO'#EuO:qQ7[O'#FbO;`QWO'#GmOOQO'#KV'#KVO;eQWO'#KVO;sQWO'#GuO;sQWO'#GvO;sQWO'#GxO9aQWO'#G{O<jQWO'#HOO>RQWO'#CdO>cQWO'#H[O>kQWO'#HbO>kQWO'#HdO`Q^O'#HfO>kQWO'#HhO>kQWO'#HkO>pQWO'#HqO>uQ07iO'#HwO%[Q^O'#HyO?QQ07iO'#H{O?]Q07iO'#H}O9kQ07hO'#IPO?hQ08SO'#CLine truncated
@@ -0,0 +1 @@
import{LRParser as P}from"@lezer/lr";import{styleTags as Q,tags as O}from"@lezer/highlight";const e=Q({String:O.string,Number:O.number,"True False":O.bool,PropertyName:O.propertyName,Null:O.null,",":O.separator,"[ ]":O.squareBracket,"{ }":O.brace}),r=P.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"\u26A0 JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[e],skippedNodes:[0],repeatNodeCount:2,tokenData:"(p~RaXY!WYZ!W]^!Wpq!Wrs!]|}$i}!O$n!Q!R$w!R![&V![!]&h!}#O&m#P#Q&r#Y#Z&w#b#c'f#h#i'}#o#p(f#q#r(k~!]Oc~~!`Upq!]qr!]rs!rs#O!]#O#P!w#P~!]~!wOe~~!zXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#g~#jR!Q![#s!c!i#s#T#Z#s~#vR!Q![$P!c!i$P#T#Z$P~$SR!Q![$]!c!i$]#T#Z$]~$`R!Q![!]!c!i!]#T#Z!]~$nOh~~$qQ!Q!R$w!R![&V~$|RT~!O!P%V!g!h%k#X#Y%k~%YP!Q![%]~%bRT~!Q![%]!g!h%k#X#Y%k~%nR{|%w}!O%w!Q![%}~%zP!Q![%}~&SPT~!Q![%}~&[ST~!O!P%V!Q![&V!g!h%k#X#Y%k~&mOg~~&rO]~~&wO[~~&zP#T#U&}~'QP#`#a'T~'WP#g#h'Z~'^P#X#Y'a~'fOR~~'iP#i#j'l~'oP#`#a'r~'uP#`#a'x~'}OS~~(QP#f#g(T~(WP#i#j(Z~(^P#X#Y(a~(fOQ~~(kOW~~(pOV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});export{r as parser};
@@ -0,0 +1 @@
import{Parser as $,NodeProp as C,NodeSet as E,NodeType as j,DefaultBufferLength as G,Tree as P,IterMode as U}from"@lezer/common";class b{constructor(t,e,s,i,h,r,n,o,a,u=0,f){this.p=t,this.stack=e,this.state=s,this.reducePos=i,this.pos=h,this.score=r,this.buffer=n,this.bufferBase=o,this.curContext=a,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,s=0){let i=t.parser.context;return new b(t,[],e,s,s,0,[],0,i?new N(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let s=t>>19,i=t&65535,{parser:h}=this.p,r=this.reducePos<this.pos-25;r&&this.setLookAhead(this.pos);let n=h.dynamicPrecedence(i);if(n&&(this.score+=n),s==0){this.pushState(h.getGoto(this.state,i,!0),this.reducePos),i<h.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,r?8:4,!0),this.reduceContext(i,this.reducePos);return}let o=this.stack.length-(s-1)*3-(t&262144?6:0),a=o?this.stack[o-2]:this.p.ranges[0].from,u=this.reducePos-a;u>=2e3&&!(!((e=this.p.parser.nodeSet.types[i])===null||e===void 0)&&e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=u));let f=o?this.stack[o-1]:0,p=this.bufferBase+this.buffer.length-f;if(i<h.minRepeatTerm||t&131072){let c=h.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,a,c,p+4,!0)}if(t&262144)this.state=this.stack[o];else{let c=this.stack[o-3];this.state=h.getGoto(c,i,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(i,a)}storeNode(t,e,s,i=4,h=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let r=this,n=this.buffer.length;if(n==0&&r.parent&&(n=r.bufferBase-r.parent.bufferBase,r=r.parent),n>0&&r.buffer[n-4]==0&&r.buffer[n-1]>-1){if(e==s)return;if(r.buffer[n-2]>=e){r.buffer[n-2]=s;return}}}if(!h||this.pos==s)this.buffer.push(t,e,s,i);else{let r=this.buffer.length;if(r>0&&this.buffer[r-4]!=0){let n=!1;for(let o=r;o>0&&this.buffer[o-2]>s;o-=4)if(this.buffer[o-1]>=0){n=!0;break}if(n)for(;r>0&&this.buffer[r-2]>s;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4)}this.buffer[r]=t,this.buffer[r+1]=e,this.buffer[r+2]=s,this.buffer[r+3]=i}}shift(t,e,s,i){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let h=t,{parser:r}=this.p;(i>this.pos||e<=r.maxNode)&&(this.pos=i,r.stateFlag(h,1)||(this.reducePos=i)),this.pushState(h,s),this.shiftContext(e,s),e<=r.maxNode&&this.buffer.push(e,s,i,4)}else this.pos=i,this.shiftContext(e,s),e<=this.p.parser.maxNode&&this.buffer.push(e,s,i,4)}apply(t,e,s,i){t&65536?this.reduce(t):this.shift(t,e,s,i)}useNode(t,e){let s=this.p.reused.length-1;(s<0||this.p.reused[s]!=t)&&(this.p.reused.push(t),s++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(e,i),this.buffer.push(s,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let s=t.buffer.slice(e),i=t.bufferBase+e;for(;t&&i==t.bufferBase;)t=t.parent;return new b(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,s,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let s=t<=this.p.parser.maxNode;s&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,s?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new H(this);;){let s=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(s==0)return!1;if((s&65536)==0)return!0;e.reduce(s)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let i=[];for(let h=0,r;h<e.length;h+=2)(r=e[h+1])!=this.state&&this.p.parser.hasAction(r,t)&&i.push(e[h],r);if(this.stack.length<120)for(let h=0;i.length<8&&h<e.length;h+=2){let r=e[h+1];i.some((n,o)=>o&1&&n==r)||i.push(e[h],r)}e=i}let s=[];for(let i=0;i<e.length&&s.length<4;i+=2){let h=e[i+1];if(h==this.state)continue;let r=this.split();r.pushState(h,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(e[i],this.pos),r.reducePos=this.pos,r.score-=200,s.push(r)}return s}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if((e&65536)==0)return!1;if(!t.validAction(this.state,e)){let s=e>>19,i=e&65535,h=this.stack.length-s*3;if(h<0||t.getGoto(this.stack[h],i,!1)<0){let r=this.findForcedReduction();if(r==null)return!1;e=r}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=Line truncated
@@ -0,0 +1 @@
import{ExternalTokenizer as S,LRParser as q}from"@lezer/lr";import{styleTags as n,tags as $}from"@lezer/highlight";const d=1,o=2,x=263,R=3,V=264,W=265,U=266,v=4,r=5,b=6,l=7,e=8,u=9,m=10,Y=11,p=12,_=13,Z=14,c=15,k=16,j=17,w=18,h=19,G=20,g=21,f=22,E=23,I=24,C=25,F=26,N=27,K=28,A=29,H=30,L=31,D=32,B=33,M=34,J=35,OO=36,$O=37,QO=38,iO=39,yO=40,aO=41,SO=42,zO=43,PO=44,TO=45,tO=46,WO=47,eO=48,sO=49,XO=50,qO=51,nO=52,dO=53,oO=54,xO=55,RO=56,VO=57,UO=58,vO=59,rO=60,bO=61,P=62,lO=63,uO=64,mO=65,YO={abstract:v,and:r,array:b,as:l,true:e,false:e,break:u,case:m,catch:Y,clone:p,const:_,continue:Z,declare:k,default:c,do:j,echo:w,else:h,elseif:G,enddeclare:g,endfor:f,endforeach:E,endif:I,endswitch:C,endwhile:F,enum:N,extends:K,final:A,finally:H,fn:L,for:D,foreach:B,from:M,function:J,global:OO,goto:$O,if:QO,implements:iO,include:yO,include_once:aO,instanceof:SO,insteadof:zO,interface:PO,list:TO,match:tO,namespace:WO,new:eO,null:sO,or:XO,print:qO,require:nO,require_once:dO,return:oO,switch:xO,throw:RO,trait:VO,try:UO,unset:vO,use:rO,var:bO,public:P,private:P,protected:P,while:lO,xor:uO,yield:mO,__proto__:null};function pO(O){let Q=YO[O.toLowerCase()];return Q??-1}function s(O){return O==9||O==10||O==13||O==32}function X(O){return O>=97&&O<=122||O>=65&&O<=90}function a(O){return O==95||O>=128||X(O)}function T(O){return O>=48&&O<=55||O>=97&&O<=102||O>=65&&O<=70}const _O={int:!0,integer:!0,bool:!0,boolean:!0,float:!0,double:!0,real:!0,string:!0,array:!0,object:!0,unset:!0,__proto__:null},ZO=new S(O=>{if(O.next==40){O.advance();let Q=0;for(;s(O.peek(Q));)Q++;let i="",y;for(;X(y=O.peek(Q));)i+=String.fromCharCode(y),Q++;for(;s(O.peek(Q));)Q++;O.peek(Q)==41&&_O[i.toLowerCase()]&&O.acceptToken(d)}else if(O.next==60&&O.peek(1)==60&&O.peek(2)==60){for(let y=0;y<3;y++)O.advance();for(;O.next==32||O.next==9;)O.advance();let Q=O.next==39;if(Q&&O.advance(),!a(O.next))return;let i=String.fromCharCode(O.next);for(;O.advance(),!(!a(O.next)&&!(O.next>=48&&O.next<=55));)i+=String.fromCharCode(O.next);if(Q){if(O.next!=39)return;O.advance()}if(O.next!=10&&O.next!=13)return;for(;;){let y=O.next==10||O.next==13;if(O.advance(),O.next<0)return;if(y){for(;O.next==32||O.next==9;)O.advance();let t=!0;for(let z=0;z<i.length;z++){if(O.next!=i.charCodeAt(z)){t=!1;break}O.advance()}if(t)return O.acceptToken(o)}}}}),cO=new S(O=>{O.next<0&&O.acceptToken(U)}),kO=new S((O,Q)=>{O.next==63&&Q.canShift(W)&&O.peek(1)==62&&O.acceptToken(W)});function jO(O){let Q=O.peek(1);if(Q==110||Q==114||Q==116||Q==118||Q==101||Q==102||Q==92||Q==36||Q==34||Q==123)return 2;if(Q>=48&&Q<=55){let i=2,y;for(;i<5&&(y=O.peek(i))>=48&&y<=55;)i++;return i}if(Q==120&&T(O.peek(2)))return T(O.peek(3))?4:3;if(Q==117&&O.peek(2)==123)for(let i=3;;i++){let y=O.peek(i);if(y==125)return i==2?0:i+1;if(!T(y))break}return 0}const wO=new S((O,Q)=>{let i=!1;for(;!(O.next==34||O.next<0||O.next==36&&(a(O.peek(1))||O.peek(1)==123)||O.next==123&&O.peek(1)==36);i=!0){if(O.next==92){let y=jO(O);if(y){if(i)break;return O.acceptToken(R,y)}}else if(!i&&(O.next==91||O.next==45&&O.peek(1)==62&&a(O.peek(2))||O.next==63&&O.peek(1)==45&&O.peek(2)==62&&a(O.peek(3)))&&Q.canShift(V))break;O.advance()}i&&O.acceptToken(x)}),hO=n({"Visibility abstract final static":$.modifier,"for foreach while do if else elseif switch try catch finally return throw break continue default case":$.controlKeyword,"endif endfor endforeach endswitch endwhile declare enddeclare goto match":$.controlKeyword,"and or xor yield unset clone instanceof insteadof":$.operatorKeyword,"function fn class trait implements extends const enum global interface use var":$.definitionKeyword,"include include_once require require_once namespace":$.moduleKeyword,"new from echo print array list as":$.keyword,null:$.null,Boolean:$.bool,VariableName:$.variableName,"NamespaceName/...":$.namespace,"NamedType/...":$.typeName,Name:$.name,"CallExpression/Name":$.function($.variableName),"LabelStatement/Name":$.labelName,"MemberExpression/Name":$.propertyName,"MemberExpression/VariableName":$.special($.propertyName),"ScopedExpression/ClassMemberName/Name":$.propertyName,"ScopedExpression/ClassMemberName/VariableName":$.special($.propertyName),"CallExpression/MemberExpression/Name":$.function($.propertyName),"CallExpression/ScopedExpression/ClassMemberName/Name":$.function($.propertyName),"MethodDeclaration/Name":$.function($.definition($.variableName)),"FunctionDefinition/Name":$.function($.definition($.variableName)),"ClassDeclaration/Name":$.definition($.className),UpdateOp:$.updateOperator,ArithOp:$.arithmeticOperator,LogicOp:$.logicOperator,BitOp:$.bitwiseOperator,CompareOp:$.compareOperator,ControlOp:$.controlOperator,AssignOp:$.definitionOperator,"$ ConcatOp":$.operator,LineComment:$.lineComment,BlockComment:$.blockComment,Integer:$.integer,Float:$.float,String:$.string,ShellExpression:$.special($.string),"=> ->":$.punctuation,"( )":$.paren,"#[ [ ]":$.squareBracket,"${ { }":$.brace,"-> ?->":$.derefOperator,", ; :: : \\":$.separator,"PhpOpen PhpClose":$.processingILine truncated
@@ -0,0 +1 @@
import{ContextTracker as W,ExternalTokenizer as n,LRParser as l}from"@lezer/lr";import{styleTags as w,tags as d}from"@lezer/highlight";const s=1,g=2,i=3,v=4,C=5,p=35,X=36,m=37,z=11,h=13;function Q(O){return O==45||O==46||O==58||O>=65&&O<=90||O==95||O>=97&&O<=122||O>=161}function _(O){return O==9||O==10||O==13||O==32}let o=null,P=null,T=0;function $(O,e){let t=O.pos+e;if(P==O&&T==t)return o;for(;_(O.peek(e));)e++;let r="";for(;;){let a=O.peek(e);if(!Q(a))break;r+=String.fromCharCode(a),e++}return P=O,T=t,o=r||null}function c(O,e){this.name=O,this.parent=e,this.hash=e?e.hash:0;for(let t=0;t<O.length;t++)this.hash+=(this.hash<<4)+O.charCodeAt(t)+(O.charCodeAt(t)<<8)}const S=new W({start:null,shift(O,e,t,r){return e==s?new c($(r,1)||"",O):O},reduce(O,e){return e==z&&O?O.parent:O},reuse(O,e,t,r){let a=e.type.id;return a==s||a==h?new c($(r,1)||"",O):O},hash(O){return O?O.hash:0},strict:!1}),U=new n((O,e)=>{if(O.next==60){if(O.advance(),O.next==47){O.advance();let t=$(O,0);if(!t)return O.acceptToken(C);if(e.context&&t==e.context.name)return O.acceptToken(g);for(let r=e.context;r;r=r.parent)if(r.name==t)return O.acceptToken(i,-2);O.acceptToken(v)}else if(O.next!=33&&O.next!=63)return O.acceptToken(s)}},{contextual:!0});function k(O,e){return new n(t=>{for(let r=0,a=0;;a++){if(t.next<0){a&&t.acceptToken(O);break}if(t.next==e.charCodeAt(r)){if(r++,r==e.length){a>e.length&&t.acceptToken(O,1-e.length);break}}else r=t.next==e.charCodeAt(0)?1:0;t.advance()}})}const f=k(p,"-->"),b=k(X,"?>"),x=k(m,"]]>"),R=w({Text:d.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":d.angleBracket,TagName:d.tagName,"MismatchedCloseTag/Tagname":[d.tagName,d.invalid],AttributeName:d.attributeName,AttributeValue:d.attributeValue,Is:d.definitionOperator,"EntityReference CharacterReference":d.character,Comment:d.blockComment,ProcessingInst:d.processingInstruction,DoctypeDecl:d.documentMeta,Cdata:d.special(d.string)}),u=l.deserialize({version:14,states:",SOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DS'#DSOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO#mOpO,59TO#uO!bO,59TOOOP'#C{'#C{O$TOaO,59RO$[OpO'#CoOOOP,59R,59ROOOQ'#C|'#C|O$dOrO,59^OOOP,59^,59^OOOS'#C}'#C}O$lOtO,59_OOOP,59_,59_O$tOpO,59`O$|OpO,59`OOOP-E6t-E6tOOOW-E6u-E6uOOOP1G.l1G.lOOOO-E6v-E6vO%UO!bO1G.oO%UO!bO1G.oO%dOpO'#CkO%lO!bO'#CyO%zO!bO1G.oOOOP1G.o1G.oOOOP1G.w1G.wOOOP-E6y-E6yOOOP1G.m1G.mO&VOpO,59ZO&_OpO,59ZOOOQ-E6z-E6zOOOP1G.x1G.xOOOS-E6{-E6{OOOP1G.y1G.yO&gOpO1G.zO&gOpO1G.zOOOP1G.z1G.zO&oO!bO7+$ZO&}O!bO7+$ZOOOP7+$Z7+$ZOOOP7+$c7+$cO'YOpO,59VO'bOpO,59VO'jO!bO,59eOOOO-E6w-E6wO'xOpO1G.uO'xOpO1G.uOOOP1G.u1G.uO(QOpO7+$fOOOP7+$f7+$fO(YO!bO<<GuOOOP<<Gu<<GuOOOP<<G}<<G}O'bOpO1G.qO'bOpO1G.qO(eO#tO'#CnOOOO1G.q1G.qO(sOpO7+$aOOOP7+$a7+$aOOOP<<HQ<<HQOOOPAN=aAN=aOOOPAN=iAN=iO'bOpO7+$]OOOO7+$]7+$]OOOO'#Cz'#CzO({O#tO,59YOOOO,59Y,59YOOOP<<G{<<G{OOOO<<Gw<<GwOOOO-E6x-E6xOOOO1G.t1G.t",stateData:")Z~OPQOSVOTWOVWOWWOXWOiXOxPO}TO!PUO~OuZOw]O~O^`Oy^O~OPQOQcOSVOTWOVWOWWOXWOxPO}TO!PUO~ORdO~P!SOseO|gO~OthO!OjO~O^lOy^O~OuZOwoO~O^qOy^O~O[vO`sOdwOy^O~ORyO~P!SO^{Oy^O~OseO|}O~OthO!O!PO~O^!QOy^O~O[!SOy^O~O[!VO`sOd!WOy^O~Oa!YOy^O~Oy^O[mX`mXdmX~O[!VO`sOd!WO~O^!]Oy^O~O[!_Oy^O~O[!aOy^O~O[!cO`sOd!dOy^O~O[!cO`sOd!dO~Oa!eOy^O~Oy^Oz!gO~Oy^O[ma`madma~O[!jOy^O~O[!kOy^O~O[!lO`sOd!mO~OW!pOX!pOz!rO{!pO~O[!sOy^O~OW!pOX!pOz!vO{!pO~O",goto:"%[wPPPPPPPPPPxxP!OP!UPP!_!iP!oxxxP!u!{#R$Z$j$p$v$|PPPP%SXWORYbXRORYb_t`qru!T!U!bQ!h!YS!o!e!fR!t!nQdRRybXSORYbQYORmYQ[PRn[Q_QQkVjp_krz!R!T!X!Z!^!`!f!i!nQr`QzcQ!RlQ!TqQ!XsQ!ZtQ!^{Q!`!QQ!f!YQ!i!]R!n!eQu`S!UqrU![u!U!bR!b!TQ!q!gR!u!qQbRRxbQfTR|fQiUR!OiSXOYTaRb",nodeNames:"\u26A0 StartTag StartCloseTag MissingCloseTag StartCloseTag StartCloseTag Document Text EntityReference CharacterReference Cdata Element EndTag OpenTag TagName Attribute AttributeName Is AttributeValue CloseTag SelfCloseEndTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag DoctypeDecl",maxTerm:47,context:S,nodeProps:[["closedBy",1,"SelfCloseEndTag EndTag",13,"CloseTag MissingCloseTag"],["openedBy",12,"StartTag StartCloseTag",19,"OpenTag",20,"StartTag"]],propSources:[R],skippedNodes:[0],repeatNodeCount:8,tokenData:"Az~R!WOX$kXY%rYZ%rZ]$k]^%r^p$kpq%rqr$krs&tsv$kvw'Uw}$k}!O(q!O!P$k!P!Q*n!Q![$k![!]+z!]!^$k!^!_/s!_!`=i!`!a>U!a!b>q!b!c$k!c!}+z!}#P$k#P#Q?}#Q#R$k#R#S+z#S#T$k#T#o+z#o%W$k%W%o+z%o%p$k%p&a+z&a&b$k&b1p+z1p4U$k4U4d+z4d4e$k4e$IS+z$IS$I`$k$I`$Ib+z$Ib$Kh$k$Kh%#t+z%#t&/x$k&/x&Et+z&Et&FV$k&FV;'S+z;'S;:j/S;:j?&r$k?&r?Ah+z?Ah?BY$k?BY?Mn+z?Mn~$kX$rUVP{WOr$krs%Usv$kw!^$k!^!_%d!_~$kP%ZRVPOv%Uw!^%U!_~%UW%iR{WOr%dsv%dw~%d_%{]VP{WyUOX$kXY%rYZ%rZ]$k]^%r^p$kpq%rqr$krs%Usv$kw!^$k!^!_%d!_~$kZ&{RzYVPOv%Uw!^%U!_~%U~'XTOp'hqs'hst(Pt!]'h!^~'h~'kTOp'hqs'ht!]'h!]!^'z!^~'h~(POW~~(SROp(]q!](]!^~(]~(`SOp(]q!](]!]!^(l!^~(]~(qOX~Z(xWVP{WOr$krs%Usv$kw}$k}!O)b!O!^$k!^!_%d!_~$kZ)iWVP{WOr$krs%Usv$kw!^$k!^!_%d!_!`$k!`!a*R!a~$kZ*[U|QVP{WOr$krs%Usv$kw!^$k!^!_%d!_~$k]*uWVP{WOr$krs%Usv$kw!^$k!^!_%d!_!`$k!`!a+_!a~$k]+hUdSVP{WOr$krs%Usv$kw!^$k!^!_%d!_~$k_,V}`S^QVP{WOr$krs%Usv$kw}$k}!O+z!O!P+z!P!Q$k!Q!Line truncated
@@ -0,0 +1 @@
const je={id:"",classname:"",theme:"light",parent:"",toggle:!0,popover:!0,position:"bottom-start",margin:4,preset:!0,color:"#000",default:"#000",target:"",disabled:!1,format:"rgb",singleInput:!1,inputs:!0,opacity:!0,preview:!0,copy:!0,swatches:[],toggleSwatches:!1,closeOnScroll:!1,i18n:{picker:"Color picker",buttons:{copy:"Copy color to clipboard",changeFormat:"Change color format",swatch:"Color swatch: %label%",toggleSwatches:"Toggle Swatches"},sliders:{hue:"Change hue",alpha:"Change opacity"}}},k=document,de=k.documentElement,Q="#000000",we="button",be="open",Pe="close",ze="color",D="click",Fe="pointerdown",Re="pointermove",We="pointerup",Ze="scroll",me="keydown",F="input",N="change",X="rgb",fe="hsl",qe={capture:!0},Ke=["hex",X,fe],M=t=>typeof t=="string",Ue=t=>t instanceof Element,ve=t=>Number.isFinite(M(t)&&t.trim()!==""?+t:t),{keys:dt,assign:Y,setPrototypeOf:wt,prototype:bt}=Object,{isArray:ee}=Array,ye=t=>t!=null&&typeof t=="object"&&!ee(t)&&!Ue(t),T=(t,e)=>dt(t).forEach(a=>e(a,t[a])),te=(t,e)=>(T(e,(a,r)=>{Y(t,{[a]:ye(r)?te(t[a]||{},r):r})}),t),Ge=()=>k.body,ae=(t,e=de)=>M(t)&&t.trim()?[...e.querySelectorAll(t)]:Ue(t)?[t]:[],Je=t=>ae(`${F},${we},[tabindex]`,t),O=(t,e,a,r={},o)=>{const s=k.createElement(t);return e&&(s.className=e.trim()),a&&(M(a)?s.innerHTML=a:s.append(...(ee(a)?a:[a]).filter(n=>!!n))),T(M(o)?{...r,"aria-label":o}:r,(n,l)=>s.setAttribute(n,l+"")),s},$=(t,e,a)=>O("div",e,t,{},a),se=(t,e)=>(t&&t!==e&&t.replaceWith(e),e),R=(t="",e="",a,r=t)=>O(we,"alwan__button "+e,a,{type:we,title:r},t),Qe=(t,e,a,r=1)=>O(F,"alwan__slider alwan__"+e,"",{type:"range",max:a,step:r},t),Xe=(t,e)=>t.style.setProperty("--color",e),_e=(t,e,a)=>t.classList.toggle("alwan--"+e,a),xe=(t,e,a)=>{t.style.transform=`translate(${e}px,${a}px)`},j=t=>{const{x:e,y:a,width:r,height:o}=t.getBoundingClientRect();return[e,a,r,o,r+e,o+a]},Ye=t=>$(t,"alwan__container"),$e=(t,e)=>t.style.display=e?"none":"",v=(t,e,a,r)=>t.addEventListener(e,a,r),oe=(t,e,a)=>t.removeEventListener(e,a),ne=(t,e=X)=>e?e+(e===X?`(${t.r}, ${t.g}, ${t.b}`:`(${t.h}, ${t.s}%, ${t.l}%`)+(t.a<1?`, ${t.a})`:")"):Q,{min:W,max:Se,abs:mt,round:B,PI:ft}=Math,Z=(t,e=100,a=0)=>t>e?e:t<a?a:t,et=t=>B((t%=360)<0?t+360:t),Le=t=>parseInt(t,16),vt=t=>{let e,a,{config:r,s:o}=t,s=!1;const n=()=>{const i={};s||(o.t(),s=!0),T(e,(h,w)=>i[h]=w.value),o.o(i[a]||ne(i,a),!0)},l=()=>{e={};const i=a==="hex"||r.singleInput?[a]:[...a+(r.opacity?"a":"")];return $(i.map(h=>O("label","",[e[h]=O(F,"alwan__input",[],{type:"text",value:o.i[h]}),O("span","",h)])),"alwan__inputs")};return{p({inputs:i,format:h,i18n:w}){let f,p,g,b,u=Ke;return i!==!0&&(i=i||{},u=u.filter(c=>i[c])),b=u.length,u=b?u:Ke,a=u[Se(u.indexOf(h),0)],o.u(a),b?(b>1&&(g=R(w.buttons.changeFormat,"",'<svg width="15" height="15" viewBox="0 0 20 20" aria-role="none"><path d="M10 1L5 8h10l-5-7zm0 18l5-7H5l5 7z"></path></svg>'),v(g,D,()=>{a=u[(u.indexOf(a)+1)%b],o.u(a),f=se(f,l())})),f=l(),p=$(f),v(p,F,n),v(p,N,()=>{o._(),s=!1}),v(p,"focusin",c=>c.target.select()),v(p,me,c=>c.key==="Enter"&&t.c.v(!1)),Ye([p,g])):null},m(i){s||T(e||{},(h,w)=>w.value=i[h]+"")}}},yt={ArrowLeft:-1,ArrowRight:1},_t={ArrowUp:-1,ArrowDown:1},xt=({s:t})=>{let e,a,r,o,s;const n={s:0,l:0},l=(p,g)=>{let b,u,[,,c,_]=s;r=p=Z(p,c),o=g=Z(g,_),xe(a,p,g),b=1-g/_,u=b*(1-p/(2*c)),n.s=u===1||u===0?0:(b-u)/W(u,1-u)*100,n.l=100*u,t.$(n)},i=({x:p,y:g,buttons:b})=>{b?l(p-s[0],g-s[1]):h()},h=()=>{t._(),oe(k,Re,i),oe(k,We,h)},w=p=>{e.setPointerCapture(p.pointerId),t.t(),s=j(e),l(p.x-s[0],p.y-s[1]),v(k,Re,i),v(k,We,h)},f=p=>{const g=p.key,b=yt[g]||0,u=_t[g]||0;(b||u)&&(p.preventDefault(),s=j(e),t.t(),l(r+b*s[2]/100,o+u*s[3]/100),t._())};return{p:({i18n:p,disabled:g})=>(a=$("","alwan__cursor"),e=$(a,"alwan__selector",p.picker||p.palette),g||(e.tabIndex=0,v(e,Fe,w),v(e,me,f)),e),A(p,g){p=(g/=100)+p/100*W(g,1-g),s=j(e),r=(p?2*(1-g/p):0)*s[2],o=(1-p)*s[3],xe(a,r,o)}}},$t=({s:t,e})=>{let a,r,o;return{p:({opacity:s,i18n:{sliders:n}})=>(a=Qe(n.hue,"hue",360),r=s?Qe(n.alpha,"alpha",1,.01):null,o=$([a,r]),v(o,N,()=>e.S(N)),v(o,F,({target:l})=>t.$({[l===a?"h":"a"]:l.value})),o),m(s,n){a.value=s+"",r&&(r.value=n+"")}}},re=t=>(t<16?"0":"")+t.toString(16),ke=(t,e,a)=>(t%=12,B(255*(a-e*W(a,1-a)*Se(-1,W(t-3,9-t,1))))),Ae=O("canvas").getContext("2d"),St={turn:360,rad:180/ft,grad:.9},Lt=/a?\(\s*([+-]?\d*\.?\d+)(\w*)?\s*[\s,]\s*([+-]?\d*\.?\d+)%?\s*,?\s*([+-]?\d*\.?\d+)%?(?:\s*[\/,]\s*([+-]?\d*\.?\d+)(%)?)?\s*\)?$/,tt=t=>M(t)?t:ne(t,(e=>ye(e)&&[fe,X].find(a=>[...a].every(r=>ve(e[r])))||"")(t)),at=t=>(Ae.fillStyle=Q,Ae.fillStyle=t,Ae.fillStyle),kt=(t,e)=>{let a,r,o=tt(t).trim();if(/^hsl/.test(o)){const[s,n,l,i,h,w="1",f]=Lt.exec(o)||[];s&&(r={h:et(+n*(St[l]||1)),s:Z(+i),l:Z(+h),a:Z(+w/(f?100:1),1)})}if(!r){if(/^[\da-f]+$/i.test(o)&&(o="#"+o),o=at(o),o[0]==="#")a={r:Le(o[1]+o[2]),g:Le(o[3]+o[4]),b:Le(o[5]+o[6]),a:1};else{const[s,n,l,i]=o.match(/[\d\.]+/g).map(Number);a={r:s,g:n,b:l,a:i}}r=(({r:s,g:n,b:l,a:i})=>{const h=Se(s/=255,n/=255,l/=255),w=W(s,n,l),f=h-w,p=(h+w)/2;return{h:et(60*(fLine truncated
+1
View File
@@ -0,0 +1 @@
var yo=Object.defineProperty;var wo=(e,t)=>{for(var r in t)yo(e,r,{get:t[r],enumerable:!0})};var ot=new Map,ae={set(e,t,r){ot.has(e)||ot.set(e,new Map);let o=ot.get(e);if(!o.has(t)&&o.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(o.keys())[0]}.`);return}o.set(t,r)},get(e,t){return ot.has(e)&&ot.get(e).get(t)||null},remove(e,t){if(!ot.has(e))return;let r=ot.get(e);r.delete(t),r.size===0&&ot.delete(e)}};var Re="transitionend",Me=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(t,r)=>`#${CSS.escape(r)}`)),e),Cr=e=>e==null?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),Sr=e=>{do e+=Math.floor(Math.random()*1e6);while(document.getElementById(e));return e},xo=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:r}=window.getComputedStyle(e),o=Number.parseFloat(t),i=Number.parseFloat(r);return!o&&!i?0:(t=t.split(",")[0],r=r.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(r))*1e3)},He=e=>{e.dispatchEvent(new Event(Re))},it=e=>!e||typeof e!="object"?!1:(typeof e.jquery<"u"&&(e=e[0]),typeof e.nodeType<"u"),J=e=>it(e)?e.jquery?e[0]:e:typeof e=="string"&&e.length>0?document.querySelector(Me(e)):null,le=e=>{if(!it(e)||e.getClientRects().length===0)return!1;let t=getComputedStyle(e).getPropertyValue("visibility")==="visible",r=e.closest("details:not([open])");if(!r)return t;if(r!==e){let o=e.closest("summary");if(o&&o.parentNode!==r||o===null)return!1}return t},Nr=e=>!e||e.nodeType!==Node.ELEMENT_NODE||e.classList.contains("disabled")?!0:typeof e.disabled<"u"?e.disabled:e.hasAttribute("disabled")&&e.getAttribute("disabled")!=="false",ke=e=>{if(!document.documentElement.attachShadow)return null;if(typeof e.getRootNode=="function"){let t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?ke(e.parentNode):null},$e=()=>{},ce=e=>{e.offsetHeight},Ve=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Ie=[],To=e=>{document.readyState==="loading"?(Ie.length||document.addEventListener("DOMContentLoaded",()=>{for(let t of Ie)t()}),Ie.push(e)):e()},At=()=>document.documentElement.dir==="rtl",nt=e=>{To(()=>{let t=Ve();if(t){let r=e.NAME,o=t.fn[r];t.fn[r]=e.jQueryInterface,t.fn[r].Constructor=e,t.fn[r].noConflict=()=>(t.fn[r]=o,e.jQueryInterface)}})},K=(e,t=[],r=e)=>typeof e=="function"?e(...t):r,Dr=(e,t,r=!0)=>{if(!r){K(e);return}let i=xo(t)+5,n=!1,s=({target:a})=>{a===t&&(n=!0,t.removeEventListener(Re,s),K(e))};t.addEventListener(Re,s),setTimeout(()=>{n||He(t)},i)},Lr=(e,t,r,o)=>{let i=e.length,n=e.indexOf(t);return n===-1?!r&&o?e[i-1]:e[0]:(n+=r?1:-1,o&&(n=(n+i)%i),e[Math.max(0,Math.min(n,i-1))])};var Ao=/[^.]*(?=\..*)\.|.*/,Oo=/\..*/,Co=/::\d+$/,je={},Pr=1,Rr={mouseenter:"mouseover",mouseleave:"mouseout"},So=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Mr(e,t){return t&&`${t}::${Pr++}`||e.uidEvent||Pr++}function Hr(e){let t=Mr(e);return e.uidEvent=t,je[t]=je[t]||{},je[t]}function No(e,t){return function r(o){return Fe(o,{delegateTarget:e}),r.oneOff&&We.off(e,o.type,t),t.apply(e,[o])}}function Do(e,t,r){return function o(i){let n=e.querySelectorAll(t);for(let{target:s}=i;s&&s!==this;s=s.parentNode)for(let a of n)if(a===s)return Fe(i,{delegateTarget:s}),o.oneOff&&We.off(e,i.type,t,r),r.apply(s,[i])}}function kr(e,t,r=null){return Object.values(e).find(o=>o.callable===t&&o.delegationSelector===r)}function $r(e,t,r){let o=typeof t=="string",i=o?r:t||r,n=Vr(e);return So.has(n)||(n=e),[o,i,n]}function Ir(e,t,r,o,i){if(typeof t!="string"||!e)return;let[n,s,a]=$r(t,r,o);t in Rr&&(s=(b=>function(d){if(!d.relatedTarget||d.relatedTarget!==d.delegateTarget&&!d.delegateTarget.contains(d.relatedTarget))return b.call(this,d)})(s));let l=Hr(e),f=l[a]||(l[a]={}),c=kr(f,s,n?r:null);if(c){c.oneOff=c.oneOff&&i;return}let u=Mr(s,t.replace(Ao,"")),m=n?Do(e,r,s):No(e,s);m.delegationSelector=n?r:null,m.callable=s,m.oneOff=i,m.uidEvent=u,f[u]=m,e.addEventListener(a,m,n)}function Be(e,t,r,o,i){let n=kr(t[r],o,i);n&&(e.removeEventListener(r,n,!!i),delete t[r][n.uidEvent])}function Lo(e,t,r,o){let i=t[r]||{};for(let[n,s]of Object.entries(i))n.includes(o)&&Be(e,t,r,s.callable,s.delegationSelector)}function Vr(e){return e=e.replace(Oo,""),Rr[e]||e}var We={on(e,t,r,o){Ir(e,t,r,o,!1)},one(e,t,r,o){Ir(e,t,r,o,!0)},off(e,t,r,o){if(typeof t!="string"||!e)return;let[i,n,s]=$r(t,r,o),a=s!==t,l=Hr(e),f=l[s]||{},c=t.startsWith(".");if(typeof n<"u"){Line truncated
@@ -0,0 +1 @@
function s(){var r=arguments[0];typeof r=="string"&&(r=document.createElement(r));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var o=t[n];typeof o=="string"?r.setAttribute(n,o):o!=null&&(r[n]=o)}e++}for(;e<arguments.length;e++)f(r,arguments[e]);return r}function f(r,e){if(typeof e=="string")r.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)r.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)f(r,e[t]);else throw new RangeError("Unsupported child node: "+e)}export{s as default};
@@ -0,0 +1,44 @@
var Ld=typeof global=="object"&&global&&global.Object===Object&&global,Po=Ld;var Ed=typeof self=="object"&&self&&self.Object===Object&&self,Pd=Po||Ed||Function("return this")(),C=Pd;var Cd=C.Symbol,V=Cd;var Fp=Object.prototype,Md=Fp.hasOwnProperty,Fd=Fp.toString,Ye=V?V.toStringTag:void 0;function Wd(r){var t=Md.call(r,Ye),e=r[Ye];try{r[Ye]=void 0;var o=!0}catch{}var f=Fd.call(r);return o&&(t?r[Ye]=e:delete r[Ye]),f}var Wp=Wd;var Bd=Object.prototype,Nd=Bd.toString;function Dd(r){return Nd.call(r)}var Bp=Dd;var jd="[object Null]",Ud="[object Undefined]",Np=V?V.toStringTag:void 0;function Gd(r){return r==null?r===void 0?Ud:jd:Np&&Np in Object(r)?Wp(r):Bp(r)}var U=Gd;function kd(r){return r!=null&&typeof r=="object"}var T=kd;var qd="[object Symbol]";function zd(r){return typeof r=="symbol"||T(r)&&U(r)==qd}var Y=zd;var Hd=NaN;function Kd(r){return typeof r=="number"?r:Y(r)?Hd:+r}var Jf=Kd;function Yd(r,t){for(var e=-1,o=r==null?0:r.length,f=Array(o);++e<o;)f[e]=t(r[e],e,r);return f}var O=Yd;var Xd=Array.isArray,c=Xd;var $d=1/0,Dp=V?V.prototype:void 0,jp=Dp?Dp.toString:void 0;function Up(r){if(typeof r=="string")return r;if(c(r))return O(r,Up)+"";if(Y(r))return jp?jp.call(r):"";var t=r+"";return t=="0"&&1/r==-$d?"-0":t}var tr=Up;function Zd(r,t){return function(e,o){var f;if(e===void 0&&o===void 0)return t;if(e!==void 0&&(f=e),o!==void 0){if(f===void 0)return o;typeof e=="string"||typeof o=="string"?(e=tr(e),o=tr(o)):(e=Jf(e),o=Jf(o)),f=r(e,o)}return f}}var st=Zd;var Vd=st(function(r,t){return r+t},0),Qf=Vd;var Jd=/\s/;function Qd(r){for(var t=r.length;t--&&Jd.test(r.charAt(t)););return t}var Co=Qd;var rc=/^\s+/;function tc(r){return r&&r.slice(0,Co(r)+1).replace(rc,"")}var Mo=tc;function ec(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var S=ec;var Gp=NaN,oc=/^[-+]0x[0-9a-f]+$/i,fc=/^0b[01]+$/i,ac=/^0o[0-7]+$/i,ic=parseInt;function nc(r){if(typeof r=="number")return r;if(Y(r))return Gp;if(S(r)){var t=typeof r.valueOf=="function"?r.valueOf():r;r=S(t)?t+"":t}if(typeof r!="string")return r===0?r:+r;r=Mo(r);var e=fc.test(r);return e||ac.test(r)?ic(r.slice(2),e?2:8):oc.test(r)?Gp:+r}var or=nc;var kp=1/0,mc=17976931348623157e292;function pc(r){if(!r)return r===0?r:0;if(r=or(r),r===kp||r===-kp){var t=r<0?-1:1;return t*mc}return r===r?r:0}var Tr=pc;function uc(r){var t=Tr(r),e=t%1;return t===t?e?t-e:t:0}var x=uc;var sc="Expected a function";function lc(r,t){if(typeof t!="function")throw new TypeError(sc);return r=x(r),function(){if(--r<1)return t.apply(this,arguments)}}var ra=lc;function dc(r){return r}var D=dc;var cc="[object AsyncFunction]",xc="[object Function]",hc="[object GeneratorFunction]",gc="[object Proxy]";function bc(r){if(!S(r))return!1;var t=U(r);return t==xc||t==hc||t==cc||t==gc}var pr=bc;var yc=C["__core-js_shared__"],re=yc;var qp=function(){var r=/[^.]+$/.exec(re&&re.keys&&re.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function vc(r){return!!qp&&qp in r}var zp=vc;var _c=Function.prototype,Ac=_c.toString;function Ic(r){if(r!=null){try{return Ac.call(r)}catch{}try{return r+""}catch{}}return""}var ft=Ic;var Rc=/[\\^$.*+?()[\]{}|]/g,Oc=/^\[object .+?Constructor\]$/,Sc=Function.prototype,Tc=Object.prototype,wc=Sc.toString,Lc=Tc.hasOwnProperty,Ec=RegExp("^"+wc.call(Lc).replace(Rc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Pc(r){if(!S(r)||zp(r))return!1;var t=pr(r)?Ec:Oc;return t.test(ft(r))}var Fo=Pc;function Cc(r,t){return r?.[t]}var Hp=Cc;function Mc(r,t){var e=Hp(r,t);return Fo(e)?e:void 0}var Er=Mc;var Fc=Er(C,"WeakMap"),Ct=Fc;var Wc=Ct&&new Ct,te=Wc;var Bc=te?function(r,t){return te.set(r,t),r}:D,Wo=Bc;var Kp=Object.create,Nc=function(){function r(){}return function(t){if(!S(t))return{};if(Kp)return Kp(t);r.prototype=t;var e=new r;return r.prototype=void 0,e}}(),jr=Nc;function Dc(r){return function(){var t=arguments;switch(t.length){case 0:return new r;case 1:return new r(t[0]);case 2:return new r(t[0],t[1]);case 3:return new r(t[0],t[1],t[2]);case 4:return new r(t[0],t[1],t[2],t[3]);case 5:return new r(t[0],t[1],t[2],t[3],t[4]);case 6:return new r(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new r(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var e=jr(r.prototype),o=r.apply(e,t);return S(o)?o:e}}var at=Dc;var jc=1;function Uc(r,t,e){var o=t&jc,f=at(r);function a(){var n=this&&this!==C&&this instanceof a?f:r;return n.apply(o?e:this,arguments)}return a}var Yp=Uc;function Gc(r,t,e){switch(e.length){case 0:return r.call(t);case 1:return r.call(t,e[0]);case 2:return r.call(t,e[0],e[1]);case 3:return r.call(t,e[0],e[1],e[2])}return r.apply(t,e)}var X=Gc;var kc=Math.max;function qc(r,t,e,o){for(var f=-1,a=r.length,n=e.length,m=-1,p=t.length,u=kc(a-n,0),s=Array(p+u),l=!o;++m<p;)s[m]=t[m];for(;++f<n;)(l||f<a)&&(s[e[f]]=r[f]);for(;u--;)s[m++]=r[f++];return s}var Bo=qc;var zc=Math.max;function Hc(r,t,e,o){for(var f=-1,a=r.length,n=-1,m=e.length,p=-1,u=t.length,s=zc(a-m,0),l=Array(s+u),g=!o;++f<s;)l[f]=r[f];for(var y=f;++p<u;)l[y+p]=t[p];for(;++n<Line truncated
/* [wrapped with `+t+`] */
`)}var Zp=xx;function hx(r){return function(){return r}}var Ft=hx;var gx=function(){try{var r=Er(Object,"defineProperty");return r({},"",{}),r}catch{}}(),fe=gx;var bx=fe?function(r,t){return fe(r,"toString",{configurable:!0,enumerable:!1,value:Ft(t),writable:!0})}:D,Vp=bx;var yx=ko(Vp),ae=yx;function vx(r,t){for(var e=-1,o=r==null?0:r.length;++e<o&&t(r[e],e,r)!==!1;);return r}var fr=vx;function _x(r,t,e,o){for(var f=r.length,a=e+(o?1:-1);o?a--:++a<f;)if(t(r[a],a,r))return a;return-1}var ct=_x;function Ax(r){return r!==r}var zo=Ax;function Ix(r,t,e){for(var o=e-1,f=r.length;++o<f;)if(r[o]===t)return o;return-1}var Jp=Ix;function Rx(r,t,e){return t===t?Jp(r,t,e):ct(r,zo,e)}var Ur=Rx;function Ox(r,t){var e=r==null?0:r.length;return!!e&&Ur(r,t,0)>-1}var xt=Ox;var Sx=1,Tx=2,wx=8,Lx=16,Ex=32,Px=64,Cx=128,Mx=256,Fx=512,Wx=[["ary",Cx],["bind",Sx],["bindKey",Tx],["curry",wx],["curryRight",Lx],["flip",Fx],["partial",Ex],["partialRight",Px],["rearg",Mx]];function Bx(r,t){return fr(Wx,function(e){var o="_."+e[0];t&e[1]&&!xt(r,o)&&r.push(o)}),r.sort()}var Qp=Bx;function Nx(r,t,e){var o=t+"";return ae(r,Zp(o,Qp($p(o),e)))}var Ho=Nx;var Dx=1,jx=2,Ux=4,Gx=8,ru=32,tu=64;function kx(r,t,e,o,f,a,n,m,p,u){var s=t&Gx,l=s?n:void 0,g=s?void 0:n,y=s?a:void 0,I=s?void 0:a;t|=s?ru:tu,t&=~(s?tu:ru),t&Ux||(t&=~(Dx|jx));var L=[r,t,f,y,l,I,g,m,p,u],A=e.apply(void 0,L);return Xe(r)&&qo(A,L),A.placeholder=o,Ho(A,r,t)}var Ko=kx;function qx(r){var t=r;return t.placeholder}var Gr=qx;var zx=9007199254740991,Hx=/^(?:0|[1-9]\d*)$/;function Kx(r,t){var e=typeof r;return t=t??zx,!!t&&(e=="number"||e!="symbol"&&Hx.test(r))&&r>-1&&r%1==0&&r<t}var lr=Kx;var Yx=Math.min;function Xx(r,t){for(var e=r.length,o=Yx(t.length,e),f=z(r);o--;){var a=t[o];r[o]=lr(a,e)?f[a]:void 0}return r}var eu=Xx;var ou="__lodash_placeholder__";function $x(r,t){for(var e=-1,o=r.length,f=0,a=[];++e<o;){var n=r[e];(n===t||n===ou)&&(r[e]=ou,a[f++]=e)}return a}var wr=$x;var Zx=1,Vx=2,Jx=8,Qx=16,rh=128,th=512;function fu(r,t,e,o,f,a,n,m,p,u){var s=t&rh,l=t&Zx,g=t&Vx,y=t&(Jx|Qx),I=t&th,L=g?void 0:at(r);function A(){for(var P=arguments.length,F=Array(P),Fr=P;Fr--;)F[Fr]=arguments[Fr];if(y)var Sr=Gr(A),Wr=Xp(F,Sr);if(o&&(F=Bo(F,o,f,y)),a&&(F=No(F,a,n,y)),P-=Wr,y&&P<u){var er=wr(F,Sr);return Ko(r,t,fu,A.placeholder,e,F,er,m,p,u-P)}var Yr=l?e:this,ot=g?Yr[r]:r;return P=F.length,m?F=eu(F,m):I&&P>1&&F.reverse(),s&&p<P&&(F.length=p),this&&this!==C&&this instanceof A&&(ot=L||at(ot)),ot.apply(Yr,F)}return A}var ie=fu;function eh(r,t,e){var o=at(r);function f(){for(var a=arguments.length,n=Array(a),m=a,p=Gr(f);m--;)n[m]=arguments[m];var u=a<3&&n[0]!==p&&n[a-1]!==p?[]:wr(n,p);if(a-=u.length,a<e)return Ko(r,t,ie,f.placeholder,void 0,n,u,void 0,void 0,e-a);var s=this&&this!==C&&this instanceof f?o:r;return X(s,this,n)}return f}var au=eh;var oh=1;function fh(r,t,e,o){var f=t&oh,a=at(r);function n(){for(var m=-1,p=arguments.length,u=-1,s=o.length,l=Array(s+p),g=this&&this!==C&&this instanceof n?a:r;++u<s;)l[u]=o[u];for(;p--;)l[u++]=arguments[++m];return X(g,f?e:this,l)}return n}var iu=fh;var nu="__lodash_placeholder__",ta=1,ah=2,ih=4,mu=8,$e=128,pu=256,nh=Math.min;function mh(r,t){var e=r[1],o=t[1],f=e|o,a=f<(ta|ah|$e),n=o==$e&&e==mu||o==$e&&e==pu&&r[7].length<=t[8]||o==($e|pu)&&t[7].length<=t[8]&&e==mu;if(!(a||n))return r;o&ta&&(r[2]=t[2],f|=e&ta?0:ih);var m=t[3];if(m){var p=r[3];r[3]=p?Bo(p,m,t[4]):m,r[4]=p?wr(r[3],nu):t[4]}return m=t[5],m&&(p=r[5],r[5]=p?No(p,m,t[6]):m,r[6]=p?wr(r[5],nu):t[6]),m=t[7],m&&(r[7]=m),o&$e&&(r[8]=r[8]==null?t[8]:nh(r[8],t[8])),r[9]==null&&(r[9]=t[9]),r[0]=t[0],r[1]=f,r}var uu=mh;var ph="Expected a function",su=1,uh=2,ea=8,oa=16,fa=32,lu=64,du=Math.max;function sh(r,t,e,o,f,a,n,m){var p=t&uh;if(!p&&typeof r!="function")throw new TypeError(ph);var u=o?o.length:0;if(u||(t&=~(fa|lu),o=f=void 0),n=n===void 0?n:du(x(n),0),m=m===void 0?m:x(m),u-=f?f.length:0,t&lu){var s=o,l=f;o=f=void 0}var g=p?void 0:ee(r),y=[r,t,e,o,f,s,l,a,n,m];if(g&&uu(y,g),r=y[0],t=y[1],e=y[2],o=y[3],f=y[4],m=y[9]=y[9]===void 0?p?0:r.length:du(y[9]-u,0),!m&&t&(ea|oa)&&(t&=~(ea|oa)),!t||t==su)var I=Yp(r,t,e);else t==ea||t==oa?I=au(r,t,m):(t==fa||t==(su|fa))&&!f.length?I=iu(r,t,e,o):I=ie.apply(void 0,y);var L=g?Wo:qo;return Ho(L(I,y),r,t)}var dr=sh;var lh=128;function dh(r,t,e){return t=e?void 0:t,t=r&&t==null?r.length:t,dr(r,lh,void 0,void 0,void 0,void 0,t)}var Ze=dh;function ch(r,t,e){t=="__proto__"&&fe?fe(r,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[t]=e}var ir=ch;function xh(r,t){return r===t||r!==r&&t!==t}var Q=xh;var hh=Object.prototype,gh=hh.hasOwnProperty;function bh(r,t,e){var o=r[t];(!(gh.call(r,t)&&Q(o,e))||e===void 0&&!(t in r))&&ir(r,t,e)}var $r=bh;function yh(r,t,e,o){var f=!e;e||(e={});for(var a=-1,n=t.length;++a<n;){var m=t[a],p=o?o(e[m],r[m],m,e,r):void 0;p===void 0&&(p=r[m]),f?ir(e,m,p):$r(e,m,p)}return e}var nr=yh;var cu=Math.max;function vh(r,t,e){return t=cu(t===void 0?r.length-1:t,0),function(){for(var o=arguments,f=-1,a=cu(o.length-t,0),n=Array(a);++f<a;)n[f]=o[t+ Line truncated
`:"";r.replace(g,function(A,P,F,Fr,Sr,Wr){return F||(F=Fr),l+=r.slice(u,Wr).replace(aL,ld),P&&(m=!0,l+=`' +
__e(`+P+`) +
'`),Sr&&(p=!0,l+=`';
`+Sr+`;
__p += '`),F&&(l+=`' +
((__t = (`+F+`)) == null ? '' : __t) +
'`),u=Wr+A.length,A}),l+=`';
`;var I=hd.call(t,"variable")&&t.variable;if(!I)l=`with (obj) {
`+l+`
}
`;else if(xd.test(I))throw new Error(Qw);l=(p?l.replace(tL,""):l).replace(eL,"$1").replace(oL,"$1;"),l="function("+(I||"obj")+`) {
`+(I?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(m?", __e = _.escape":"")+(p?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+l+`return __p
}`;var L=ro(function(){return Function(a,y+"return "+l).apply(void 0,n)});if(L.source=l,Ut(L))throw L;return L}var Km=nL;var mL="Expected a function";function pL(r,t,e){var o=!0,f=!0;if(typeof r!="function")throw new TypeError(mL);return S(e)&&(o="leading"in e?!!e.leading:o,f="trailing"in e?!!e.trailing:f),so(r,t,{leading:o,maxWait:t,trailing:f})}var Ym=pL;function uL(r,t){return t(r)}var et=uL;var sL=9007199254740991,Xm=4294967295,lL=Math.min;function dL(r,t){if(r=x(r),r<1||r>sL)return[];var e=Xm,o=lL(r,Xm);t=mr(t),r-=Xm;for(var f=ne(o,t);++e<r;)t(e);return f}var $m=dL;function cL(){return this}var Kf=cL;function xL(r,t){var e=r;return e instanceof w&&(e=e.value()),xe(t,function(o,f){return f.func.apply(f.thisArg,Ar([o],f.args))},e)}var Yf=xL;function hL(){return Yf(this.__wrapped__,this.__actions__)}var Dr=hL;function gL(r){return v(r).toLowerCase()}var Zm=gL;function bL(r){return c(r)?O(r,ar):Y(r)?[r]:z(Zo(v(r)))}var Vm=bL;var gd=9007199254740991;function yL(r){return r?Mr(x(r),-gd,gd):r===0?r:0}var Jm=yL;function vL(r){return v(r).toUpperCase()}var Qm=vL;function _L(r,t,e){var o=c(r),f=o||vr(r)||Br(r);if(t=d(t,4),e==null){var a=r&&r.constructor;f?e=o?new a:[]:S(r)?e=pr(a)?jr(vt(r)):{}:e={}}return(f?fr:gr)(r,function(n,m,p){return t(e,n,m,p)}),e}var rp=_L;function AL(r,t){for(var e=r.length;e--&&Ur(t,r[e],0)>-1;);return e}var Xf=AL;function IL(r,t){for(var e=-1,o=r.length;++e<o&&Ur(t,r[e],0)>-1;);return e}var $f=IL;function RL(r,t,e){if(r=v(r),r&&(e||t===void 0))return Mo(r);if(!r||!(t=tr(t)))return r;var o=ur(r),f=ur(t),a=$f(o,f),n=Xf(o,f)+1;return Ir(o,a,n).join("")}var tp=RL;function OL(r,t,e){if(r=v(r),r&&(e||t===void 0))return r.slice(0,Co(r)+1);if(!r||!(t=tr(t)))return r;var o=ur(r),f=Xf(o,ur(t))+1;return Ir(o,0,f).join("")}var ep=OL;var SL=/^\s+/;function TL(r,t,e){if(r=v(r),r&&(e||t===void 0))return r.replace(SL,"");if(!r||!(t=tr(t)))return r;var o=ur(r),f=$f(o,ur(t));return Ir(o,f).join("")}var op=TL;var wL=30,LL="...",EL=/\w*$/;function PL(r,t){var e=wL,o=LL;if(S(t)){var f="separator"in t?t.separator:f;e="length"in t?x(t.length):e,o="omission"in t?tr(t.omission):o}r=v(r);var a=r.length;if(qr(r)){var n=ur(r);a=n.length}if(e>=a)return r;var m=e-Hr(o);if(m<1)return o;var p=n?Ir(n,0,m).join(""):r.slice(0,m);if(f===void 0)return p+o;if(n&&(m+=p.length-m),Vt(f)){if(r.slice(m).search(f)){var u,s=p;for(f.global||(f=RegExp(f.source,v(EL.exec(f))+"g")),f.lastIndex=0;u=f.exec(s);)var l=u.index;p=p.slice(0,l===void 0?m:l)}}else if(r.indexOf(tr(f),m)!=m){var g=p.lastIndexOf(f);g>-1&&(p=p.slice(0,g))}return p+o}var fp=PL;function CL(r){return Ze(r,1)}var ap=CL;var ML={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},FL=he(ML),bd=FL;var yd=/&(?:amp|lt|gt|quot|#39);/g,WL=RegExp(yd.source);function BL(r){return r=v(r),r&&WL.test(r)?r.replace(yd,bd):r}var ip=BL;var NL=1/0,DL=_t&&1/It(new _t([,-0]))[1]==NL?function(r){return new _t(r)}:Mt,vd=DL;var jL=200;function UL(r,t,e){var o=-1,f=xt,a=r.length,n=!0,m=[],p=m;if(e)n=!1,f=Pe;else if(a>=jL){var u=t?null:vd(r);if(u)return It(u);n=!1,f=mt,p=new At}else p=t?[]:m;r:for(;++o<a;){var s=r[o],l=t?t(s):s;if(s=e||s!==0?s:0,n&&l===l){for(var g=p.length;g--;)if(p[g]===l)continue r;t&&p.push(l),m.push(s)}else f(p,l,e)||(p!==m&&p.push(l),m.push(s))}return m}var Lr=UL;var GL=h(function(r){return Lr(B(r,1,M,!0))}),np=GL;var kL=h(function(r){var t=K(r);return M(t)&&(t=void 0),Lr(B(r,1,M,!0),d(t,2))}),mp=kL;var qL=h(function(r){var t=K(r);return t=typeof t=="function"?t:void 0,Lr(B(r,1,M,!0),void 0,t)}),pp=qL;function zL(r){return r&&r.length?Lr(r):[]}var up=zL;function HL(r,t){return r&&r.length?Lr(r,d(t,2)):[]}var sp=HL;function KL(r,t){return t=typeof t=="function"?t:void 0,r&&r.length?Lr(r,void 0,t):[]}var lp=KL;var YL=0;function XL(r){var t=++YL;return v(r)+t}var dp=XL;function $L(r,t){return r==null?!0:je(r,t)}var cp=$L;var ZL=Math.max;function VL(r){if(!(r&&r.length))return[];var t=0;return r=Rr(r,function(e){if(M(e))return t=ZL(e.length,t),!0}),ne(t,function(e){return O(r,we(e))})}var Qt=VL;function JL(r,t){if(!(r&&r.length))return[];var e=Qt(r);return t==null?e:O(e,function(o){return X(t,void 0,o)})}var Lo=JL;function QL(r,t,e,o){return tt(r,t,e(Cr(r,t)),o)}var Zf=QL;function rE(r,t,e){return r==null?r:Zf(r,t,mr(e))}var xp=rE;function tE(r,t,e,o){return o=typeof o=="function"?o:void 0,r==null?r:Zf(r,t,mr(e),o)}var hp=tE;var eE=zr(function(r,t,e){return r+(e?" ":"")+t.toUpperCase()}),gp=eE;function oE(r){return r==null?[]:Fe(r,q(r))}var bp=oE;var fE=h(function(r,t){return M(r)?Jr(r,t):[]}),yp=fE;function aE(r,t){return To(mr(t),r)}var vp=aE;var iE=xr(function(r){var t=r.length,e=t?r[0]:0,o=this.__wrapped__,f=function(a){return ce(a,r)};return t>1||this.__actions__.length||!(o instanceof w)||!lr(e)?this.thru(f):(o=o.slice(e,+e+(t?1:0)),o.__actions__.push({func:et,args:[f],thisArg:void 0}),new yr(o,this.__chain__).thru(function(a){return t&&!a.length&&a.push(void 0),a}))}),_p=iE;function nE(){return io(this)}var Ap=nE;function mE(){var r=this.__wrapped__;if(r in Line truncated
/*! Bundled license information:
lodash-es/lodash.default.js:
(**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="es" --repo lodash/lodash#4.18.1 -o ./`
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*)
lodash-es/lodash.js:
(**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="es" --repo lodash/lodash#4.18.1 -o ./`
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*)
*/
@@ -0,0 +1,6 @@
var b=(y,v)=>()=>(v||y((v={exports:{}}).exports,v),v.exports);var T=b((E,k)=>{/*!***************************************************
* mark.js v8.11.1
* https://markjs.io/
* Copyright (c) 2014–2018, Julian Kühnel
* Released under the MIT license https://git.io/vwTVl
*****************************************************/(function(y,v){typeof E=="object"&&typeof k<"u"?k.exports=v():typeof define=="function"&&define.amd?define(v):y.Mark=v()})(E,function(){"use strict";var y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},v=function(f,o){if(!(f instanceof o))throw new TypeError("Cannot call a class as a function")},I=function(){function f(o,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(o,t.key,t)}}return function(o,e,n){return e&&f(o.prototype,e),n&&f(o,n),o}}(),N=Object.assign||function(f){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(f[n]=e[n])}return f},x=function(){function f(o){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:5e3;v(this,f),this.ctx=o,this.iframes=e,this.exclude=n,this.iframesTimeout=t}return I(f,[{key:"getContexts",value:function(){var e=void 0,n=[];return typeof this.ctx>"u"||!this.ctx?e=[]:NodeList.prototype.isPrototypeOf(this.ctx)?e=Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?e=this.ctx:typeof this.ctx=="string"?e=Array.prototype.slice.call(document.querySelectorAll(this.ctx)):e=[this.ctx],e.forEach(function(t){var a=n.filter(function(r){return r.contains(t)}).length>0;n.indexOf(t)===-1&&!a&&n.push(t)}),n}},{key:"getIframeContents",value:function(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=void 0;try{var r=e.contentWindow;if(a=r.document,!r||!a)throw new Error("iframe inaccessible")}catch{t()}a&&n(a)}},{key:"isIframeBlank",value:function(e){var n="about:blank",t=e.getAttribute("src").trim(),a=e.contentWindow.location.href;return a===n&&t!==n&&t}},{key:"observeIframeLoad",value:function(e,n,t){var a=this,r=!1,s=null,i=function c(){if(!r){r=!0,clearTimeout(s);try{a.isIframeBlank(e)||(e.removeEventListener("load",c),a.getIframeContents(e,n,t))}catch{t()}}};e.addEventListener("load",i),s=setTimeout(i,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,n,t){try{e.contentWindow.document.readyState==="complete"?this.isIframeBlank(e)?this.observeIframeLoad(e,n,t):this.getIframeContents(e,n,t):this.observeIframeLoad(e,n,t)}catch{t()}}},{key:"waitForIframes",value:function(e,n){var t=this,a=0;this.forEachIframe(e,function(){return!0},function(r){a++,t.waitForIframes(r.querySelector("html"),function(){--a||n()})},function(r){r||n()})}},{key:"forEachIframe",value:function(e,n,t){var a=this,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){},s=e.querySelectorAll("iframe"),i=s.length,c=0;s=Array.prototype.slice.call(s);var u=function(){--i<=0&&r(c)};i||u(),s.forEach(function(l){f.matches(l,a.exclude)?u():a.onIframeReady(l,function(h){n(l)&&(c++,t(h)),u()},u)})}},{key:"createIterator",value:function(e,n,t){return document.createNodeIterator(e,n,t,!1)}},{key:"createInstanceOnIframe",value:function(e){return new f(e.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,n,t){var a=e.compareDocumentPosition(t),r=Node.DOCUMENT_POSITION_PRECEDING;if(a&r)if(n!==null){var s=n.compareDocumentPosition(t),i=Node.DOCUMENT_POSITION_FOLLOWING;if(s&i)return!0}else return!0;return!1}},{key:"getIteratorNode",value:function(e){var n=e.previousNode(),t=void 0;return n===null?t=e.nextNode():t=e.nextNode()&&e.nextNode(),{prevNode:n,node:t}}},{key:"checkIframeFilter",value:function(e,n,t,a){var r=!1,s=!1;return a.forEach(function(i,c){i.val===t&&(r=c,s=i.handled)}),this.compareNodeIframe(e,n,t)?(r===!1&&!s?a.push({val:t,handled:!0}):r!==!1&&!s&&(a[r].handled=!0),!0):(r===!1&&a.push({val:t,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,n,t,a){var r=this;e.forEach(function(s){s.handled||r.getIframeContents(s.val,function(i){r.createInstanceOnIframe(i).forEachNode(n,t,a)})})}},{key:"iterateThroughNodes",value:function(e,n,t,a,r){for(var s=this,i=this.createIterator(n,e,a),c=[],u=[],l=void 0,h=void 0,d=function(){var g=s.getIteratorNode(i);return h=g.prevNode,l=g.node,l};d();)this.iframes&&this.forEachIframe(n,function(p){return s.checkIframeFilter(l,h,p,c)},function(p){s.createInstanceOnIframe(p).forEachNode(e,function(g){return u.push(g)},a)}),u.push(l);u.forEach(function(p){t(p)}),this.iframes&&this.handleOpenIframes(c,e,t,a),r()}},{key:"forEachNode",value:function(e,n,t){var a=this,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){},s=this.getContexts(),i=s.length;i||r(),s.forEach(function(c){var u=function(){a.iterateThroughNodes(e,c,n,t,function(){--i<=0&&r()})};a.iframes?a.waitForIframes(c,u):u()})}}],[{key:"matches",value:function(e,n){var t=typeof n=="string"?[n]:n,a=e.matches||e.matchesSelector||e.msMLine truncated
@@ -0,0 +1,202 @@
var k=Object.defineProperty;var I=(n,e)=>{for(var t in e)k(n,t,{get:e[t],enumerable:!0})};var g={};I(g,{OptionPure:()=>p,SelectPure:()=>o});function v(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?v=function(t){return typeof t}:v=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(n)}function a(n,e,t){var i=t.value;if(typeof i!="function")throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(v(i)));var r=!1;return{configurable:!0,get:function(){if(r||this===n.prototype||this.hasOwnProperty(e)||typeof i!="function")return i;var d=i.bind(this);return r=!0,Object.defineProperty(this,e,{configurable:!0,get:function(){return d},set:function(C){i=C,delete this[e]}}),r=!1,d},set:function(d){i=d}}}import{LitElement as _,html as $}from"lit";import{ifDefined as P}from"lit-html/directives/if-defined.js";import{customElement as D}from"lit/decorators/custom-element.js";import{property as f}from"lit/decorators/property.js";var b={ENTER:"Enter",TAB:"Tab"};var y=()=>{};var O={label:"",value:"",select:y,unselect:y,disabled:!1,hidden:!1,selected:!1};import{css as E}from"lit";var x=E`
.select-wrapper {
position: relative;
}
.select {
bottom: 0;
display: flex;
flex-wrap: wrap;
left: 0;
position: absolute;
right: 0;
top: 0;
width: var(--select-width, 100%);
}
.label:focus {
outline: var(--select-outline, 2px solid #e3e3e3);
}
.label:after {
border-bottom: 1px solid var(--color, #000);
border-right: 1px solid var(--color, #000);
box-sizing: border-box;
content: "";
display: block;
height: 10px;
margin-top: -2px;
transform: rotate(45deg);
transition: 0.2s ease-in-out;
width: 10px;
}
.label.visible:after {
margin-bottom: -4px;
margin-top: 0;
transform: rotate(225deg);
}
select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
position: relative;
opacity: 0;
}
select[multiple] {
z-index: 0;
}
select,
.label {
align-items: center;
background-color: var(--background-color, #fff);
border-radius: var(--border-radius, 4px);
border: var(--border-width, 1px) solid var(--border-color, #000);
box-sizing: border-box;
color: var(--color, #000);
cursor: pointer;
display: flex;
font-family: var(--font-family, inherit);
font-size: var(--font-size, 14px);
font-weight: var(--font-weight, 400);
min-height: var(--select-height, 44px);
justify-content: space-between;
padding: var(--padding, 0 10px);
width: 100%;
z-index: 1;
}
@media only screen and (hover: none) and (pointer: coarse){
select {
z-index: 2;
}
}
.dropdown {
background-color: var(--border-color, #000);
border-radius: var(--border-radius, 4px);
border: var(--border-width, 1px) solid var(--border-color, #000);
display: none;
flex-direction: column;
gap: var(--border-width, 1px);
justify-content: space-between;
max-height: calc(var(--select-height, 44px) * var(--dropdown-items, 4) + var(--border-width, 1px) * calc(var(--dropdown-items, 4) - 1));
overflow-y: scroll;
position: absolute;
top: calc(var(--select-height, 44px) + var(--dropdown-gap, 0px));
width: calc(100% - var(--border-width, 1px) * 2);
z-index: var(--dropdown-z-index, 2);
}
.dropdown.visible {
display: flex;
z-index: 100;
}
.disabled {
background-color: var(--disabled-background-color, #bdc3c7);
color: var(--disabled-color, #ecf0f1);
cursor: default;
}
.multi-selected {
background-color: var(--selected-background-color, #e3e3e3);
border-radius: var(--border-radius, 4px);
color: var(--selected-color, #000);
display: flex;
gap: 8px;
justify-content: space-between;
padding: 2px 4px;
}
.multi-selected-wrapper {
display: flex;
flex-wrap: wrap;
gap: 4px;
width: calc(100% - 30px);
}
.cross:after {
content: '\\00d7';
display: inline-block;
height: 100%;
text-align: center;
width: 12px;
}
`;import{css as L}from"lit";var S=L`
.option {
align-items: center;
background-color: var(--background-color, #fff);
box-sizing: border-box;
color: var(--color, #000);
cursor: pointer;
display: flex;
font-family: var(--font-family, inherit);
font-size: var(--font-size, 14px);
font-weight: var(--font-weight, 400);
min-height: var(--select-height, 44px);
justify-content: flex-start;
padding: var(--padding, 0 10px);
width: 100%;
}
.option:not(.disabled):focus, .option:not(.disabled):not(.selected):hover {
background-color: var(--hover-background-color, #e3e3e3);
color: var(--hover-color, #000);
}
.selected {
background-color: var(--selected-background-color, #e3e3e3);
color: var(--selected-color, #000);
}
.disabled {
background-color: var(--disabled-background-color, #e3e3e3);
color: var(--disabled-color, #000);
cursor: default;
}
`;var u=function(n,e,t,i){var r=arguments.length,s=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,i);else for(var h=n.length-1;h>=0;h--)(d=n[h])&&(s=(r<3?d(s):r>3?d(e,t,s):d(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},p=class extends _{constructor(){super(...arguments),this.isSelected=!1,this.isDisabled=!1,this.isHidden=!1,this.optionValue="",this.displayedLabel="",this.optionIndex=-1}static get styles(){return S}connectedCallback(){super.connectedCallback(),this.isSelected=this.getAttribute("selected")!==null,this.isDisabled=this.getAttribute("disabled")!==null,this.isHidden=this.getAttribute("hidden")!==null,this.optionValue=this.getAttribute("value")||"",this.assignDisplayedLabel(),this.fireOnReadyCallback()}getOption(){return{label:this.displayedLabel,value:this.optionValue,select:this.select,unselect:this.unselect,selected:this.isSelected,disabled:this.isDisabled,hidden:this.isHidden}}select(){this.isSelected=!0,this.setAttribute("selected","")}unselect(){this.isSelected=!1,this.removeAttribute("selected")}setOnReadyCallback(e,t){this.onReady=e,this.optionIndex=t}setOnSelectCallback(e){this.onSelect=e}render(){let e=["option"];return this.isSelected&&e.push("selected"),this.isDisabled&&e.push("disabled"),$`
<div
class="${e.join(" ")}"
@click=${this.fireOnSelectCallback}
@keydown="${this.fireOnSelectIfEnterPressed}"
tabindex="${P(this.isDisabled?void 0:"0")}"
>
<slot hidden @slotchange=${this.assignDisplayedLabel}></slot>
${this.displayedLabel}
</div>
`}assignDisplayedLabel(){if(this.textContent){this.displayedLabel=this.textContent;return}this.getAttribute("label")&&(this.displayedLabel=this.getAttribute("label")||"")}fireOnReadyCallback(){this.onReady&&this.onReady(this.getOption(),this.optionIndex)}fireOnSelectCallback(e){e.stopPropagation(),!(!this.onSelect||this.isDisabled)&&this.onSelect(this.optionValue)}fireOnSelectIfEnterPressed(e){e.key===b.ENTER&&this.fireOnSelectCallback(e)}};u([f()],p.prototype,"isSelected",void 0);u([f()],p.prototype,"isDisabled",void 0);u([f()],p.prototype,"isHidden",void 0);u([f()],p.prototype,"optionValue",void 0);u([f()],p.prototype,"displayedLabel",void 0);u([f()],p.prototype,"optionIndex",void 0);u([a],p.prototype,"getOption",null);u([a],p.prototype,"select",null);u([a],p.prototype,"unselect",null);u([a],p.prototype,"fireOnReadyCallback",null);p=u([D("option-pure")],p);import{LitElement as A,html as m}from"lit";import{ifDefined as w}from"lit-html/directives/if-defined.js";import{customElement as R}from"lit/decorators/custom-element.js";import{property as c}from"lit/decorators/property.js";import{query as z}from"lit/decorators/query.js";var l=function(n,e,t,i){var r=arguments.length,s=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,i);else for(var h=n.length-1;h>=0;h--)(d=n[h])&&(s=(r<3?d(s):r>3?d(e,t,s):d(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},o=class extends A{constructor(){super(...arguments),this.options=[],this.visible=!1,this.selectedOption=O,this._selectedOptions=[],this.disabled=!1,this.isMultipleSelect=!1,this.name="",this._id="",this.formName="",this.value="",this.values=[],this.defaultLabel="",this.totalRenderedChildOptions=-1,this.form=null,this.hiddenInput=null}static get styles(){return x}connectedCallback(){super.connectedCallback(),this.disabled=this.getAttribute("disabled")!==null,this.isMultipleSelect=this.getAttribute("multiple")!==null,this.name=this.getAttribute("name")||"",this._id=this.getAttribute("id")||"",this.formName=this.name||this.id,this.defaultLabel=this.getAttribute("default-label")||""}open(){this.disabled||(this.visible=!0,this.removeEventListeners(),document.body.addEventListener("click",this.close,!0))}close(e){e&&this.contains(e.target)||(this.visible=!1,this.removeEventListeners())}enable(){this.disabled=!1}disable(){this.disabled=!0}get selectedIndex(){var e;return(e=this.nativeSelect)===null||e===void 0?void 0:e.selectedIndex}set selectedIndex(e){!e&&e!==0||this.selectOptionByValue(this.options[e].value)}get selectedOptions(){var e;return(e=this.nativeSelect)===null||e===void 0?void 0:e.selectedOptions}render(){let e=["label"];return this.disabled&&e.push("disabled"),this.visible&&e.push("visible"),m`
<div class="select-wrapper">
<select
@change=${this.handleNativeSelectChange}
?disabled=${this.disabled}
?multiple=${this.isMultipleSelect}
name="${w(this.name||void 0)}"
id=${w(this.id||void 0)}
size="1"
>
${this.getNativeOptionsHtml()}
</select>
<div class="select">
<div
class="${e.join(" ")}"
@click="${this.visible?this.close:this.open}"
@keydown="${this.openDropdownIfProperKeyIsPressed}"
tabindex="0"
>
${this.getDisplayedLabel()}
</div>
<div class="dropdown${this.visible?" visible":""}">
<slot @slotchange=${this.initializeSelect}></slot>
</div>
</div>
</div>
`}handleNativeSelectChange(){var e;this.selectedIndex=(e=this.nativeSelect)===null||e===void 0?void 0:e.selectedIndex}getNativeOptionsHtml(){return this.options.map(this.getSingleNativeOptionHtml)}getSingleNativeOptionHtml({value:e,label:t,hidden:i,disabled:r}){return m`
<option
value=${e}
?selected=${this.isOptionSelected(e)}
?hidden=${i}
?disabled=${r}
>
${t}
</option>
`}isOptionSelected(e){let t=this.selectedOption.value===e;return this.isMultipleSelect&&(t=!!this._selectedOptions.find(i=>i.value===e)),t}openDropdownIfProperKeyIsPressed(e){(e.key===b.ENTER||e.key===b.TAB)&&this.open()}getDisplayedLabel(){return this.isMultipleSelect&&this._selectedOptions.length?this.getMultiSelectLabelHtml():this.selectedOption.label||this.defaultLabel}getMultiSelectLabelHtml(){return m`
<div class="multi-selected-wrapper">
${this._selectedOptions.map(this.getMultiSelectSelectedOptionHtml)}
</div>
`}getMultiSelectSelectedOptionHtml({label:e,value:t}){return m`
<span class="multi-selected">
${e}
<span
class="cross"
@click=${i=>this.fireOnSelectCallback(i,t)}
>
</span>
</span>
`}fireOnSelectCallback(e,t){e.stopPropagation(),this.selectOptionByValue(t)}initializeSelect(){this.processChildOptions(),this.selectDefaultOptionIfNoneSelected(),this.appendHiddenInputToClosestForm()}processChildOptions(){let e=this.querySelectorAll("option-pure");this.totalRenderedChildOptions=e.length;for(let t=0;t<e.length;t++)this.initializeSingleOption(e[t],t)}selectDefaultOptionIfNoneSelected(){!this.selectedOption.value&&!this.isMultipleSelect&&this.options.length&&this.selectOptionByValue(this.options[0].value)}initializeSingleOption(e,t){e.setOnSelectCallback(this.selectOptionByValue),this.options[t]=e.getOption(),this.options[t].selected&&this.selectOptionByValue(this.options[t].value)}removeEventListeners(){document.body.removeEventListener("click",this.close)}appendHiddenInputToClosestForm(){this.form=this.closest("form"),!(!this.form||this.hiddenInput)&&(this.hiddenInput=document.createElement("input"),this.hiddenInput.setAttribute("type","hidden"),this.hiddenInput.setAttribute("name",this.formName),this.form.appendChild(this.hiddenInput))}unselectAllOptions(){for(let e=0;e<this.options.length;e++)this.options[e].unselect()}selectOptionByValue(e){let t=this.options.find(({value:i})=>i===e);t&&this.setSelectValue(t)}setSelectValue(e){this.isMultipleSelect?this.setMultiSelectValue(e):this.setSingleSelectValue(e),this.updateHiddenInputInForm(),this.dispatchChangeEvent()}dispatchChangeEvent(){this.dispatchEvent(new Event("change"))}setMultiSelectValue(e){let t=this._selectedOptions.indexOf(e);t!==-1?(this.values.splice(t,1),this._selectedOptions.splice(t,1),e.unselect()):(this.values.push(e.value),this._selectedOptions.push(e),e.select()),this.requestUpdate()}setSingleSelectValue(e){this.unselectAllOptions(),this.close(),this.selectedOption=e,this.value=e.value,e.select()}updateHiddenInputInForm(){if(!this.form||!this.hiddenInput)return;this.hiddenInput.value=this.isMultipleSelect?this.values.join(","):this.value;let e=new Event("change",{bubbles:!0});this.hiddenInput.dispatchEvent(e)}};l([c()],o.prototype,"options",void 0);l([c()],o.prototype,"visible",void 0);l([c()],o.prototype,"selectedOption",void 0);l([c()],o.prototype,"_selectedOptions",void 0);l([c()],o.prototype,"disabled",void 0);l([c()],o.prototype,"isMultipleSelect",void 0);l([c()],o.prototype,"name",void 0);l([c()],o.prototype,"_id",void 0);l([c()],o.prototype,"formName",void 0);l([c()],o.prototype,"value",void 0);l([c()],o.prototype,"values",void 0);l([c()],o.prototype,"defaultLabel",void 0);l([c()],o.prototype,"totalRenderedChildOptions",void 0);l([z("select")],o.prototype,"nativeSelect",void 0);l([a],o.prototype,"close",null);l([a],o.prototype,"getSingleNativeOptionHtml",null);l([a],o.prototype,"getMultiSelectLabelHtml",null);l([a],o.prototype,"getMultiSelectSelectedOptionHtml",null);l([a],o.prototype,"initializeSelect",null);l([a],o.prototype,"initializeSingleOption",null);l([a],o.prototype,"removeEventListeners",null);l([a],o.prototype,"appendHiddenInputToClosestForm",null);l([a],o.prototype,"selectOptionByValue",null);o=l([R("select-pure")],o);var xe=g;export{xe as default};
@@ -0,0 +1,3 @@
const y="\u037C",m=typeof Symbol>"u"?"__"+y:Symbol.for(y),S=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),g=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class C{constructor(e,n){this.rules=[];let{finish:i}=n||{};function s(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function l(t,h,a,T){let f=[],r=/^@(\w+)\b/.exec(t[0]),c=r&&r[1]=="keyframes";if(r&&h==null)return a.push(t[0]+";");for(let u in h){let o=h[u];if(/&/.test(u))l(u.split(/,\s*/).map(d=>t.map(p=>d.replace(/&/,p))).reduce((d,p)=>d.concat(p)),o,a);else if(o&&typeof o=="object"){if(!r)throw new RangeError("The value of a property ("+u+") should be a primitive value.");l(s(u),o,f,c)}else o!=null&&f.push(u.replace(/_.*/,"").replace(/[A-Z]/g,d=>"-"+d.toLowerCase())+": "+o+";")}(f.length||c)&&a.push((i&&!r&&!T?t.map(i):t).join(", ")+" {"+f.join(" ")+"}")}for(let t in e)l(s(t),e[t],this.rules)}getRules(){return this.rules.join(`
`)}static newName(){let e=g[m]||1;return g[m]=e+1,y+e.toString(36)}static mount(e,n,i){let s=e[S],l=i&&i.nonce;s?l&&s.setNonce(l):s=new A(e,l),s.mount(Array.isArray(n)?n:[n])}}let w=new Map;class A{constructor(e,n){let i=e.ownerDocument||e,s=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let l=w.get(i);if(l)return e.adoptedStyleSheets=[l.sheet,...e.adoptedStyleSheets],e[S]=l;this.sheet=new s.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],w.set(i,this)}else{this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);let l=e.head||e;l.insertBefore(this.styleTag,l.firstChild)}this.modules=[],e[S]=this}mount(e){let n=this.sheet,i=0,s=0;for(let l=0;l<e.length;l++){let t=e[l],h=this.modules.indexOf(t);if(h<s&&h>-1&&(this.modules.splice(h,1),s--,h=-1),h==-1){if(this.modules.splice(s++,0,t),n)for(let a=0;a<t.rules.length;a++)n.insertRule(t.rules[a],i++)}else{for(;s<h;)i+=this.modules[s++].rules.length;i+=t.rules.length,s++}}if(!n){let l="";for(let t=0;t<this.modules.length;t++)l+=this.modules[t].getRules()+`
`;this.styleTag.textContent=l}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}export{C as StyleModule};
@@ -0,0 +1 @@
var t={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},a={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'};for(var n=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),y=typeof navigator<"u"&&/Gecko\/\d+/.test(navigator.userAgent),g=typeof navigator<"u"&&/Mac/.test(navigator.platform),d=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),c=g||n&&+n[1]<57,r=0;r<10;r++)t[48+r]=t[96+r]=String(r);for(var r=1;r<=24;r++)t[r+111]="F"+r;for(var r=65;r<=90;r++)t[r]=String.fromCharCode(r+32),a[r]=String.fromCharCode(r);for(var i in t)a.hasOwnProperty(i)||(a[i]=t[i]);function p(o){var f=c&&(o.ctrlKey||o.altKey||o.metaKey)||d&&o.shiftKey&&o.key&&o.key.length==1||o.key=="Unidentified",e=!f&&o.key||(o.shiftKey?a:t)[o.keyCode]||o.key||"Unidentified";return e=="Esc"&&(e="Escape"),e=="Del"&&(e="Delete"),e=="Left"&&(e="ArrowLeft"),e=="Up"&&(e="ArrowUp"),e=="Right"&&(e="ArrowRight"),e=="Down"&&(e="ArrowDown"),e}export{t as base,p as keyName,a as shift};