@jointhedots/ui 2.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/bundle.manifest.json +47 -0
  2. package/chunk.73S35ZUP.js +1 -0
  3. package/chunk.7FLBFFZJ.js +1 -0
  4. package/chunk.IWVPDTNR.js +60 -0
  5. package/chunk.J7UOQR25.js +787 -0
  6. package/chunk.NOVIDUKC.js +1 -0
  7. package/chunk.NZRTZDOB.js +1 -0
  8. package/chunk.OW3MI2XU.js +35 -0
  9. package/chunk.S2ABQ2TE.js +51 -0
  10. package/chunk.SOVKFN6E.js +57 -0
  11. package/chunk.TB7PTJUW.js +297 -0
  12. package/chunk.VLRB3H3F.js +12 -0
  13. package/chunk.YJXSWWE6.js +3 -0
  14. package/chunk.ZTJG4JJS.js +26 -0
  15. package/cid.0Z4H3pyI6YJvF25fpMdVxrsrJb2aoHNuRqCW8ykQutc.json +44 -0
  16. package/cid.N30c0jISJNset9Hvr2NLQnsa9sVwvpNmyKx2QZaYQyc.json +10 -0
  17. package/export.applicationboard.js +1 -0
  18. package/export.codeeditor.js +1 -0
  19. package/export.componentslibrary.js +1 -0
  20. package/export.dialog.js +1 -0
  21. package/export.icon.js +1 -0
  22. package/export.inputs.js +1 -0
  23. package/export.items.js +1 -0
  24. package/export.layouts.js +1 -0
  25. package/export.notifications.js +1 -0
  26. package/export.servicepoint.js +1 -0
  27. package/export.theme.js +1 -0
  28. package/lambda.node_modules.monaco_editor.esm.vs.editor.editor_worker_js.js +1 -0
  29. package/lambda.node_modules.monaco_editor.esm.vs.language.css.css_worker.js +66 -0
  30. package/lambda.node_modules.monaco_editor.esm.vs.language.html.html_worker.js +443 -0
  31. package/lambda.node_modules.monaco_editor.esm.vs.language.json.json_worker.js +31 -0
  32. package/lambda.node_modules.monaco_editor.esm.vs.language.typescript.ts_worker.js +67711 -0
  33. package/lambda.src.applicationboard.component.js +1 -0
  34. package/package.json +73 -0
  35. package/types.d.ts +1862 -0
@@ -0,0 +1,31 @@
1
+ import{a as R,b as L,c as xe,d as ge,e as B,f as ee,h as Y,k as ce,l as q,m as $,o as qe,q as Z,v as Ae,w as z,x as y,y as te}from"./chunk.YJXSWWE6.js";import{c as at}from"./chunk.ZTJG4JJS.js";import"./chunk.73S35ZUP.js";function pe(t,e=!1){let n=t.length,r=0,s="",i=0,a=16,o=0,m=0,f=0,h=0,l=0;function p(c,v){let g=0,T=0;for(;g<c;){let A=t.charCodeAt(r);if(A>=48&&A<=57)T=T*16+A-48;else if(A>=65&&A<=70)T=T*16+A-65+10;else if(A>=97&&A<=102)T=T*16+A-97+10;else break;r++,g++}return g<c&&(T=-1),T}function k(c){r=c,s="",i=0,a=16,l=0}function u(){let c=r;if(t.charCodeAt(r)===48)r++;else for(r++;r<t.length&&ue(t.charCodeAt(r));)r++;if(r<t.length&&t.charCodeAt(r)===46)if(r++,r<t.length&&ue(t.charCodeAt(r)))for(r++;r<t.length&&ue(t.charCodeAt(r));)r++;else return l=3,t.substring(c,r);let v=r;if(r<t.length&&(t.charCodeAt(r)===69||t.charCodeAt(r)===101))if(r++,(r<t.length&&t.charCodeAt(r)===43||t.charCodeAt(r)===45)&&r++,r<t.length&&ue(t.charCodeAt(r))){for(r++;r<t.length&&ue(t.charCodeAt(r));)r++;v=r}else l=3;return t.substring(c,v)}function b(){let c="",v=r;for(;;){if(r>=n){c+=t.substring(v,r),l=2;break}let g=t.charCodeAt(r);if(g===34){c+=t.substring(v,r),r++;break}if(g===92){if(c+=t.substring(v,r),r++,r>=n){l=2;break}switch(t.charCodeAt(r++)){case 34:c+='"';break;case 92:c+="\\";break;case 47:c+="/";break;case 98:c+="\b";break;case 102:c+="\f";break;case 110:c+=`
2
+ `;break;case 114:c+="\r";break;case 116:c+=" ";break;case 117:let A=p(4);A>=0?c+=String.fromCharCode(A):l=4;break;default:l=5}v=r;continue}if(g>=0&&g<=31)if(de(g)){c+=t.substring(v,r),l=2;break}else l=6;r++}return c}function d(){if(s="",l=0,i=r,m=o,h=f,r>=n)return i=n,a=17;let c=t.charCodeAt(r);if(We(c)){do r++,s+=String.fromCharCode(c),c=t.charCodeAt(r);while(We(c));return a=15}if(de(c))return r++,s+=String.fromCharCode(c),c===13&&t.charCodeAt(r)===10&&(r++,s+=`
3
+ `),o++,f=r,a=14;switch(c){case 123:return r++,a=1;case 125:return r++,a=2;case 91:return r++,a=3;case 93:return r++,a=4;case 58:return r++,a=6;case 44:return r++,a=5;case 34:return r++,s=b(),a=10;case 47:let v=r-1;if(t.charCodeAt(r+1)===47){for(r+=2;r<n&&!de(t.charCodeAt(r));)r++;return s=t.substring(v,r),a=12}if(t.charCodeAt(r+1)===42){r+=2;let g=n-1,T=!1;for(;r<g;){let A=t.charCodeAt(r);if(A===42&&t.charCodeAt(r+1)===47){r+=2,T=!0;break}r++,de(A)&&(A===13&&t.charCodeAt(r)===10&&r++,o++,f=r)}return T||(r++,l=1),s=t.substring(v,r),a=13}return s+=String.fromCharCode(c),r++,a=16;case 45:if(s+=String.fromCharCode(c),r++,r===n||!ue(t.charCodeAt(r)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return s+=u(),a=11;default:for(;r<n&&S(c);)r++,c=t.charCodeAt(r);if(i!==r){switch(s=t.substring(i,r),s){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return s+=String.fromCharCode(c),r++,a=16}}function S(c){if(We(c)||de(c))return!1;switch(c){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function x(){let c;do c=d();while(c>=12&&c<=15);return c}return{setPosition:k,getPosition:()=>r,scan:e?x:d,getToken:()=>a,getTokenValue:()=>s,getTokenOffset:()=>i,getTokenLength:()=>r-i,getTokenStartLine:()=>m,getTokenStartCharacter:()=>i-h,getTokenError:()=>l}}function We(t){return t===32||t===9}function de(t){return t===10||t===13}function ue(t){return t>=48&&t<=57}var lt;(function(t){t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.space=32]="space",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.asterisk=42]="asterisk",t[t.backslash=92]="backslash",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.plus=43]="plus",t[t.slash=47]="slash",t[t.formFeed=12]="formFeed",t[t.tab=9]="tab"})(lt||(lt={}));var W=new Array(20).fill(0).map((t,e)=>" ".repeat(e)),me=200,Je={" ":{"\n":new Array(me).fill(0).map((t,e)=>`
4
+ `+" ".repeat(e)),"\r":new Array(me).fill(0).map((t,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(me).fill(0).map((t,e)=>`\r
5
+ `+" ".repeat(e))}," ":{"\n":new Array(me).fill(0).map((t,e)=>`
6
+ `+" ".repeat(e)),"\r":new Array(me).fill(0).map((t,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(me).fill(0).map((t,e)=>`\r
7
+ `+" ".repeat(e))}},ft=[`
8
+ `,"\r",`\r
9
+ `];function ut(t,e,n){let r,s,i,a,o;if(e){for(a=e.offset,o=a+e.length,i=a;i>0&&!ct(t,i-1);)i--;let g=o;for(;g<t.length&&!ct(t,g);)g++;s=t.substring(i,g),r=Bt(s,n)}else s=t,r=0,i=0,a=0,o=t.length;let m=Ut(n,t),f=ft.includes(m),h=0,l=0,p;n.insertSpaces?p=W[n.tabSize||4]??he(W[1],n.tabSize||4):p=" ";let k=p===" "?" ":" ",u=pe(s,!1),b=!1;function d(){if(h>1)return he(m,h)+he(p,r+l);let g=p.length*(r+l);return!f||g>Je[k][m].length?m+he(p,r+l):g<=0?m:Je[k][m][g]}function S(){let g=u.scan();for(h=0;g===15||g===14;)g===14&&n.keepLines?h+=1:g===14&&(h=1),g=u.scan();return b=g===16||u.getTokenError()!==0,g}let x=[];function c(g,T,A){!b&&(!e||T<o&&A>a)&&t.substring(T,A)!==g&&x.push({offset:T,length:A-T,content:g})}let v=S();if(n.keepLines&&h>0&&c(he(m,h),0,0),v!==17){let g=u.getTokenOffset()+i,T=p.length*r<20&&n.insertSpaces?W[p.length*r]:he(p,r);c(T,i,g)}for(;v!==17;){let g=u.getTokenOffset()+u.getTokenLength()+i,T=S(),A="",N=!1;for(;h===0&&(T===12||T===13);){let M=u.getTokenOffset()+i;c(W[1],g,M),g=u.getTokenOffset()+u.getTokenLength()+i,N=T===12,A=N?d():"",T=S()}if(T===2)v!==1&&l--,n.keepLines&&h>0||!n.keepLines&&v!==1?A=d():n.keepLines&&(A=W[1]);else if(T===4)v!==3&&l--,n.keepLines&&h>0||!n.keepLines&&v!==3?A=d():n.keepLines&&(A=W[1]);else{switch(v){case 3:case 1:l++,n.keepLines&&h>0||!n.keepLines?A=d():A=W[1];break;case 5:n.keepLines&&h>0||!n.keepLines?A=d():A=W[1];break;case 12:A=d();break;case 13:h>0?A=d():N||(A=W[1]);break;case 6:n.keepLines&&h>0?A=d():N||(A=W[1]);break;case 10:n.keepLines&&h>0?A=d():T===6&&!N&&(A="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&h>0?A=d():(T===12||T===13)&&!N?A=W[1]:T!==5&&T!==17&&(b=!0);break;case 16:b=!0;break}h>0&&(T===12||T===13)&&(A=d())}T===17&&(n.keepLines&&h>0?A=d():A=n.insertFinalNewline?m:"");let O=u.getTokenOffset()+i;c(A,g,O),v=T}return x}function he(t,e){let n="";for(let r=0;r<e;r++)n+=t;return n}function Bt(t,e){let n=0,r=0,s=e.tabSize||4;for(;n<t.length;){let i=t.charAt(n);if(i===W[1])r++;else if(i===" ")r+=s;else break;n++}return Math.floor(r/s)}function Ut(t,e){for(let n=0;n<e.length;n++){let r=e.charAt(n);if(r==="\r")return n+1<e.length&&e.charAt(n+1)===`
10
+ `?`\r
11
+ `:"\r";if(r===`
12
+ `)return`
13
+ `}return t&&t.eol||`
14
+ `}function ct(t,e){return`\r
15
+ `.indexOf(t.charAt(e))!==-1}var Ne;(function(t){t.DEFAULT={allowTrailingComma:!1}})(Ne||(Ne={}));function pt(t,e=[],n=Ne.DEFAULT){let r=null,s=[],i=[];function a(m){Array.isArray(s)?s.push(m):r!==null&&(s[r]=m)}return Wt(t,{onObjectBegin:()=>{let m={};a(m),i.push(s),s=m,r=null},onObjectProperty:m=>{r=m},onObjectEnd:()=>{s=i.pop()},onArrayBegin:()=>{let m=[];a(m),i.push(s),s=m,r=null},onArrayEnd:()=>{s=i.pop()},onLiteralValue:a,onError:(m,f,h)=>{e.push({error:m,offset:f,length:h})}},n),s[0]}function Ke(t){if(!t.parent||!t.parent.children)return[];let e=Ke(t.parent);if(t.parent.type==="property"){let n=t.parent.children[0].value;e.push(n)}else if(t.parent.type==="array"){let n=t.parent.children.indexOf(t);n!==-1&&e.push(n)}return e}function Oe(t){switch(t.type){case"array":return t.children.map(Oe);case"object":let e=Object.create(null);for(let n of t.children){let r=n.children[1];r&&(e[n.children[0].value]=Oe(r))}return e;case"null":case"string":case"number":case"boolean":return t.value;default:return}}function qt(t,e,n=!1){return e>=t.offset&&e<t.offset+t.length||n&&e===t.offset+t.length}function ze(t,e,n=!1){if(qt(t,e,n)){let r=t.children;if(Array.isArray(r))for(let s=0;s<r.length&&r[s].offset<=e;s++){let i=ze(r[s],e,n);if(i)return i}return t}}function Wt(t,e,n=Ne.DEFAULT){let r=pe(t,!1),s=[];function i(P){return P?()=>P(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(P){return P?()=>P(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>s.slice()):()=>!0}function o(P){return P?V=>P(V,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function m(P){return P?V=>P(V,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>s.slice()):()=>!0}let f=a(e.onObjectBegin),h=m(e.onObjectProperty),l=i(e.onObjectEnd),p=a(e.onArrayBegin),k=i(e.onArrayEnd),u=m(e.onLiteralValue),b=o(e.onSeparator),d=i(e.onComment),S=o(e.onError),x=n&&n.disallowComments,c=n&&n.allowTrailingComma;function v(){for(;;){let P=r.scan();switch(r.getTokenError()){case 4:g(14);break;case 5:g(15);break;case 3:g(13);break;case 1:x||g(11);break;case 2:g(12);break;case 6:g(16);break}switch(P){case 12:case 13:x?g(10):d();break;case 16:g(1);break;case 15:case 14:break;default:return P}}}function g(P,V=[],ot=[]){if(S(P),V.length+ot.length>0){let Te=r.getToken();for(;Te!==17;){if(V.indexOf(Te)!==-1){v();break}else if(ot.indexOf(Te)!==-1)break;Te=v()}}}function T(P){let V=r.getTokenValue();return P?u(V):(h(V),s.push(V)),v(),!0}function A(){switch(r.getToken()){case 11:let P=r.getTokenValue(),V=Number(P);isNaN(V)&&(g(2),V=0),u(V);break;case 7:u(null);break;case 8:u(!0);break;case 9:u(!1);break;default:return!1}return v(),!0}function N(){return r.getToken()!==10?(g(3,[],[2,5]),!1):(T(!1),r.getToken()===6?(b(":"),v(),I()||g(4,[],[2,5])):g(5,[],[2,5]),s.pop(),!0)}function O(){f(),v();let P=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(P||g(4,[],[]),b(","),v(),r.getToken()===2&&c)break}else P&&g(6,[],[]);N()||g(4,[],[2,5]),P=!0}return l(),r.getToken()!==2?g(7,[2],[]):v(),!0}function M(){p(),v();let P=!0,V=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(V||g(4,[],[]),b(","),v(),r.getToken()===4&&c)break}else V&&g(6,[],[]);P?(s.push(0),P=!1):s[s.length-1]++,I()||g(4,[],[4,5]),V=!0}return k(),P||s.pop(),r.getToken()!==4?g(8,[4],[]):v(),!0}function I(){switch(r.getToken()){case 3:return M();case 1:return O();case 10:return T(!0);default:return A()}}return v(),r.getToken()===17?n.allowEmptyContent?!0:(g(4,[],[]),!1):I()?(r.getToken()!==17&&g(9,[],[]),!0):(g(4,[],[]),!1)}var H=pe,mt;(function(t){t[t.None=0]="None",t[t.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=2]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",t[t.InvalidUnicode=4]="InvalidUnicode",t[t.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",t[t.InvalidCharacter=6]="InvalidCharacter"})(mt||(mt={}));var ht;(function(t){t[t.OpenBraceToken=1]="OpenBraceToken",t[t.CloseBraceToken=2]="CloseBraceToken",t[t.OpenBracketToken=3]="OpenBracketToken",t[t.CloseBracketToken=4]="CloseBracketToken",t[t.CommaToken=5]="CommaToken",t[t.ColonToken=6]="ColonToken",t[t.NullKeyword=7]="NullKeyword",t[t.TrueKeyword=8]="TrueKeyword",t[t.FalseKeyword=9]="FalseKeyword",t[t.StringLiteral=10]="StringLiteral",t[t.NumericLiteral=11]="NumericLiteral",t[t.LineCommentTrivia=12]="LineCommentTrivia",t[t.BlockCommentTrivia=13]="BlockCommentTrivia",t[t.LineBreakTrivia=14]="LineBreakTrivia",t[t.Trivia=15]="Trivia",t[t.Unknown=16]="Unknown",t[t.EOF=17]="EOF"})(ht||(ht={}));var dt=pt,yt=ze,bt=Ke,kt=Oe,gt;(function(t){t[t.InvalidSymbol=1]="InvalidSymbol",t[t.InvalidNumberFormat=2]="InvalidNumberFormat",t[t.PropertyNameExpected=3]="PropertyNameExpected",t[t.ValueExpected=4]="ValueExpected",t[t.ColonExpected=5]="ColonExpected",t[t.CommaExpected=6]="CommaExpected",t[t.CloseBraceExpected=7]="CloseBraceExpected",t[t.CloseBracketExpected=8]="CloseBracketExpected",t[t.EndOfFileExpected=9]="EndOfFileExpected",t[t.InvalidCommentToken=10]="InvalidCommentToken",t[t.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=12]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",t[t.InvalidUnicode=14]="InvalidUnicode",t[t.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",t[t.InvalidCharacter=16]="InvalidCharacter"})(gt||(gt={}));function vt(t,e,n){return ut(t,e,n)}function se(t,e){if(t===e)return!0;if(t==null||e===null||e===void 0||typeof t!=typeof e||typeof t!="object"||Array.isArray(t)!==Array.isArray(e))return!1;let n,r;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(n=0;n<t.length;n++)if(!se(t[n],e[n]))return!1}else{let s=[];for(r in t)s.push(r);s.sort();let i=[];for(r in e)i.push(r);if(i.sort(),!se(s,i))return!1;for(n=0;n<s.length;n++)if(!se(t[s[n]],e[s[n]]))return!1}return!0}function _(t){return typeof t=="number"}function J(t){return typeof t<"u"}function G(t){return typeof t=="boolean"}function we(t){return typeof t=="string"}function X(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Jt(t,e){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(t[n]!==e[n])return!1;return!0}function ne(t,e){let n=t.length-e.length;return n>0?t.lastIndexOf(e)===n:n===0?t===e:!1}function oe(t){let e="";Jt(t,"(?i)")&&(t=t.substring(4),e="i");try{return new RegExp(t,e+"u")}catch{try{return new RegExp(t,e)}catch{return}}}function He(t){let e=0;for(let n=0;n<t.length;n++){e++;let r=t.charCodeAt(n);55296<=r&&r<=56319&&n++}return e}var w;(function(t){t[t.Undefined=0]="Undefined",t[t.EnumValueMismatch=1]="EnumValueMismatch",t[t.Deprecated=2]="Deprecated",t[t.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=258]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",t[t.InvalidUnicode=260]="InvalidUnicode",t[t.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",t[t.InvalidCharacter=262]="InvalidCharacter",t[t.PropertyExpected=513]="PropertyExpected",t[t.CommaExpected=514]="CommaExpected",t[t.ColonExpected=515]="ColonExpected",t[t.ValueExpected=516]="ValueExpected",t[t.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",t[t.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",t[t.TrailingComma=519]="TrailingComma",t[t.DuplicateKey=520]="DuplicateKey",t[t.CommentNotPermitted=521]="CommentNotPermitted",t[t.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",t[t.SchemaResolveError=768]="SchemaResolveError",t[t.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature"})(w||(w={}));var K;(function(t){t[t.v3=3]="v3",t[t.v4=4]="v4",t[t.v6=6]="v6",t[t.v7=7]="v7",t[t.v2019_09=19]="v2019_09",t[t.v2020_12=20]="v2020_12"})(K||(K={}));var ye;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[ce.Markdown,ce.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}})(ye||(ye={}));var Kt={"color-hex":{errorMessage:y("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:y("String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:y("String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:y("String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:y("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:y("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:y("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:y("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}},C=class{constructor(e,n,r=0){this.offset=n,this.length=r,this.parent=e}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}},Ge=class extends C{constructor(e,n){super(e,n),this.type="null",this.value=null}},Pe=class extends C{constructor(e,n,r){super(e,r),this.type="boolean",this.value=n}},Ze=class extends C{constructor(e,n){super(e,n),this.type="array",this.items=[]}get children(){return this.items}},Xe=class extends C{constructor(e,n){super(e,n),this.type="number",this.isInteger=!0,this.value=Number.NaN}},be=class extends C{constructor(e,n,r){super(e,n,r),this.type="string",this.value=""}},Qe=class extends C{constructor(e,n,r){super(e,n),this.type="property",this.colonOffset=-1,this.keyNode=r}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},Ye=class extends C{constructor(e,n){super(e,n),this.type="object",this.properties=[]}get children(){return this.properties}};function U(t){return G(t)?t?{}:{not:{}}:t}var St;(function(t){t[t.Key=0]="Key",t[t.Enum=1]="Enum"})(St||(St={}));var zt={"http://json-schema.org/draft-03/schema#":K.v3,"http://json-schema.org/draft-04/schema#":K.v4,"http://json-schema.org/draft-06/schema#":K.v6,"http://json-schema.org/draft-07/schema#":K.v7,"https://json-schema.org/draft/2019-09/schema":K.v2019_09,"https://json-schema.org/draft/2020-12/schema":K.v2020_12},Le=class{constructor(e){this.schemaDraft=e}},Ce=class t{constructor(e=-1,n){this.focusOffset=e,this.exclude=n,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){Array.prototype.push.apply(this.schemas,e.schemas)}include(e){return(this.focusOffset===-1||et(e,this.focusOffset))&&e!==this.exclude}newSub(){return new t(-1,this.exclude)}},ae=class{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}};ae.instance=new ae;var D=class{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches+=e.propertiesMatches,this.propertiesValueMatches+=e.propertiesValueMatches,this.mergeProcessedProperties(e)}mergeEnumValues(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(let n of this.problems)n.code===w.EnumValueMismatch&&(n.message=y("Value is not accepted. Valid values: {0}.",this.enumValues.map(r=>JSON.stringify(r)).join(", ")))}}mergePropertyMatch(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&e.enumValues.length===1&&this.primaryValueMatches++}mergeProcessedProperties(e){e.processedProperties.forEach(n=>this.processedProperties.add(n))}compare(e){let n=this.hasProblems();return n!==e.hasProblems()?n?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches}};function xt(t,e=[]){return new Ie(t,e,[])}function Q(t){return kt(t)}function ke(t){return bt(t)}function et(t,e,n=!1){return e>=t.offset&&e<t.offset+t.length||n&&e===t.offset+t.length}var Ie=class{constructor(e,n=[],r=[]){this.root=e,this.syntaxErrors=n,this.comments=r}getNodeFromOffset(e,n=!1){if(this.root)return yt(this.root,e,n)}visit(e){if(this.root){let n=r=>{let s=e(r),i=r.children;if(Array.isArray(i))for(let a=0;a<i.length&&s;a++)s=n(i[a]);return s};n(this.root)}}validate(e,n,r=B.Warning,s){if(this.root&&n){let i=new D;return j(this.root,n,i,ae.instance,new Le(s??Tt(n))),i.problems.map(a=>{let o=L.create(e.positionAt(a.location.offset),e.positionAt(a.location.offset+a.location.length));return ee.create(o,a.message,a.severity??r,a.code)})}}getMatchingSchemas(e,n=-1,r){if(this.root&&e){let s=new Ce(n,r),i=Tt(e),a=new Le(i);return j(this.root,e,new D,s,a),s.schemas}return[]}};function Tt(t,e=K.v2020_12){let n=t.$schema;return n?zt[n]??e:e}function j(t,e,n,r,s){if(!t||!r.include(t))return;if(t.type==="property")return j(t.valueNode,e,n,r,s);let i=t;switch(a(),i.type){case"object":h(i);break;case"array":f(i);break;case"string":m(i);break;case"number":o(i);break}r.add({node:i,schema:e});function a(){function l(x){return i.type===x||x==="integer"&&i.type==="number"&&i.isInteger}if(Array.isArray(e.type)?e.type.some(l)||n.problems.push({location:{offset:i.offset,length:i.length},message:e.errorMessage||y("Incorrect type. Expected one of {0}.",e.type.join(", "))}):e.type&&(l(e.type)||n.problems.push({location:{offset:i.offset,length:i.length},message:e.errorMessage||y('Incorrect type. Expected "{0}".',e.type)})),Array.isArray(e.allOf))for(let x of e.allOf){let c=new D,v=r.newSub();j(i,U(x),c,v,s),n.merge(c),r.merge(v)}let p=U(e.not);if(p){let x=new D,c=r.newSub();j(i,p,x,c,s),x.hasProblems()||n.problems.push({location:{offset:i.offset,length:i.length},message:e.errorMessage||y("Matches a schema that is not allowed.")});for(let v of c.schemas)v.inverted=!v.inverted,r.add(v)}let k=(x,c)=>{let v=[],g;for(let T of x){let A=U(T),N=new D,O=r.newSub();if(j(i,A,N,O,s),N.hasProblems()||v.push(A),!g)g={schema:A,validationResult:N,matchingSchemas:O};else if(!c&&!N.hasProblems()&&!g.validationResult.hasProblems())g.matchingSchemas.merge(O),g.validationResult.propertiesMatches+=N.propertiesMatches,g.validationResult.propertiesValueMatches+=N.propertiesValueMatches,g.validationResult.mergeProcessedProperties(N);else{let M=N.compare(g.validationResult);M>0?g={schema:A,validationResult:N,matchingSchemas:O}:M===0&&(g.matchingSchemas.merge(O),g.validationResult.mergeEnumValues(N))}}return v.length>1&&c&&n.problems.push({location:{offset:i.offset,length:1},message:y("Matches multiple schemas when only one must validate.")}),g&&(n.merge(g.validationResult),r.merge(g.matchingSchemas)),v.length};Array.isArray(e.anyOf)&&k(e.anyOf,!1),Array.isArray(e.oneOf)&&k(e.oneOf,!0);let u=x=>{let c=new D,v=r.newSub();j(i,U(x),c,v,s),n.merge(c),r.merge(v)},b=(x,c,v)=>{let g=U(x),T=new D,A=r.newSub();j(i,g,T,A,s),r.merge(A),n.mergeProcessedProperties(T),T.hasProblems()?v&&u(v):c&&u(c)},d=U(e.if);if(d&&b(d,U(e.then),U(e.else)),Array.isArray(e.enum)){let x=Q(i),c=!1;for(let v of e.enum)if(se(x,v)){c=!0;break}n.enumValues=e.enum,n.enumValueMatch=c,c||n.problems.push({location:{offset:i.offset,length:i.length},code:w.EnumValueMismatch,message:e.errorMessage||y("Value is not accepted. Valid values: {0}.",e.enum.map(v=>JSON.stringify(v)).join(", "))})}if(J(e.const)){let x=Q(i);se(x,e.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:i.offset,length:i.length},code:w.EnumValueMismatch,message:e.errorMessage||y("Value must be {0}.",JSON.stringify(e.const))}),n.enumValueMatch=!1),n.enumValues=[e.const]}let S=e.deprecationMessage;if(S||e.deprecated){S=S||y("Value is deprecated");let x=i.parent?.type==="property"?i.parent:i;n.problems.push({location:{offset:x.offset,length:x.length},severity:B.Warning,message:S,code:w.Deprecated})}}function o(l){let p=l.value;function k(v){let g=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(v.toString());return g&&{value:Number(g[1]+(g[2]||"")),multiplier:(g[2]?.length||0)-(parseInt(g[3])||0)}}if(_(e.multipleOf)){let v=-1;if(Number.isInteger(e.multipleOf))v=p%e.multipleOf;else{let g=k(e.multipleOf),T=k(p);if(g&&T){let A=10**Math.abs(T.multiplier-g.multiplier);T.multiplier<g.multiplier?T.value*=A:g.value*=A,v=T.value%g.value}}v!==0&&n.problems.push({location:{offset:l.offset,length:l.length},message:y("Value is not divisible by {0}.",e.multipleOf)})}function u(v,g){if(_(g))return g;if(G(g)&&g)return v}function b(v,g){if(!G(g)||!g)return v}let d=u(e.minimum,e.exclusiveMinimum);_(d)&&p<=d&&n.problems.push({location:{offset:l.offset,length:l.length},message:y("Value is below the exclusive minimum of {0}.",d)});let S=u(e.maximum,e.exclusiveMaximum);_(S)&&p>=S&&n.problems.push({location:{offset:l.offset,length:l.length},message:y("Value is above the exclusive maximum of {0}.",S)});let x=b(e.minimum,e.exclusiveMinimum);_(x)&&p<x&&n.problems.push({location:{offset:l.offset,length:l.length},message:y("Value is below the minimum of {0}.",x)});let c=b(e.maximum,e.exclusiveMaximum);_(c)&&p>c&&n.problems.push({location:{offset:l.offset,length:l.length},message:y("Value is above the maximum of {0}.",c)})}function m(l){if(_(e.minLength)&&He(l.value)<e.minLength&&n.problems.push({location:{offset:l.offset,length:l.length},message:y("String is shorter than the minimum length of {0}.",e.minLength)}),_(e.maxLength)&&He(l.value)>e.maxLength&&n.problems.push({location:{offset:l.offset,length:l.length},message:y("String is longer than the maximum length of {0}.",e.maxLength)}),we(e.pattern)&&(oe(e.pattern)?.test(l.value)||n.problems.push({location:{offset:l.offset,length:l.length},message:e.patternErrorMessage||e.errorMessage||y('String does not match the pattern of "{0}".',e.pattern)})),e.format)switch(e.format){case"uri":case"uri-reference":{let k;if(!l.value)k=y("URI expected.");else{let u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(l.value);u?!u[2]&&e.format==="uri"&&(k=y("URI with a scheme is expected.")):k=y("URI is expected.")}k&&n.problems.push({location:{offset:l.offset,length:l.length},message:e.patternErrorMessage||e.errorMessage||y("String is not a URI: {0}",k)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":let p=Kt[e.format];(!l.value||!p.pattern.exec(l.value))&&n.problems.push({location:{offset:l.offset,length:l.length},message:e.patternErrorMessage||e.errorMessage||p.errorMessage})}}function f(l){let p,k;s.schemaDraft>=K.v2020_12?(p=e.prefixItems,k=Array.isArray(e.items)?void 0:e.items):(p=Array.isArray(e.items)?e.items:void 0,k=Array.isArray(e.items)?e.additionalItems:e.items);let u=0;if(p!==void 0){let S=Math.min(p.length,l.items.length);for(;u<S;u++){let x=p[u],c=U(x),v=new D,g=l.items[u];g&&(j(g,c,v,r,s),n.mergePropertyMatch(v)),n.processedProperties.add(String(u))}}if(k!==void 0&&u<l.items.length)if(typeof k=="boolean")for(k===!1&&n.problems.push({location:{offset:l.offset,length:l.length},message:y("Array has too many items according to schema. Expected {0} or fewer.",u)});u<l.items.length;u++)n.processedProperties.add(String(u)),n.propertiesValueMatches++;else for(;u<l.items.length;u++){let S=new D;j(l.items[u],k,S,r,s),n.mergePropertyMatch(S),n.processedProperties.add(String(u))}let b=U(e.contains);if(b){let S=0;for(let x=0;x<l.items.length;x++){let c=l.items[x],v=new D;j(c,b,v,ae.instance,s),v.hasProblems()||(S++,s.schemaDraft>=K.v2020_12&&n.processedProperties.add(String(x)))}S===0&&!_(e.minContains)&&n.problems.push({location:{offset:l.offset,length:l.length},message:e.errorMessage||y("Array does not contain required item.")}),_(e.minContains)&&S<e.minContains&&n.problems.push({location:{offset:l.offset,length:l.length},message:e.errorMessage||y("Array has too few items that match the contains contraint. Expected {0} or more.",e.minContains)}),_(e.maxContains)&&S>e.maxContains&&n.problems.push({location:{offset:l.offset,length:l.length},message:e.errorMessage||y("Array has too many items that match the contains contraint. Expected {0} or less.",e.maxContains)})}let d=e.unevaluatedItems;if(d!==void 0)for(let S=0;S<l.items.length;S++){if(!n.processedProperties.has(String(S)))if(d===!1)n.problems.push({location:{offset:l.offset,length:l.length},message:y("Item does not match any validation rule from the array.")});else{let x=new D;j(l.items[S],e.unevaluatedItems,x,r,s),n.mergePropertyMatch(x)}n.processedProperties.add(String(S)),n.propertiesValueMatches++}if(_(e.minItems)&&l.items.length<e.minItems&&n.problems.push({location:{offset:l.offset,length:l.length},message:y("Array has too few items. Expected {0} or more.",e.minItems)}),_(e.maxItems)&&l.items.length>e.maxItems&&n.problems.push({location:{offset:l.offset,length:l.length},message:y("Array has too many items. Expected {0} or fewer.",e.maxItems)}),e.uniqueItems===!0){let x=function(){for(let c=0;c<S.length-1;c++){let v=S[c];for(let g=c+1;g<S.length;g++)if(se(v,S[g]))return!0}return!1},S=Q(l);x()&&n.problems.push({location:{offset:l.offset,length:l.length},message:y("Array has duplicate items.")})}}function h(l){let p=Object.create(null),k=new Set;for(let c of l.properties){let v=c.keyNode.value;p[v]=c.valueNode,k.add(v)}if(Array.isArray(e.required)){for(let c of e.required)if(!p[c]){let v=l.parent&&l.parent.type==="property"&&l.parent.keyNode,g=v?{offset:v.offset,length:v.length}:{offset:l.offset,length:1};n.problems.push({location:g,message:y('Missing property "{0}".',c)})}}let u=c=>{k.delete(c),n.processedProperties.add(c)};if(e.properties)for(let c of Object.keys(e.properties)){u(c);let v=e.properties[c],g=p[c];if(g)if(G(v))if(v)n.propertiesMatches++,n.propertiesValueMatches++;else{let T=g.parent;n.problems.push({location:{offset:T.keyNode.offset,length:T.keyNode.length},message:e.errorMessage||y("Property {0} is not allowed.",c)})}else{let T=new D;j(g,v,T,r,s),n.mergePropertyMatch(T)}}if(e.patternProperties)for(let c of Object.keys(e.patternProperties)){let v=oe(c);if(v){let g=[];for(let T of k)if(v.test(T)){g.push(T);let A=p[T];if(A){let N=e.patternProperties[c];if(G(N))if(N)n.propertiesMatches++,n.propertiesValueMatches++;else{let O=A.parent;n.problems.push({location:{offset:O.keyNode.offset,length:O.keyNode.length},message:e.errorMessage||y("Property {0} is not allowed.",T)})}else{let O=new D;j(A,N,O,r,s),n.mergePropertyMatch(O)}}}g.forEach(u)}}let b=e.additionalProperties;if(b!==void 0)for(let c of k){u(c);let v=p[c];if(v){if(b===!1){let g=v.parent;n.problems.push({location:{offset:g.keyNode.offset,length:g.keyNode.length},message:e.errorMessage||y("Property {0} is not allowed.",c)})}else if(b!==!0){let g=new D;j(v,b,g,r,s),n.mergePropertyMatch(g)}}}let d=e.unevaluatedProperties;if(d!==void 0){let c=[];for(let v of k)if(!n.processedProperties.has(v)){c.push(v);let g=p[v];if(g){if(d===!1){let T=g.parent;n.problems.push({location:{offset:T.keyNode.offset,length:T.keyNode.length},message:e.errorMessage||y("Property {0} is not allowed.",v)})}else if(d!==!0){let T=new D;j(g,d,T,r,s),n.mergePropertyMatch(T)}}}c.forEach(u)}if(_(e.maxProperties)&&l.properties.length>e.maxProperties&&n.problems.push({location:{offset:l.offset,length:l.length},message:y("Object has more properties than limit of {0}.",e.maxProperties)}),_(e.minProperties)&&l.properties.length<e.minProperties&&n.problems.push({location:{offset:l.offset,length:l.length},message:y("Object has fewer properties than the required number of {0}",e.minProperties)}),e.dependentRequired)for(let c in e.dependentRequired){let v=p[c],g=e.dependentRequired[c];v&&Array.isArray(g)&&x(c,g)}if(e.dependentSchemas)for(let c in e.dependentSchemas){let v=p[c],g=e.dependentSchemas[c];v&&X(g)&&x(c,g)}if(e.dependencies)for(let c in e.dependencies)p[c]&&x(c,e.dependencies[c]);let S=U(e.propertyNames);if(S)for(let c of l.properties){let v=c.keyNode;v&&j(v,S,n,ae.instance,s)}function x(c,v){if(Array.isArray(v))for(let g of v)p[g]?n.propertiesValueMatches++:n.problems.push({location:{offset:l.offset,length:l.length},message:y("Object is missing property {0} required by property {1}.",g,c)});else{let g=U(v);if(g){let T=new D;j(l,g,T,r,s),n.mergePropertyMatch(T)}}}}}function At(t,e){let n=[],r=-1,s=t.getText(),i=H(s,!1),a=e&&e.collectComments?[]:void 0;function o(){for(;;){let T=i.scan();switch(h(),T){case 12:case 13:Array.isArray(a)&&a.push(L.create(t.positionAt(i.getTokenOffset()),t.positionAt(i.getTokenOffset()+i.getTokenLength())));break;case 15:case 14:break;default:return T}}}function m(T,A,N,O,M=B.Error){if(n.length===0||N!==r){let I=L.create(t.positionAt(N),t.positionAt(O));n.push(ee.create(I,T,M,A,t.languageId)),r=N}}function f(T,A,N=void 0,O=[],M=[]){let I=i.getTokenOffset(),P=i.getTokenOffset()+i.getTokenLength();if(I===P&&I>0){for(I--;I>0&&/\s/.test(s.charAt(I));)I--;P=I+1}if(m(T,A,I,P),N&&l(N,!1),O.length+M.length>0){let V=i.getToken();for(;V!==17;){if(O.indexOf(V)!==-1){o();break}else if(M.indexOf(V)!==-1)break;V=o()}}return N}function h(){switch(i.getTokenError()){case 4:return f(y("Invalid unicode sequence in string."),w.InvalidUnicode),!0;case 5:return f(y("Invalid escape character in string."),w.InvalidEscapeCharacter),!0;case 3:return f(y("Unexpected end of number."),w.UnexpectedEndOfNumber),!0;case 1:return f(y("Unexpected end of comment."),w.UnexpectedEndOfComment),!0;case 2:return f(y("Unexpected end of string."),w.UnexpectedEndOfString),!0;case 6:return f(y("Invalid characters in string. Control characters must be escaped."),w.InvalidCharacter),!0}return!1}function l(T,A){return T.length=i.getTokenOffset()+i.getTokenLength()-T.offset,A&&o(),T}function p(T){if(i.getToken()!==3)return;let A=new Ze(T,i.getTokenOffset());o();let N=!1;for(;i.getToken()!==4&&i.getToken()!==17;){if(i.getToken()===5){N||f(y("Value expected"),w.ValueExpected);let M=i.getTokenOffset();if(o(),i.getToken()===4){N&&m(y("Trailing comma"),w.TrailingComma,M,M+1);continue}}else N&&f(y("Expected comma"),w.CommaExpected);let O=c(A);O?A.items.push(O):f(y("Value expected"),w.ValueExpected,void 0,[],[4,5]),N=!0}return i.getToken()!==4?f(y("Expected comma or closing bracket"),w.CommaOrCloseBacketExpected,A):l(A,!0)}let k=new be(void 0,0,0);function u(T,A){let N=new Qe(T,i.getTokenOffset(),k),O=d(N);if(!O)if(i.getToken()===16){f(y("Property keys must be doublequoted"),w.PropertyKeysMustBeDoublequoted);let I=new be(N,i.getTokenOffset(),i.getTokenLength());I.value=i.getTokenValue(),O=I,o()}else return;if(N.keyNode=O,O.value!=="//"){let I=A[O.value];I?(m(y("Duplicate object key"),w.DuplicateKey,N.keyNode.offset,N.keyNode.offset+N.keyNode.length,B.Warning),X(I)&&m(y("Duplicate object key"),w.DuplicateKey,I.keyNode.offset,I.keyNode.offset+I.keyNode.length,B.Warning),A[O.value]=!0):A[O.value]=N}if(i.getToken()===6)N.colonOffset=i.getTokenOffset(),o();else if(f(y("Colon expected"),w.ColonExpected),i.getToken()===10&&t.positionAt(O.offset+O.length).line<t.positionAt(i.getTokenOffset()).line)return N.length=O.length,N;let M=c(N);return M?(N.valueNode=M,N.length=M.offset+M.length-N.offset,N):f(y("Value expected"),w.ValueExpected,N,[],[2,5])}function b(T){if(i.getToken()!==1)return;let A=new Ye(T,i.getTokenOffset()),N=Object.create(null);o();let O=!1;for(;i.getToken()!==2&&i.getToken()!==17;){if(i.getToken()===5){O||f(y("Property expected"),w.PropertyExpected);let I=i.getTokenOffset();if(o(),i.getToken()===2){O&&m(y("Trailing comma"),w.TrailingComma,I,I+1);continue}}else O&&f(y("Expected comma"),w.CommaExpected);let M=u(A,N);M?A.properties.push(M):f(y("Property expected"),w.PropertyExpected,void 0,[],[2,5]),O=!0}return i.getToken()!==2?f(y("Expected comma or closing brace"),w.CommaOrCloseBraceExpected,A):l(A,!0)}function d(T){if(i.getToken()!==10)return;let A=new be(T,i.getTokenOffset());return A.value=i.getTokenValue(),l(A,!0)}function S(T){if(i.getToken()!==11)return;let A=new Xe(T,i.getTokenOffset());if(i.getTokenError()===0){let N=i.getTokenValue();try{let O=JSON.parse(N);if(!_(O))return f(y("Invalid number format."),w.Undefined,A);A.value=O}catch{return f(y("Invalid number format."),w.Undefined,A)}A.isInteger=N.indexOf(".")===-1}return l(A,!0)}function x(T){switch(i.getToken()){case 7:return l(new Ge(T,i.getTokenOffset()),!0);case 8:return l(new Pe(T,!0,i.getTokenOffset()),!0);case 9:return l(new Pe(T,!1,i.getTokenOffset()),!0);default:return}}function c(T){return p(T)||b(T)||d(T)||S(T)||x(T)}let v;return o()!==17&&(v=c(v),v?i.getToken()!==17&&f(y("End of file expected."),w.Undefined):f(y("Expected a JSON object, array or literal."),w.Undefined)),new Ie(v,n,a)}function Ve(t,e,n){if(t!==null&&typeof t=="object"){let r=e+" ";if(Array.isArray(t)){if(t.length===0)return"[]";let s=`[
16
+ `;for(let i=0;i<t.length;i++)s+=r+Ve(t[i],r,n),i<t.length-1&&(s+=","),s+=`
17
+ `;return s+=e+"]",s}else{let s=Object.keys(t);if(s.length===0)return"{}";let i=`{
18
+ `;for(let a=0;a<s.length;a++){let o=s[a];i+=r+JSON.stringify(o)+": "+Ve(t[o],r,n),a<s.length-1&&(i+=","),i+=`
19
+ `}return i+=e+"}",i}}return n(t)}var Me=class{constructor(e,n=[],r=Promise,s={}){this.schemaService=e,this.contributions=n,this.promiseConstructor=r,this.clientCapabilities=s}doResolve(e){for(let n=this.contributions.length-1;n>=0;n--){let r=this.contributions[n].resolveCompletion;if(r){let s=r(e);if(s)return s}}return this.promiseConstructor.resolve(e)}doComplete(e,n,r){let s={items:[],isIncomplete:!1},i=e.getText(),a=e.offsetAt(n),o=r.getNodeFromOffset(a,!0);if(this.isInComment(e,o?o.offset:0,a))return Promise.resolve(s);if(o&&a===o.offset+o.length&&a>0){let p=i[a-1];(o.type==="object"&&p==="}"||o.type==="array"&&p==="]")&&(o=o.parent)}let m=this.getCurrentWord(e,a),f;if(o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null"))f=L.create(e.positionAt(o.offset),e.positionAt(o.offset+o.length));else{let p=a-m.length;p>0&&i[p-1]==='"'&&p--,f=L.create(e.positionAt(p),n)}let h=new Map,l={add:p=>{let k=p.label,u=h.get(k);if(u)u.documentation||(u.documentation=p.documentation),u.detail||(u.detail=p.detail),u.labelDetails||(u.labelDetails=p.labelDetails);else{if(k=k.replace(/[\n]/g,"\u21B5"),k.length>60){let b=k.substr(0,57).trim()+"...";h.has(b)||(k=b)}p.textEdit=Y.replace(f,p.insertText),p.label=k,h.set(k,p),s.items.push(p)}},setAsIncomplete:()=>{s.isIncomplete=!0},error:p=>{console.error(p)},getNumberOfProposals:()=>s.items.length};return this.schemaService.getSchemaForResource(e.uri,r).then(p=>{let k=[],u=!0,b="",d;if(o&&o.type==="string"){let x=o.parent;x&&x.type==="property"&&x.keyNode===o&&(u=!x.valueNode,d=x,b=i.substr(o.offset+1,o.length-2),x&&(o=x.parent))}if(o&&o.type==="object"){if(o.offset===a)return s;o.properties.forEach(g=>{(!d||d!==g)&&h.set(g.keyNode.value,qe.create("__"))});let c="";u&&(c=this.evaluateSeparatorAfter(e,e.offsetAt(f.end))),p?this.getPropertyCompletions(p,r,o,u,c,l):this.getSchemaLessPropertyCompletions(r,o,b,l);let v=ke(o);this.contributions.forEach(g=>{let T=g.collectPropertyCompletions(e.uri,v,m,u,c==="",l);T&&k.push(T)}),!p&&m.length>0&&i.charAt(a-m.length-1)!=='"'&&(l.add({kind:q.Property,label:this.getLabelForValue(m),insertText:this.getInsertTextForProperty(m,void 0,!1,c),insertTextFormat:$.Snippet,documentation:""}),l.setAsIncomplete())}let S={};return p?this.getValueCompletions(p,r,o,a,e,l,S):this.getSchemaLessValueCompletions(r,o,a,e,l),this.contributions.length>0&&this.getContributedValueCompletions(r,o,a,e,l,k),this.promiseConstructor.all(k).then(()=>{if(l.getNumberOfProposals()===0){let x=a;o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null")&&(x=o.offset+o.length);let c=this.evaluateSeparatorAfter(e,x);this.addFillerValueCompletions(S,c,l)}return s})})}getPropertyCompletions(e,n,r,s,i,a){n.getMatchingSchemas(e.schema,r.offset).forEach(m=>{if(m.node===r&&!m.inverted){let f=m.schema.properties;f&&Object.keys(f).forEach(l=>{let p=f[l];if(typeof p=="object"&&!p.deprecationMessage&&!p.doNotSuggest){let k={kind:q.Property,label:l,insertText:this.getInsertTextForProperty(l,p,s,i),insertTextFormat:$.Snippet,filterText:this.getFilterTextForValue(l),documentation:this.fromMarkup(p.markdownDescription)||p.description||""};p.suggestSortText!==void 0&&(k.sortText=p.suggestSortText),k.insertText&&ne(k.insertText,`$1${i}`)&&(k.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(k)}});let h=m.schema.propertyNames;if(typeof h=="object"&&!h.deprecationMessage&&!h.doNotSuggest){let l=(p,k=void 0)=>{let u={kind:q.Property,label:p,insertText:this.getInsertTextForProperty(p,void 0,s,i),insertTextFormat:$.Snippet,filterText:this.getFilterTextForValue(p),documentation:k||this.fromMarkup(h.markdownDescription)||h.description||""};h.suggestSortText!==void 0&&(u.sortText=h.suggestSortText),u.insertText&&ne(u.insertText,`$1${i}`)&&(u.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(u)};if(h.enum)for(let p=0;p<h.enum.length;p++){let k;h.markdownEnumDescriptions&&p<h.markdownEnumDescriptions.length?k=this.fromMarkup(h.markdownEnumDescriptions[p]):h.enumDescriptions&&p<h.enumDescriptions.length&&(k=h.enumDescriptions[p]),l(h.enum[p],k)}h.const&&l(h.const)}}})}getSchemaLessPropertyCompletions(e,n,r,s){let i=a=>{a.properties.forEach(o=>{let m=o.keyNode.value;s.add({kind:q.Property,label:m,insertText:this.getInsertTextForValue(m,""),insertTextFormat:$.Snippet,filterText:this.getFilterTextForValue(m),documentation:""})})};if(n.parent)if(n.parent.type==="property"){let a=n.parent.keyNode.value;e.visit(o=>(o.type==="property"&&o!==n.parent&&o.keyNode.value===a&&o.valueNode&&o.valueNode.type==="object"&&i(o.valueNode),!0))}else n.parent.type==="array"&&n.parent.items.forEach(a=>{a.type==="object"&&a!==n&&i(a)});else n.type==="object"&&s.add({kind:q.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:$.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(e,n,r,s,i){let a=r;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(a=n.offset+n.length,n=n.parent),!n){i.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:$.Snippet,documentation:""}),i.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:$.Snippet,documentation:""});return}let o=this.evaluateSeparatorAfter(s,a),m=f=>{f.parent&&!et(f.parent,r,!0)&&i.add({kind:this.getSuggestionKind(f.type),label:this.getLabelTextForMatchingNode(f,s),insertText:this.getInsertTextForMatchingNode(f,s,o),insertTextFormat:$.Snippet,documentation:""}),f.type==="boolean"&&this.addBooleanValueCompletion(!f.value,o,i)};if(n.type==="property"&&r>(n.colonOffset||0)){let f=n.valueNode;if(f&&(r>f.offset+f.length||f.type==="object"||f.type==="array"))return;let h=n.keyNode.value;e.visit(l=>(l.type==="property"&&l.keyNode.value===h&&l.valueNode&&m(l.valueNode),!0)),h==="$schema"&&n.parent&&!n.parent.parent&&this.addDollarSchemaCompletions(o,i)}if(n.type==="array")if(n.parent&&n.parent.type==="property"){let f=n.parent.keyNode.value;e.visit(h=>(h.type==="property"&&h.keyNode.value===f&&h.valueNode&&h.valueNode.type==="array"&&h.valueNode.items.forEach(m),!0))}else n.items.forEach(m)}getValueCompletions(e,n,r,s,i,a,o){let m=s,f,h;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(m=r.offset+r.length,h=r,r=r.parent),!r){this.addSchemaValueCompletions(e.schema,"",a,o);return}if(r.type==="property"&&s>(r.colonOffset||0)){let l=r.valueNode;if(l&&s>l.offset+l.length)return;f=r.keyNode.value,r=r.parent}if(r&&(f!==void 0||r.type==="array")){let l=this.evaluateSeparatorAfter(i,m),p=n.getMatchingSchemas(e.schema,r.offset,h);for(let k of p)if(k.node===r&&!k.inverted&&k.schema){if(r.type==="array"&&k.schema.items){let u=a;if(k.schema.uniqueItems){let b=new Set;r.children.forEach(d=>{d.type!=="array"&&d.type!=="object"&&b.add(this.getLabelForValue(Q(d)))}),u={...a,add(d){b.has(d.label)||a.add(d)}}}if(Array.isArray(k.schema.items)){let b=this.findItemAtOffset(r,i,s);b<k.schema.items.length&&this.addSchemaValueCompletions(k.schema.items[b],l,u,o)}else this.addSchemaValueCompletions(k.schema.items,l,u,o)}if(f!==void 0){let u=!1;if(k.schema.properties){let b=k.schema.properties[f];b&&(u=!0,this.addSchemaValueCompletions(b,l,a,o))}if(k.schema.patternProperties&&!u){for(let b of Object.keys(k.schema.patternProperties))if(oe(b)?.test(f)){u=!0;let S=k.schema.patternProperties[b];this.addSchemaValueCompletions(S,l,a,o)}}if(k.schema.additionalProperties&&!u){let b=k.schema.additionalProperties;this.addSchemaValueCompletions(b,l,a,o)}}}f==="$schema"&&!r.parent&&this.addDollarSchemaCompletions(l,a),o.boolean&&(this.addBooleanValueCompletion(!0,l,a),this.addBooleanValueCompletion(!1,l,a)),o.null&&this.addNullValueCompletion(l,a)}}getContributedValueCompletions(e,n,r,s,i,a){if(!n)this.contributions.forEach(o=>{let m=o.collectDefaultCompletions(s.uri,i);m&&a.push(m)});else if((n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(n=n.parent),n&&n.type==="property"&&r>(n.colonOffset||0)){let o=n.keyNode.value,m=n.valueNode;if((!m||r<=m.offset+m.length)&&n.parent){let f=ke(n.parent);this.contributions.forEach(h=>{let l=h.collectValueCompletions(s.uri,f,o,i);l&&a.push(l)})}}}addSchemaValueCompletions(e,n,r,s){typeof e=="object"&&(this.addEnumValueCompletions(e,n,r),this.addDefaultValueCompletions(e,n,r),this.collectTypes(e,s),Array.isArray(e.allOf)&&e.allOf.forEach(i=>this.addSchemaValueCompletions(i,n,r,s)),Array.isArray(e.anyOf)&&e.anyOf.forEach(i=>this.addSchemaValueCompletions(i,n,r,s)),Array.isArray(e.oneOf)&&e.oneOf.forEach(i=>this.addSchemaValueCompletions(i,n,r,s)))}addDefaultValueCompletions(e,n,r,s=0){let i=!1;if(J(e.default)){let a=e.type,o=e.default;for(let f=s;f>0;f--)o=[o],a="array";let m={kind:this.getSuggestionKind(a),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,n),insertTextFormat:$.Snippet};this.doesSupportsLabelDetails()?m.labelDetails={description:y("Default value")}:m.detail=y("Default value"),r.add(m),i=!0}Array.isArray(e.examples)&&e.examples.forEach(a=>{let o=e.type,m=a;for(let f=s;f>0;f--)m=[m],o="array";r.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(m),insertText:this.getInsertTextForValue(m,n),insertTextFormat:$.Snippet}),i=!0}),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach(a=>{let o=e.type,m=a.body,f=a.label,h,l;if(J(m)){e.type;for(let p=s;p>0;p--)m=[m];h=this.getInsertTextForSnippetValue(m,n),l=this.getFilterTextForSnippetValue(m),f=f||this.getLabelForSnippetValue(m)}else if(typeof a.bodyText=="string"){let p="",k="",u="";for(let b=s;b>0;b--)p=p+u+`[
20
+ `,k=k+`
21
+ `+u+"]",u+=" ",o="array";h=p+u+a.bodyText.split(`
22
+ `).join(`
23
+ `+u)+k+n,f=f||h,l=h.replace(/[\n]/g,"")}else return;r.add({kind:this.getSuggestionKind(o),label:f,documentation:this.fromMarkup(a.markdownDescription)||a.description,insertText:h,insertTextFormat:$.Snippet,filterText:l}),i=!0}),!i&&typeof e.items=="object"&&!Array.isArray(e.items)&&s<5&&this.addDefaultValueCompletions(e.items,n,r,s+1)}addEnumValueCompletions(e,n,r){if(J(e.const)&&r.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,n),insertTextFormat:$.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let s=0,i=e.enum.length;s<i;s++){let a=e.enum[s],o=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&s<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?o=this.fromMarkup(e.markdownEnumDescriptions[s]):e.enumDescriptions&&s<e.enumDescriptions.length&&(o=e.enumDescriptions[s]),r.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,n),insertTextFormat:$.Snippet,documentation:o})}}collectTypes(e,n){if(Array.isArray(e.enum)||J(e.const))return;let r=e.type;Array.isArray(r)?r.forEach(s=>n[s]=!0):r&&(n[r]=!0)}addFillerValueCompletions(e,n,r){e.object&&r.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},n),insertTextFormat:$.Snippet,detail:y("New object"),documentation:""}),e.array&&r.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],n),insertTextFormat:$.Snippet,detail:y("New array"),documentation:""})}addBooleanValueCompletion(e,n,r){r.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,n),insertTextFormat:$.Snippet,documentation:""})}addNullValueCompletion(e,n){n.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:$.Snippet,documentation:""})}addDollarSchemaCompletions(e,n){this.schemaService.getRegisteredSchemaIds(s=>s==="http"||s==="https").forEach(s=>{s.startsWith("http://json-schema.org/draft-")&&(s=s+"#"),n.add({kind:q.Module,label:this.getLabelForValue(s),filterText:this.getFilterTextForValue(s),insertText:this.getInsertTextForValue(s,e),insertTextFormat:$.Snippet,documentation:""})})}getLabelForValue(e){return JSON.stringify(e)}getValueFromLabel(e){return JSON.parse(e)}getFilterTextForValue(e){return JSON.stringify(e)}getFilterTextForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(e){return e.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(e,n){let r=JSON.stringify(e,null," ");return r==="{}"?"{$1}"+n:r==="[]"?"[$1]"+n:this.getInsertTextForPlainText(r+n)}getInsertTextForSnippetValue(e,n){return Ve(e,"",s=>typeof s=="string"&&s[0]==="^"?s.substr(1):JSON.stringify(s))+n}getInsertTextForGuessedValue(e,n){switch(typeof e){case"object":return e===null?"${1:null}"+n:this.getInsertTextForValue(e,n);case"string":let r=JSON.stringify(e);return r=r.substr(1,r.length-2),r=this.getInsertTextForPlainText(r),'"${1:'+r+'}"'+n;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+n}return this.getInsertTextForValue(e,n)}getSuggestionKind(e){if(Array.isArray(e)){let n=e;e=n.length>0?n[0]:void 0}if(!e)return q.Value;switch(e){case"string":return q.Value;case"object":return q.Module;case"property":return q.Property;default:return q.Value}}getLabelTextForMatchingNode(e,n){switch(e.type){case"array":return"[]";case"object":return"{}";default:return n.getText().substr(e.offset,e.length)}}getInsertTextForMatchingNode(e,n,r){switch(e.type){case"array":return this.getInsertTextForValue([],r);case"object":return this.getInsertTextForValue({},r);default:let s=n.getText().substr(e.offset,e.length)+r;return this.getInsertTextForPlainText(s)}}getInsertTextForProperty(e,n,r,s){let i=this.getInsertTextForValue(e,"");if(!r)return i;let a=i+": ",o,m=0;if(n){if(Array.isArray(n.defaultSnippets)){if(n.defaultSnippets.length===1){let f=n.defaultSnippets[0].body;J(f)&&(o=this.getInsertTextForSnippetValue(f,""))}m+=n.defaultSnippets.length}if(n.enum&&(!o&&n.enum.length===1&&(o=this.getInsertTextForGuessedValue(n.enum[0],"")),m+=n.enum.length),J(n.const)&&(o||(o=this.getInsertTextForGuessedValue(n.const,"")),m++),J(n.default)&&(o||(o=this.getInsertTextForGuessedValue(n.default,"")),m++),Array.isArray(n.examples)&&n.examples.length&&(o||(o=this.getInsertTextForGuessedValue(n.examples[0],"")),m+=n.examples.length),m===0){let f=Array.isArray(n.type)?n.type[0]:n.type;switch(f||(n.properties?f="object":n.items&&(f="array")),f){case"boolean":o="$1";break;case"string":o='"$1"';break;case"object":o="{$1}";break;case"array":o="[$1]";break;case"number":case"integer":o="${1:0}";break;case"null":o="${1:null}";break;default:return i}}}return(!o||m>1)&&(o="$1"),a+o+s}getCurrentWord(e,n){let r=n-1,s=e.getText();for(;r>=0&&`
24
+ \r\v":{[,]}`.indexOf(s.charAt(r))===-1;)r--;return s.substring(r+1,n)}evaluateSeparatorAfter(e,n){let r=H(e.getText(),!0);switch(r.setPosition(n),r.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(e,n,r){let s=H(n.getText(),!0),i=e.items;for(let a=i.length-1;a>=0;a--){let o=i[a];if(r>o.offset+o.length)return s.setPosition(o.offset+o.length),s.scan()===5&&r>=s.getTokenOffset()+s.getTokenLength()?a+1:a;if(r>=o.offset)return a}return 0}isInComment(e,n,r){let s=H(e.getText(),!1);s.setPosition(n);let i=s.scan();for(;i!==17&&s.getTokenOffset()+s.getTokenLength()<r;)i=s.scan();return(i===12||i===13)&&s.getTokenOffset()<=r}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:ce.Markdown,value:e}}doesSupportMarkdown(){if(!J(this.supportsMarkdown)){let e=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&e.indexOf(ce.Markdown)!==-1}return this.supportsMarkdown}doesSupportsCommitCharacters(){return J(this.supportsCommitCharacters)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return J(this.labelDetailsSupport)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}};var Ee=class{constructor(e,n=[],r){this.schemaService=e,this.contributions=n,this.promise=r||Promise}doHover(e,n,r){let s=e.offsetAt(n),i=r.getNodeFromOffset(s);if(!i||(i.type==="object"||i.type==="array")&&s>i.offset+1&&s<i.offset+i.length-1)return this.promise.resolve(null);let a=i;if(i.type==="string"){let h=i.parent;if(h&&h.type==="property"&&h.keyNode===i&&(i=h.valueNode,!i))return this.promise.resolve(null)}let o=L.create(e.positionAt(a.offset),e.positionAt(a.offset+a.length)),m=h=>({contents:h,range:o}),f=ke(i);for(let h=this.contributions.length-1;h>=0;h--){let p=this.contributions[h].getInfoContribution(e.uri,f);if(p)return p.then(k=>m(k))}return this.schemaService.getSchemaForResource(e.uri,r).then(h=>{if(h&&i){let l=r.getMatchingSchemas(h.schema,i.offset),p,k,u,b;l.every(S=>{if(S.node===i&&!S.inverted&&S.schema&&(p=p||S.schema.title,k=k||S.schema.markdownDescription||tt(S.schema.description),S.schema.enum)){let x=S.schema.enum.indexOf(Q(i));S.schema.markdownEnumDescriptions?u=S.schema.markdownEnumDescriptions[x]:S.schema.enumDescriptions&&(u=tt(S.schema.enumDescriptions[x])),u&&(b=S.schema.enum[x],typeof b!="string"&&(b=JSON.stringify(b)))}return!0});let d="";return p&&(d=tt(p)),k&&(d.length>0&&(d+=`
25
+
26
+ `),d+=k),u&&(d.length>0&&(d+=`
27
+
28
+ `),d+=`\`${Ht(b)}\`: ${u}`),m([d])}return null})}};function tt(t){if(t)return t.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
29
+
30
+ $3`).replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function Ht(t){return t.indexOf("`")!==-1?"`` "+t+" ``":t}var $e=class{constructor(e,n){this.jsonSchemaService=e,this.promise=n,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=e.validate!==!1,this.commentSeverity=e.allowComments?void 0:B.Error)}doValidation(e,n,r,s){if(!this.validationEnabled)return this.promise.resolve([]);let i=[],a={},o=f=>{let h=f.range.start.line+" "+f.range.start.character+" "+f.message;a[h]||(a[h]=!0,i.push(f))},m=f=>{let h=r?.trailingCommas?Fe(r.trailingCommas):B.Error,l=r?.comments?Fe(r.comments):this.commentSeverity,p=r?.schemaValidation?Fe(r.schemaValidation):B.Warning,k=r?.schemaRequest?Fe(r.schemaRequest):B.Warning;if(f){let u=(b,d)=>{if(n.root&&k){let S=n.root,x=S.type==="object"?S.properties[0]:void 0;if(x&&x.keyNode.value==="$schema"){let c=x.valueNode||x,v=L.create(e.positionAt(c.offset),e.positionAt(c.offset+c.length));o(ee.create(v,b,k,d))}else{let c=L.create(e.positionAt(S.offset),e.positionAt(S.offset+1));o(ee.create(c,b,k,d))}}};if(f.errors.length)u(f.errors[0],w.SchemaResolveError);else if(p){for(let d of f.warnings)u(d,w.SchemaUnsupportedFeature);let b=n.validate(e,f.schema,p,r?.schemaDraft);b&&b.forEach(o)}Nt(f.schema)&&(l=void 0),Ot(f.schema)&&(h=void 0)}for(let u of n.syntaxErrors){if(u.code===w.TrailingComma){if(typeof h!="number")continue;u.severity=h}o(u)}if(typeof l=="number"){let u=y("Comments are not permitted in JSON.");n.comments.forEach(b=>{o(ee.create(b,u,l,w.CommentNotPermitted))})}return i};if(s){let f=s.id||"schemaservice://untitled/"+Gt++;return this.jsonSchemaService.registerExternalSchema({uri:f,schema:s}).getResolvedSchema().then(l=>m(l))}return this.jsonSchemaService.getSchemaForResource(e.uri,n).then(f=>m(f))}getLanguageStatus(e,n){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,n)}}},Gt=0;function Nt(t){if(t&&typeof t=="object"){if(G(t.allowComments))return t.allowComments;if(t.allOf)for(let e of t.allOf){let n=Nt(e);if(G(n))return n}}}function Ot(t){if(t&&typeof t=="object"){if(G(t.allowTrailingCommas))return t.allowTrailingCommas;let e=t;if(G(e.allowsTrailingCommas))return e.allowsTrailingCommas;if(t.allOf)for(let n of t.allOf){let r=Ot(n);if(G(r))return r}}}function Fe(t){switch(t){case"error":return B.Error;case"warning":return B.Warning;case"ignore":return}}function E(t){return t<48?0:t<=57?t-48:(t<97&&(t+=32),t>=97&&t<=102?t-97+10:0)}function wt(t){if(t[0]==="#")switch(t.length){case 4:return{red:E(t.charCodeAt(1))*17/255,green:E(t.charCodeAt(2))*17/255,blue:E(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:E(t.charCodeAt(1))*17/255,green:E(t.charCodeAt(2))*17/255,blue:E(t.charCodeAt(3))*17/255,alpha:E(t.charCodeAt(4))*17/255};case 7:return{red:(E(t.charCodeAt(1))*16+E(t.charCodeAt(2)))/255,green:(E(t.charCodeAt(3))*16+E(t.charCodeAt(4)))/255,blue:(E(t.charCodeAt(5))*16+E(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(E(t.charCodeAt(1))*16+E(t.charCodeAt(2)))/255,green:(E(t.charCodeAt(3))*16+E(t.charCodeAt(4)))/255,blue:(E(t.charCodeAt(5))*16+E(t.charCodeAt(6)))/255,alpha:(E(t.charCodeAt(7))*16+E(t.charCodeAt(8)))/255}}}var je=class{constructor(e){this.schemaService=e}findDocumentSymbols(e,n,r={resultLimit:Number.MAX_VALUE}){let s=n.root;if(!s)return[];let i=r.resultLimit||Number.MAX_VALUE,a=e.uri;if((a==="vscode://defaultsettings/keybindings.json"||ne(a.toLowerCase(),"/user/keybindings.json"))&&s.type==="array"){let p=[];for(let k of s.items)if(k.type==="object"){for(let u of k.properties)if(u.keyNode.value==="key"&&u.valueNode){let b=xe.create(e.uri,re(e,k));if(p.push({name:Pt(u.valueNode),kind:Z.Function,location:b}),i--,i<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),p}}return p}let o=[{node:s,containerName:""}],m=0,f=!1,h=[],l=(p,k)=>{p.type==="array"?p.items.forEach(u=>{u&&o.push({node:u,containerName:k})}):p.type==="object"&&p.properties.forEach(u=>{let b=u.valueNode;if(b)if(i>0){i--;let d=xe.create(e.uri,re(e,u)),S=k?k+"."+u.keyNode.value:u.keyNode.value;h.push({name:this.getKeyLabel(u),kind:this.getSymbolKind(b.type),location:d,containerName:k}),o.push({node:b,containerName:S})}else f=!0})};for(;m<o.length;){let p=o[m++];l(p.node,p.containerName)}return f&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),h}findDocumentSymbols2(e,n,r={resultLimit:Number.MAX_VALUE}){let s=n.root;if(!s)return[];let i=r.resultLimit||Number.MAX_VALUE,a=e.uri;if((a==="vscode://defaultsettings/keybindings.json"||ne(a.toLowerCase(),"/user/keybindings.json"))&&s.type==="array"){let p=[];for(let k of s.items)if(k.type==="object"){for(let u of k.properties)if(u.keyNode.value==="key"&&u.valueNode){let b=re(e,k),d=re(e,u.keyNode);if(p.push({name:Pt(u.valueNode),kind:Z.Function,range:b,selectionRange:d}),i--,i<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),p}}return p}let o=[],m=[{node:s,result:o}],f=0,h=!1,l=(p,k)=>{p.type==="array"?p.items.forEach((u,b)=>{if(u)if(i>0){i--;let d=re(e,u),S=d,c={name:String(b),kind:this.getSymbolKind(u.type),range:d,selectionRange:S,children:[]};k.push(c),m.push({result:c.children,node:u})}else h=!0}):p.type==="object"&&p.properties.forEach(u=>{let b=u.valueNode;if(b)if(i>0){i--;let d=re(e,u),S=re(e,u.keyNode),x=[],c={name:this.getKeyLabel(u),kind:this.getSymbolKind(b.type),range:d,selectionRange:S,children:x,detail:this.getDetail(b)};k.push(c),m.push({result:x,node:b})}else h=!0})};for(;f<m.length;){let p=m[f++];l(p.node,p.result)}return h&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),o}getSymbolKind(e){switch(e){case"object":return Z.Module;case"string":return Z.String;case"number":return Z.Number;case"array":return Z.Array;case"boolean":return Z.Boolean;default:return Z.Variable}}getKeyLabel(e){let n=e.keyNode.value;return n&&(n=n.replace(/[\n]/g,"\u21B5")),n&&n.trim()?n:`"${n}"`}getDetail(e){if(e){if(e.type==="boolean"||e.type==="number"||e.type==="null"||e.type==="string")return String(e.value);if(e.type==="array")return e.children.length?void 0:"[]";if(e.type==="object")return e.children.length?void 0:"{}"}}findDocumentColors(e,n,r){return this.schemaService.getSchemaForResource(e.uri,n).then(s=>{let i=[];if(s){let a=r&&typeof r.resultLimit=="number"?r.resultLimit:Number.MAX_VALUE,o=n.getMatchingSchemas(s.schema),m={};for(let f of o)if(!f.inverted&&f.schema&&(f.schema.format==="color"||f.schema.format==="color-hex")&&f.node&&f.node.type==="string"){let h=String(f.node.offset);if(!m[h]){let l=wt(Q(f.node));if(l){let p=re(e,f.node);i.push({color:l,range:p})}if(m[h]=!0,a--,a<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(e.uri),i}}}return i})}getColorPresentations(e,n,r,s){let i=[],a=Math.round(r.red*255),o=Math.round(r.green*255),m=Math.round(r.blue*255);function f(l){let p=l.toString(16);return p.length!==2?"0"+p:p}let h;return r.alpha===1?h=`#${f(a)}${f(o)}${f(m)}`:h=`#${f(a)}${f(o)}${f(m)}${f(Math.round(r.alpha*255))}`,i.push({label:h,textEdit:Y.replace(s,JSON.stringify(h))}),i}};function re(t,e){return L.create(t.positionAt(e.offset),t.positionAt(e.offset+e.length))}function Pt(t){return Q(t)||y("<empty>")}var De={schemaAssociations:[],schemas:{"http://json-schema.org/draft-04/schema#":{$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},Zt={id:y("A unique identifier for the schema."),$schema:y("The schema to verify this document against."),title:y("A descriptive title of the element."),description:y("A long description of the element. Used in hover menus and suggestions."),default:y("A default value. Used by suggestions."),multipleOf:y("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:y("The maximum numerical value, inclusive by default."),exclusiveMaximum:y("Makes the maximum property exclusive."),minimum:y("The minimum numerical value, inclusive by default."),exclusiveMinimum:y("Makes the minimum property exclusive."),maxLength:y("The maximum length of a string."),minLength:y("The minimum length of a string."),pattern:y("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:y("For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:y("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:y("The maximum number of items that can be inside an array. Inclusive."),minItems:y("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:y("If all of the items in the array must be unique. Defaults to false."),maxProperties:y("The maximum number of properties an object can have. Inclusive."),minProperties:y("The minimum number of properties an object can have. Inclusive."),required:y("An array of strings that lists the names of all properties required on this object."),additionalProperties:y("Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:y("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:y("A map of property names to schemas for each property."),patternProperties:y("A map of regular expressions on property names to schemas for matching properties."),dependencies:y("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:y("The set of literal values that are valid."),type:y("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:y("Describes the format expected for the value."),allOf:y("An array of schemas, all of which must match."),anyOf:y("An array of schemas, where at least one must match."),oneOf:y("An array of schemas, exactly one of which must match."),not:y("A schema which must not match."),$id:y("A unique identifier for the schema."),$ref:y("Reference a definition hosted on any location."),$comment:y("Comments from schema authors to readers or maintainers of the schema."),readOnly:y("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:y("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:y('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:y("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:y("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:y("Describes the media type of a string property."),contentEncoding:y("Describes the content encoding of a string property."),if:y('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:y('The "if" subschema is used for validation when the "if" subschema succeeds.'),else:y('The "else" subschema is used for validation when the "if" subschema fails.')};for(let t in De.schemas){let e=De.schemas[t];for(let n in e.properties){let r=e.properties[n];typeof r=="boolean"&&(r=e.properties[n]={});let s=Zt[n];s&&(r.description=s)}}function Lt(t,e){if(typeof t!="string")throw new TypeError("Expected a string");let n=String(t),r="",s=!!e,i=!!e,a=!1,o=e&&typeof e.flags=="string"?e.flags:"",m;for(let f=0,h=n.length;f<h;f++)switch(m=n[f],m){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":r+="\\"+m;break;case"?":if(s){r+=".";break}case"[":case"]":if(s){r+=m;break}case"{":if(s){a=!0,r+="(";break}case"}":if(s){a=!1,r+=")";break}case",":if(a){r+="|";break}r+="\\"+m;break;case"*":let l=n[f-1],p=1;for(;n[f+1]==="*";)p++,f++;let k=n[f+1];i?p>1&&(l==="/"||l===void 0||l==="{"||l===",")&&(k==="/"||k===void 0||k===","||k==="}")?(k==="/"?f++:l==="/"&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)":r+=".*";break;default:r+=m}return(!o||!~o.indexOf("g"))&&(r="^"+r+"$"),new RegExp(r,o)}var Xt="!",Qt="/",nt=class{constructor(e,n,r){this.folderUri=n,this.uris=r,this.globWrappers=[];try{for(let s of e){let i=s[0]!==Xt;i||(s=s.substring(1)),s.length>0&&(s[0]===Qt&&(s=s.substring(1)),this.globWrappers.push({regexp:Lt("**/"+s,{extended:!0,globstar:!0}),include:i}))}n&&(n=It(n),n.endsWith("/")||(n=n+"/"),this.folderUri=n)}catch{this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let n=!1;for(let{regexp:r,include:s}of this.globWrappers)r.test(e)&&(n=s);return n}getURIs(){return this.uris}},rt=class{constructor(e,n,r){this.service=e,this.uri=n,this.dependencies=new Set,this.anchors=void 0,r&&(this.unresolvedSchema=this.service.promise.resolve(new le(r)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(e=>this.service.resolveSchemaContent(e,this))),this.resolvedSchema}clearSchema(){let e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}},le=class{constructor(e,n=[]){this.schema=e,this.errors=n}},_e=class{constructor(e,n=[],r=[],s){this.schema=e,this.errors=n,this.warnings=r,this.schemaDraft=s}getSection(e){let n=this.getSectionRecursive(e,this.schema);if(n)return U(n)}getSectionRecursive(e,n){if(!n||typeof n=="boolean"||e.length===0)return n;let r=e.shift();if(n.properties&&typeof n.properties[r])return this.getSectionRecursive(e,n.properties[r]);if(n.patternProperties){for(let s of Object.keys(n.patternProperties))if(oe(s)?.test(r))return this.getSectionRecursive(e,n.patternProperties[s])}else{if(typeof n.additionalProperties=="object")return this.getSectionRecursive(e,n.additionalProperties);if(r.match("[0-9]+")){if(Array.isArray(n.items)){let s=parseInt(r,10);if(!isNaN(s)&&n.items[s])return this.getSectionRecursive(e,n.items[s])}else if(n.items)return this.getSectionRecursive(e,n.items)}}}},Re=class{constructor(e,n,r){this.contextService=n,this.requestService=e,this.promiseConstructor=r||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter(n=>{let r=te.parse(n).scheme;return r!=="schemaservice"&&(!e||e(r))})}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let n=!1;e=ie(e);let r=[e],s=Object.keys(this.schemasById).map(i=>this.schemasById[i]);for(;r.length;){let i=r.pop();for(let a=0;a<s.length;a++){let o=s[a];o&&(o.uri===i||o.dependencies.has(i))&&(o.uri!==i&&r.push(o.uri),o.clearSchema()&&(n=!0),s[a]=void 0)}}return n}setSchemaContributions(e){if(e.schemas){let n=e.schemas;for(let r in n){let s=ie(r);this.contributionSchemas[s]=this.addSchemaHandle(s,n[r])}}if(Array.isArray(e.schemaAssociations)){let n=e.schemaAssociations;for(let r of n){let s=r.uris.map(ie),i=this.addFilePatternAssociation(r.pattern,r.folderUri,s);this.contributionAssociations.push(i)}}}addSchemaHandle(e,n){let r=new rt(this,e,n);return this.schemasById[e]=r,r}getOrAddSchemaHandle(e,n){return this.schemasById[e]||this.addSchemaHandle(e,n)}addFilePatternAssociation(e,n,r){let s=new nt(e,n,r);return this.filePatternAssociations.push(s),s}registerExternalSchema(e){let n=ie(e.uri);return this.registeredSchemasIds[n]=!0,this.cachedSchemaForResource=void 0,e.fileMatch&&e.fileMatch.length&&this.addFilePatternAssociation(e.fileMatch,e.folderUri,[n]),e.schema?this.addSchemaHandle(n,e.schema):this.getOrAddSchemaHandle(n)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(let e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(let e of this.contributionAssociations)this.filePatternAssociations.push(e)}getResolvedSchema(e){let n=ie(e),r=this.schemasById[n];return r?r.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(e){if(!this.requestService){let n=y("Unable to load schema from '{0}'. No schema request service available",ve(e));return this.promise.resolve(new le({},[n]))}return e.startsWith("http://json-schema.org/")&&(e="https"+e.substring(4)),this.requestService(e).then(n=>{if(!n){let a=y("Unable to load schema from '{0}': No content.",ve(e));return new le({},[a])}let r=[];n.charCodeAt(0)===65279&&(r.push(y("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",ve(e))),n=n.trimStart());let s={},i=[];return s=dt(n,i),i.length&&r.push(y("Unable to parse content from '{0}': Parse error at offset {1}.",ve(e),i[0].offset)),new le(s,r)},n=>{let r=n.toString(),s=n.toString().split("Error: ");return s.length>1&&(r=s[1]),ne(r,".")&&(r=r.substr(0,r.length-1)),new le({},[y("Unable to load schema from '{0}': {1}.",ve(e),r)])})}resolveSchemaContent(e,n){let r=e.errors.slice(0),s=e.schema,i=s.$schema?ie(s.$schema):void 0;if(i==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new _e({},[y("Draft-03 schemas are not supported.")],[],i));let a=new Set,o=this.contextService,m=(b,d)=>{d=decodeURIComponent(d);let S=b;return d[0]==="/"&&(d=d.substring(1)),d.split("/").some(x=>(x=x.replace(/~1/g,"/").replace(/~0/g,"~"),S=S[x],!S)),S},f=(b,d,S)=>(d.anchors||(d.anchors=u(b)),d.anchors.get(S)),h=(b,d)=>{for(let S in d)d.hasOwnProperty(S)&&S!=="id"&&S!=="$id"&&(b[S]=d[S])},l=(b,d,S,x)=>{let c;x===void 0||x.length===0?c=d:x.charAt(0)==="/"?c=m(d,x):c=f(d,S,x),c?h(b,c):r.push(y("$ref '{0}' in '{1}' can not be resolved.",x||"",S.uri))},p=(b,d,S,x)=>{o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(d)&&(d=o.resolveRelativePath(d,x.uri)),d=ie(d);let c=this.getOrAddSchemaHandle(d);return c.getUnresolvedSchema().then(v=>{if(x.dependencies.add(d),v.errors.length){let g=S?d+"#"+S:d;r.push(y("Problems loading reference '{0}': {1}",g,v.errors[0]))}return l(b,v.schema,c,S),k(b,v.schema,c)})},k=(b,d,S)=>{let x=[];return this.traverseNodes(b,c=>{let v=new Set;for(;c.$ref;){let g=c.$ref,T=g.split("#",2);if(delete c.$ref,T[0].length>0){x.push(p(c,T[0],T[1],S));return}else if(!v.has(g)){let A=T[1];l(c,d,S,A),v.add(g)}}c.$recursiveRef&&a.add("$recursiveRef"),c.$dynamicRef&&a.add("$dynamicRef")}),this.promise.all(x)},u=b=>{let d=new Map;return this.traverseNodes(b,S=>{let x=S.$id||S.id,c=we(x)&&x.charAt(0)==="#"?x.substring(1):S.$anchor;c&&(d.has(c)?r.push(y("Duplicate anchor declaration: '{0}'",c)):d.set(c,S)),S.$recursiveAnchor&&a.add("$recursiveAnchor"),S.$dynamicAnchor&&a.add("$dynamicAnchor")}),d};return k(s,s,n).then(b=>{let d=[];return a.size&&d.push(y("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(a.keys()).join(", "))),new _e(s,r,d,i)})}traverseNodes(e,n){if(!e||typeof e!="object")return Promise.resolve(null);let r=new Set,s=(...h)=>{for(let l of h)X(l)&&m.push(l)},i=(...h)=>{for(let l of h)if(X(l))for(let p in l){let u=l[p];X(u)&&m.push(u)}},a=(...h)=>{for(let l of h)if(Array.isArray(l))for(let p of l)X(p)&&m.push(p)},o=h=>{if(Array.isArray(h))for(let l of h)X(l)&&m.push(l);else X(h)&&m.push(h)},m=[e],f=m.pop();for(;f;)r.has(f)||(r.add(f),n(f),s(f.additionalItems,f.additionalProperties,f.not,f.contains,f.propertyNames,f.if,f.then,f.else,f.unevaluatedItems,f.unevaluatedProperties),i(f.definitions,f.$defs,f.properties,f.patternProperties,f.dependencies,f.dependentSchemas),a(f.anyOf,f.allOf,f.oneOf,f.prefixItems),o(f.items)),f=m.pop()}getSchemaFromProperty(e,n){if(n.root?.type==="object"){for(let r of n.root.properties)if(r.keyNode.value==="$schema"&&r.valueNode?.type==="string"){let s=r.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(s)&&(s=this.contextService.resolveRelativePath(s,e)),s}}}getAssociatedSchemas(e){let n=Object.create(null),r=[],s=It(e);for(let i of this.filePatternAssociations)if(i.matchesPattern(s))for(let a of i.getURIs())n[a]||(r.push(a),n[a]=!0);return r}getSchemaURIsForResource(e,n){let r=n&&this.getSchemaFromProperty(e,n);return r?[r]:this.getAssociatedSchemas(e)}getSchemaForResource(e,n){if(n){let i=this.getSchemaFromProperty(e,n);if(i){let a=ie(i);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;let r=this.getAssociatedSchemas(e),s=r.length>0?this.createCombinedSchema(e,r).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:s},s}createCombinedSchema(e,n){if(n.length===1)return this.getOrAddSchemaHandle(n[0]);{let r="schemaservice://combinedSchema/"+encodeURIComponent(e),s={allOf:n.map(i=>({$ref:i}))};return this.addSchemaHandle(r,s)}}getMatchingSchemas(e,n,r){if(r){let s=r.id||"schemaservice://untitled/matchingSchemas/"+Yt++;return this.addSchemaHandle(s,r).getResolvedSchema().then(a=>n.getMatchingSchemas(a.schema).filter(o=>!o.inverted))}return this.getSchemaForResource(e.uri,n).then(s=>s?n.getMatchingSchemas(s.schema).filter(i=>!i.inverted):[])}},Yt=0;function ie(t){try{return te.parse(t).toString(!0)}catch{return t}}function It(t){try{return te.parse(t).with({fragment:null,query:null}).toString(!0)}catch{return t}}function ve(t){try{let e=te.parse(t);if(e.scheme==="file")return e.fsPath}catch{}return t}function Vt(t,e){let n=[],r=[],s=[],i=-1,a=H(t.getText(),!1),o=a.scan();function m(u){n.push(u),r.push(s.length)}for(;o!==17;){switch(o){case 1:case 3:{let u=t.positionAt(a.getTokenOffset()).line,b={startLine:u,endLine:u,kind:o===1?"object":"array"};s.push(b);break}case 2:case 4:{let u=o===2?"object":"array";if(s.length>0&&s[s.length-1].kind===u){let b=s.pop(),d=t.positionAt(a.getTokenOffset()).line;b&&d>b.startLine+1&&i!==b.startLine&&(b.endLine=d-1,m(b),i=b.startLine)}break}case 13:{let u=t.positionAt(a.getTokenOffset()).line,b=t.positionAt(a.getTokenOffset()+a.getTokenLength()).line;a.getTokenError()===1&&u+1<t.lineCount?a.setPosition(t.offsetAt(R.create(u+1,0))):u<b&&(m({startLine:u,endLine:b,kind:ge.Comment}),i=u);break}case 12:{let b=t.getText().substr(a.getTokenOffset(),a.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(b){let d=t.positionAt(a.getTokenOffset()).line;if(b[1]){let S={startLine:d,endLine:d,kind:ge.Region};s.push(S)}else{let S=s.length-1;for(;S>=0&&s[S].kind!==ge.Region;)S--;if(S>=0){let x=s[S];s.length=S,d>x.startLine&&i!==x.startLine&&(x.endLine=d,m(x),i=x.startLine)}}}break}}o=a.scan()}let f=e&&e.rangeLimit;if(typeof f!="number"||n.length<=f)return n;e&&e.onRangeLimitExceeded&&e.onRangeLimitExceeded(t.uri);let h=[];for(let u of r)u<30&&(h[u]=(h[u]||0)+1);let l=0,p=0;for(let u=0;u<h.length;u++){let b=h[u];if(b){if(b+l>f){p=u;break}l+=b}}let k=[];for(let u=0;u<n.length;u++){let b=r[u];typeof b=="number"&&(b<p||b===p&&l++<f)&&k.push(n[u])}return k}function Mt(t,e,n){function r(o){let m=t.offsetAt(o),f=n.getNodeFromOffset(m,!0),h=[];for(;f;){switch(f.type){case"string":case"object":case"array":let p=f.offset+1,k=f.offset+f.length-1;p<k&&m>=p&&m<=k&&h.push(s(p,k)),h.push(s(f.offset,f.offset+f.length));break;case"number":case"boolean":case"null":case"property":h.push(s(f.offset,f.offset+f.length));break}if(f.type==="property"||f.parent&&f.parent.type==="array"){let p=a(f.offset+f.length,5);p!==-1&&h.push(s(f.offset,p))}f=f.parent}let l;for(let p=h.length-1;p>=0;p--)l=Ae.create(h[p],l);return l||(l=Ae.create(L.create(o,o))),l}function s(o,m){return L.create(t.positionAt(o),t.positionAt(m))}let i=H(t.getText(),!0);function a(o,m){return i.setPosition(o),i.scan()===m?i.getTokenOffset()+i.getTokenLength():-1}return e.map(r)}function Se(t,e,n){let r;if(n){let i=t.offsetAt(n.start),a=t.offsetAt(n.end)-i;r={offset:i,length:a}}let s={tabSize:e?e.tabSize:4,insertSpaces:e?.insertSpaces===!0,insertFinalNewline:e?.insertFinalNewline===!0,eol:`
31
+ `,keepLines:e?.keepLines===!0};return vt(t.getText(),r,s).map(i=>Y.replace(L.create(t.positionAt(i.offset),t.positionAt(i.offset+i.length)),i.content))}var F;(function(t){t[t.Object=0]="Object",t[t.Array=1]="Array"})(F||(F={}));var fe=class{constructor(e,n){this.propertyName=e??"",this.beginningLineNumber=n,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(e){if(e.parent=this,this.childrenProperties.length>0){let n=0;e.noKeyName?n=this.childrenProperties.length:n=en(this.childrenProperties,e,Ct),n<0&&(n=n*-1-1),this.childrenProperties.splice(n,0,e)}else this.childrenProperties.push(e);return e}};function Ct(t,e){let n=t.propertyName.toLowerCase(),r=e.propertyName.toLowerCase();return n<r?-1:n>r?1:0}function en(t,e,n){let r=e.propertyName.toLowerCase(),s=t[0].propertyName.toLowerCase(),i=t[t.length-1].propertyName.toLowerCase();if(r<s)return 0;if(r>i)return t.length;let a=0,o=t.length-1;for(;a<=o;){let m=o+a>>1,f=n(e,t[m]);if(f>0)a=m+1;else if(f<0)o=m-1;else return m}return-a-1}function Ft(t,e){let n={...e,keepLines:!1},r=z.applyEdits(t,Se(t,n,void 0)),s=z.create("test://test.json","json",0,r),i=tn(s),a=nn(s,i),o=Se(a,n,void 0),m=z.applyEdits(a,o);return[Y.replace(L.create(R.create(0,0),t.positionAt(t.getText().length)),m)]}function tn(t){let e=t.getText(),n=H(e,!1),r=new fe,s=r,i=r,a=r,o,m=0,f=0,h,l,p=-1,k=-1,u=0,b=0,d=[],S=!1,x=!1;for(;(o=n.scan())!==17;){if(S===!0&&o!==14&&o!==15&&o!==12&&o!==13&&i.endLineNumber===void 0){let c=n.getTokenStartLine();l===2||l===4?a.endLineNumber=c-1:i.endLineNumber=c-1,u=c,S=!1}if(x===!0&&o!==14&&o!==15&&o!==12&&o!==13&&(u=n.getTokenStartLine(),x=!1),n.getTokenStartLine()!==m){for(let c=m;c<n.getTokenStartLine();c++){let v=t.getText(L.create(R.create(c,0),R.create(c+1,0))).length;f=f+v}m=n.getTokenStartLine()}switch(o){case 10:{if(h===void 0||h===1||h===5&&d[d.length-1]===F.Object){let c=new fe(n.getTokenValue(),u);a=i,i=s.addChildProperty(c)}break}case 3:{if(r.beginningLineNumber===void 0&&(r.beginningLineNumber=n.getTokenStartLine()),d[d.length-1]===F.Object)s=i;else if(d[d.length-1]===F.Array){let c=new fe(n.getTokenValue(),u);c.noKeyName=!0,a=i,i=s.addChildProperty(c),s=i}d.push(F.Array),i.type=F.Array,u=n.getTokenStartLine(),u++;break}case 1:{if(r.beginningLineNumber===void 0)r.beginningLineNumber=n.getTokenStartLine();else if(d[d.length-1]===F.Array){let c=new fe(n.getTokenValue(),u);c.noKeyName=!0,a=i,i=s.addChildProperty(c)}i.type=F.Object,d.push(F.Object),s=i,u=n.getTokenStartLine(),u++;break}case 4:{b=n.getTokenStartLine(),d.pop(),i.endLineNumber===void 0&&(h===2||h===4)&&(i.endLineNumber=b-1,i.lastProperty=!0,i.lineWhereToAddComma=p,i.indexWhereToAddComa=k,a=i,i=i?i.parent:void 0,s=i),r.endLineNumber=b,u=b+1;break}case 2:{b=n.getTokenStartLine(),d.pop(),h!==1&&(i.endLineNumber===void 0&&(i.endLineNumber=b-1,i.lastProperty=!0,i.lineWhereToAddComma=p,i.indexWhereToAddComa=k),a=i,i=i?i.parent:void 0,s=i),r.endLineNumber=n.getTokenStartLine(),u=b+1;break}case 5:{b=n.getTokenStartLine(),i.endLineNumber===void 0&&(d[d.length-1]===F.Object||d[d.length-1]===F.Array&&(h===2||h===4))&&(i.endLineNumber=b,i.commaIndex=n.getTokenOffset()-f,i.commaLine=b),(h===2||h===4)&&(a=i,i=i?i.parent:void 0,s=i),u=b+1;break}case 13:{h===5&&p===n.getTokenStartLine()&&(d[d.length-1]===F.Array&&(l===2||l===4)||d[d.length-1]===F.Object)&&(d[d.length-1]===F.Array&&(l===2||l===4)||d[d.length-1]===F.Object)&&(i.endLineNumber=void 0,S=!0),(h===1||h===3)&&p===n.getTokenStartLine()&&(x=!0);break}}o!==14&&o!==13&&o!==12&&o!==15&&(l=h,h=o,p=n.getTokenStartLine(),k=n.getTokenOffset()+n.getTokenLength()-f)}return r}function nn(t,e){if(e.childrenProperties.length===0)return t;let n=z.create("test://test.json","json",0,t.getText()),r=[];for(Et(r,e,e.beginningLineNumber);r.length>0;){let s=r.shift(),i=s.propertyTreeArray,a=s.beginningLineNumber;for(let o=0;o<i.length;o++){let m=i[o],f=L.create(R.create(m.beginningLineNumber,0),R.create(m.endLineNumber+1,0)),h=t.getText(f),l=z.create("test://test.json","json",0,h);if(m.lastProperty===!0&&o!==i.length-1){let u=m.lineWhereToAddComma-m.beginningLineNumber,b=m.indexWhereToAddComa,d={range:L.create(R.create(u,b),R.create(u,b)),text:","};z.update(l,[d],1)}else if(m.lastProperty===!1&&o===i.length-1){let u=m.commaIndex,d=m.commaLine-m.beginningLineNumber,S={range:L.create(R.create(d,u),R.create(d,u+1)),text:""};z.update(l,[S],1)}let p=m.endLineNumber-m.beginningLineNumber+1,k={range:L.create(R.create(a,0),R.create(a+p,0)),text:l.getText()};z.update(n,[k],1),Et(r,m,a),a=a+p}}return n}function Et(t,e,n){if(e.childrenProperties.length!==0)if(e.type===F.Object){let r=1/0;for(let i of e.childrenProperties)i.beginningLineNumber<r&&(r=i.beginningLineNumber);let s=r-e.beginningLineNumber;n=n+s,t.push(new Be(n,e.childrenProperties))}else e.type===F.Array&&$t(t,e,n)}function $t(t,e,n){for(let r of e.childrenProperties){if(r.type===F.Object){let s=1/0;for(let a of r.childrenProperties)a.beginningLineNumber<s&&(s=a.beginningLineNumber);let i=s-r.beginningLineNumber;t.push(new Be(n+r.beginningLineNumber-e.beginningLineNumber+i,r.childrenProperties))}r.type===F.Array&&$t(t,r,n+r.beginningLineNumber-e.beginningLineNumber)}}var Be=class{constructor(e,n){this.beginningLineNumber=e,this.propertyTreeArray=n}};function jt(t,e){let n=[];return e.visit(r=>{if(r.type==="property"&&r.keyNode.value==="$ref"&&r.valueNode?.type==="string"){let s=r.valueNode.value,i=sn(e,s);if(i){let a=t.positionAt(i.offset);n.push({target:`${t.uri}#${a.line+1},${a.character+1}`,range:rn(t,r.valueNode)})}}return!0}),Promise.resolve(n)}function rn(t,e){return L.create(t.positionAt(e.offset+1),t.positionAt(e.offset+e.length-1))}function sn(t,e){let n=on(e);return n?it(n,t.root):null}function it(t,e){if(!e)return null;if(t.length===0)return e;let n=t.shift();if(e&&e.type==="object"){let r=e.properties.find(s=>s.keyNode.value===n);return r?it(t,r.valueNode):null}else if(e&&e.type==="array"&&n.match(/^(0|[1-9][0-9]*)$/)){let r=Number.parseInt(n),s=e.items[r];return s?it(t,s):null}return null}function on(t){return t==="#"?[]:t[0]!=="#"||t[1]!=="/"?null:t.substring(2).split(/\//).map(an)}function an(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function Dt(t){let e=t.promiseConstructor||Promise,n=new Re(t.schemaRequestService,t.workspaceContext,e);n.setSchemaContributions(De);let r=new Me(n,t.contributions,e,t.clientCapabilities),s=new Ee(n,t.contributions,e),i=new je(n),a=new $e(n,e);return{configure:o=>{n.clearExternalSchemas(),o.schemas?.forEach(n.registerExternalSchema.bind(n)),a.configure(o)},resetSchema:o=>n.onResourceChange(o),doValidation:a.doValidation.bind(a),getLanguageStatus:a.getLanguageStatus.bind(a),parseJSONDocument:o=>At(o,{collectComments:!0}),newJSONDocument:(o,m)=>xt(o,m),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:i.findDocumentSymbols.bind(i),findDocumentSymbols2:i.findDocumentSymbols2.bind(i),findDocumentColors:i.findDocumentColors.bind(i),getColorPresentations:i.getColorPresentations.bind(i),doHover:s.doHover.bind(s),getFoldingRanges:Vt,getSelectionRanges:Mt,findDefinition:()=>Promise.resolve([]),findLinks:jt,format:(o,m,f)=>Se(o,f,m),sort:(o,m)=>Ft(o,m)}}var _t;typeof fetch<"u"&&(_t=function(t){return fetch(t).then(e=>e.text())});var Ue=class{constructor(e,n){this._ctx=e,this._languageSettings=n.languageSettings,this._languageId=n.languageId,this._languageService=Dt({workspaceContext:{resolveRelativePath:(r,s)=>{let i=s.substr(0,s.lastIndexOf("/")+1);return cn(i,r)}},schemaRequestService:n.enableSchemaRequest?_t:void 0,clientCapabilities:ye.LATEST}),this._languageService.configure(this._languageSettings)}async doValidation(e){let n=this._getTextDocument(e);if(n){let r=this._languageService.parseJSONDocument(n);return this._languageService.doValidation(n,r,this._languageSettings)}return Promise.resolve([])}async doComplete(e,n){let r=this._getTextDocument(e);if(!r)return null;let s=this._languageService.parseJSONDocument(r);return this._languageService.doComplete(r,n,s)}async doResolve(e){return this._languageService.doResolve(e)}async doHover(e,n){let r=this._getTextDocument(e);if(!r)return null;let s=this._languageService.parseJSONDocument(r);return this._languageService.doHover(r,n,s)}async format(e,n,r){let s=this._getTextDocument(e);if(!s)return[];let i=this._languageService.format(s,n,r);return Promise.resolve(i)}async resetSchema(e){return Promise.resolve(this._languageService.resetSchema(e))}async findDocumentSymbols(e){let n=this._getTextDocument(e);if(!n)return[];let r=this._languageService.parseJSONDocument(n),s=this._languageService.findDocumentSymbols2(n,r);return Promise.resolve(s)}async findDocumentColors(e){let n=this._getTextDocument(e);if(!n)return[];let r=this._languageService.parseJSONDocument(n),s=this._languageService.findDocumentColors(n,r);return Promise.resolve(s)}async getColorPresentations(e,n,r){let s=this._getTextDocument(e);if(!s)return[];let i=this._languageService.parseJSONDocument(s),a=this._languageService.getColorPresentations(s,i,n,r);return Promise.resolve(a)}async getFoldingRanges(e,n){let r=this._getTextDocument(e);if(!r)return[];let s=this._languageService.getFoldingRanges(r,n);return Promise.resolve(s)}async getSelectionRanges(e,n){let r=this._getTextDocument(e);if(!r)return[];let s=this._languageService.parseJSONDocument(r),i=this._languageService.getSelectionRanges(r,n,s);return Promise.resolve(i)}async parseJSONDocument(e){let n=this._getTextDocument(e);if(!n)return null;let r=this._languageService.parseJSONDocument(n);return Promise.resolve(r)}async getMatchingSchemas(e){let n=this._getTextDocument(e);if(!n)return[];let r=this._languageService.parseJSONDocument(n);return Promise.resolve(this._languageService.getMatchingSchemas(n,r))}_getTextDocument(e){let n=this._ctx.getMirrorModels();for(let r of n)if(r.uri.toString()===e)return z.create(e,this._languageId,r.version,r.getValue());return null}},ln=47,st=46;function fn(t){return t.charCodeAt(0)===ln}function cn(t,e){if(fn(e)){let n=te.parse(t),r=e.split("/");return n.with({path:Rt(r)}).toString()}return un(t,e)}function Rt(t){let e=[];for(let r of t)r.length===0||r.length===1&&r.charCodeAt(0)===st||(r.length===2&&r.charCodeAt(0)===st&&r.charCodeAt(1)===st?e.pop():e.push(r));t.length>1&&t[t.length-1].length===0&&e.push("");let n=e.join("/");return t[0].length===0&&(n="/"+n),n}function un(t,...e){let n=te.parse(t),r=n.path.split("/");for(let s of e)r.push(...s.split("/"));return n.with({path:Rt(r)}).toString()}self.onmessage=()=>{at((t,e)=>new Ue(t,e))};