parse-dashboard 9.2.1-alpha.1 → 9.3.0-alpha.1

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 (94) hide show
  1. package/Parse-Dashboard/public/bundles/1056.bundle.js +1 -0
  2. package/Parse-Dashboard/public/bundles/1151.bundle.js +1 -0
  3. package/Parse-Dashboard/public/bundles/1256.bundle.js +1 -0
  4. package/Parse-Dashboard/public/bundles/1272.bundle.js +1 -0
  5. package/Parse-Dashboard/public/bundles/1356.bundle.js +1 -0
  6. package/Parse-Dashboard/public/bundles/1440.bundle.js +1 -0
  7. package/Parse-Dashboard/public/bundles/1675.bundle.js +1 -0
  8. package/Parse-Dashboard/public/bundles/1987.bundle.js +1 -0
  9. package/Parse-Dashboard/public/bundles/2499.bundle.js +2 -0
  10. package/Parse-Dashboard/public/bundles/2499.bundle.js.LICENSE.txt +6 -0
  11. package/Parse-Dashboard/public/bundles/2794.bundle.js +1 -0
  12. package/Parse-Dashboard/public/bundles/2823.bundle.js +2 -0
  13. package/Parse-Dashboard/public/bundles/2823.bundle.js.LICENSE.txt +1 -0
  14. package/Parse-Dashboard/public/bundles/2955.bundle.js +1 -0
  15. package/Parse-Dashboard/public/bundles/2972.bundle.js +1 -0
  16. package/Parse-Dashboard/public/bundles/3120.bundle.js +1 -0
  17. package/Parse-Dashboard/public/bundles/3212.bundle.js +1 -0
  18. package/Parse-Dashboard/public/bundles/3227.bundle.js +1 -0
  19. package/Parse-Dashboard/public/bundles/3412.bundle.js +1 -0
  20. package/Parse-Dashboard/public/bundles/3839.bundle.js +1 -0
  21. package/Parse-Dashboard/public/bundles/3871.bundle.js +1 -0
  22. package/Parse-Dashboard/public/bundles/4056.bundle.js +1 -0
  23. package/Parse-Dashboard/public/bundles/4062.bundle.js +1 -0
  24. package/Parse-Dashboard/public/bundles/4069.bundle.js +1 -0
  25. package/Parse-Dashboard/public/bundles/4097.bundle.js +1 -0
  26. package/Parse-Dashboard/public/bundles/4438.bundle.js +1 -0
  27. package/Parse-Dashboard/public/bundles/448.bundle.js +1 -1
  28. package/Parse-Dashboard/public/bundles/4760.bundle.js +2 -0
  29. package/Parse-Dashboard/public/bundles/4760.bundle.js.LICENSE.txt +6 -0
  30. package/Parse-Dashboard/public/bundles/4837.bundle.js +1 -0
  31. package/Parse-Dashboard/public/bundles/490.bundle.js +1 -0
  32. package/Parse-Dashboard/public/bundles/5147.bundle.js +1 -0
  33. package/Parse-Dashboard/public/bundles/5166.bundle.js +1 -0
  34. package/Parse-Dashboard/public/bundles/5281.bundle.js +2 -0
  35. package/Parse-Dashboard/public/bundles/5281.bundle.js.LICENSE.txt +44 -0
  36. package/Parse-Dashboard/public/bundles/5521.bundle.js +1 -0
  37. package/Parse-Dashboard/public/bundles/580.bundle.js +1 -0
  38. package/Parse-Dashboard/public/bundles/5834.bundle.js +1 -0
  39. package/Parse-Dashboard/public/bundles/5851.bundle.js +1 -0
  40. package/Parse-Dashboard/public/bundles/5866.bundle.js +1 -0
  41. package/Parse-Dashboard/public/bundles/5967.bundle.js +1 -0
  42. package/Parse-Dashboard/public/bundles/6079.bundle.js +1 -0
  43. package/Parse-Dashboard/public/bundles/6214.bundle.js +1 -0
  44. package/Parse-Dashboard/public/bundles/6490.bundle.js +1 -0
  45. package/Parse-Dashboard/public/bundles/6556.bundle.js +1 -0
  46. package/Parse-Dashboard/public/bundles/6562.bundle.js +2 -0
  47. package/Parse-Dashboard/public/bundles/6562.bundle.js.LICENSE.txt +6 -0
  48. package/Parse-Dashboard/public/bundles/6727.bundle.js +1 -0
  49. package/Parse-Dashboard/public/bundles/7110.bundle.js +1 -0
  50. package/Parse-Dashboard/public/bundles/7214.bundle.js +2 -0
  51. package/Parse-Dashboard/public/bundles/7214.bundle.js.LICENSE.txt +6 -0
  52. package/Parse-Dashboard/public/bundles/7413.bundle.js +1 -0
  53. package/Parse-Dashboard/public/bundles/7537.bundle.js +1 -0
  54. package/Parse-Dashboard/public/bundles/7775.bundle.js +1 -0
  55. package/Parse-Dashboard/public/bundles/792.bundle.js +1 -0
  56. package/Parse-Dashboard/public/bundles/802.bundle.js +1 -0
  57. package/Parse-Dashboard/public/bundles/8058.bundle.js +1 -0
  58. package/Parse-Dashboard/public/bundles/8445.bundle.js +1 -0
  59. package/Parse-Dashboard/public/bundles/9096.bundle.js +1 -0
  60. package/Parse-Dashboard/public/bundles/9174.bundle.js +1 -0
  61. package/Parse-Dashboard/public/bundles/9433.bundle.js +1 -0
  62. package/Parse-Dashboard/public/bundles/9794.bundle.js +1 -0
  63. package/Parse-Dashboard/public/bundles/9895.bundle.js +1 -0
  64. package/Parse-Dashboard/public/bundles/dashboard.bundle.js +1 -1
  65. package/Parse-Dashboard/public/bundles/dashboard.bundle.js.LICENSE.txt +39 -75
  66. package/Parse-Dashboard/public/bundles/img/f6283f7ccaed1249d9eb.ttf +0 -0
  67. package/Parse-Dashboard/public/bundles/login.bundle.js +1 -1
  68. package/Parse-Dashboard/public/bundles/login.bundle.js.LICENSE.txt +21 -14
  69. package/package.json +12 -10
  70. package/Parse-Dashboard/public/bundles/120.bundle.js +0 -1
  71. package/Parse-Dashboard/public/bundles/183.bundle.js +0 -1
  72. package/Parse-Dashboard/public/bundles/19.bundle.js +0 -1
  73. package/Parse-Dashboard/public/bundles/221.bundle.js +0 -1
  74. package/Parse-Dashboard/public/bundles/372.bundle.js +0 -1
  75. package/Parse-Dashboard/public/bundles/573.bundle.js +0 -1
  76. package/Parse-Dashboard/public/bundles/578.bundle.js +0 -1
  77. package/Parse-Dashboard/public/bundles/584.bundle.js +0 -1
  78. package/Parse-Dashboard/public/bundles/629.bundle.js +0 -1
  79. package/Parse-Dashboard/public/bundles/643.bundle.js +0 -1
  80. package/Parse-Dashboard/public/bundles/647.bundle.js +0 -1
  81. package/Parse-Dashboard/public/bundles/701.bundle.js +0 -1
  82. package/Parse-Dashboard/public/bundles/729.bundle.js +0 -1
  83. package/Parse-Dashboard/public/bundles/75.bundle.js +0 -1
  84. package/Parse-Dashboard/public/bundles/753.bundle.js +0 -1
  85. package/Parse-Dashboard/public/bundles/817.bundle.js +0 -1
  86. package/Parse-Dashboard/public/bundles/844.bundle.js +0 -1
  87. package/Parse-Dashboard/public/bundles/862.bundle.js +0 -1
  88. package/Parse-Dashboard/public/bundles/866.bundle.js +0 -1
  89. package/Parse-Dashboard/public/bundles/874.bundle.js +0 -1
  90. package/Parse-Dashboard/public/bundles/881.bundle.js +0 -1
  91. package/Parse-Dashboard/public/bundles/929.bundle.js +0 -1
  92. package/Parse-Dashboard/public/bundles/950.bundle.js +0 -1
  93. package/Parse-Dashboard/public/bundles/97.bundle.js +0 -1
  94. package/Parse-Dashboard/public/bundles/976.bundle.js +0 -1
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 7214.bundle.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7214],{29681(e,t,n){n.d(t,{n:()=>a});var r=n(84869),i=n(26635),s=n(81978);let o=!1;function a(e){if(o)return;o=!0;const t=new r.AU(e=>{globalThis.postMessage(e)},t=>new i.EditorSimpleWorker(s.EditorWorkerHost.getChannel(t),e));globalThis.onmessage=e=>{t.onmessage(e.data)}}globalThis.onmessage=e=>{o||a(null)}},67214(e,t,n){var r,i,s=n(29681);function o(e,t=!1){const n=e.length;let r=0,i="",s=0,o=16,u=0,f=0,h=0,d=0,m=0;function p(t,n){let i=0,s=0;for(;i<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)s=16*s+t-48;else if(t>=65&&t<=70)s=16*s+t-65+10;else{if(!(t>=97&&t<=102))break;s=16*s+t-97+10}r++,i++}return i<t&&(s=-1),s}function g(){if(i="",m=0,s=r,f=u,d=h,r>=n)return s=n,o=17;let t=e.charCodeAt(r);if(a(t)){do{r++,i+=String.fromCharCode(t),t=e.charCodeAt(r)}while(a(t));return o=15}if(c(t))return r++,i+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,i+="\n"),u++,h=r,o=14;switch(t){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=function(){let t="",i=r;for(;;){if(r>=n){t+=e.substring(i,r),m=2;break}const s=e.charCodeAt(r);if(34===s){t+=e.substring(i,r),r++;break}if(92!==s){if(s>=0&&s<=31){if(c(s)){t+=e.substring(i,r),m=2;break}m=6}r++}else{if(t+=e.substring(i,r),r++,r>=n){m=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=p(4,!0);e>=0?t+=String.fromCharCode(e):m=4;break;default:m=5}i=r}}return t}(),o=10;case 47:const a=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!c(e.charCodeAt(r));)r++;return i=e.substring(a,r),o=12}if(42===e.charCodeAt(r+1)){r+=2;const t=n-1;let s=!1;for(;r<t;){const t=e.charCodeAt(r);if(42===t&&47===e.charCodeAt(r+1)){r+=2,s=!0;break}r++,c(t)&&(13===t&&10===e.charCodeAt(r)&&r++,u++,h=r)}return s||(r++,m=1),i=e.substring(a,r),o=13}return i+=String.fromCharCode(t),r++,o=16;case 45:if(i+=String.fromCharCode(t),r++,r===n||!l(e.charCodeAt(r)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=function(){let t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&l(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(r++,!(r<e.length&&l(e.charCodeAt(r))))return m=3,e.substring(t,r);for(r++;r<e.length&&l(e.charCodeAt(r));)r++}let n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if(r++,(r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&l(e.charCodeAt(r))){for(r++;r<e.length&&l(e.charCodeAt(r));)r++;n=r}else m=3;return e.substring(t,n)}(),o=11;default:for(;r<n&&y(t);)r++,t=e.charCodeAt(r);if(s!==r){switch(i=e.substring(s,r),i){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return i+=String.fromCharCode(t),r++,o=16}}function y(e){if(a(e)||c(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,i="",s=0,o=16,m=0},getPosition:()=>r,scan:t?function(){let e;do{e=g()}while(e>=12&&e<=15);return e}:g,getToken:()=>o,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>r-s,getTokenStartLine:()=>f,getTokenStartCharacter:()=>s-d,getTokenError:()=>m}}function a(e){return 32===e||9===e}function c(e){return 10===e||13===e}function l(e){return e>=48&&e<=57}(i=r||(r={}))[i.lineFeed=10]="lineFeed",i[i.carriageReturn=13]="carriageReturn",i[i.space=32]="space",i[i._0=48]="_0",i[i._1=49]="_1",i[i._2=50]="_2",i[i._3=51]="_3",i[i._4=52]="_4",i[i._5=53]="_5",i[i._6=54]="_6",i[i._7=55]="_7",i[i._8=56]="_8",i[i._9=57]="_9",i[i.a=97]="a",i[i.b=98]="b",i[i.c=99]="c",i[i.d=100]="d",i[i.e=101]="e",i[i.f=102]="f",i[i.g=103]="g",i[i.h=104]="h",i[i.i=105]="i",i[i.j=106]="j",i[i.k=107]="k",i[i.l=108]="l",i[i.m=109]="m",i[i.n=110]="n",i[i.o=111]="o",i[i.p=112]="p",i[i.q=113]="q",i[i.r=114]="r",i[i.s=115]="s",i[i.t=116]="t",i[i.u=117]="u",i[i.v=118]="v",i[i.w=119]="w",i[i.x=120]="x",i[i.y=121]="y",i[i.z=122]="z",i[i.A=65]="A",i[i.B=66]="B",i[i.C=67]="C",i[i.D=68]="D",i[i.E=69]="E",i[i.F=70]="F",i[i.G=71]="G",i[i.H=72]="H",i[i.I=73]="I",i[i.J=74]="J",i[i.K=75]="K",i[i.L=76]="L",i[i.M=77]="M",i[i.N=78]="N",i[i.O=79]="O",i[i.P=80]="P",i[i.Q=81]="Q",i[i.R=82]="R",i[i.S=83]="S",i[i.T=84]="T",i[i.U=85]="U",i[i.V=86]="V",i[i.W=87]="W",i[i.X=88]="X",i[i.Y=89]="Y",i[i.Z=90]="Z",i[i.asterisk=42]="asterisk",i[i.backslash=92]="backslash",i[i.closeBrace=125]="closeBrace",i[i.closeBracket=93]="closeBracket",i[i.colon=58]="colon",i[i.comma=44]="comma",i[i.dot=46]="dot",i[i.doubleQuote=34]="doubleQuote",i[i.minus=45]="minus",i[i.openBrace=123]="openBrace",i[i.openBracket=91]="openBracket",i[i.plus=43]="plus",i[i.slash=47]="slash",i[i.formFeed=12]="formFeed",i[i.tab=9]="tab";var u,f=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),h=200,d={" ":{"\n":new Array(h).fill(0).map((e,t)=>"\n"+" ".repeat(t)),"\r":new Array(h).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(h).fill(0).map((e,t)=>"\r\n"+" ".repeat(t))},"\t":{"\n":new Array(h).fill(0).map((e,t)=>"\n"+"\t".repeat(t)),"\r":new Array(h).fill(0).map((e,t)=>"\r"+"\t".repeat(t)),"\r\n":new Array(h).fill(0).map((e,t)=>"\r\n"+"\t".repeat(t))}},m=["\n","\r","\r\n"];function p(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}function g(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}(u||(u={})).DEFAULT={allowTrailingComma:!1};var y,b,v,x,k=o;(b=y||(y={}))[b.None=0]="None",b[b.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",b[b.UnexpectedEndOfString=2]="UnexpectedEndOfString",b[b.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",b[b.InvalidUnicode=4]="InvalidUnicode",b[b.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",b[b.InvalidCharacter=6]="InvalidCharacter",(x=v||(v={}))[x.OpenBraceToken=1]="OpenBraceToken",x[x.CloseBraceToken=2]="CloseBraceToken",x[x.OpenBracketToken=3]="OpenBracketToken",x[x.CloseBracketToken=4]="CloseBracketToken",x[x.CommaToken=5]="CommaToken",x[x.ColonToken=6]="ColonToken",x[x.NullKeyword=7]="NullKeyword",x[x.TrueKeyword=8]="TrueKeyword",x[x.FalseKeyword=9]="FalseKeyword",x[x.StringLiteral=10]="StringLiteral",x[x.NumericLiteral=11]="NumericLiteral",x[x.LineCommentTrivia=12]="LineCommentTrivia",x[x.BlockCommentTrivia=13]="BlockCommentTrivia",x[x.LineBreakTrivia=14]="LineBreakTrivia",x[x.Trivia=15]="Trivia",x[x.Unknown=16]="Unknown",x[x.EOF=17]="EOF";var S,A,T,C,w,O,I,E,N,L,P,M,V,j,$,F,_,R,D,U,B,q,K,J,W,z,H,G,X,Z,Q,Y,ee,te,ne,re,ie,se,oe,ae,ce,le,ue,fe,he,de,me,pe,ge,ye,be,ve,xe,ke,Se,Ae,Te,Ce,we,Oe,Ie,Ee,Ne,Le,Pe,Me,Ve,je,$e,Fe,_e,Re,De,Ue,Be,qe,Ke,Je,We,ze,He,Ge,Xe,Ze,Qe,Ye,et,tt,nt,rt,it,st,ot,at,ct,lt,ut,ft,ht,dt,mt,pt,gt,yt,bt,vt,xt,kt,St,At,Tt,Ct,wt,Ot,It,Et,Nt,Lt,Pt,Mt,Vt,jt,$t,Ft,_t,Rt,Dt,Ut,Bt,qt,Kt,Jt,Wt,zt,Ht,Gt=function(e,t=[],n=u.DEFAULT){let r=null,i=[];const s=[];function a(e){Array.isArray(i)?i.push(e):null!==r&&(i[r]=e)}return function(e,t,n=u.DEFAULT){const r=o(e,!1),i=[];function s(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function c(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}const f=a(t.onObjectBegin),h=l(t.onObjectProperty),d=s(t.onObjectEnd),m=a(t.onArrayBegin),p=s(t.onArrayEnd),g=l(t.onLiteralValue),y=c(t.onSeparator),b=s(t.onComment),v=c(t.onError),x=n&&n.disallowComments,k=n&&n.allowTrailingComma;function S(){for(;;){const e=r.scan();switch(r.getTokenError()){case 4:A(14);break;case 5:A(15);break;case 3:A(13);break;case 1:x||A(11);break;case 2:A(12);break;case 6:A(16)}switch(e){case 12:case 13:x?A(10):b();break;case 16:A(1);break;case 15:case 14:break;default:return e}}}function A(e,t=[],n=[]){if(v(e),t.length+n.length>0){let e=r.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){S();break}if(-1!==n.indexOf(e))break;e=S()}}}function T(e){const t=r.getTokenValue();return e?g(t):(h(t),i.push(t)),S(),!0}function C(){return 10!==r.getToken()?(A(3,[],[2,5]),!1):(T(!1),6===r.getToken()?(y(":"),S(),w()||A(4,[],[2,5])):A(5,[],[2,5]),i.pop(),!0)}function w(){switch(r.getToken()){case 3:return function(){m(),S();let e=!0,t=!1;for(;4!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(t||A(4,[],[]),y(","),S(),4===r.getToken()&&k)break}else t&&A(6,[],[]);e?(i.push(0),e=!1):i[i.length-1]++,w()||A(4,[],[4,5]),t=!0}return p(),e||i.pop(),4!==r.getToken()?A(8,[4],[]):S(),!0}();case 1:return function(){f(),S();let e=!1;for(;2!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(e||A(4,[],[]),y(","),S(),2===r.getToken()&&k)break}else e&&A(6,[],[]);C()||A(4,[],[2,5]),e=!0}return d(),2!==r.getToken()?A(7,[2],[]):S(),!0}();case 10:return T(!0);default:return function(){switch(r.getToken()){case 11:const e=r.getTokenValue();let t=Number(e);isNaN(t)&&(A(2),t=0),g(t);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return S(),!0}()}}S(),17===r.getToken()?!!n.allowEmptyContent||A(4,[],[]):w()?17!==r.getToken()&&A(9,[],[]):A(4,[],[])}(e,{onObjectBegin:()=>{const e={};a(e),s.push(i),i=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{const e=[];a(e),s.push(i),i=e,r=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:a,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),i[0]},Xt=function e(t,n,r=!1){if(function(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(t,n,r)){const i=t.children;if(Array.isArray(i))for(let t=0;t<i.length&&i[t].offset<=n;t++){const s=e(i[t],n,r);if(s)return s}return t}},Zt=function e(t){if(!t.parent||!t.parent.children)return[];const n=e(t.parent);if("property"===t.parent.type){const e=t.parent.children[0].value;n.push(e)}else if("array"===t.parent.type){const e=t.parent.children.indexOf(t);-1!==e&&n.push(e)}return n},Qt=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":const n=Object.create(null);for(let r of t.children){const t=r.children[1];t&&(n[r.children[0].value]=e(t))}return n;case"null":case"string":case"number":case"boolean":return t.value;default:return}};function Yt(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!Yt(e[n],t[n]))return!1}else{const i=[];for(r in e)i.push(r);i.sort();const s=[];for(r in t)s.push(r);if(s.sort(),!Yt(i,s))return!1;for(n=0;n<i.length;n++)if(!Yt(e[i[n]],t[i[n]]))return!1}return!0}function en(e){return"number"==typeof e}function tn(e){return void 0!==e}function nn(e){return"boolean"==typeof e}function rn(e){return"string"==typeof e}function sn(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function on(e,t){const n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}function an(e){let t="";(function(e,t){if(e.length<4)return!1;for(let n=0;n<4;n++)if(e[n]!==t[n])return!1;return!0})(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch(n){try{return new RegExp(e,t)}catch(e){return}}}function cn(e){let t=0;for(let n=0;n<e.length;n++){t++;const r=e.charCodeAt(n);55296<=r&&r<=56319&&n++}return t}(A=S||(S={}))[A.InvalidSymbol=1]="InvalidSymbol",A[A.InvalidNumberFormat=2]="InvalidNumberFormat",A[A.PropertyNameExpected=3]="PropertyNameExpected",A[A.ValueExpected=4]="ValueExpected",A[A.ColonExpected=5]="ColonExpected",A[A.CommaExpected=6]="CommaExpected",A[A.CloseBraceExpected=7]="CloseBraceExpected",A[A.CloseBracketExpected=8]="CloseBracketExpected",A[A.EndOfFileExpected=9]="EndOfFileExpected",A[A.InvalidCommentToken=10]="InvalidCommentToken",A[A.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",A[A.UnexpectedEndOfString=12]="UnexpectedEndOfString",A[A.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",A[A.InvalidUnicode=14]="InvalidUnicode",A[A.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",A[A.InvalidCharacter=16]="InvalidCharacter",(T||(T={})).is=function(e){return"string"==typeof e},(C||(C={})).is=function(e){return"string"==typeof e},(O=w||(w={})).MIN_VALUE=-2147483648,O.MAX_VALUE=2147483647,O.is=function(e){return"number"==typeof e&&O.MIN_VALUE<=e&&e<=O.MAX_VALUE},(E=I||(I={})).MIN_VALUE=0,E.MAX_VALUE=2147483647,E.is=function(e){return"number"==typeof e&&E.MIN_VALUE<=e&&e<=E.MAX_VALUE},(L=N||(N={})).create=function(e,t){return e===Number.MAX_VALUE&&(e=I.MAX_VALUE),t===Number.MAX_VALUE&&(t=I.MAX_VALUE),{line:e,character:t}},L.is=function(e){let t=e;return ln.objectLiteral(t)&&ln.uinteger(t.line)&&ln.uinteger(t.character)},(M=P||(P={})).create=function(e,t,n,r){if(ln.uinteger(e)&&ln.uinteger(t)&&ln.uinteger(n)&&ln.uinteger(r))return{start:N.create(e,t),end:N.create(n,r)};if(N.is(e)&&N.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)},M.is=function(e){let t=e;return ln.objectLiteral(t)&&N.is(t.start)&&N.is(t.end)},(j=V||(V={})).create=function(e,t){return{uri:e,range:t}},j.is=function(e){let t=e;return ln.objectLiteral(t)&&P.is(t.range)&&(ln.string(t.uri)||ln.undefined(t.uri))},(F=$||($={})).create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},F.is=function(e){let t=e;return ln.objectLiteral(t)&&P.is(t.targetRange)&&ln.string(t.targetUri)&&P.is(t.targetSelectionRange)&&(P.is(t.originSelectionRange)||ln.undefined(t.originSelectionRange))},(R=_||(_={})).create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},R.is=function(e){const t=e;return ln.objectLiteral(t)&&ln.numberRange(t.red,0,1)&&ln.numberRange(t.green,0,1)&&ln.numberRange(t.blue,0,1)&&ln.numberRange(t.alpha,0,1)},(U=D||(D={})).create=function(e,t){return{range:e,color:t}},U.is=function(e){const t=e;return ln.objectLiteral(t)&&P.is(t.range)&&_.is(t.color)},(q=B||(B={})).create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},q.is=function(e){const t=e;return ln.objectLiteral(t)&&ln.string(t.label)&&(ln.undefined(t.textEdit)||se.is(t))&&(ln.undefined(t.additionalTextEdits)||ln.typedArray(t.additionalTextEdits,se.is))},(J=K||(K={})).Comment="comment",J.Imports="imports",J.Region="region",(z=W||(W={})).create=function(e,t,n,r,i,s){const o={startLine:e,endLine:t};return ln.defined(n)&&(o.startCharacter=n),ln.defined(r)&&(o.endCharacter=r),ln.defined(i)&&(o.kind=i),ln.defined(s)&&(o.collapsedText=s),o},z.is=function(e){const t=e;return ln.objectLiteral(t)&&ln.uinteger(t.startLine)&&ln.uinteger(t.startLine)&&(ln.undefined(t.startCharacter)||ln.uinteger(t.startCharacter))&&(ln.undefined(t.endCharacter)||ln.uinteger(t.endCharacter))&&(ln.undefined(t.kind)||ln.string(t.kind))},(G=H||(H={})).create=function(e,t){return{location:e,message:t}},G.is=function(e){let t=e;return ln.defined(t)&&V.is(t.location)&&ln.string(t.message)},(Z=X||(X={})).Error=1,Z.Warning=2,Z.Information=3,Z.Hint=4,(Y=Q||(Q={})).Unnecessary=1,Y.Deprecated=2,(ee||(ee={})).is=function(e){const t=e;return ln.objectLiteral(t)&&ln.string(t.href)},(ne=te||(te={})).create=function(e,t,n,r,i,s){let o={range:e,message:t};return ln.defined(n)&&(o.severity=n),ln.defined(r)&&(o.code=r),ln.defined(i)&&(o.source=i),ln.defined(s)&&(o.relatedInformation=s),o},ne.is=function(e){var t;let n=e;return ln.defined(n)&&P.is(n.range)&&ln.string(n.message)&&(ln.number(n.severity)||ln.undefined(n.severity))&&(ln.integer(n.code)||ln.string(n.code)||ln.undefined(n.code))&&(ln.undefined(n.codeDescription)||ln.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(ln.string(n.source)||ln.undefined(n.source))&&(ln.undefined(n.relatedInformation)||ln.typedArray(n.relatedInformation,H.is))},(ie=re||(re={})).create=function(e,t,...n){let r={title:e,command:t};return ln.defined(n)&&n.length>0&&(r.arguments=n),r},ie.is=function(e){let t=e;return ln.defined(t)&&ln.string(t.title)&&ln.string(t.command)},(oe=se||(se={})).replace=function(e,t){return{range:e,newText:t}},oe.insert=function(e,t){return{range:{start:e,end:e},newText:t}},oe.del=function(e){return{range:e,newText:""}},oe.is=function(e){const t=e;return ln.objectLiteral(t)&&ln.string(t.newText)&&P.is(t.range)},(ce=ae||(ae={})).create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},ce.is=function(e){const t=e;return ln.objectLiteral(t)&&ln.string(t.label)&&(ln.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(ln.string(t.description)||void 0===t.description)},(le||(le={})).is=function(e){const t=e;return ln.string(t)},(fe=ue||(ue={})).replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},fe.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},fe.del=function(e,t){return{range:e,newText:"",annotationId:t}},fe.is=function(e){const t=e;return se.is(t)&&(ae.is(t.annotationId)||le.is(t.annotationId))},(de=he||(he={})).create=function(e,t){return{textDocument:e,edits:t}},de.is=function(e){let t=e;return ln.defined(t)&&Ce.is(t.textDocument)&&Array.isArray(t.edits)},(pe=me||(me={})).create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},pe.is=function(e){let t=e;return t&&"create"===t.kind&&ln.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||ln.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ln.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||le.is(t.annotationId))},(ye=ge||(ge={})).create=function(e,t,n,r){let i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},ye.is=function(e){let t=e;return t&&"rename"===t.kind&&ln.string(t.oldUri)&&ln.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||ln.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ln.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||le.is(t.annotationId))},(ve=be||(be={})).create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},ve.is=function(e){let t=e;return t&&"delete"===t.kind&&ln.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||ln.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||ln.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||le.is(t.annotationId))},(xe||(xe={})).is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(e=>ln.string(e.kind)?me.is(e)||ge.is(e)||be.is(e):he.is(e)))},(Se=ke||(ke={})).create=function(e){return{uri:e}},Se.is=function(e){let t=e;return ln.defined(t)&&ln.string(t.uri)},(Te=Ae||(Ae={})).create=function(e,t){return{uri:e,version:t}},Te.is=function(e){let t=e;return ln.defined(t)&&ln.string(t.uri)&&ln.integer(t.version)},(we=Ce||(Ce={})).create=function(e,t){return{uri:e,version:t}},we.is=function(e){let t=e;return ln.defined(t)&&ln.string(t.uri)&&(null===t.version||ln.integer(t.version))},(Ie=Oe||(Oe={})).create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},Ie.is=function(e){let t=e;return ln.defined(t)&&ln.string(t.uri)&&ln.string(t.languageId)&&ln.integer(t.version)&&ln.string(t.text)},(Ne=Ee||(Ee={})).PlainText="plaintext",Ne.Markdown="markdown",Ne.is=function(e){const t=e;return t===Ne.PlainText||t===Ne.Markdown},(Le||(Le={})).is=function(e){const t=e;return ln.objectLiteral(e)&&Ee.is(t.kind)&&ln.string(t.value)},(Me=Pe||(Pe={})).Text=1,Me.Method=2,Me.Function=3,Me.Constructor=4,Me.Field=5,Me.Variable=6,Me.Class=7,Me.Interface=8,Me.Module=9,Me.Property=10,Me.Unit=11,Me.Value=12,Me.Enum=13,Me.Keyword=14,Me.Snippet=15,Me.Color=16,Me.File=17,Me.Reference=18,Me.Folder=19,Me.EnumMember=20,Me.Constant=21,Me.Struct=22,Me.Event=23,Me.Operator=24,Me.TypeParameter=25,(je=Ve||(Ve={})).PlainText=1,je.Snippet=2,($e||($e={})).Deprecated=1,(_e=Fe||(Fe={})).create=function(e,t,n){return{newText:e,insert:t,replace:n}},_e.is=function(e){const t=e;return t&&ln.string(t.newText)&&P.is(t.insert)&&P.is(t.replace)},(De=Re||(Re={})).asIs=1,De.adjustIndentation=2,(Ue||(Ue={})).is=function(e){const t=e;return t&&(ln.string(t.detail)||void 0===t.detail)&&(ln.string(t.description)||void 0===t.description)},(Be||(Be={})).create=function(e){return{label:e}},(qe||(qe={})).create=function(e,t){return{items:e||[],isIncomplete:!!t}},(Je=Ke||(Ke={})).fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},Je.is=function(e){const t=e;return ln.string(t)||ln.objectLiteral(t)&&ln.string(t.language)&&ln.string(t.value)},(We||(We={})).is=function(e){let t=e;return!!t&&ln.objectLiteral(t)&&(Le.is(t.contents)||Ke.is(t.contents)||ln.typedArray(t.contents,Ke.is))&&(void 0===e.range||P.is(e.range))},(ze||(ze={})).create=function(e,t){return t?{label:e,documentation:t}:{label:e}},(He||(He={})).create=function(e,t,...n){let r={label:e};return ln.defined(t)&&(r.documentation=t),ln.defined(n)?r.parameters=n:r.parameters=[],r},(Xe=Ge||(Ge={})).Text=1,Xe.Read=2,Xe.Write=3,(Ze||(Ze={})).create=function(e,t){let n={range:e};return ln.number(t)&&(n.kind=t),n},(Ye=Qe||(Qe={})).File=1,Ye.Module=2,Ye.Namespace=3,Ye.Package=4,Ye.Class=5,Ye.Method=6,Ye.Property=7,Ye.Field=8,Ye.Constructor=9,Ye.Enum=10,Ye.Interface=11,Ye.Function=12,Ye.Variable=13,Ye.Constant=14,Ye.String=15,Ye.Number=16,Ye.Boolean=17,Ye.Array=18,Ye.Object=19,Ye.Key=20,Ye.Null=21,Ye.EnumMember=22,Ye.Struct=23,Ye.Event=24,Ye.Operator=25,Ye.TypeParameter=26,(et||(et={})).Deprecated=1,(tt||(tt={})).create=function(e,t,n,r,i){let s={name:e,kind:t,location:{uri:r,range:n}};return i&&(s.containerName=i),s},(nt||(nt={})).create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}},(it=rt||(rt={})).create=function(e,t,n,r,i,s){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==s&&(o.children=s),o},it.is=function(e){let t=e;return t&&ln.string(t.name)&&ln.number(t.kind)&&P.is(t.range)&&P.is(t.selectionRange)&&(void 0===t.detail||ln.string(t.detail))&&(void 0===t.deprecated||ln.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))},(ot=st||(st={})).Empty="",ot.QuickFix="quickfix",ot.Refactor="refactor",ot.RefactorExtract="refactor.extract",ot.RefactorInline="refactor.inline",ot.RefactorRewrite="refactor.rewrite",ot.Source="source",ot.SourceOrganizeImports="source.organizeImports",ot.SourceFixAll="source.fixAll",(ct=at||(at={})).Invoked=1,ct.Automatic=2,(ut=lt||(lt={})).create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},ut.is=function(e){let t=e;return ln.defined(t)&&ln.typedArray(t.diagnostics,te.is)&&(void 0===t.only||ln.typedArray(t.only,ln.string))&&(void 0===t.triggerKind||t.triggerKind===at.Invoked||t.triggerKind===at.Automatic)},(ht=ft||(ft={})).create=function(e,t,n){let r={title:e},i=!0;return"string"==typeof t?(i=!1,r.kind=t):re.is(t)?r.command=t:r.edit=t,i&&void 0!==n&&(r.kind=n),r},ht.is=function(e){let t=e;return t&&ln.string(t.title)&&(void 0===t.diagnostics||ln.typedArray(t.diagnostics,te.is))&&(void 0===t.kind||ln.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||re.is(t.command))&&(void 0===t.isPreferred||ln.boolean(t.isPreferred))&&(void 0===t.edit||xe.is(t.edit))},(mt=dt||(dt={})).create=function(e,t){let n={range:e};return ln.defined(t)&&(n.data=t),n},mt.is=function(e){let t=e;return ln.defined(t)&&P.is(t.range)&&(ln.undefined(t.command)||re.is(t.command))},(gt=pt||(pt={})).create=function(e,t){return{tabSize:e,insertSpaces:t}},gt.is=function(e){let t=e;return ln.defined(t)&&ln.uinteger(t.tabSize)&&ln.boolean(t.insertSpaces)},(bt=yt||(yt={})).create=function(e,t,n){return{range:e,target:t,data:n}},bt.is=function(e){let t=e;return ln.defined(t)&&P.is(t.range)&&(ln.undefined(t.target)||ln.string(t.target))},(xt=vt||(vt={})).create=function(e,t){return{range:e,parent:t}},xt.is=function(e){let t=e;return ln.objectLiteral(t)&&P.is(t.range)&&(void 0===t.parent||xt.is(t.parent))},(St=kt||(kt={})).namespace="namespace",St.type="type",St.class="class",St.enum="enum",St.interface="interface",St.struct="struct",St.typeParameter="typeParameter",St.parameter="parameter",St.variable="variable",St.property="property",St.enumMember="enumMember",St.event="event",St.function="function",St.method="method",St.macro="macro",St.keyword="keyword",St.modifier="modifier",St.comment="comment",St.string="string",St.number="number",St.regexp="regexp",St.operator="operator",St.decorator="decorator",(Tt=At||(At={})).declaration="declaration",Tt.definition="definition",Tt.readonly="readonly",Tt.static="static",Tt.deprecated="deprecated",Tt.abstract="abstract",Tt.async="async",Tt.modification="modification",Tt.documentation="documentation",Tt.defaultLibrary="defaultLibrary",(Ct||(Ct={})).is=function(e){const t=e;return ln.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])},(Ot=wt||(wt={})).create=function(e,t){return{range:e,text:t}},Ot.is=function(e){const t=e;return null!=t&&P.is(t.range)&&ln.string(t.text)},(Et=It||(It={})).create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},Et.is=function(e){const t=e;return null!=t&&P.is(t.range)&&ln.boolean(t.caseSensitiveLookup)&&(ln.string(t.variableName)||void 0===t.variableName)},(Lt=Nt||(Nt={})).create=function(e,t){return{range:e,expression:t}},Lt.is=function(e){const t=e;return null!=t&&P.is(t.range)&&(ln.string(t.expression)||void 0===t.expression)},(Mt=Pt||(Pt={})).create=function(e,t){return{frameId:e,stoppedLocation:t}},Mt.is=function(e){const t=e;return ln.defined(t)&&P.is(e.stoppedLocation)},(jt=Vt||(Vt={})).Type=1,jt.Parameter=2,jt.is=function(e){return 1===e||2===e},(Ft=$t||($t={})).create=function(e){return{value:e}},Ft.is=function(e){const t=e;return ln.objectLiteral(t)&&(void 0===t.tooltip||ln.string(t.tooltip)||Le.is(t.tooltip))&&(void 0===t.location||V.is(t.location))&&(void 0===t.command||re.is(t.command))},(Rt=_t||(_t={})).create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},Rt.is=function(e){const t=e;return ln.objectLiteral(t)&&N.is(t.position)&&(ln.string(t.label)||ln.typedArray(t.label,$t.is))&&(void 0===t.kind||Vt.is(t.kind))&&void 0===t.textEdits||ln.typedArray(t.textEdits,se.is)&&(void 0===t.tooltip||ln.string(t.tooltip)||Le.is(t.tooltip))&&(void 0===t.paddingLeft||ln.boolean(t.paddingLeft))&&(void 0===t.paddingRight||ln.boolean(t.paddingRight))},(Dt||(Dt={})).createSnippet=function(e){return{kind:"snippet",value:e}},(Ut||(Ut={})).create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}},(Bt||(Bt={})).create=function(e){return{items:e}},(Kt=qt||(qt={})).Invoked=0,Kt.Automatic=1,(Jt||(Jt={})).create=function(e,t){return{range:e,text:t}},(Wt||(Wt={})).create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}},(zt||(zt={})).is=function(e){const t=e;return ln.objectLiteral(t)&&C.is(t.uri)&&ln.string(t.name)},function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,i=e.slice(0,r),s=e.slice(r);t(i,n),t(s,n);let o=0,a=0,c=0;for(;o<i.length&&a<s.length;){let t=n(i[o],s[a]);e[c++]=t<=0?i[o++]:s[a++]}for(;o<i.length;)e[c++]=i[o++];for(;a<s.length;)e[c++]=s[a++];return e}e.create=function(e,t,n,r){return new un(e,t,n,r)},e.is=function(e){let t=e;return!!(ln.defined(t)&&ln.string(t.uri)&&(ln.undefined(t.languageId)||ln.string(t.languageId))&&ln.uinteger(t.lineCount)&&ln.func(t.getText)&&ln.func(t.positionAt)&&ln.func(t.offsetAt))},e.applyEdits=function(e,n){let r=e.getText(),i=t(n,(e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}),s=r.length;for(let t=i.length-1;t>=0;t--){let n=i[t],o=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=s))throw new Error("Overlapping edit");r=r.substring(0,o)+n.newText+r.substring(a,r.length),s=o}return r}}(Ht||(Ht={}));var ln,un=class{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&(e.push(r),n=!1);let i=t.charAt(r);n="\r"===i||"\n"===i,"\r"===i&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return N.create(0,e);for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return N.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}};!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(ln||(ln={}));var fn,hn,dn,mn,pn,gn,yn,bn=class e{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(t,n){for(let n of t)if(e.isIncremental(n)){const e=kn(n.range),t=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);const i=Math.max(e.start.line,0),s=Math.max(e.end.line,0);let o=this._lineOffsets;const a=xn(n.text,!1,t);if(s-i===a.length)for(let e=0,t=a.length;e<t;e++)o[e+i+1]=a[e];else a.length<1e4?o.splice(i+1,s-i,...a):this._lineOffsets=o=o.slice(0,i+1).concat(a,o.slice(s+1));const c=n.text.length-(r-t);if(0!==c)for(let e=i+1+a.length,t=o.length;e<t;e++)o[e]=o[e]+c}else{if(!e.isFull(n))throw new Error("Unknown change event received");this._content=n.text,this._lineOffsets=void 0}this._version=n}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=xn(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return{line:0,character:e};for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}};function vn(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);vn(r,t),vn(i,t);let s=0,o=0,a=0;for(;s<r.length&&o<i.length;){let n=t(r[s],i[o]);e[a++]=n<=0?r[s++]:i[o++]}for(;s<r.length;)e[a++]=r[s++];for(;o<i.length;)e[a++]=i[o++];return e}function xn(e,t,n=0){const r=t?[n]:[];for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);13!==i&&10!==i||(13===i&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,r.push(n+t+1))}return r}function kn(e){const t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Sn(e){const t=kn(e.range);return t!==e.range?{newText:e.newText,range:t}:e}function An(...e){const t=e[0];let n,r,i;if("string"==typeof t)n=t,r=t,e.splice(0,1),i=e&&"object"==typeof e[0]?e[0]:e;else{if(t instanceof Array){const n=e.slice(1);if(t.length!==n.length+1)throw new Error("expected a string as the first argument to l10n.t");let r=t[0];for(let e=1;e<t.length;e++)r+=`{${e-1}}`+t[e];return An(r,...n)}r=t.message,n=r,t.comment&&t.comment.length>0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),i=t.args??{}}return s=r,o=i,0===Object.keys(o).length?s:s.replace(Tn,(e,t)=>o[t]??e);var s,o}(hn=fn||(fn={})).create=function(e,t,n,r){return new bn(e,t,n,r)},hn.update=function(e,t,n){if(e instanceof bn)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},hn.applyEdits=function(e,t){let n=e.getText(),r=vn(t.map(Sn),(e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}),i=0;const s=[];for(const t of r){let r=e.offsetAt(t.range.start);if(r<i)throw new Error("Overlapping edit");r>i&&s.push(n.substring(i,r)),t.newText.length&&s.push(t.newText),i=e.offsetAt(t.range.end)}return s.push(n.substr(i)),s.join("")},(mn=dn||(dn={}))[mn.Undefined=0]="Undefined",mn[mn.EnumValueMismatch=1]="EnumValueMismatch",mn[mn.Deprecated=2]="Deprecated",mn[mn.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",mn[mn.UnexpectedEndOfString=258]="UnexpectedEndOfString",mn[mn.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",mn[mn.InvalidUnicode=260]="InvalidUnicode",mn[mn.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",mn[mn.InvalidCharacter=262]="InvalidCharacter",mn[mn.PropertyExpected=513]="PropertyExpected",mn[mn.CommaExpected=514]="CommaExpected",mn[mn.ColonExpected=515]="ColonExpected",mn[mn.ValueExpected=516]="ValueExpected",mn[mn.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",mn[mn.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",mn[mn.TrailingComma=519]="TrailingComma",mn[mn.DuplicateKey=520]="DuplicateKey",mn[mn.CommentNotPermitted=521]="CommentNotPermitted",mn[mn.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",mn[mn.SchemaResolveError=768]="SchemaResolveError",mn[mn.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature",(gn=pn||(pn={}))[gn.v3=3]="v3",gn[gn.v4=4]="v4",gn[gn.v6=6]="v6",gn[gn.v7=7]="v7",gn[gn.v2019_09=19]="v2019_09",gn[gn.v2020_12=20]="v2020_12",(yn||(yn={})).LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Ee.Markdown,Ee.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}};var Tn=/{([^}]+)}/g;var Cn,wn,On={"color-hex":{errorMessage:An("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:An("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:An("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:An("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:An("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:An("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:An("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:An("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}},In=class{constructor(e,t,n=0){this.offset=t,this.length=n,this.parent=e}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}},En=class extends In{constructor(e,t){super(e,t),this.type="null",this.value=null}},Nn=class extends In{constructor(e,t,n){super(e,n),this.type="boolean",this.value=t}},Ln=class extends In{constructor(e,t){super(e,t),this.type="array",this.items=[]}get children(){return this.items}},Pn=class extends In{constructor(e,t){super(e,t),this.type="number",this.isInteger=!0,this.value=Number.NaN}},Mn=class extends In{constructor(e,t,n){super(e,t,n),this.type="string",this.value=""}},Vn=class extends In{constructor(e,t,n){super(e,t),this.type="property",this.colonOffset=-1,this.keyNode=n}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},jn=class extends In{constructor(e,t){super(e,t),this.type="object",this.properties=[]}get children(){return this.properties}};function $n(e){return nn(e)?e?{}:{not:{}}:e}(wn=Cn||(Cn={}))[wn.Key=0]="Key",wn[wn.Enum=1]="Enum";var Fn={"http://json-schema.org/draft-03/schema#":pn.v3,"http://json-schema.org/draft-04/schema#":pn.v4,"http://json-schema.org/draft-06/schema#":pn.v6,"http://json-schema.org/draft-07/schema#":pn.v7,"https://json-schema.org/draft/2019-09/schema":pn.v2019_09,"https://json-schema.org/draft/2020-12/schema":pn.v2020_12},_n=class{constructor(e){this.schemaDraft=e}},Rn=class e{constructor(e=-1,t){this.focusOffset=e,this.exclude=t,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){Array.prototype.push.apply(this.schemas,e.schemas)}include(e){return(-1===this.focusOffset||Kn(e,this.focusOffset))&&e!==this.exclude}newSub(){return new e(-1,this.exclude)}},Dn=class{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}};Dn.instance=new Dn;var Un=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(const e of this.problems)e.code===dn.EnumValueMismatch&&(e.message=An("Value is not accepted. Valid values: {0}.",this.enumValues.map(e=>JSON.stringify(e)).join(", ")))}}mergePropertyMatch(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&1===e.enumValues.length&&this.primaryValueMatches++}mergeProcessedProperties(e){e.processedProperties.forEach(e=>this.processedProperties.add(e))}compare(e){const t=this.hasProblems();return t!==e.hasProblems()?t?-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 Bn(e){return Qt(e)}function qn(e){return Zt(e)}function Kn(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}var Jn=class{constructor(e,t=[],n=[]){this.root=e,this.syntaxErrors=t,this.comments=n}getNodeFromOffset(e,t=!1){if(this.root)return Xt(this.root,e,t)}visit(e){if(this.root){const t=n=>{let r=e(n);const i=n.children;if(Array.isArray(i))for(let e=0;e<i.length&&r;e++)r=t(i[e]);return r};t(this.root)}}validate(e,t,n=X.Warning,r){if(this.root&&t){const i=new Un;return zn(this.root,t,i,Dn.instance,new _n(r??Wn(t))),i.problems.map(t=>{const r=P.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return te.create(r,t.message,t.severity??n,t.code)})}}getMatchingSchemas(e,t=-1,n){if(this.root&&e){const r=new Rn(t,n),i=Wn(e),s=new _n(i);return zn(this.root,e,new Un,r,s),r.schemas}return[]}};function Wn(e,t=pn.v2020_12){let n=e.$schema;return n?Fn[n]??t:t}function zn(e,t,n,r,i){if(!e||!r.include(e))return;if("property"===e.type)return zn(e.valueNode,t,n,r,i);const s=e;switch(function(){function e(e){return s.type===e||"integer"===e&&"number"===s.type&&s.isInteger}if(Array.isArray(t.type)?t.type.some(e)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||An("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(e(t.type)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||An('Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(const e of t.allOf){const t=new Un,o=r.newSub();zn(s,$n(e),t,o,i),n.merge(t),r.merge(o)}const o=$n(t.not);if(o){const e=new Un,a=r.newSub();zn(s,o,e,a,i),e.hasProblems()||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||An("Matches a schema that is not allowed.")});for(const e of a.schemas)e.inverted=!e.inverted,r.add(e)}const a=(e,t)=>{const o=[];let a;for(const n of e){const e=$n(n),c=new Un,l=r.newSub();if(zn(s,e,c,l,i),c.hasProblems()||o.push(e),a)if(t||c.hasProblems()||a.validationResult.hasProblems()){const t=c.compare(a.validationResult);t>0?a={schema:e,validationResult:c,matchingSchemas:l}:0===t&&(a.matchingSchemas.merge(l),a.validationResult.mergeEnumValues(c))}else a.matchingSchemas.merge(l),a.validationResult.propertiesMatches+=c.propertiesMatches,a.validationResult.propertiesValueMatches+=c.propertiesValueMatches,a.validationResult.mergeProcessedProperties(c);else a={schema:e,validationResult:c,matchingSchemas:l}}return o.length>1&&t&&n.problems.push({location:{offset:s.offset,length:1},message:An("Matches multiple schemas when only one must validate.")}),a&&(n.merge(a.validationResult),r.merge(a.matchingSchemas)),o.length};Array.isArray(t.anyOf)&&a(t.anyOf,!1),Array.isArray(t.oneOf)&&a(t.oneOf,!0);const c=e=>{const t=new Un,o=r.newSub();zn(s,$n(e),t,o,i),n.merge(t),r.merge(o)},l=$n(t.if);if(l&&((e,t,o)=>{const a=$n(e),l=new Un,u=r.newSub();zn(s,a,l,u,i),r.merge(u),n.mergeProcessedProperties(l),l.hasProblems()?o&&c(o):t&&c(t)})(l,$n(t.then),$n(t.else)),Array.isArray(t.enum)){const e=Bn(s);let r=!1;for(const n of t.enum)if(Yt(e,n)){r=!0;break}n.enumValues=t.enum,n.enumValueMatch=r,r||n.problems.push({location:{offset:s.offset,length:s.length},code:dn.EnumValueMismatch,message:t.errorMessage||An("Value is not accepted. Valid values: {0}.",t.enum.map(e=>JSON.stringify(e)).join(", "))})}tn(t.const)&&(Yt(Bn(s),t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:s.offset,length:s.length},code:dn.EnumValueMismatch,message:t.errorMessage||An("Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]);let u=t.deprecationMessage;if(u||t.deprecated){u=u||An("Value is deprecated");let e="property"===s.parent?.type?s.parent:s;n.problems.push({location:{offset:e.offset,length:e.length},severity:X.Warning,message:u,code:dn.Deprecated})}}(),s.type){case"object":!function(e){const s=Object.create(null),o=new Set;for(const t of e.properties){const e=t.keyNode.value;s[e]=t.valueNode,o.add(e)}if(Array.isArray(t.required))for(const r of t.required)if(!s[r]){const t=e.parent&&"property"===e.parent.type&&e.parent.keyNode,i=t?{offset:t.offset,length:t.length}:{offset:e.offset,length:1};n.problems.push({location:i,message:An('Missing property "{0}".',r)})}const a=e=>{o.delete(e),n.processedProperties.add(e)};if(t.properties)for(const e of Object.keys(t.properties)){a(e);const o=t.properties[e],c=s[e];if(c)if(nn(o))if(o)n.propertiesMatches++,n.propertiesValueMatches++;else{const r=c.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||An("Property {0} is not allowed.",e)})}else{const e=new Un;zn(c,o,e,r,i),n.mergePropertyMatch(e)}}if(t.patternProperties)for(const e of Object.keys(t.patternProperties)){const c=an(e);if(c){const l=[];for(const a of o)if(c.test(a)){l.push(a);const o=s[a];if(o){const s=t.patternProperties[e];if(nn(s))if(s)n.propertiesMatches++,n.propertiesValueMatches++;else{const e=o.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||An("Property {0} is not allowed.",a)})}else{const e=new Un;zn(o,s,e,r,i),n.mergePropertyMatch(e)}}}l.forEach(a)}}const c=t.additionalProperties;if(void 0!==c)for(const e of o){a(e);const o=s[e];if(o)if(!1===c){const r=o.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||An("Property {0} is not allowed.",e)})}else if(!0!==c){const e=new Un;zn(o,c,e,r,i),n.mergePropertyMatch(e)}}const l=t.unevaluatedProperties;if(void 0!==l){const e=[];for(const a of o)if(!n.processedProperties.has(a)){e.push(a);const o=s[a];if(o)if(!1===l){const e=o.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||An("Property {0} is not allowed.",a)})}else if(!0!==l){const e=new Un;zn(o,l,e,r,i),n.mergePropertyMatch(e)}}e.forEach(a)}if(en(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:An("Object has more properties than limit of {0}.",t.maxProperties)}),en(t.minProperties)&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:An("Object has fewer properties than the required number of {0}",t.minProperties)}),t.dependentRequired)for(const e in t.dependentRequired){const n=s[e],r=t.dependentRequired[e];n&&Array.isArray(r)&&f(e,r)}if(t.dependentSchemas)for(const e in t.dependentSchemas){const n=s[e],r=t.dependentSchemas[e];n&&sn(r)&&f(e,r)}if(t.dependencies)for(const e in t.dependencies)s[e]&&f(e,t.dependencies[e]);const u=$n(t.propertyNames);if(u)for(const t of e.properties){const e=t.keyNode;e&&zn(e,u,n,Dn.instance,i)}function f(t,o){if(Array.isArray(o))for(const r of o)s[r]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},message:An("Object is missing property {0} required by property {1}.",r,t)});else{const t=$n(o);if(t){const s=new Un;zn(e,t,s,r,i),n.mergePropertyMatch(s)}}}}(s);break;case"array":!function(e){let s,o;i.schemaDraft>=pn.v2020_12?(s=t.prefixItems,o=Array.isArray(t.items)?void 0:t.items):(s=Array.isArray(t.items)?t.items:void 0,o=Array.isArray(t.items)?t.additionalItems:t.items);let a=0;if(void 0!==s){const t=Math.min(s.length,e.items.length);for(;a<t;a++){const t=$n(s[a]),o=new Un,c=e.items[a];c&&(zn(c,t,o,r,i),n.mergePropertyMatch(o)),n.processedProperties.add(String(a))}}if(void 0!==o&&a<e.items.length)if("boolean"==typeof o)for(!1===o&&n.problems.push({location:{offset:e.offset,length:e.length},message:An("Array has too many items according to schema. Expected {0} or fewer.",a)});a<e.items.length;a++)n.processedProperties.add(String(a)),n.propertiesValueMatches++;else for(;a<e.items.length;a++){const t=new Un;zn(e.items[a],o,t,r,i),n.mergePropertyMatch(t),n.processedProperties.add(String(a))}const c=$n(t.contains);if(c){let r=0;for(let t=0;t<e.items.length;t++){const s=e.items[t],o=new Un;zn(s,c,o,Dn.instance,i),o.hasProblems()||(r++,i.schemaDraft>=pn.v2020_12&&n.processedProperties.add(String(t)))}0!==r||en(t.minContains)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||An("Array does not contain required item.")}),en(t.minContains)&&r<t.minContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||An("Array has too few items that match the contains contraint. Expected {0} or more.",t.minContains)}),en(t.maxContains)&&r>t.maxContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||An("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}const l=t.unevaluatedItems;if(void 0!==l)for(let s=0;s<e.items.length;s++){if(!n.processedProperties.has(String(s)))if(!1===l)n.problems.push({location:{offset:e.offset,length:e.length},message:An("Item does not match any validation rule from the array.")});else{const o=new Un;zn(e.items[s],t.unevaluatedItems,o,r,i),n.mergePropertyMatch(o)}n.processedProperties.add(String(s)),n.propertiesValueMatches++}if(en(t.minItems)&&e.items.length<t.minItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:An("Array has too few items. Expected {0} or more.",t.minItems)}),en(t.maxItems)&&e.items.length>t.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:An("Array has too many items. Expected {0} or fewer.",t.maxItems)}),!0===t.uniqueItems){let t=function(){for(let e=0;e<r.length-1;e++){const t=r[e];for(let n=e+1;n<r.length;n++)if(Yt(t,r[n]))return!0}return!1};const r=Bn(e);t()&&n.problems.push({location:{offset:e.offset,length:e.length},message:An("Array has duplicate items.")})}}(s);break;case"string":!function(e){if(en(t.minLength)&&cn(e.value)<t.minLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:An("String is shorter than the minimum length of {0}.",t.minLength)}),en(t.maxLength)&&cn(e.value)>t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:An("String is longer than the maximum length of {0}.",t.maxLength)}),rn(t.pattern)){const r=an(t.pattern);r?.test(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||An('String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":{let r;if(e.value){const n=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);n?n[2]||"uri"!==t.format||(r=An("URI with a scheme is expected.")):r=An("URI is expected.")}else r=An("URI expected.");r&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||An("String is not a URI: {0}",r)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":const r=On[t.format];e.value&&r.pattern.exec(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||r.errorMessage})}}(s);break;case"number":!function(e){const r=e.value;function i(e){const t=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(e.toString());return t&&{value:Number(t[1]+(t[2]||"")),multiplier:(t[2]?.length||0)-(parseInt(t[3])||0)}}if(en(t.multipleOf)){let s=-1;if(Number.isInteger(t.multipleOf))s=r%t.multipleOf;else{let e=i(t.multipleOf),n=i(r);if(e&&n){const t=10**Math.abs(n.multiplier-e.multiplier);n.multiplier<e.multiplier?n.value*=t:e.value*=t,s=n.value%e.value}}0!==s&&n.problems.push({location:{offset:e.offset,length:e.length},message:An("Value is not divisible by {0}.",t.multipleOf)})}function s(e,t){return en(t)?t:nn(t)&&t?e:void 0}function o(e,t){if(!nn(t)||!t)return e}const a=s(t.minimum,t.exclusiveMinimum);en(a)&&r<=a&&n.problems.push({location:{offset:e.offset,length:e.length},message:An("Value is below the exclusive minimum of {0}.",a)});const c=s(t.maximum,t.exclusiveMaximum);en(c)&&r>=c&&n.problems.push({location:{offset:e.offset,length:e.length},message:An("Value is above the exclusive maximum of {0}.",c)});const l=o(t.minimum,t.exclusiveMinimum);en(l)&&r<l&&n.problems.push({location:{offset:e.offset,length:e.length},message:An("Value is below the minimum of {0}.",l)});const u=o(t.maximum,t.exclusiveMaximum);en(u)&&r>u&&n.problems.push({location:{offset:e.offset,length:e.length},message:An("Value is above the maximum of {0}.",u)})}(s)}r.add({node:s,schema:t})}function Hn(e,t,n){if(null!==e&&"object"==typeof e){const r=t+"\t";if(Array.isArray(e)){if(0===e.length)return"[]";let i="[\n";for(let t=0;t<e.length;t++)i+=r+Hn(e[t],r,n),t<e.length-1&&(i+=","),i+="\n";return i+=t+"]",i}{const i=Object.keys(e);if(0===i.length)return"{}";let s="{\n";for(let t=0;t<i.length;t++){const o=i[t];s+=r+JSON.stringify(o)+": "+Hn(e[o],r,n),t<i.length-1&&(s+=","),s+="\n"}return s+=t+"}",s}}return n(e)}var Gn=class{constructor(e,t=[],n=Promise,r={}){this.schemaService=e,this.contributions=t,this.promiseConstructor=n,this.clientCapabilities=r}doResolve(e){for(let t=this.contributions.length-1;t>=0;t--){const n=this.contributions[t].resolveCompletion;if(n){const t=n(e);if(t)return t}}return this.promiseConstructor.resolve(e)}doComplete(e,t,n){const r={items:[],isIncomplete:!1},i=e.getText(),s=e.offsetAt(t);let o=n.getNodeFromOffset(s,!0);if(this.isInComment(e,o?o.offset:0,s))return Promise.resolve(r);if(o&&s===o.offset+o.length&&s>0){const e=i[s-1];("object"===o.type&&"}"===e||"array"===o.type&&"]"===e)&&(o=o.parent)}const a=this.getCurrentWord(e,s);let c;if(!o||"string"!==o.type&&"number"!==o.type&&"boolean"!==o.type&&"null"!==o.type){let n=s-a.length;n>0&&'"'===i[n-1]&&n--,c=P.create(e.positionAt(n),t)}else c=P.create(e.positionAt(o.offset),e.positionAt(o.offset+o.length));const l=new Map,u={add:e=>{let t=e.label;const n=l.get(t);if(n)n.documentation||(n.documentation=e.documentation),n.detail||(n.detail=e.detail),n.labelDetails||(n.labelDetails=e.labelDetails);else{if(t=t.replace(/[\n]/g,"↵"),t.length>60){const e=t.substr(0,57).trim()+"...";l.has(e)||(t=e)}e.textEdit=se.replace(c,e.insertText),e.label=t,l.set(t,e),r.items.push(e)}},setAsIncomplete:()=>{r.isIncomplete=!0},error:e=>{console.error(e)},getNumberOfProposals:()=>r.items.length};return this.schemaService.getSchemaForResource(e.uri,n).then(t=>{const f=[];let h,d=!0,m="";if(o&&"string"===o.type){const e=o.parent;e&&"property"===e.type&&e.keyNode===o&&(d=!e.valueNode,h=e,m=i.substr(o.offset+1,o.length-2),e&&(o=e.parent))}if(o&&"object"===o.type){if(o.offset===s)return r;o.properties.forEach(e=>{h&&h===e||l.set(e.keyNode.value,Be.create("__"))});let p="";d&&(p=this.evaluateSeparatorAfter(e,e.offsetAt(c.end))),t?this.getPropertyCompletions(t,n,o,d,p,u):this.getSchemaLessPropertyCompletions(n,o,m,u);const g=qn(o);this.contributions.forEach(t=>{const n=t.collectPropertyCompletions(e.uri,g,a,d,""===p,u);n&&f.push(n)}),!t&&a.length>0&&'"'!==i.charAt(s-a.length-1)&&(u.add({kind:Pe.Property,label:this.getLabelForValue(a),insertText:this.getInsertTextForProperty(a,void 0,!1,p),insertTextFormat:Ve.Snippet,documentation:""}),u.setAsIncomplete())}const p={};return t?this.getValueCompletions(t,n,o,s,e,u,p):this.getSchemaLessValueCompletions(n,o,s,e,u),this.contributions.length>0&&this.getContributedValueCompletions(n,o,s,e,u,f),this.promiseConstructor.all(f).then(()=>{if(0===u.getNumberOfProposals()){let t=s;!o||"string"!==o.type&&"number"!==o.type&&"boolean"!==o.type&&"null"!==o.type||(t=o.offset+o.length);const n=this.evaluateSeparatorAfter(e,t);this.addFillerValueCompletions(p,n,u)}return r})})}getPropertyCompletions(e,t,n,r,i,s){t.getMatchingSchemas(e.schema,n.offset).forEach(e=>{if(e.node===n&&!e.inverted){const t=e.schema.properties;t&&Object.keys(t).forEach(e=>{const n=t[e];if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const t={kind:Pe.Property,label:e,insertText:this.getInsertTextForProperty(e,n,r,i),insertTextFormat:Ve.Snippet,filterText:this.getFilterTextForValue(e),documentation:this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(t.sortText=n.suggestSortText),t.insertText&&on(t.insertText,`$1${i}`)&&(t.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(t)}});const n=e.schema.propertyNames;if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const e=(e,t=void 0)=>{const o={kind:Pe.Property,label:e,insertText:this.getInsertTextForProperty(e,void 0,r,i),insertTextFormat:Ve.Snippet,filterText:this.getFilterTextForValue(e),documentation:t||this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(o.sortText=n.suggestSortText),o.insertText&&on(o.insertText,`$1${i}`)&&(o.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(o)};if(n.enum)for(let t=0;t<n.enum.length;t++){let r;n.markdownEnumDescriptions&&t<n.markdownEnumDescriptions.length?r=this.fromMarkup(n.markdownEnumDescriptions[t]):n.enumDescriptions&&t<n.enumDescriptions.length&&(r=n.enumDescriptions[t]),e(n.enum[t],r)}n.const&&e(n.const)}}})}getSchemaLessPropertyCompletions(e,t,n,r){const i=e=>{e.properties.forEach(e=>{const t=e.keyNode.value;r.add({kind:Pe.Property,label:t,insertText:this.getInsertTextForValue(t,""),insertTextFormat:Ve.Snippet,filterText:this.getFilterTextForValue(t),documentation:""})})};if(t.parent)if("property"===t.parent.type){const n=t.parent.keyNode.value;e.visit(e=>("property"===e.type&&e!==t.parent&&e.keyNode.value===n&&e.valueNode&&"object"===e.valueNode.type&&i(e.valueNode),!0))}else"array"===t.parent.type&&t.parent.items.forEach(e=>{"object"===e.type&&e!==t&&i(e)});else"object"===t.type&&r.add({kind:Pe.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:Ve.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(e,t,n,r,i){let s=n;if(!t||"string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(s=t.offset+t.length,t=t.parent),!t)return i.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:Ve.Snippet,documentation:""}),void i.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:Ve.Snippet,documentation:""});const o=this.evaluateSeparatorAfter(r,s),a=e=>{e.parent&&!Kn(e.parent,n,!0)&&i.add({kind:this.getSuggestionKind(e.type),label:this.getLabelTextForMatchingNode(e,r),insertText:this.getInsertTextForMatchingNode(e,r,o),insertTextFormat:Ve.Snippet,documentation:""}),"boolean"===e.type&&this.addBooleanValueCompletion(!e.value,o,i)};if("property"===t.type&&n>(t.colonOffset||0)){const r=t.valueNode;if(r&&(n>r.offset+r.length||"object"===r.type||"array"===r.type))return;const s=t.keyNode.value;e.visit(e=>("property"===e.type&&e.keyNode.value===s&&e.valueNode&&a(e.valueNode),!0)),"$schema"===s&&t.parent&&!t.parent.parent&&this.addDollarSchemaCompletions(o,i)}if("array"===t.type)if(t.parent&&"property"===t.parent.type){const n=t.parent.keyNode.value;e.visit(e=>("property"===e.type&&e.keyNode.value===n&&e.valueNode&&"array"===e.valueNode.type&&e.valueNode.items.forEach(a),!0))}else t.items.forEach(a)}getValueCompletions(e,t,n,r,i,s,o){let a,c,l=r;if(!n||"string"!==n.type&&"number"!==n.type&&"boolean"!==n.type&&"null"!==n.type||(l=n.offset+n.length,c=n,n=n.parent),n){if("property"===n.type&&r>(n.colonOffset||0)){const e=n.valueNode;if(e&&r>e.offset+e.length)return;a=n.keyNode.value,n=n.parent}if(n&&(void 0!==a||"array"===n.type)){const u=this.evaluateSeparatorAfter(i,l),f=t.getMatchingSchemas(e.schema,n.offset,c);for(const e of f)if(e.node===n&&!e.inverted&&e.schema){if("array"===n.type&&e.schema.items){let t=s;if(e.schema.uniqueItems){const e=new Set;n.children.forEach(t=>{"array"!==t.type&&"object"!==t.type&&e.add(this.getLabelForValue(Bn(t)))}),t={...s,add(t){e.has(t.label)||s.add(t)}}}if(Array.isArray(e.schema.items)){const s=this.findItemAtOffset(n,i,r);s<e.schema.items.length&&this.addSchemaValueCompletions(e.schema.items[s],u,t,o)}else this.addSchemaValueCompletions(e.schema.items,u,t,o)}if(void 0!==a){let t=!1;if(e.schema.properties){const n=e.schema.properties[a];n&&(t=!0,this.addSchemaValueCompletions(n,u,s,o))}if(e.schema.patternProperties&&!t)for(const n of Object.keys(e.schema.patternProperties)){const r=an(n);if(r?.test(a)){t=!0;const r=e.schema.patternProperties[n];this.addSchemaValueCompletions(r,u,s,o)}}if(e.schema.additionalProperties&&!t){const t=e.schema.additionalProperties;this.addSchemaValueCompletions(t,u,s,o)}}}"$schema"!==a||n.parent||this.addDollarSchemaCompletions(u,s),o.boolean&&(this.addBooleanValueCompletion(!0,u,s),this.addBooleanValueCompletion(!1,u,s)),o.null&&this.addNullValueCompletion(u,s)}}else this.addSchemaValueCompletions(e.schema,"",s,o)}getContributedValueCompletions(e,t,n,r,i,s){if(t){if("string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(t=t.parent),t&&"property"===t.type&&n>(t.colonOffset||0)){const e=t.keyNode.value,o=t.valueNode;if((!o||n<=o.offset+o.length)&&t.parent){const n=qn(t.parent);this.contributions.forEach(t=>{const o=t.collectValueCompletions(r.uri,n,e,i);o&&s.push(o)})}}}else this.contributions.forEach(e=>{const t=e.collectDefaultCompletions(r.uri,i);t&&s.push(t)})}addSchemaValueCompletions(e,t,n,r){"object"==typeof e&&(this.addEnumValueCompletions(e,t,n),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,r),Array.isArray(e.allOf)&&e.allOf.forEach(e=>this.addSchemaValueCompletions(e,t,n,r)),Array.isArray(e.anyOf)&&e.anyOf.forEach(e=>this.addSchemaValueCompletions(e,t,n,r)),Array.isArray(e.oneOf)&&e.oneOf.forEach(e=>this.addSchemaValueCompletions(e,t,n,r)))}addDefaultValueCompletions(e,t,n,r=0){let i=!1;if(tn(e.default)){let s=e.type,o=e.default;for(let e=r;e>0;e--)o=[o],s="array";const a={kind:this.getSuggestionKind(s),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,t),insertTextFormat:Ve.Snippet};this.doesSupportsLabelDetails()?a.labelDetails={description:An("Default value")}:a.detail=An("Default value"),n.add(a),i=!0}Array.isArray(e.examples)&&e.examples.forEach(s=>{let o=e.type,a=s;for(let e=r;e>0;e--)a=[a],o="array";n.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,t),insertTextFormat:Ve.Snippet}),i=!0}),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach(s=>{let o,a,c=e.type,l=s.body,u=s.label;if(tn(l)){let n=e.type;for(let e=r;e>0;e--)l=[l],n="array";o=this.getInsertTextForSnippetValue(l,t),a=this.getFilterTextForSnippetValue(l),u=u||this.getLabelForSnippetValue(l)}else{if("string"!=typeof s.bodyText)return;{let e="",n="",i="";for(let t=r;t>0;t--)e=e+i+"[\n",n=n+"\n"+i+"]",i+="\t",c="array";o=e+i+s.bodyText.split("\n").join("\n"+i)+n+t,u=u||o,a=o.replace(/[\n]/g,"")}}n.add({kind:this.getSuggestionKind(c),label:u,documentation:this.fromMarkup(s.markdownDescription)||s.description,insertText:o,insertTextFormat:Ve.Snippet,filterText:a}),i=!0}),!i&&"object"==typeof e.items&&!Array.isArray(e.items)&&r<5&&this.addDefaultValueCompletions(e.items,t,n,r+1)}addEnumValueCompletions(e,t,n){if(tn(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:Ve.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let r=0,i=e.enum.length;r<i;r++){const i=e.enum[r];let s=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&r<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?s=this.fromMarkup(e.markdownEnumDescriptions[r]):e.enumDescriptions&&r<e.enumDescriptions.length&&(s=e.enumDescriptions[r]),n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(i),insertText:this.getInsertTextForValue(i,t),insertTextFormat:Ve.Snippet,documentation:s})}}collectTypes(e,t){if(Array.isArray(e.enum)||tn(e.const))return;const n=e.type;Array.isArray(n)?n.forEach(e=>t[e]=!0):n&&(t[n]=!0)}addFillerValueCompletions(e,t,n){e.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},t),insertTextFormat:Ve.Snippet,detail:An("New object"),documentation:""}),e.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:Ve.Snippet,detail:An("New array"),documentation:""})}addBooleanValueCompletion(e,t,n){n.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,t),insertTextFormat:Ve.Snippet,documentation:""})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:Ve.Snippet,documentation:""})}addDollarSchemaCompletions(e,t){this.schemaService.getRegisteredSchemaIds(e=>"http"===e||"https"===e).forEach(n=>{n.startsWith("http://json-schema.org/draft-")&&(n+="#"),t.add({kind:Pe.Module,label:this.getLabelForValue(n),filterText:this.getFilterTextForValue(n),insertText:this.getInsertTextForValue(n,e),insertTextFormat:Ve.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,t){const n=JSON.stringify(e,null,"\t");return"{}"===n?"{$1}"+t:"[]"===n?"[$1]"+t:this.getInsertTextForPlainText(n+t)}getInsertTextForSnippetValue(e,t){return Hn(e,"",e=>"string"==typeof e&&"^"===e[0]?e.substr(1):JSON.stringify(e))+t}getInsertTextForGuessedValue(e,t){switch(typeof e){case"object":return null===e?"${1:null}"+t:this.getInsertTextForValue(e,t);case"string":let n=JSON.stringify(e);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+t;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+t}return this.getInsertTextForValue(e,t)}getSuggestionKind(e){if(Array.isArray(e)){const t=e;e=t.length>0?t[0]:void 0}if(!e)return Pe.Value;switch(e){case"string":default:return Pe.Value;case"object":return Pe.Module;case"property":return Pe.Property}}getLabelTextForMatchingNode(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:return t.getText().substr(e.offset,e.length)}}getInsertTextForMatchingNode(e,t,n){switch(e.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:const r=t.getText().substr(e.offset,e.length)+n;return this.getInsertTextForPlainText(r)}}getInsertTextForProperty(e,t,n,r){const i=this.getInsertTextForValue(e,"");if(!n)return i;const s=i+": ";let o,a=0;if(t){if(Array.isArray(t.defaultSnippets)){if(1===t.defaultSnippets.length){const e=t.defaultSnippets[0].body;tn(e)&&(o=this.getInsertTextForSnippetValue(e,""))}a+=t.defaultSnippets.length}if(t.enum&&(o||1!==t.enum.length||(o=this.getInsertTextForGuessedValue(t.enum[0],"")),a+=t.enum.length),tn(t.const)&&(o||(o=this.getInsertTextForGuessedValue(t.const,"")),a++),tn(t.default)&&(o||(o=this.getInsertTextForGuessedValue(t.default,"")),a++),Array.isArray(t.examples)&&t.examples.length&&(o||(o=this.getInsertTextForGuessedValue(t.examples[0],"")),a+=t.examples.length),0===a){let e=Array.isArray(t.type)?t.type[0]:t.type;switch(e||(t.properties?e="object":t.items&&(e="array")),e){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||a>1)&&(o="$1"),s+o+r}getCurrentWord(e,t){let n=t-1;const r=e.getText();for(;n>=0&&-1===' \t\n\r\v":{[,]}'.indexOf(r.charAt(n));)n--;return r.substring(n+1,t)}evaluateSeparatorAfter(e,t){const n=k(e.getText(),!0);switch(n.setPosition(t),n.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(e,t,n){const r=k(t.getText(),!0),i=e.items;for(let e=i.length-1;e>=0;e--){const t=i[e];if(n>t.offset+t.length)return r.setPosition(t.offset+t.length),5===r.scan()&&n>=r.getTokenOffset()+r.getTokenLength()?e+1:e;if(n>=t.offset)return e}return 0}isInComment(e,t,n){const r=k(e.getText(),!1);r.setPosition(t);let i=r.scan();for(;17!==i&&r.getTokenOffset()+r.getTokenLength()<n;)i=r.scan();return(12===i||13===i)&&r.getTokenOffset()<=n}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:Ee.Markdown,value:e}}doesSupportMarkdown(){if(!tn(this.supportsMarkdown)){const e=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&-1!==e.indexOf(Ee.Markdown)}return this.supportsMarkdown}doesSupportsCommitCharacters(){return tn(this.supportsCommitCharacters)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return tn(this.labelDetailsSupport)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}},Xn=class{constructor(e,t=[],n){this.schemaService=e,this.contributions=t,this.promise=n||Promise}doHover(e,t,n){const r=e.offsetAt(t);let i=n.getNodeFromOffset(r);if(!i||("object"===i.type||"array"===i.type)&&r>i.offset+1&&r<i.offset+i.length-1)return this.promise.resolve(null);const s=i;if("string"===i.type){const e=i.parent;if(e&&"property"===e.type&&e.keyNode===i&&(i=e.valueNode,!i))return this.promise.resolve(null)}const o=P.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length)),a=e=>({contents:e,range:o}),c=qn(i);for(let t=this.contributions.length-1;t>=0;t--){const n=this.contributions[t].getInfoContribution(e.uri,c);if(n)return n.then(e=>a(e))}return this.schemaService.getSchemaForResource(e.uri,n).then(e=>{if(e&&i){let r,s,o,c;n.getMatchingSchemas(e.schema,i.offset).every(e=>{if(e.node===i&&!e.inverted&&e.schema&&(r=r||e.schema.title,s=s||e.schema.markdownDescription||Zn(e.schema.description),e.schema.enum)){const t=e.schema.enum.indexOf(Bn(i));e.schema.markdownEnumDescriptions?o=e.schema.markdownEnumDescriptions[t]:e.schema.enumDescriptions&&(o=Zn(e.schema.enumDescriptions[t])),o&&(c=e.schema.enum[t],"string"!=typeof c&&(c=JSON.stringify(c)))}return!0});let l="";return r&&(l=Zn(r)),s&&(l.length>0&&(l+="\n\n"),l+=s),o&&(l.length>0&&(l+="\n\n"),l+=`\`${t=c,-1!==t.indexOf("`")?"`` "+t+" ``":t}\`: ${o}`),a([l])}var t;return null})}};function Zn(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3").replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}var Qn=class{constructor(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=!1!==e.validate,this.commentSeverity=e.allowComments?void 0:X.Error)}doValidation(e,t,n,r){if(!this.validationEnabled)return this.promise.resolve([]);const i=[],s={},o=e=>{const t=e.range.start.line+" "+e.range.start.character+" "+e.message;s[t]||(s[t]=!0,i.push(e))},a=r=>{let s=n?.trailingCommas?nr(n.trailingCommas):X.Error,a=n?.comments?nr(n.comments):this.commentSeverity,c=n?.schemaValidation?nr(n.schemaValidation):X.Warning,l=n?.schemaRequest?nr(n.schemaRequest):X.Warning;if(r){const i=(n,r)=>{if(t.root&&l){const i=t.root,s="object"===i.type?i.properties[0]:void 0;if(s&&"$schema"===s.keyNode.value){const t=s.valueNode||s,i=P.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length));o(te.create(i,n,l,r))}else{const t=P.create(e.positionAt(i.offset),e.positionAt(i.offset+1));o(te.create(t,n,l,r))}}};if(r.errors.length)i(r.errors[0],dn.SchemaResolveError);else if(c){for(const e of r.warnings)i(e,dn.SchemaUnsupportedFeature);const s=t.validate(e,r.schema,c,n?.schemaDraft);s&&s.forEach(o)}er(r.schema)&&(a=void 0),tr(r.schema)&&(s=void 0)}for(const e of t.syntaxErrors){if(e.code===dn.TrailingComma){if("number"!=typeof s)continue;e.severity=s}o(e)}if("number"==typeof a){const e=An("Comments are not permitted in JSON.");t.comments.forEach(t=>{o(te.create(t,e,a,dn.CommentNotPermitted))})}return i};if(r){const e=r.id||"schemaservice://untitled/"+Yn++;return this.jsonSchemaService.registerExternalSchema({uri:e,schema:r}).getResolvedSchema().then(e=>a(e))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then(e=>a(e))}getLanguageStatus(e,t){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,t)}}},Yn=0;function er(e){if(e&&"object"==typeof e){if(nn(e.allowComments))return e.allowComments;if(e.allOf)for(const t of e.allOf){const e=er(t);if(nn(e))return e}}}function tr(e){if(e&&"object"==typeof e){if(nn(e.allowTrailingCommas))return e.allowTrailingCommas;const t=e;if(nn(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(const t of e.allOf){const e=tr(t);if(nn(e))return e}}}function nr(e){switch(e){case"error":return X.Error;case"warning":return X.Warning;case"ignore":return}}function rr(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function ir(e){if("#"===e[0])switch(e.length){case 4:return{red:17*rr(e.charCodeAt(1))/255,green:17*rr(e.charCodeAt(2))/255,blue:17*rr(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*rr(e.charCodeAt(1))/255,green:17*rr(e.charCodeAt(2))/255,blue:17*rr(e.charCodeAt(3))/255,alpha:17*rr(e.charCodeAt(4))/255};case 7:return{red:(16*rr(e.charCodeAt(1))+rr(e.charCodeAt(2)))/255,green:(16*rr(e.charCodeAt(3))+rr(e.charCodeAt(4)))/255,blue:(16*rr(e.charCodeAt(5))+rr(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*rr(e.charCodeAt(1))+rr(e.charCodeAt(2)))/255,green:(16*rr(e.charCodeAt(3))+rr(e.charCodeAt(4)))/255,blue:(16*rr(e.charCodeAt(5))+rr(e.charCodeAt(6)))/255,alpha:(16*rr(e.charCodeAt(7))+rr(e.charCodeAt(8)))/255}}}var sr=class{constructor(e){this.schemaService=e}findDocumentSymbols(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let i=n.resultLimit||Number.MAX_VALUE;const s=e.uri;if(("vscode://defaultsettings/keybindings.json"===s||on(s.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){const t=[];for(const o of r.items)if("object"===o.type)for(const r of o.properties)if("key"===r.keyNode.value&&r.valueNode){const a=V.create(e.uri,or(e,o));if(t.push({name:ar(r.valueNode),kind:Qe.Function,location:a}),i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),t}return t}const o=[{node:r,containerName:""}];let a=0,c=!1;const l=[],u=(t,n)=>{"array"===t.type?t.items.forEach(e=>{e&&o.push({node:e,containerName:n})}):"object"===t.type&&t.properties.forEach(t=>{const r=t.valueNode;if(r)if(i>0){i--;const s=V.create(e.uri,or(e,t)),a=n?n+"."+t.keyNode.value:t.keyNode.value;l.push({name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),location:s,containerName:n}),o.push({node:r,containerName:a})}else c=!0})};for(;a<o.length;){const e=o[a++];u(e.node,e.containerName)}return c&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),l}findDocumentSymbols2(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let i=n.resultLimit||Number.MAX_VALUE;const s=e.uri;if(("vscode://defaultsettings/keybindings.json"===s||on(s.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){const t=[];for(const o of r.items)if("object"===o.type)for(const r of o.properties)if("key"===r.keyNode.value&&r.valueNode){const a=or(e,o),c=or(e,r.keyNode);if(t.push({name:ar(r.valueNode),kind:Qe.Function,range:a,selectionRange:c}),i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),t}return t}const o=[],a=[{node:r,result:o}];let c=0,l=!1;const u=(t,n)=>{"array"===t.type?t.items.forEach((t,r)=>{if(t)if(i>0){i--;const s=or(e,t),o=s,c={name:String(r),kind:this.getSymbolKind(t.type),range:s,selectionRange:o,children:[]};n.push(c),a.push({result:c.children,node:t})}else l=!0}):"object"===t.type&&t.properties.forEach(t=>{const r=t.valueNode;if(r)if(i>0){i--;const s=or(e,t),o=or(e,t.keyNode),c=[],l={name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),range:s,selectionRange:o,children:c,detail:this.getDetail(r)};n.push(l),a.push({result:c,node:r})}else l=!0})};for(;c<a.length;){const e=a[c++];u(e.node,e.result)}return l&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),o}getSymbolKind(e){switch(e){case"object":return Qe.Module;case"string":return Qe.String;case"number":return Qe.Number;case"array":return Qe.Array;case"boolean":return Qe.Boolean;default:return Qe.Variable}}getKeyLabel(e){let t=e.keyNode.value;return t&&(t=t.replace(/[\n]/g,"↵")),t&&t.trim()?t:`"${t}"`}getDetail(e){if(e)return"boolean"===e.type||"number"===e.type||"null"===e.type||"string"===e.type?String(e.value):"array"===e.type?e.children.length?void 0:"[]":"object"===e.type?e.children.length?void 0:"{}":void 0}findDocumentColors(e,t,n){return this.schemaService.getSchemaForResource(e.uri,t).then(r=>{const i=[];if(r){let s=n&&"number"==typeof n.resultLimit?n.resultLimit:Number.MAX_VALUE;const o=t.getMatchingSchemas(r.schema),a={};for(const t of o)if(!t.inverted&&t.schema&&("color"===t.schema.format||"color-hex"===t.schema.format)&&t.node&&"string"===t.node.type){const r=String(t.node.offset);if(!a[r]){const o=ir(Bn(t.node));if(o){const n=or(e,t.node);i.push({color:o,range:n})}if(a[r]=!0,s--,s<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),i}}}return i})}getColorPresentations(e,t,n,r){const i=[],s=Math.round(255*n.red),o=Math.round(255*n.green),a=Math.round(255*n.blue);function c(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}let l;return l=1===n.alpha?`#${c(s)}${c(o)}${c(a)}`:`#${c(s)}${c(o)}${c(a)}${c(Math.round(255*n.alpha))}`,i.push({label:l,textEdit:se.replace(r,JSON.stringify(l))}),i}};function or(e,t){return P.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function ar(e){return Bn(e)||An("<empty>")}var cr,lr={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}}},ur={id:An("A unique identifier for the schema."),$schema:An("The schema to verify this document against."),title:An("A descriptive title of the element."),description:An("A long description of the element. Used in hover menus and suggestions."),default:An("A default value. Used by suggestions."),multipleOf:An("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:An("The maximum numerical value, inclusive by default."),exclusiveMaximum:An("Makes the maximum property exclusive."),minimum:An("The minimum numerical value, inclusive by default."),exclusiveMinimum:An("Makes the minimum property exclusive."),maxLength:An("The maximum length of a string."),minLength:An("The minimum length of a string."),pattern:An("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:An("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:An("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:An("The maximum number of items that can be inside an array. Inclusive."),minItems:An("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:An("If all of the items in the array must be unique. Defaults to false."),maxProperties:An("The maximum number of properties an object can have. Inclusive."),minProperties:An("The minimum number of properties an object can have. Inclusive."),required:An("An array of strings that lists the names of all properties required on this object."),additionalProperties:An("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:An("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:An("A map of property names to schemas for each property."),patternProperties:An("A map of regular expressions on property names to schemas for matching properties."),dependencies:An("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:An("The set of literal values that are valid."),type:An("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:An("Describes the format expected for the value."),allOf:An("An array of schemas, all of which must match."),anyOf:An("An array of schemas, where at least one must match."),oneOf:An("An array of schemas, exactly one of which must match."),not:An("A schema which must not match."),$id:An("A unique identifier for the schema."),$ref:An("Reference a definition hosted on any location."),$comment:An("Comments from schema authors to readers or maintainers of the schema."),readOnly:An("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:An("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:An('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:An("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:An("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:An("Describes the media type of a string property."),contentEncoding:An("Describes the content encoding of a string property."),if:An('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:An('The "if" subschema is used for validation when the "if" subschema succeeds.'),else:An('The "else" subschema is used for validation when the "if" subschema fails.')};for(const e in lr.schemas){const t=lr.schemas[e];for(const e in t.properties){let n=t.properties[e];"boolean"==typeof n&&(n=t.properties[e]={});const r=ur[e];r&&(n.description=r)}}(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,s=-1,o=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(s===a-1||1===o);else if(s!==a-1&&2===o){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),s=a,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,s=a,o=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(s+1,a):r=e.slice(s+1,a),i=a-s-1;s=a,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var o;s>=0?o=arguments[s]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(r=o+"/"+r,i=47===o.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var s=e.length,o=s-i,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var c=n.length-a,l=o<c?o:c,u=-1,f=0;f<=l;++f){if(f===l){if(c>l){if(47===n.charCodeAt(a+f))return n.slice(a+f+1);if(0===f)return n.slice(a+f)}else o>l&&(47===e.charCodeAt(i+f)?u=f:0===f&&(u=0));break}var h=e.charCodeAt(i+f);if(h!==n.charCodeAt(a+f))break;47===h&&(u=f)}var d="";for(f=i+u+1;f<=s;++f)f!==s&&47!==e.charCodeAt(f)||(0===d.length?d+="..":d+="/..");return d.length>0?d+n.slice(a+u):(a+=u,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!s){i=o;break}}else s=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,s=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(47===l){if(!o){i=r+1;break}}else-1===c&&(o=!1,c=r+1),a>=0&&(l===n.charCodeAt(a)?-1==--a&&(s=r):(a=-1,s=c))}return i===s?s=c:-1===s&&(s=e.length),e.slice(i,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){i=r+1;break}}else-1===s&&(o=!1,s=r+1);return-1===s?"":e.slice(i,s)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===i&&(s=!1,i=a+1),46===c?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1);else if(!s){r=a+1;break}}return-1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return n=(t=e).dir||t.root,r=t.base||(t.name||"")+(t.ext||""),n?n===t.root?n+r:n+"/"+r:r;var t,n,r},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),s=47===i;s?(n.root="/",r=1):r=0;for(var o=-1,a=0,c=-1,l=!0,u=e.length-1,f=0;u>=r;--u)if(47!==(i=e.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===i?-1===o?o=u:1!==f&&(f=1):-1!==o&&(f=-1);else if(!l){a=u+1;break}return-1===o||-1===c||0===f||1===f&&o===c-1&&o===a+1?-1!==c&&(n.base=n.name=0===a&&s?e.slice(1,c):e.slice(a,c)):(0===a&&s?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(a,o),n.base=e.slice(a,c)),n.ext=e.slice(o,c)),a>0?n.dir=e.slice(0,a-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{let e;if(n.r(r),n.d(r,{URI:()=>u,Utils:()=>T}),"object"==typeof process)e="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,i=/^\//,s=/^\/\//;function o(e,n){if(!e.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!i.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const a="",c="/",l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(e){return e instanceof u||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,s=!1){"object"==typeof e?(this.scheme=e.scheme||a,this.authority=e.authority||a,this.path=e.path||a,this.query=e.query||a,this.fragment=e.fragment||a):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||a,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,n||a),this.query=r||a,this.fragment=i||a,o(this,s))}get fsPath(){return g(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=a),void 0===n?n=this.authority:null===n&&(n=a),void 0===r?r=this.path:null===r&&(r=a),void 0===i?i=this.query:null===i&&(i=a),void 0===s?s=this.fragment:null===s&&(s=a),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new h(t,n,r,i,s)}static parse(e,t=!1){const n=l.exec(e);return n?new h(n[2]||a,x(n[4]||a),x(n[5]||a),x(n[7]||a),x(n[9]||a),t):new h(a,a,a,a,a)}static file(t){let n=a;if(e&&(t=t.replace(/\\/g,c)),t[0]===c&&t[1]===c){const e=t.indexOf(c,2);-1===e?(n=t.substring(2),t=c):(n=t.substring(2,e),t=t.substring(e)||c)}return new h("file",n,t,a,a)}static from(e){const t=new h(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return y(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof u)return e;{const t=new h(e);return t._formatted=e.external,t._fsPath=e._sep===f?e.fsPath:null,t}}return e}}const f=e?1:void 0;class h extends u{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=g(this,!1)),this._fsPath}toString(e=!1){return e?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const d={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function m(e,t,n){let r,i=-1;for(let s=0;s<e.length;s++){const o=e.charCodeAt(s);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=d[o];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function p(e){let t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=d[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function g(t,n){let r;return r=t.authority&&t.path.length>1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,"\\")),r}function y(e,t){const n=t?p:m;let r="",{scheme:i,authority:s,path:o,query:a,fragment:l}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=c,r+=c),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),l&&(r+="#",r+=t?l:m(l,!1,!1)),r}function b(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+b(e.substr(3)):e}}const v=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function x(e){return e.match(v)?e.replace(v,e=>b(e)):e}var k=n(470);const S=k.posix||k,A="/";var T,C;(C=T||(T={})).joinPath=function(e,...t){return e.with({path:S.join(e.path,...t)})},C.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==A&&(n=A+n,r=!0);let i=S.resolve(n,...t);return r&&i[0]===A&&!e.authority&&(i=i.substring(1)),e.with({path:i})},C.dirname=function(e){if(0===e.path.length||e.path===A)return e;let t=S.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},C.basename=function(e){return S.basename(e.path)},C.extname=function(e){return S.extname(e.path)}})(),cr=r})();var{URI:fr,Utils:hr}=cr;function dr(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");const n=String(e);let r="";const i=!!t&&!!t.extended,s=!!t&&!!t.globstar;let o=!1;const a=t&&"string"==typeof t.flags?t.flags:"";let c;for(let e=0,t=n.length;e<t;e++)switch(c=n[e],c){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":r+="\\"+c;break;case"?":if(i){r+=".";break}case"[":case"]":if(i){r+=c;break}case"{":if(i){o=!0,r+="(";break}case"}":if(i){o=!1,r+=")";break}case",":if(o){r+="|";break}r+="\\"+c;break;case"*":const t=n[e-1];let a=1;for(;"*"===n[e+1];)a++,e++;const l=n[e+1];s?!(a>1)||"/"!==t&&void 0!==t&&"{"!==t&&","!==t||"/"!==l&&void 0!==l&&","!==l&&"}"!==l?r+="([^/]*)":("/"===l?e++:"/"===t&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+=".*";break;default:r+=c}return a&&~a.indexOf("g")||(r="^"+r+"$"),new RegExp(r,a)}var mr,pr,gr=class{constructor(e,t,n){this.folderUri=t,this.uris=n,this.globWrappers=[];try{for(let t of e){const e="!"!==t[0];e||(t=t.substring(1)),t.length>0&&("/"===t[0]&&(t=t.substring(1)),this.globWrappers.push({regexp:dr("**/"+t,{extended:!0,globstar:!0}),include:e}))}t&&((t=Ar(t)).endsWith("/")||(t+="/"),this.folderUri=t)}catch(e){this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let t=!1;for(const{regexp:n,include:r}of this.globWrappers)n.test(e)&&(t=r);return t}getURIs(){return this.uris}},yr=class{constructor(e,t,n){this.service=e,this.uri=t,this.dependencies=new Set,this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new br(n)))}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(){const e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}},br=class{constructor(e,t=[]){this.schema=e,this.errors=t}},vr=class{constructor(e,t=[],n=[],r){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=r}getSection(e){const t=this.getSectionRecursive(e,this.schema);if(t)return $n(t)}getSectionRecursive(e,t){if(!t||"boolean"==typeof t||0===e.length)return t;const n=e.shift();if(t.properties&&(t.properties[n],1))return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties)for(const r of Object.keys(t.patternProperties)){const i=an(r);if(i?.test(n))return this.getSectionRecursive(e,t.patternProperties[r])}else{if("object"==typeof t.additionalProperties)return this.getSectionRecursive(e,t.additionalProperties);if(n.match("[0-9]+"))if(Array.isArray(t.items)){const r=parseInt(n,10);if(!isNaN(r)&&t.items[r])return this.getSectionRecursive(e,t.items[r])}else if(t.items)return this.getSectionRecursive(e,t.items)}}},xr=class{constructor(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter(t=>{const n=fr.parse(t).scheme;return"schemaservice"!==n&&(!e||e(n))})}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let t=!1;const n=[e=Sr(e)],r=Object.keys(this.schemasById).map(e=>this.schemasById[e]);for(;n.length;){const e=n.pop();for(let i=0;i<r.length;i++){const s=r[i];s&&(s.uri===e||s.dependencies.has(e))&&(s.uri!==e&&n.push(s.uri),s.clearSchema()&&(t=!0),r[i]=void 0)}}return t}setSchemaContributions(e){if(e.schemas){const t=e.schemas;for(const e in t){const n=Sr(e);this.contributionSchemas[n]=this.addSchemaHandle(n,t[e])}}if(Array.isArray(e.schemaAssociations)){const t=e.schemaAssociations;for(let e of t){const t=e.uris.map(Sr),n=this.addFilePatternAssociation(e.pattern,e.folderUri,t);this.contributionAssociations.push(n)}}}addSchemaHandle(e,t){const n=new yr(this,e,t);return this.schemasById[e]=n,n}getOrAddSchemaHandle(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)}addFilePatternAssociation(e,t,n){const r=new gr(e,t,n);return this.filePatternAssociations.push(r),r}registerExternalSchema(e){const t=Sr(e.uri);return this.registeredSchemasIds[t]=!0,this.cachedSchemaForResource=void 0,e.fileMatch&&e.fileMatch.length&&this.addFilePatternAssociation(e.fileMatch,e.folderUri,[t]),e.schema?this.addSchemaHandle(t,e.schema):this.getOrAddSchemaHandle(t)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(const e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(const e of this.contributionAssociations)this.filePatternAssociations.push(e)}getResolvedSchema(e){const t=Sr(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(e){if(!this.requestService){const t=An("Unable to load schema from '{0}'. No schema request service available",Tr(e));return this.promise.resolve(new br({},[t]))}return e.startsWith("http://json-schema.org/")&&(e="https"+e.substring(4)),this.requestService(e).then(t=>{if(!t){const t=An("Unable to load schema from '{0}': No content.",Tr(e));return new br({},[t])}const n=[];65279===t.charCodeAt(0)&&(n.push(An("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",Tr(e))),t=t.trimStart());let r={};const i=[];return r=Gt(t,i),i.length&&n.push(An("Unable to parse content from '{0}': Parse error at offset {1}.",Tr(e),i[0].offset)),new br(r,n)},t=>{let n=t.toString();const r=t.toString().split("Error: ");return r.length>1&&(n=r[1]),on(n,".")&&(n=n.substr(0,n.length-1)),new br({},[An("Unable to load schema from '{0}': {1}.",Tr(e),n)])})}resolveSchemaContent(e,t){const n=e.errors.slice(0),r=e.schema;let i=r.$schema?Sr(r.$schema):void 0;if("http://json-schema.org/draft-03/schema"===i)return this.promise.resolve(new vr({},[An("Draft-03 schemas are not supported.")],[],i));let s=new Set;const o=this.contextService,a=(e,t,r,i)=>{let s;var o,a,c;void 0===i||0===i.length?s=t:"/"===i.charAt(0)?s=((e,t)=>{t=decodeURIComponent(t);let n=e;return"/"===t[0]&&(t=t.substring(1)),t.split("/").some(e=>(e=e.replace(/~1/g,"/").replace(/~0/g,"~"),n=n[e],!n)),n})(t,i):(o=t,c=i,(a=r).anchors||(a.anchors=u(o)),s=a.anchors.get(c)),s?((e,t)=>{for(const n in t)t.hasOwnProperty(n)&&"id"!==n&&"$id"!==n&&(e[n]=t[n])})(e,s):n.push(An("$ref '{0}' in '{1}' can not be resolved.",i||"",r.uri))},c=(e,t,r,i)=>{o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(t)&&(t=o.resolveRelativePath(t,i.uri)),t=Sr(t);const s=this.getOrAddSchemaHandle(t);return s.getUnresolvedSchema().then(o=>{if(i.dependencies.add(t),o.errors.length){const e=r?t+"#"+r:t;n.push(An("Problems loading reference '{0}': {1}",e,o.errors[0]))}return a(e,o.schema,s,r),l(e,o.schema,s)})},l=(e,t,n)=>{const r=[];return this.traverseNodes(e,e=>{const i=new Set;for(;e.$ref;){const s=e.$ref,o=s.split("#",2);if(delete e.$ref,o[0].length>0)return void r.push(c(e,o[0],o[1],n));if(!i.has(s)){const r=o[1];a(e,t,n,r),i.add(s)}}e.$recursiveRef&&s.add("$recursiveRef"),e.$dynamicRef&&s.add("$dynamicRef")}),this.promise.all(r)},u=e=>{const t=new Map;return this.traverseNodes(e,e=>{const r=e.$id||e.id,i=rn(r)&&"#"===r.charAt(0)?r.substring(1):e.$anchor;i&&(t.has(i)?n.push(An("Duplicate anchor declaration: '{0}'",i)):t.set(i,e)),e.$recursiveAnchor&&s.add("$recursiveAnchor"),e.$dynamicAnchor&&s.add("$dynamicAnchor")}),t};return l(r,r,t).then(e=>{let t=[];return s.size&&t.push(An("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(s.keys()).join(", "))),new vr(r,n,t,i)})}traverseNodes(e,t){if(!e||"object"!=typeof e)return Promise.resolve(null);const n=new Set,r=(...e)=>{for(const t of e)sn(t)&&a.push(t)},i=(...e)=>{for(const t of e)if(sn(t))for(const e in t){const n=t[e];sn(n)&&a.push(n)}},s=(...e)=>{for(const t of e)if(Array.isArray(t))for(const e of t)sn(e)&&a.push(e)},o=e=>{if(Array.isArray(e))for(const t of e)sn(t)&&a.push(t);else sn(e)&&a.push(e)},a=[e];let c=a.pop();for(;c;)n.has(c)||(n.add(c),t(c),r(c.additionalItems,c.additionalProperties,c.not,c.contains,c.propertyNames,c.if,c.then,c.else,c.unevaluatedItems,c.unevaluatedProperties),i(c.definitions,c.$defs,c.properties,c.patternProperties,c.dependencies,c.dependentSchemas),s(c.anyOf,c.allOf,c.oneOf,c.prefixItems),o(c.items)),c=a.pop()}getSchemaFromProperty(e,t){if("object"===t.root?.type)for(const n of t.root.properties)if("$schema"===n.keyNode.value&&"string"===n.valueNode?.type){let t=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(t)&&(t=this.contextService.resolveRelativePath(t,e)),t}}getAssociatedSchemas(e){const t=Object.create(null),n=[],r=Ar(e);for(const e of this.filePatternAssociations)if(e.matchesPattern(r))for(const r of e.getURIs())t[r]||(n.push(r),t[r]=!0);return n}getSchemaURIsForResource(e,t){let n=t&&this.getSchemaFromProperty(e,t);return n?[n]:this.getAssociatedSchemas(e)}getSchemaForResource(e,t){if(t){let n=this.getSchemaFromProperty(e,t);if(n){const e=Sr(n);return this.getOrAddSchemaHandle(e).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;const n=this.getAssociatedSchemas(e),r=n.length>0?this.createCombinedSchema(e,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:r},r}createCombinedSchema(e,t){if(1===t.length)return this.getOrAddSchemaHandle(t[0]);{const n="schemaservice://combinedSchema/"+encodeURIComponent(e),r={allOf:t.map(e=>({$ref:e}))};return this.addSchemaHandle(n,r)}}getMatchingSchemas(e,t,n){if(n){const e=n.id||"schemaservice://untitled/matchingSchemas/"+kr++;return this.addSchemaHandle(e,n).getResolvedSchema().then(e=>t.getMatchingSchemas(e.schema).filter(e=>!e.inverted))}return this.getSchemaForResource(e.uri,t).then(e=>e?t.getMatchingSchemas(e.schema).filter(e=>!e.inverted):[])}},kr=0;function Sr(e){try{return fr.parse(e).toString(!0)}catch(t){return e}}function Ar(e){try{return fr.parse(e).with({fragment:null,query:null}).toString(!0)}catch(t){return e}}function Tr(e){try{const t=fr.parse(e);if("file"===t.scheme)return t.fsPath}catch(e){}return e}function Cr(e,t){const n=[],r=[],i=[];let s=-1;const o=k(e.getText(),!1);let a=o.scan();function c(e){n.push(e),r.push(i.length)}for(;17!==a;){switch(a){case 1:case 3:{const t=e.positionAt(o.getTokenOffset()).line,n={startLine:t,endLine:t,kind:1===a?"object":"array"};i.push(n);break}case 2:case 4:{const t=2===a?"object":"array";if(i.length>0&&i[i.length-1].kind===t){const t=i.pop(),n=e.positionAt(o.getTokenOffset()).line;t&&n>t.startLine+1&&s!==t.startLine&&(t.endLine=n-1,c(t),s=t.startLine)}break}case 13:{const t=e.positionAt(o.getTokenOffset()).line,n=e.positionAt(o.getTokenOffset()+o.getTokenLength()).line;1===o.getTokenError()&&t+1<e.lineCount?o.setPosition(e.offsetAt(N.create(t+1,0))):t<n&&(c({startLine:t,endLine:n,kind:K.Comment}),s=t);break}case 12:{const t=e.getText().substr(o.getTokenOffset(),o.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(t){const n=e.positionAt(o.getTokenOffset()).line;if(t[1]){const e={startLine:n,endLine:n,kind:K.Region};i.push(e)}else{let e=i.length-1;for(;e>=0&&i[e].kind!==K.Region;)e--;if(e>=0){const t=i[e];i.length=e,n>t.startLine&&s!==t.startLine&&(t.endLine=n,c(t),s=t.startLine)}}}break}}a=o.scan()}const l=t&&t.rangeLimit;if("number"!=typeof l||n.length<=l)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);const u=[];for(let e of r)e<30&&(u[e]=(u[e]||0)+1);let f=0,h=0;for(let e=0;e<u.length;e++){const t=u[e];if(t){if(t+f>l){h=e;break}f+=t}}const d=[];for(let e=0;e<n.length;e++){const t=r[e];"number"==typeof t&&(t<h||t===h&&f++<l)&&d.push(n[e])}return d}function wr(e,t,n){function r(t,n){return P.create(e.positionAt(t),e.positionAt(n))}const i=k(e.getText(),!0);function s(e,t){return i.setPosition(e),i.scan()===t?i.getTokenOffset()+i.getTokenLength():-1}return t.map(function(t){let i=e.offsetAt(t),o=n.getNodeFromOffset(i,!0);const a=[];for(;o;){switch(o.type){case"string":case"object":case"array":const e=o.offset+1,t=o.offset+o.length-1;e<t&&i>=e&&i<=t&&a.push(r(e,t)),a.push(r(o.offset,o.offset+o.length));break;case"number":case"boolean":case"null":case"property":a.push(r(o.offset,o.offset+o.length))}if("property"===o.type||o.parent&&"array"===o.parent.type){const e=s(o.offset+o.length,5);-1!==e&&a.push(r(o.offset,e))}o=o.parent}let c;for(let e=a.length-1;e>=0;e--)c=vt.create(a[e],c);return c||(c=vt.create(P.create(t,t))),c})}function Or(e,t,n){let r;if(n){const t=e.offsetAt(n.start);r={offset:t,length:e.offsetAt(n.end)-t}}const i={tabSize:t?t.tabSize:4,insertSpaces:!0===t?.insertSpaces,insertFinalNewline:!0===t?.insertFinalNewline,eol:"\n",keepLines:!0===t?.keepLines};return function(e,t,n){return function(e,t,n){let r,i,s,a,c;if(t){for(a=t.offset,c=a+t.length,s=a;s>0&&!g(e,s-1);)s--;let o=c;for(;o<e.length&&!g(e,o);)o++;i=e.substring(s,o),r=function(e,t){let n=0,r=0;const i=t.tabSize||4;for(;n<e.length;){let t=e.charAt(n);if(t===f[1])r++;else{if("\t"!==t)break;r+=i}n++}return Math.floor(r/i)}(i,n)}else i=e,r=0,s=0,a=0,c=e.length;const l=function(e,t){for(let e=0;e<t.length;e++){const n=t.charAt(e);if("\r"===n)return e+1<t.length&&"\n"===t.charAt(e+1)?"\r\n":"\r";if("\n"===n)return"\n"}return e&&e.eol||"\n"}(n,e),u=m.includes(l);let h,y=0,b=0;h=n.insertSpaces?f[n.tabSize||4]??p(f[1],n.tabSize||4):"\t";const v="\t"===h?"\t":" ";let x=o(i,!1),k=!1;function S(){if(y>1)return p(l,y)+p(h,r+b);const e=h.length*(r+b);return!u||e>d[v][l].length?l+p(h,r+b):e<=0?l:d[v][l][e]}function A(){let e=x.scan();for(y=0;15===e||14===e;)14===e&&n.keepLines?y+=1:14===e&&(y=1),e=x.scan();return k=16===e||0!==x.getTokenError(),e}const T=[];function C(n,r,i){k||t&&!(r<c&&i>a)||e.substring(r,i)===n||T.push({offset:r,length:i-r,content:n})}let w=A();if(n.keepLines&&y>0&&C(p(l,y),0,0),17!==w){let e=x.getTokenOffset()+s;C(h.length*r<20&&n.insertSpaces?f[h.length*r]:p(h,r),s,e)}for(;17!==w;){let e=x.getTokenOffset()+x.getTokenLength()+s,t=A(),r="",i=!1;for(;0===y&&(12===t||13===t);){let n=x.getTokenOffset()+s;C(f[1],e,n),e=x.getTokenOffset()+x.getTokenLength()+s,i=12===t,r=i?S():"",t=A()}if(2===t)1!==w&&b--,n.keepLines&&y>0||!n.keepLines&&1!==w?r=S():n.keepLines&&(r=f[1]);else if(4===t)3!==w&&b--,n.keepLines&&y>0||!n.keepLines&&3!==w?r=S():n.keepLines&&(r=f[1]);else{switch(w){case 3:case 1:b++,r=n.keepLines&&y>0||!n.keepLines?S():f[1];break;case 5:r=n.keepLines&&y>0||!n.keepLines?S():f[1];break;case 12:r=S();break;case 13:y>0?r=S():i||(r=f[1]);break;case 6:n.keepLines&&y>0?r=S():i||(r=f[1]);break;case 10:n.keepLines&&y>0?r=S():6!==t||i||(r="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&y>0?r=S():12!==t&&13!==t||i?5!==t&&17!==t&&(k=!0):r=f[1];break;case 16:k=!0}y>0&&(12===t||13===t)&&(r=S())}17===t&&(r=n.keepLines&&y>0?S():n.insertFinalNewline?l:""),C(r,e,x.getTokenOffset()+s),w=t}return T}(e,t,n)}(e.getText(),r,i).map(t=>se.replace(P.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content))}(pr=mr||(mr={}))[pr.Object=0]="Object",pr[pr.Array=1]="Array";var Ir=class{constructor(e,t){this.propertyName=e??"",this.beginningLineNumber=t,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(e){if(e.parent=this,this.childrenProperties.length>0){let t=0;t=e.noKeyName?this.childrenProperties.length:function(e,t,n){const r=t.propertyName.toLowerCase(),i=e[0].propertyName.toLowerCase(),s=e[e.length-1].propertyName.toLowerCase();if(r<i)return 0;if(r>s)return e.length;let o=0,a=e.length-1;for(;o<=a;){let r=a+o>>1,i=n(t,e[r]);if(i>0)o=r+1;else{if(!(i<0))return r;a=r-1}}return-o-1}(this.childrenProperties,e,Er),t<0&&(t=-1*t-1),this.childrenProperties.splice(t,0,e)}else this.childrenProperties.push(e);return e}};function Er(e,t){const n=e.propertyName.toLowerCase(),r=t.propertyName.toLowerCase();return n<r?-1:n>r?1:0}function Nr(e,t,n){if(0!==t.childrenProperties.length)if(t.type===mr.Object){let r=1/0;for(const e of t.childrenProperties)e.beginningLineNumber<r&&(r=e.beginningLineNumber);n+=r-t.beginningLineNumber,e.push(new Mr(n,t.childrenProperties))}else t.type===mr.Array&&Lr(e,t,n)}function Lr(e,t,n){for(const r of t.childrenProperties){if(r.type===mr.Object){let i=1/0;for(const e of r.childrenProperties)e.beginningLineNumber<i&&(i=e.beginningLineNumber);const s=i-r.beginningLineNumber;e.push(new Mr(n+r.beginningLineNumber-t.beginningLineNumber+s,r.childrenProperties))}r.type===mr.Array&&Lr(e,r,n+r.beginningLineNumber-t.beginningLineNumber)}}var Pr,Mr=class{constructor(e,t){this.beginningLineNumber=e,this.propertyTreeArray=t}};function Vr(e,t){const n=[];return t.visit(r=>{if("property"===r.type&&"$ref"===r.keyNode.value&&"string"===r.valueNode?.type){const i=r.valueNode.value,s=function(e,t){const n=function(e){return"#"===e?[]:"#"!==e[0]||"/"!==e[1]?null:e.substring(2).split(/\//).map(Fr)}(t);return n?$r(n,e.root):null}(t,i);if(s){const t=e.positionAt(s.offset);n.push({target:`${e.uri}#${t.line+1},${t.character+1}`,range:jr(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function jr(e,t){return P.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function $r(e,t){if(!t)return null;if(0===e.length)return t;const n=e.shift();if(t&&"object"===t.type){const r=t.properties.find(e=>e.keyNode.value===n);return r?$r(e,r.valueNode):null}if(t&&"array"===t.type&&n.match(/^(0|[1-9][0-9]*)$/)){const r=Number.parseInt(n),i=t.items[r];return i?$r(e,i):null}return null}function Fr(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function _r(e){const t=e.promiseConstructor||Promise,n=new xr(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(lr);const r=new Gn(n,e.contributions,t,e.clientCapabilities),i=new Xn(n,e.contributions,t),s=new sr(n),o=new Qn(n,t);return{configure:e=>{n.clearExternalSchemas(),e.schemas?.forEach(n.registerExternalSchema.bind(n)),o.configure(e)},resetSchema:e=>n.onResourceChange(e),doValidation:o.doValidation.bind(o),getLanguageStatus:o.getLanguageStatus.bind(o),parseJSONDocument:e=>function(e,t){const n=[];let r=-1;const i=e.getText(),s=k(i,!1),o=t&&t.collectComments?[]:void 0;function a(){for(;;){const t=s.scan();switch(u(),t){case 12:case 13:Array.isArray(o)&&o.push(P.create(e.positionAt(s.getTokenOffset()),e.positionAt(s.getTokenOffset()+s.getTokenLength())));break;case 15:case 14:break;default:return t}}}function c(t,i,s,o,a=X.Error){if(0===n.length||s!==r){const c=P.create(e.positionAt(s),e.positionAt(o));n.push(te.create(c,t,a,i,e.languageId)),r=s}}function l(e,t,n=void 0,r=[],o=[]){let l=s.getTokenOffset(),u=s.getTokenOffset()+s.getTokenLength();if(l===u&&l>0){for(l--;l>0&&/\s/.test(i.charAt(l));)l--;u=l+1}if(c(e,t,l,u),n&&f(n,!1),r.length+o.length>0){let e=s.getToken();for(;17!==e;){if(-1!==r.indexOf(e)){a();break}if(-1!==o.indexOf(e))break;e=a()}}return n}function u(){switch(s.getTokenError()){case 4:return l(An("Invalid unicode sequence in string."),dn.InvalidUnicode),!0;case 5:return l(An("Invalid escape character in string."),dn.InvalidEscapeCharacter),!0;case 3:return l(An("Unexpected end of number."),dn.UnexpectedEndOfNumber),!0;case 1:return l(An("Unexpected end of comment."),dn.UnexpectedEndOfComment),!0;case 2:return l(An("Unexpected end of string."),dn.UnexpectedEndOfString),!0;case 6:return l(An("Invalid characters in string. Control characters must be escaped."),dn.InvalidCharacter),!0}return!1}function f(e,t){return e.length=s.getTokenOffset()+s.getTokenLength()-e.offset,t&&a(),e}const h=new Mn(void 0,0,0);function d(t,n){const r=new Vn(t,s.getTokenOffset(),h);let i=m(r);if(!i){if(16!==s.getToken())return;{l(An("Property keys must be doublequoted"),dn.PropertyKeysMustBeDoublequoted);const e=new Mn(r,s.getTokenOffset(),s.getTokenLength());e.value=s.getTokenValue(),i=e,a()}}if(r.keyNode=i,"//"!==i.value){const e=n[i.value];e?(c(An("Duplicate object key"),dn.DuplicateKey,r.keyNode.offset,r.keyNode.offset+r.keyNode.length,X.Warning),sn(e)&&c(An("Duplicate object key"),dn.DuplicateKey,e.keyNode.offset,e.keyNode.offset+e.keyNode.length,X.Warning),n[i.value]=!0):n[i.value]=r}if(6===s.getToken())r.colonOffset=s.getTokenOffset(),a();else if(l(An("Colon expected"),dn.ColonExpected),10===s.getToken()&&e.positionAt(i.offset+i.length).line<e.positionAt(s.getTokenOffset()).line)return r.length=i.length,r;const o=p(r);return o?(r.valueNode=o,r.length=o.offset+o.length-r.offset,r):l(An("Value expected"),dn.ValueExpected,r,[],[2,5])}function m(e){if(10!==s.getToken())return;const t=new Mn(e,s.getTokenOffset());return t.value=s.getTokenValue(),f(t,!0)}function p(e){return function(e){if(3!==s.getToken())return;const t=new Ln(e,s.getTokenOffset());a();let n=!1;for(;4!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){n||l(An("Value expected"),dn.ValueExpected);const e=s.getTokenOffset();if(a(),4===s.getToken()){n&&c(An("Trailing comma"),dn.TrailingComma,e,e+1);continue}}else n&&l(An("Expected comma"),dn.CommaExpected);const e=p(t);e?t.items.push(e):l(An("Value expected"),dn.ValueExpected,void 0,[],[4,5]),n=!0}return 4!==s.getToken()?l(An("Expected comma or closing bracket"),dn.CommaOrCloseBacketExpected,t):f(t,!0)}(e)||function(e){if(1!==s.getToken())return;const t=new jn(e,s.getTokenOffset()),n=Object.create(null);a();let r=!1;for(;2!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){r||l(An("Property expected"),dn.PropertyExpected);const e=s.getTokenOffset();if(a(),2===s.getToken()){r&&c(An("Trailing comma"),dn.TrailingComma,e,e+1);continue}}else r&&l(An("Expected comma"),dn.CommaExpected);const e=d(t,n);e?t.properties.push(e):l(An("Property expected"),dn.PropertyExpected,void 0,[],[2,5]),r=!0}return 2!==s.getToken()?l(An("Expected comma or closing brace"),dn.CommaOrCloseBraceExpected,t):f(t,!0)}(e)||m(e)||function(e){if(11!==s.getToken())return;const t=new Pn(e,s.getTokenOffset());if(0===s.getTokenError()){const e=s.getTokenValue();try{const n=JSON.parse(e);if(!en(n))return l(An("Invalid number format."),dn.Undefined,t);t.value=n}catch(e){return l(An("Invalid number format."),dn.Undefined,t)}t.isInteger=-1===e.indexOf(".")}return f(t,!0)}(e)||function(e){switch(s.getToken()){case 7:return f(new En(e,s.getTokenOffset()),!0);case 8:return f(new Nn(e,!0,s.getTokenOffset()),!0);case 9:return f(new Nn(e,!1,s.getTokenOffset()),!0);default:return}}(e)}let g;return 17!==a()&&(g=p(g),g?17!==s.getToken()&&l(An("End of file expected."),dn.Undefined):l(An("Expected a JSON object, array or literal."),dn.Undefined)),new Jn(g,n,o)}(e,{collectComments:!0}),newJSONDocument:(e,t)=>function(e,t=[]){return new Jn(e,t,[])}(e,t),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:s.findDocumentSymbols.bind(s),findDocumentSymbols2:s.findDocumentSymbols2.bind(s),findDocumentColors:s.findDocumentColors.bind(s),getColorPresentations:s.getColorPresentations.bind(s),doHover:i.doHover.bind(i),getFoldingRanges:Cr,getSelectionRanges:wr,findDefinition:()=>Promise.resolve([]),findLinks:Vr,format:(e,t,n)=>Or(e,n,t),sort:(e,t)=>function(e,t){const n={...t,keepLines:!1},r=fn.applyEdits(e,Or(e,n,void 0)),i=fn.create("test://test.json","json",0,r),s=function(e,t){if(0===t.childrenProperties.length)return e;const n=fn.create("test://test.json","json",0,e.getText()),r=[];for(Nr(r,t,t.beginningLineNumber);r.length>0;){const t=r.shift(),i=t.propertyTreeArray;let s=t.beginningLineNumber;for(let t=0;t<i.length;t++){const o=i[t],a=P.create(N.create(o.beginningLineNumber,0),N.create(o.endLineNumber+1,0)),c=e.getText(a),l=fn.create("test://test.json","json",0,c);if(!0===o.lastProperty&&t!==i.length-1){const e=o.lineWhereToAddComma-o.beginningLineNumber,t=o.indexWhereToAddComa,n={range:P.create(N.create(e,t),N.create(e,t)),text:","};fn.update(l,[n],1)}else if(!1===o.lastProperty&&t===i.length-1){const e=o.commaIndex,t=o.commaLine-o.beginningLineNumber,n={range:P.create(N.create(t,e),N.create(t,e+1)),text:""};fn.update(l,[n],1)}const u=o.endLineNumber-o.beginningLineNumber+1,f={range:P.create(N.create(s,0),N.create(s+u,0)),text:l.getText()};fn.update(n,[f],1),Nr(r,o,s),s+=u}}return n}(i,function(e){const t=e.getText(),n=k(t,!1);let r,i,s,o=new Ir,a=o,c=o,l=o,u=0,f=0,h=-1,d=-1,m=0,p=0,g=[],y=!1,b=!1;for(;17!==(r=n.scan());){if(!0===y&&14!==r&&15!==r&&12!==r&&13!==r&&void 0===c.endLineNumber){let e=n.getTokenStartLine();2===s||4===s?l.endLineNumber=e-1:c.endLineNumber=e-1,m=e,y=!1}if(!0===b&&14!==r&&15!==r&&12!==r&&13!==r&&(m=n.getTokenStartLine(),b=!1),n.getTokenStartLine()!==u){for(let t=u;t<n.getTokenStartLine();t++)f+=e.getText(P.create(N.create(t,0),N.create(t+1,0))).length;u=n.getTokenStartLine()}switch(r){case 10:if(void 0===i||1===i||5===i&&g[g.length-1]===mr.Object){const e=new Ir(n.getTokenValue(),m);l=c,c=a.addChildProperty(e)}break;case 3:if(void 0===o.beginningLineNumber&&(o.beginningLineNumber=n.getTokenStartLine()),g[g.length-1]===mr.Object)a=c;else if(g[g.length-1]===mr.Array){const e=new Ir(n.getTokenValue(),m);e.noKeyName=!0,l=c,c=a.addChildProperty(e),a=c}g.push(mr.Array),c.type=mr.Array,m=n.getTokenStartLine(),m++;break;case 1:if(void 0===o.beginningLineNumber)o.beginningLineNumber=n.getTokenStartLine();else if(g[g.length-1]===mr.Array){const e=new Ir(n.getTokenValue(),m);e.noKeyName=!0,l=c,c=a.addChildProperty(e)}c.type=mr.Object,g.push(mr.Object),a=c,m=n.getTokenStartLine(),m++;break;case 4:p=n.getTokenStartLine(),g.pop(),void 0!==c.endLineNumber||2!==i&&4!==i||(c.endLineNumber=p-1,c.lastProperty=!0,c.lineWhereToAddComma=h,c.indexWhereToAddComa=d,l=c,c=c?c.parent:void 0,a=c),o.endLineNumber=p,m=p+1;break;case 2:p=n.getTokenStartLine(),g.pop(),1!==i&&(void 0===c.endLineNumber&&(c.endLineNumber=p-1,c.lastProperty=!0,c.lineWhereToAddComma=h,c.indexWhereToAddComa=d),l=c,c=c?c.parent:void 0,a=c),o.endLineNumber=n.getTokenStartLine(),m=p+1;break;case 5:p=n.getTokenStartLine(),void 0!==c.endLineNumber||g[g.length-1]!==mr.Object&&(g[g.length-1]!==mr.Array||2!==i&&4!==i)||(c.endLineNumber=p,c.commaIndex=n.getTokenOffset()-f,c.commaLine=p),2!==i&&4!==i||(l=c,c=c?c.parent:void 0,a=c),m=p+1;break;case 13:5!==i||h!==n.getTokenStartLine()||(g[g.length-1]!==mr.Array||2!==s&&4!==s)&&g[g.length-1]!==mr.Object||(g[g.length-1]!==mr.Array||2!==s&&4!==s)&&g[g.length-1]!==mr.Object||(c.endLineNumber=void 0,y=!0),1!==i&&3!==i||h!==n.getTokenStartLine()||(b=!0)}14!==r&&13!==r&&12!==r&&15!==r&&(s=i,i=r,h=n.getTokenStartLine(),d=n.getTokenOffset()+n.getTokenLength()-f)}return o}(i)),o=Or(s,n,void 0),a=fn.applyEdits(s,o);return[se.replace(P.create(N.create(0,0),e.positionAt(e.getText().length)),a)]}(e,t)}}"undefined"!=typeof fetch&&(Pr=function(e){return fetch(e).then(e=>e.text())});var Rr=class{constructor(e,t){this._ctx=e,this._languageSettings=t.languageSettings,this._languageId=t.languageId,this._languageService=_r({workspaceContext:{resolveRelativePath:(e,t)=>function(e,t){if(function(e){return e.charCodeAt(0)===Dr}(t)){const n=fr.parse(e),r=t.split("/");return n.with({path:Br(r)}).toString()}return function(e,...t){const n=fr.parse(e),r=n.path.split("/");for(let e of t)r.push(...e.split("/"));return n.with({path:Br(r)}).toString()}(e,t)}(t.substr(0,t.lastIndexOf("/")+1),e)},schemaRequestService:t.enableSchemaRequest?Pr:void 0,clientCapabilities:yn.LATEST}),this._languageService.configure(this._languageSettings)}async doValidation(e){let t=this._getTextDocument(e);if(t){let e=this._languageService.parseJSONDocument(t);return this._languageService.doValidation(t,e,this._languageSettings)}return Promise.resolve([])}async doComplete(e,t){let n=this._getTextDocument(e);if(!n)return null;let r=this._languageService.parseJSONDocument(n);return this._languageService.doComplete(n,t,r)}async doResolve(e){return this._languageService.doResolve(e)}async doHover(e,t){let n=this._getTextDocument(e);if(!n)return null;let r=this._languageService.parseJSONDocument(n);return this._languageService.doHover(n,t,r)}async format(e,t,n){let r=this._getTextDocument(e);if(!r)return[];let i=this._languageService.format(r,t,n);return Promise.resolve(i)}async resetSchema(e){return Promise.resolve(this._languageService.resetSchema(e))}async findDocumentSymbols(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t),r=this._languageService.findDocumentSymbols2(t,n);return Promise.resolve(r)}async findDocumentColors(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t),r=this._languageService.findDocumentColors(t,n);return Promise.resolve(r)}async getColorPresentations(e,t,n){let r=this._getTextDocument(e);if(!r)return[];let i=this._languageService.parseJSONDocument(r),s=this._languageService.getColorPresentations(r,i,t,n);return Promise.resolve(s)}async getFoldingRanges(e,t){let n=this._getTextDocument(e);if(!n)return[];let r=this._languageService.getFoldingRanges(n,t);return Promise.resolve(r)}async getSelectionRanges(e,t){let n=this._getTextDocument(e);if(!n)return[];let r=this._languageService.parseJSONDocument(n),i=this._languageService.getSelectionRanges(n,t,r);return Promise.resolve(i)}async parseJSONDocument(e){let t=this._getTextDocument(e);if(!t)return null;let n=this._languageService.parseJSONDocument(t);return Promise.resolve(n)}async getMatchingSchemas(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t);return Promise.resolve(this._languageService.getMatchingSchemas(t,n))}_getTextDocument(e){let t=this._ctx.getMirrorModels();for(let n of t)if(n.uri.toString()===e)return fn.create(e,this._languageId,n.version,n.getValue());return null}},Dr="/".charCodeAt(0),Ur=".".charCodeAt(0);function Br(e){const t=[];for(const n of e)0===n.length||1===n.length&&n.charCodeAt(0)===Ur||(2===n.length&&n.charCodeAt(0)===Ur&&n.charCodeAt(1)===Ur?t.pop():t.push(n));e.length>1&&0===e[e.length-1].length&&t.push("");let n=t.join("/");return 0===e[0].length&&(n="/"+n),n}self.onmessage=()=>{s.n((e,t)=>new Rr(e,t))}}}]);
@@ -0,0 +1,6 @@
1
+ /*!-----------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
+ * Released under the MIT license
5
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
6
+ *-----------------------------------------------------------------------------*/
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7413,9794],{17413(e,t,u){u.d(t,{format:()=>_r});var r,n,D=Object.create,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(e,t)=>{for(var u in t)i(e,u,{get:t[u],enumerable:!0})},f=(r=(e,t)=>{var u,r,n,D,i,o,a,s,l,c,f,F,d,p,h,C,g,E,m;d=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]|[^\/\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/uy,F=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,u=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/uy,h=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y,f=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,C=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y,m=/[\t\v\f\ufeff\p{Zs}]+/uy,s=/\r?\n|[\r\u2028\u2029]/y,l=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y,p=/\/\/.*/y,n=/[<>.:={}]|\/(?![\/*])/y,r=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/uy,D=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y,i=/[^<>{}]+/y,E=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,g=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,o=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,a=/^(?:return|throw|yield)$/,c=RegExp(s.source),t.exports=function*(e,{jsx:t=!1}={}){var y,B,b,v,A,w,k,x,S,I,N,O,_,T;for(({length:w}=e),v=0,A="",T=[{tag:"JS"}],y=[],N=0,O=!1;v<w;){switch((x=T[T.length-1]).tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if("/"===e[v]&&(E.test(A)||o.test(A))&&(d.lastIndex=v,k=d.exec(e))){v=d.lastIndex,A=k[0],O=!0,yield{type:"RegularExpressionLiteral",value:k[0],closed:void 0!==k[1]&&"\\"!==k[1]};continue}if(F.lastIndex=v,k=F.exec(e)){switch(_=k[0],S=F.lastIndex,I=_,_){case"(":"?NonExpressionParenKeyword"===A&&T.push({tag:"JSNonExpressionParen",nesting:N}),N++,O=!1;break;case")":N--,O=!0,"JSNonExpressionParen"===x.tag&&N===x.nesting&&(T.pop(),I="?NonExpressionParenEnd",O=!1);break;case"{":F.lastIndex=0,b=!g.test(A)&&(E.test(A)||o.test(A)),y.push(b),O=!1;break;case"}":switch(x.tag){case"InterpolationInTemplate":if(y.length===x.nesting){C.lastIndex=v,k=C.exec(e),v=C.lastIndex,A=k[0],"${"===k[1]?(A="?InterpolationInTemplate",O=!1,yield{type:"TemplateMiddle",value:k[0]}):(T.pop(),O=!0,yield{type:"TemplateTail",value:k[0],closed:"`"===k[1]});continue}break;case"InterpolationInJSX":if(y.length===x.nesting){T.pop(),v+=1,A="}",yield{type:"JSXPunctuator",value:"}"};continue}}I=(O=y.pop())?"?ExpressionBraceEnd":"}";break;case"]":O=!0;break;case"++":case"--":I=O?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(t&&(E.test(A)||o.test(A))){T.push({tag:"JSXTag"}),v+=1,A="<",yield{type:"JSXPunctuator",value:_};continue}O=!1;break;default:O=!1}v=S,A=I,yield{type:"Punctuator",value:_};continue}if(u.lastIndex=v,k=u.exec(e)){switch(v=u.lastIndex,I=k[0],k[0]){case"for":case"if":case"while":case"with":"."!==A&&"?."!==A&&(I="?NonExpressionParenKeyword")}A=I,O=!o.test(k[0]),yield{type:"#"===k[1]?"PrivateIdentifier":"IdentifierName",value:k[0]};continue}if(h.lastIndex=v,k=h.exec(e)){v=h.lastIndex,A=k[0],O=!0,yield{type:"StringLiteral",value:k[0],closed:void 0!==k[2]};continue}if(f.lastIndex=v,k=f.exec(e)){v=f.lastIndex,A=k[0],O=!0,yield{type:"NumericLiteral",value:k[0]};continue}if(C.lastIndex=v,k=C.exec(e)){v=C.lastIndex,A=k[0],"${"===k[1]?(A="?InterpolationInTemplate",T.push({tag:"InterpolationInTemplate",nesting:y.length}),O=!1,yield{type:"TemplateHead",value:k[0]}):(O=!0,yield{type:"NoSubstitutionTemplate",value:k[0],closed:"`"===k[1]});continue}break;case"JSXTag":case"JSXTagEnd":if(n.lastIndex=v,k=n.exec(e)){switch(v=n.lastIndex,I=k[0],k[0]){case"<":T.push({tag:"JSXTag"});break;case">":T.pop(),"/"===A||"JSXTagEnd"===x.tag?(I="?JSX",O=!0):T.push({tag:"JSXChildren"});break;case"{":T.push({tag:"InterpolationInJSX",nesting:y.length}),I="?InterpolationInJSX",O=!1;break;case"/":"<"===A&&(T.pop(),"JSXChildren"===T[T.length-1].tag&&T.pop(),T.push({tag:"JSXTagEnd"}))}A=I,yield{type:"JSXPunctuator",value:k[0]};continue}if(r.lastIndex=v,k=r.exec(e)){v=r.lastIndex,A=k[0],yield{type:"JSXIdentifier",value:k[0]};continue}if(D.lastIndex=v,k=D.exec(e)){v=D.lastIndex,A=k[0],yield{type:"JSXString",value:k[0],closed:void 0!==k[2]};continue}break;case"JSXChildren":if(i.lastIndex=v,k=i.exec(e)){v=i.lastIndex,A=k[0],yield{type:"JSXText",value:k[0]};continue}switch(e[v]){case"<":T.push({tag:"JSXTag"}),v++,A="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":T.push({tag:"InterpolationInJSX",nesting:y.length}),v++,A="?InterpolationInJSX",O=!1,yield{type:"JSXPunctuator",value:"{"};continue}}m.lastIndex=v,(k=m.exec(e))?(v=m.lastIndex,yield{type:"WhiteSpace",value:k[0]}):(s.lastIndex=v,(k=s.exec(e))?(v=s.lastIndex,O=!1,a.test(A)&&(A="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:k[0]}):(l.lastIndex=v,(k=l.exec(e))?(v=l.lastIndex,c.test(k[0])&&(O=!1,a.test(A)&&(A="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:k[0],closed:void 0!==k[1]}):(p.lastIndex=v,(k=p.exec(e))?(v=p.lastIndex,O=!1,yield{type:"SingleLineComment",value:k[0]}):(v+=(B=String.fromCodePoint(e.codePointAt(v))).length,A=B,O=!1,yield{type:x.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:B}))))}}},()=>(n||r(n={exports:{}},n),n.exports));c({},{__debug:()=>jr,check:()=>Tr,doc:()=>or,format:()=>_r,formatWithCursor:()=>Or,getSupportInfo:()=>Pr,util:()=>fr,version:()=>cr});var F=(e,t)=>(u,r,...n)=>1|u&&null==r?void 0:(t.call(r)??r[e]).apply(r,n),d=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},p=F("replaceAll",function(){if("string"==typeof this)return d}),h=class{diff(e,t,u={}){let r;"function"==typeof u?(r=u,u={}):"callback"in u&&(r=u.callback);let n=this.castInput(e,u),D=this.castInput(t,u),i=this.removeEmpty(this.tokenize(n,u)),o=this.removeEmpty(this.tokenize(D,u));return this.diffWithOptionsObj(i,o,u,r)}diffWithOptionsObj(e,t,u,r){var n;let D=e=>(e=this.postProcess(e,u),r?void setTimeout(function(){r(e)},0):e),i=t.length,o=e.length,a=1,s=i+o;null!=u.maxEditLength&&(s=Math.min(s,u.maxEditLength));let l=null!==(n=u.timeout)&&void 0!==n?n:1/0,c=Date.now()+l,f=[{oldPos:-1,lastComponent:void 0}],F=this.extractCommon(f[0],t,e,0,u);if(f[0].oldPos+1>=o&&F+1>=i)return D(this.buildValues(f[0].lastComponent,t,e));let d=-1/0,p=1/0,h=()=>{for(let r=Math.max(d,-a);r<=Math.min(p,a);r+=2){let n,a=f[r-1],s=f[r+1];a&&(f[r-1]=void 0);let l=!1;if(s){let e=s.oldPos-r;l=s&&0<=e&&e<i}let c=a&&a.oldPos+1<o;if(l||c){if(n=!c||l&&a.oldPos<s.oldPos?this.addToPath(s,!0,!1,0,u):this.addToPath(a,!1,!0,1,u),F=this.extractCommon(n,t,e,r,u),n.oldPos+1>=o&&F+1>=i)return D(this.buildValues(n.lastComponent,t,e))||!0;f[r]=n,n.oldPos+1>=o&&(p=Math.min(p,r-1)),F+1>=i&&(d=Math.max(d,r+1))}else f[r]=void 0}a++};if(r)!function e(){setTimeout(function(){if(a>s||Date.now()>c)return r(void 0);h()||e()},0)}();else for(;a<=s&&Date.now()<=c;){let e=h();if(e)return e}}addToPath(e,t,u,r,n){let D=e.lastComponent;return D&&!n.oneChangePerToken&&D.added===t&&D.removed===u?{oldPos:e.oldPos+r,lastComponent:{count:D.count+1,added:t,removed:u,previousComponent:D.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:u,previousComponent:D}}}extractCommon(e,t,u,r,n){let D=t.length,i=u.length,o=e.oldPos,a=o-r,s=0;for(;a+1<D&&o+1<i&&this.equals(u[o+1],t[a+1],n);)a++,o++,s++,n.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return s&&!n.oneChangePerToken&&(e.lastComponent={count:s,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=o,a}equals(e,t,u){return u.comparator?u.comparator(e,t):e===t||!!u.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let u=0;u<e.length;u++)e[u]&&t.push(e[u]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,u){let r,n=[];for(;e;)n.push(e),r=e.previousComponent,delete e.previousComponent,e=r;n.reverse();let D=n.length,i=0,o=0,a=0;for(;i<D;i++){let e=n[i];if(e.removed)e.value=this.join(u.slice(a,a+e.count)),a+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(o,o+e.count);r=r.map(function(e,t){let r=u[a+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(o,o+e.count));o+=e.count,e.added||(a+=e.count)}}return n}},C=new class extends h{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}},g=()=>{},E="crlf",m="\n",y=m;function B(e){return"cr"===e?"\r":e===E?"\r\n":y}var b=new Map([[m,/\n/gu],["\r",/\r/gu],["\r\n",/\r\n/gu]]);function v(e,t){let u=b.get(t);return e.match(u)?.length??0}var A=/\r\n?/gu;function w(e){return this[e<0?this.length+e:e]}var k=F("at",function(){if(Array.isArray(this)||"string"==typeof this)return w}),x="string",S="array",I="cursor",N="indent",O="align",_="trim",T="group",P="fill",j="if-break",L="indent-if-break",$="line-suffix",R="line-suffix-boundary",M="line",J="label",V="break-parent",W=new Set([I,N,O,_,T,P,j,L,$,R,M,J,V]),K=function(e){if("string"==typeof e)return x;if(Array.isArray(e))return S;if(!e)return;let{type:t}=e;return W.has(t)?t:void 0};var z=class extends Error{name="InvalidDocError";constructor(e){super(function(e){let t=null===e?"null":typeof e;if("string"!==t&&"object"!==t)return`Unexpected doc '${t}', \nExpected it to be 'string' or 'object'.`;if(K(e))throw new Error("doc is valid.");let u=Object.prototype.toString.call(e);if("[object Object]"!==u)return`Unexpected doc '${u}'.`;let r=(e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e))([...W].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.\nExpected it to be ${r}.`}(e)),this.doc=e}},X=z,U={},q=function(e,t,u,r){let n=[e];for(;n.length>0;){let e=n.pop();if(e===U){u(n.pop());continue}u&&n.push(e,U);let D=K(e);if(!D)throw new X(e);if(!1!==t?.(e))switch(D){case S:case P:{let t=D===S?e:e.parts;for(let e=t.length-1;e>=0;--e)n.push(t[e]);break}case j:n.push(e.flatContents,e.breakContents);break;case T:if(r&&e.expandedStates)for(let t=e.expandedStates.length-1;t>=0;--t)n.push(e.expandedStates[t]);else n.push(e.contents);break;case O:case N:case L:case J:case $:n.push(e.contents);break;case x:case I:case _:case R:case M:case V:break;default:throw new X(e)}}};function H(e,t){if("string"==typeof e)return t(e);let u=new Map;return function e(r){if(u.has(r))return u.get(r);let n=function(u){switch(K(u)){case S:return t(u.map(e));case P:return t({...u,parts:u.parts.map(e)});case j:return t({...u,breakContents:e(u.breakContents),flatContents:e(u.flatContents)});case T:{let{expandedStates:r,contents:n}=u;return r?(r=r.map(e),n=r[0]):n=e(n),t({...u,contents:n,expandedStates:r})}case O:case N:case L:case J:case $:return t({...u,contents:e(u.contents)});case x:case I:case _:case R:case M:case V:return t(u);default:throw new X(u)}}(r);return u.set(r,n),n}(e)}function G(e,t,u){let r=u,n=!1;return q(e,function(e){if(n)return!1;let u=t(e);void 0!==u&&(n=!0,r=u)}),r}function Y(e){if(e.type===T&&e.break||e.type===M&&e.hard||e.type===V)return!0}function Z(e){if(e.length>0){let t=k(0,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Q(e){return e.type!==M||e.hard?e.type===j?e.flatContents:e:e.soft?"":" "}function ee(e){for(e=[...e];e.length>=2&&k(0,e,-2).type===M&&k(0,e,-1).type===V;)e.length-=2;if(e.length>0){let t=te(k(0,e,-1));e[e.length-1]=t}return e}function te(e){switch(K(e)){case N:case L:case T:case $:case J:{let t=te(e.contents);return{...e,contents:t}}case j:return{...e,breakContents:te(e.breakContents),flatContents:te(e.flatContents)};case P:return{...e,parts:ee(e.parts)};case S:return ee(e);case x:return function(e){let t=e.length;for(;t>0&&("\r"===e[t-1]||"\n"===e[t-1]);)t--;return t<e.length?e.slice(0,t):e}(e);case O:case I:case _:case R:case M:case V:break;default:throw new X(e)}return e}function ue(e){return te(function(e){return H(e,e=>function(e){switch(K(e)){case P:if(e.parts.every(e=>""===e))return"";break;case T:if(!(e.contents||e.id||e.break||e.expandedStates))return"";if(e.contents.type===T&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case O:case N:case L:case $:if(!e.contents)return"";break;case j:if(!e.flatContents&&!e.breakContents)return"";break;case S:{let t=[];for(let u of e){if(!u)continue;let[e,...r]=Array.isArray(u)?u:[u];"string"==typeof e&&"string"==typeof k(0,t,-1)?t[t.length-1]+=e:t.push(e),t.push(...r)}return 0===t.length?"":1===t.length?t[0]:t}case x:case I:case _:case R:case M:case J:case V:break;default:throw new X(e)}return e}(e))}(e))}function re(e){if(e.type===M)return!0}function ne(e,t){return e.type===J?{...e,contents:t(e.contents)}:t(e)}var De=g,ie=g,oe=g,ae=g;function se(e){return De(e),{type:N,contents:e}}function le(e,t){return ae(e),De(t),{type:O,contents:t,n:e}}function ce(e){return le({type:"root"},e)}function fe(e,t,u){De(e);let r=e;if(t>0){for(let e=0;e<Math.floor(t/u);++e)r=se(r);r=le(t%u,r),r=le(Number.NEGATIVE_INFINITY,r)}return r}var Fe={type:V},de={type:I};function pe(e,t={}){return De(e),ie(t.expandedStates,!0),{type:T,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function he(e,t){De(e),ie(t);let u=[];for(let r=0;r<t.length;r++)0!==r&&u.push(e),u.push(t[r]);return u}var Ce={type:M},ge={type:M,soft:!0},Ee={type:M,hard:!0},me=[Ee,Fe],ye={type:M,hard:!0,literal:!0},Be=[ye,Fe];function be(e){return De(e),{type:$,contents:e}}var ve={type:R},Ae={type:_};function we(e){if(!e)return"";if(Array.isArray(e)){let t=[];for(let u of e)if(Array.isArray(u))t.push(...we(u));else{let e=we(u);""!==e&&t.push(e)}return t}return e.type===j?{...e,breakContents:we(e.breakContents),flatContents:we(e.flatContents)}:e.type===T?{...e,contents:we(e.contents),expandedStates:e.expandedStates?.map(we)}:e.type===P?{type:"fill",parts:e.parts.map(we)}:e.contents?{...e,contents:we(e.contents)}:e}function ke(e){return 12288===e||e>=65281&&e<=65376||e>=65504&&e<=65510}function xe(e){return e>=4352&&e<=4447||8986===e||8987===e||9001===e||9002===e||e>=9193&&e<=9196||9200===e||9203===e||9725===e||9726===e||9748===e||9749===e||e>=9776&&e<=9783||e>=9800&&e<=9811||9855===e||e>=9866&&e<=9871||9875===e||9889===e||9898===e||9899===e||9917===e||9918===e||9924===e||9925===e||9934===e||9940===e||9962===e||9970===e||9971===e||9973===e||9978===e||9981===e||9989===e||9994===e||9995===e||10024===e||10060===e||10062===e||e>=10067&&e<=10069||10071===e||e>=10133&&e<=10135||10160===e||10175===e||11035===e||11036===e||11088===e||11093===e||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||110589===e||110590===e||e>=110592&&e<=110882||110898===e||e>=110928&&e<=110930||110933===e||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||126980===e||127183===e||127374===e||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||127568===e||127569===e||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||127988===e||e>=127992&&e<=128062||128064===e||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||128378===e||128405===e||128406===e||128420===e||e>=128507&&e<=128591||e>=128640&&e<=128709||128716===e||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||128747===e||128748===e||e>=128756&&e<=128764||e>=128992&&e<=129003||129008===e||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||129736===e||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var Se=/[^\x20-\x7F]/u,Ie=new Set("©®‼⁉™ℹ↔↕↖↗↘↙↩↪⌨⏏⏱⏲⏸⏹⏺▪▫▶◀◻◼☀☁☂☃☄☎☑☘☝☠☢☣☦☪☮☯☸☹☺♀♂♟♠♣♥♦♨♻♾⚒⚔⚕⚖⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛱⛷⛸⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅⬆⬇"),Ne=function(e){if(!e)return 0;if(!Se.test(e))return e.length;e=e.replace(/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,e=>Ie.has(e)?" ":" ");let t=0;for(let u of e){let e=u.codePointAt(0);e<=31||e>=127&&e<=159||e>=768&&e<=879||e>=65024&&e<=65039||(t+=ke(e)||xe(e)?2:1)}return t},Oe={type:0},_e={type:1},Te={value:"",length:0,queue:[],get root(){return Te}};function Pe(e,t,u){let r=1===t.type?e.queue.slice(0,-1):[...e.queue,t],n="",D=0,i=0,o=0;for(let e of r)switch(e.type){case 0:l(),u.useTabs?a(1):s(u.tabWidth);break;case 3:{let{string:t}=e;l(),n+=t,D+=t.length;break}case 2:{let{width:t}=e;i+=1,o+=t;break}default:throw new Error(`Unexpected indent comment '${e.type}'.`)}return c(),{...e,value:n,length:D,queue:r};function a(e){n+="\t".repeat(e),D+=u.tabWidth*e}function s(e){n+=" ".repeat(e),D+=e}function l(){u.useTabs?(i>0&&a(i),f()):c()}function c(){o>0&&s(o),f()}function f(){i=0,o=0}}function je(e,t,u){if(!t)return e;if("root"===t.type)return{...e,root:e};if(t===Number.NEGATIVE_INFINITY)return e.root;let r;return r="number"==typeof t?t<0?_e:{type:2,width:t}:{type:3,string:t},Pe(e,r,u)}function Le(e,t){return Pe(e,Oe,t)}function $e(e){let t=function(e){let t=0;for(let u=e.length-1;u>=0;u--){let r=e[u];if(" "!==r&&"\t"!==r)break;t++}return t}(e);return{text:0===t?e:e.slice(0,e.length-t),count:t}}var Re=Symbol("MODE_BREAK"),Me=Symbol("MODE_FLAT"),Je=Symbol("DOC_FILL_PRINTED_LENGTH");function Ve(e,t,u,r,n,D){if(u===Number.POSITIVE_INFINITY)return!0;let i=t.length,o=!1,a=[e],s="";for(;u>=0;){if(0===a.length){if(0===i)return!0;a.push(t[--i]);continue}let{mode:e,doc:l}=a.pop(),c=K(l);switch(c){case x:l&&(o&&(s+=" ",u-=1,o=!1),s+=l,u-=Ne(l));break;case S:case P:{let t=c===S?l:l.parts,u=l[Je]??0;for(let r=t.length-1;r>=u;r--)a.push({mode:e,doc:t[r]});break}case N:case O:case L:case J:a.push({mode:e,doc:l.contents});break;case _:{let{text:e,count:t}=$e(s);s=e,u+=t;break}case T:{if(D&&l.break)return!1;let t=l.break?Re:e,u=l.expandedStates&&t===Re?k(0,l.expandedStates,-1):l.contents;a.push({mode:t,doc:u});break}case j:{let t=(l.groupId?n[l.groupId]||Me:e)===Re?l.breakContents:l.flatContents;t&&a.push({mode:e,doc:t});break}case M:if(e===Re||l.hard)return!0;l.soft||(o=!0);break;case $:r=!0;break;case R:if(r)return!1}}return!1}function We(e,t){let u=Object.create(null),r=t.printWidth,n=B(t.endOfLine),D=0,i=[{indent:Te,mode:Re,doc:e}],o="",a=!1,s=[],l=[],c=[],f=[],F=0;for(function(e){let t=new Set,u=[];q(e,function(e){if(e.type===V&&Z(u),e.type===T){if(u.push(e),t.has(e))return!1;t.add(e)}},function(e){e.type===T&&u.pop().break&&Z(u)},!0)}(e);i.length>0;){let{indent:e,mode:c,doc:f}=i.pop();switch(K(f)){case x:{let e="\n"!==n?p(0,f,"\n",n):f;e&&(o+=e,i.length>0&&(D+=Ne(e)));break}case S:for(let t=f.length-1;t>=0;t--)i.push({indent:e,mode:c,doc:f[t]});break;case I:if(l.length>=2)throw new Error("There are too many 'cursor' in doc.");l.push(F+o.length);break;case N:i.push({indent:Le(e,t),mode:c,doc:f.contents});break;case O:i.push({indent:je(e,f.n,t),mode:c,doc:f.contents});break;case _:g();break;case T:switch(c){case Me:if(!a){i.push({indent:e,mode:f.break?Re:Me,doc:f.contents});break}case Re:{a=!1;let t={indent:e,mode:Me,doc:f.contents},n=r-D,o=s.length>0;if(!f.break&&Ve(t,i,n,o,u))i.push(t);else if(f.expandedStates){let t=k(0,f.expandedStates,-1);if(f.break){i.push({indent:e,mode:Re,doc:t});break}for(let r=1;r<f.expandedStates.length+1;r++){if(r>=f.expandedStates.length){i.push({indent:e,mode:Re,doc:t});break}{let t=f.expandedStates[r],D={indent:e,mode:Me,doc:t};if(Ve(D,i,n,o,u)){i.push(D);break}}}}else i.push({indent:e,mode:Re,doc:f.contents});break}}f.id&&(u[f.id]=k(0,i,-1).mode);break;case P:{let t=r-D,n=f[Je]??0,{parts:o}=f,a=o.length-n;if(0===a)break;let l=o[n+0],F=o[n+1],d={indent:e,mode:Me,doc:l},p={indent:e,mode:Re,doc:l},h=Ve(d,[],t,s.length>0,u,!0);if(1===a){h?i.push(d):i.push(p);break}let C={indent:e,mode:Me,doc:F},g={indent:e,mode:Re,doc:F};if(2===a){h?i.push(C,d):i.push(g,p);break}let E=o[n+2],m={indent:e,mode:c,doc:{...f,[Je]:n+2}},y=Ve({indent:e,mode:Me,doc:[l,F,E]},[],t,s.length>0,u,!0);i.push(m),y?i.push(C,d):h?i.push(g,d):i.push(g,p);break}case j:case L:{let t=f.groupId?u[f.groupId]:c;if(t===Re){let t=f.type===j?f.breakContents:f.negate?f.contents:se(f.contents);t&&i.push({indent:e,mode:c,doc:t})}if(t===Me){let t=f.type===j?f.flatContents:f.negate?se(f.contents):f.contents;t&&i.push({indent:e,mode:c,doc:t})}break}case $:s.push({indent:e,mode:c,doc:f.contents});break;case R:s.length>0&&i.push({indent:e,mode:c,doc:Ee});break;case M:switch(c){case Me:if(!f.hard){f.soft||(o+=" ",D+=1);break}a=!0;case Re:if(s.length>0){i.push({indent:e,mode:c,doc:f},...s.reverse()),s.length=0;break}f.literal?(o+=n,D=0,e.root&&(e.root.value&&(o+=e.root.value),D=e.root.length)):(g(),o+=n+e.value,D=e.length)}break;case J:i.push({indent:e,mode:c,doc:f.contents});break;case V:break;default:throw new X(f)}0===i.length&&s.length>0&&(i.push(...s.reverse()),s.length=0)}let d=c.join("")+o,h=[...f,...l];if(2!==h.length)return{formatted:d};let C=h[0];return{formatted:d,cursorNodeStart:C,cursorNodeText:d.slice(C,k(0,h,-1))};function g(){let{text:e,count:t}=$e(o);e&&(c.push(e),F+=e.length),o="",D-=t,l.length>0&&(f.push(...l.map(e=>Math.min(e,F))),l.length=0)}}var Ke=function(e,t,u=0){let r=0;for(let n=u;n<e.length;++n)"\t"===e[n]?r=r+t-r%t:r++;return r},ze=class{constructor(e){this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return k(0,e,null===t?-2:-4)??null}get index(){return null===this.siblings?null:k(0,this.stack,-2)}get node(){return k(0,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return null!==this.siblings}get siblings(){let{stack:e}=this,t=k(0,e,-3);return Array.isArray(t)?t:null}get next(){let{siblings:e}=this;return null===e?null:e[this.index+1]}get previous(){let{siblings:e}=this;return null===e?null:e[this.index-1]}get isFirst(){return 0===this.index}get isLast(){let{siblings:e,index:t}=this;return null!==e&&t===e.length-1}get isRoot(){return 1===this.stack.length}get root(){return this.stack[0]}get ancestors(){return[...this.#e()]}getName(){let{stack:e}=this,{length:t}=e;return t>1?k(0,e,-2):null}getValue(){return k(0,this.stack,-1)}getNode(e=0){let t=this.#t(e);return-1===t?null:this.stack[t]}getParentNode(e=0){return this.getNode(e+1)}#t(e){let{stack:t}=this;for(let u=t.length-1;u>=0;u-=2)if(!Array.isArray(t[u])&&--e<0)return u;return-1}call(e,...t){let{stack:u}=this,{length:r}=u,n=k(0,u,-1);for(let e of t)n=n?.[e],u.push(e,n);try{return e(this)}finally{u.length=r}}callParent(e,t=0){let u=this.#t(t+1),r=this.stack.splice(u+1);try{return e(this)}finally{this.stack.push(...r)}}each(e,...t){let{stack:u}=this,{length:r}=u,n=k(0,u,-1);for(let e of t)n=n[e],u.push(e,n);try{for(let t=0;t<n.length;++t)u.push(t,n[t]),e(this,t,n),u.length-=2}finally{u.length=r}}map(e,...t){let u=[];return this.each((t,r,n)=>{u[r]=e(t,r,n)},...t),u}match(...e){let t=this.stack.length-1,u=null,r=this.stack[t--];for(let n of e){if(void 0===r)return!1;let e=null;if("number"==typeof u&&(e=u,u=this.stack[t--],r=this.stack[t--]),n&&!n(r,u,e))return!1;u=this.stack[t--],r=this.stack[t--]}return!0}findAncestor(e){for(let t of this.#e())if(e(t))return t}hasAncestor(e){for(let t of this.#e())if(e(t))return!0;return!1}*#e(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let u=e[t];Array.isArray(u)||(yield u)}}},Xe=function(e){return null!==e&&"object"==typeof e};function Ue(e){return(t,u,r)=>{let n=!!r?.backwards;if(!1===u)return!1;let{length:D}=t,i=u;for(;i>=0&&i<D;){let u=t.charAt(i);if(e instanceof RegExp){if(!e.test(u))return i}else if(!e.includes(u))return i;n?i--:i++}return(-1===i||i===D)&&i}}var qe=Ue(/\s/u),He=Ue(" \t"),Ge=Ue(",; \t"),Ye=Ue(/[^\n\r]/u),Ze=e=>"\n"===e||"\r"===e||"\u2028"===e||"\u2029"===e,Qe=function(e,t,u){let r=!!u?.backwards;if(!1===t)return!1;let n=e.charAt(t);if(r){if("\r"===e.charAt(t-1)&&"\n"===n)return t-2;if(Ze(n))return t-1}else{if("\r"===n&&"\n"===e.charAt(t+1))return t+2;if(Ze(n))return t+1}return t},et=function(e,t,u={}){let r=He(e,u.backwards?t-1:t,u);return r!==Qe(e,r,u)};function*tt(e,t){let{getVisitorKeys:u,filter:r=()=>!0}=t,n=e=>Xe(e)&&r(e);for(let t of u(e)){let u=e[t];if(Array.isArray(u))for(let e of u)n(e)&&(yield e);else n(u)&&(yield u)}}var ut=function e(t,u,r){let{cache:n}=r;if(n.has(t))return n.get(t);let{filter:D}=r;if(!D)return[];let i,o=(r.getChildren?.(t,r)??[...tt(t,{getVisitorKeys:r.getVisitorKeys})]).flatMap(n=>(i??(i=[t,...u]),D(n,i)?[n]:e(n,i,r))),{locStart:a,locEnd:s}=r;return o.sort((e,t)=>a(e)-a(t)||s(e)-s(t)),n.set(t,o),o};function rt(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=function(e){let t=e.type||e.kind||"(unknown type)",u=String(e.name||e.id&&("object"==typeof e.id?e.id.name:e.id)||e.key&&("object"==typeof e.key?e.key.name:e.key)||e.value&&("object"==typeof e.value?"":String(e.value))||e.operator||"");return u.length>20&&(u=u.slice(0,19)+"…"),t+(u?" "+u:"")}(e)}function nt(e,t){t.leading=!0,t.trailing=!1,rt(e,t)}function Dt(e,t,u){t.leading=!1,t.trailing=!1,u&&(t.marker=u),rt(e,t)}function it(e,t){t.leading=!1,t.trailing=!0,rt(e,t)}var ot=new WeakMap;function at(e,t,u,r,n=[]){let D,i,{locStart:o,locEnd:a}=u,s=o(t),l=a(t),c=ut(e,n,{cache:ot,locStart:o,locEnd:a,getVisitorKeys:u.getVisitorKeys,filter:u.printer.canAttachComment,getChildren:u.printer.getCommentChildNodes}),f=0,F=c.length;for(;f<F;){let e=f+F>>1,r=c[e],d=o(r),p=a(r);if(d<=s&&l<=p)return at(r,t,u,r,[r,...n]);if(p<=s)D=r,f=e+1;else{if(!(l<=d))throw new Error("Comment location overlaps with node location");i=r,F=e}}if("TemplateLiteral"===r?.type){let{quasis:e}=r,n=dt(e,t,u);D&&dt(e,D,u)!==n&&(D=null),i&&dt(e,i,u)!==n&&(i=null)}return{enclosingNode:r,precedingNode:D,followingNode:i}}var st=()=>!1,lt=e=>!/[\S\n\u2028\u2029]/u.test(e);function ct(e,t,u,r){let{comment:n,precedingNode:D}=u[r],{locStart:i,locEnd:o}=t,a=i(n);if(D)for(let t=r-1;t>=0;t--){let{comment:r,precedingNode:n}=u[t];if(n!==D||!lt(e.slice(o(r),a)))break;a=i(r)}return et(e,a,{backwards:!0})}function ft(e,t,u,r){let{comment:n,followingNode:D}=u[r],{locStart:i,locEnd:o}=t,a=o(n);if(D)for(let t=r+1;t<u.length;t++){let{comment:r,followingNode:n}=u[t];if(n!==D||!lt(e.slice(a,i(r))))break;a=o(r)}return et(e,a)}function Ft(e,t){let u=e.length;if(0===u)return;let r,{precedingNode:n,followingNode:D}=e[0],i=t.locStart(D);for(r=u;r>0;--r){let{comment:u,precedingNode:n,followingNode:D}=e[r-1];g(),g();let o=t.originalText.slice(t.locEnd(u),i);if(!(t.printer.isGap?.(o,t)??/^[\s(]*$/u.test(o)))break;i=t.locStart(u)}for(let[t,{comment:u}]of e.entries())t<r?it(n,u):nt(D,u);for(let e of[n,D])e.comments&&e.comments.length>1&&e.comments.sort((e,u)=>t.locStart(e)-t.locStart(u));e.length=0}function dt(e,t,u){let r=u.locStart(t)-1;for(let t=1;t<e.length;++t)if(r<u.locStart(e[t]))return t-1;return 0}var pt=function(e,t){let u=t-1;return u=He(e,u,{backwards:!0}),u=Qe(e,u,{backwards:!0}),u=He(e,u,{backwards:!0}),u!==Qe(e,u,{backwards:!0})};function ht(e,t){return e.node.printed=!0,t.printer.printComment(e,t)}var Ct=class extends Error{name="ConfigError"},gt=class extends Error{name="UndefinedParserError"},Et={checkIgnorePragma:{category:"Special",type:"boolean",default:!1,description:"Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.",cliCategory:"Other"},cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:"Maintain existing\n(mixed values within one file are normalised by looking at what's used after the first line)"}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>"string"==typeof e||"function"==typeof e,choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"},{value:"mjml",description:"MJML"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:"Format code ending at a given character offset (exclusive).\nThe range will extend forwards to the end of the selected statement.",cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:"Format code starting at a given character offset.\nThe range will extend backwards to the start of the first line containing the selected statement.",cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function mt({plugins:e=[],showDeprecated:t=!1}={}){let u=e.flatMap(e=>e.languages??[]),r=[];for(let n of function(e){let t=[];for(let[u,r]of Object.entries(e)){let e={name:u,...r};Array.isArray(e.default)&&(e.default=k(0,e.default,-1).value),t.push(e)}return t}(Object.assign({},...e.map(({options:e})=>e),Et)))!t&&n.deprecated||(Array.isArray(n.choices)&&(t||(n.choices=n.choices.filter(e=>!e.deprecated)),"parser"===n.name&&(n.choices=[...n.choices,...yt(n.choices,u,e)])),n.pluginDefaults=Object.fromEntries(e.filter(e=>void 0!==e.defaultOptions?.[n.name]).map(e=>[e.name,e.defaultOptions[n.name]])),r.push(n));return{languages:u,options:r}}function*yt(e,t,u){let r=new Set(e.map(e=>e.value));for(let e of t)if(e.parsers)for(let t of e.parsers)if(!r.has(t)){r.add(t);let n=u.find(e=>e.parsers&&Object.prototype.hasOwnProperty.call(e.parsers,t)),D=e.name;n?.name&&(D+=` (plugin: ${n.name})`),yield{value:t,description:D}}}var Bt=Array.prototype.toReversed??function(){return[...this].reverse()},bt=F("toReversed",function(){if(Array.isArray(this))return Bt}),vt=function(){let e=globalThis,t=e.Deno?.build?.os;return"string"==typeof t?"windows"===t:e.navigator?.platform?.startsWith("Win")??e.process?.platform?.startsWith("win")??!1}();function At(e){if("file:"!==(e=e instanceof URL?e:new URL(e)).protocol)throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function wt(e,t){if(!t)return;let u=(e=>String(e).split(/[/\\]/u).pop())(t).toLowerCase();return e.find(({filenames:e})=>e?.some(e=>e.toLowerCase()===u))??e.find(({extensions:e})=>e?.some(e=>u.endsWith(e)))}function kt(e,t){if(t){if((e=>String(e).startsWith("file:"))(t))try{t=function(e){return vt?function(e){e=At(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return""!==e.hostname&&(t=`\\\\${e.hostname}${t}`),t}(e):function(e){return e=At(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}(e)}(t)}catch{return}if("string"==typeof t)return e.find(({isSupported:e})=>e?.({filepath:t}))}}var xt=function(e,t){let u=bt(0,e.plugins).flatMap(e=>e.languages??[]);return(function(e,t){if(t)return e.find(({name:e})=>e.toLowerCase()===t)??e.find(({aliases:e})=>e?.includes(t))??e.find(({extensions:e})=>e?.includes(`.${t}`))}(u,t.language)??wt(u,t.physicalFile)??wt(u,t.file)??kt(u,t.physicalFile)??kt(u,t.file)??void 0)?.parsers[0]},St={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(null===e||"object"!=typeof e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(e=>St.value(e)).join(", ")}]`;let t=Object.keys(e);return 0===t.length?"{}":`{ ${t.map(t=>`${St.key(t)}: ${St.value(e[t])}`).join(", ")} }`},pair:({key:e,value:t})=>St.value({[e]:t})},It=new Proxy(String,{get:()=>It}),Nt=It,Ot=()=>It,_t=Symbol.for("vnopts.VALUE_NOT_EXIST"),Tt=Symbol.for("vnopts.VALUE_UNCHANGED"),Pt=" ".repeat(2);function jt(e,t,u,r){return[`Invalid ${Nt.red(r.key(e))} value.`,`Expected ${Nt.blue(u)},`,`but received ${t===_t?Nt.gray("nothing"):Nt.red(r.value(t))}.`].join(" ")}function Lt({text:e,list:t},u){let r=[];return e&&r.push(`- ${Nt.blue(e)}`),t&&r.push([`- ${Nt.blue(t.title)}:`].concat(t.values.map(e=>Lt(e,u-Pt.length).replace(/^|\n/g,`$&${Pt}`))).join("\n")),$t(r,u)}function $t(e,t){if(1===e.length)return e[0];let[u,r]=e,[n,D]=e.map(e=>e.split("\n",1)[0].length);return n>t&&n>D?r:u}var Rt=[],Mt=[];function Jt(e,t,u){if(e===t)return 0;let r=u?.maxDistance,n=e;e.length>t.length&&(e=t,t=n);let D=e.length,i=t.length;for(;D>0&&e.charCodeAt(~-D)===t.charCodeAt(~-i);)D--,i--;let o=0;for(;o<D&&e.charCodeAt(o)===t.charCodeAt(o);)o++;if(D-=o,i-=o,void 0!==r&&i-D>r)return r;if(0===D)return void 0!==r&&i>r?r:i;let a,s,l,c,f=0,F=0;for(;f<D;)Mt[f]=e.charCodeAt(o+f),Rt[f]=++f;for(;F<i;){for(a=t.charCodeAt(o+F),l=F++,s=F,f=0;f<D;f++)c=a===Mt[f]?l:l+1,l=Rt[f],s=Rt[f]=l>s?c>s?s+1:c:c>l?l+1:c;if(void 0!==r){let e=s;for(f=0;f<D;f++)Rt[f]<e&&(e=Rt[f]);if(e>r)return r}}return Rt.length=D,Mt.length=D,void 0!==r&&s>r?r:s}var Vt=(e,t,{descriptor:u,logger:r,schemas:n})=>{let D=[`Ignored unknown option ${Nt.yellow(u.pair({key:e,value:t}))}.`],i=function(e,t){if(!Array.isArray(t)||0===t.length)return;let u=e.length;for(let u of t)if(u===e)return u;let r,n=Number.POSITIVE_INFINITY,D=new Set;for(let i of t){if(D.has(i))continue;D.add(i);let t=Math.abs(i.length-u);if(t>=n||t>3)continue;let o=Number.isFinite(n)?Math.min(n,3):3,a=void 0===o?Jt(e,i):Jt(e,i,{maxDistance:o});if(a>3)continue;let s=a;if(void 0!==o&&a===o&&3===o&&(s=Jt(e,i)),s<n&&(n=s,r=i,0===n))break}return n>3?void 0:r}(e,Object.keys(n));i&&D.push(`Did you mean ${Nt.blue(u.key(i))}?`),r.warn(D.join(" "))},Wt=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"],Kt=class{static create(e){return function(e,t){let u=new e(t),r=Object.create(u);for(let e of Wt)e in t&&(r[e]=zt(t[e],u,Kt.prototype[e].length));return r}(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return"nothing"}validate(e,t){return!1}deprecated(e,t){return!1}forward(e,t){}redirect(e,t){}overlap(e,t,u){return e}preprocess(e,t){return e}postprocess(e,t){return Tt}};function zt(e,t,u){return"function"==typeof e?(...r)=>e(...r.slice(0,u-1),t,...r.slice(u-1)):()=>e}var Xt=class extends Kt{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,t){return t.schemas[this._sourceName].validate(e,t)}redirect(e,t){return this._sourceName}},Ut=class extends Kt{expected(){return"anything"}validate(){return!0}},qt=class extends Kt{constructor({valueSchema:e,name:t=e.name,...u}){super({...u,name:t}),this._valueSchema=e}expected(e){let{text:t,list:u}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:t&&`an array of ${t}`,list:u&&{title:"an array of the following values",values:[{list:u}]}}}validate(e,t){if(!Array.isArray(e))return!1;let u=[];for(let r of e){let e=t.normalizeValidateResult(this._valueSchema.validate(r,t),r);!0!==e&&u.push(e.value)}return 0===u.length||{value:u}}deprecated(e,t){let u=[];for(let r of e){let e=t.normalizeDeprecatedResult(this._valueSchema.deprecated(r,t),r);!1!==e&&u.push(...e.map(({value:e})=>({value:[e]})))}return u}forward(e,t){let u=[];for(let r of e){let e=t.normalizeForwardResult(this._valueSchema.forward(r,t),r);u.push(...e.map(Ht))}return u}redirect(e,t){let u=[],r=[];for(let n of e){let e=t.normalizeRedirectResult(this._valueSchema.redirect(n,t),n);"remain"in e&&u.push(e.remain),r.push(...e.redirect.map(Ht))}return 0===u.length?{redirect:r}:{redirect:r,remain:u}}overlap(e,t){return e.concat(t)}};function Ht({from:e,to:t}){return{from:[e],to:t}}var Gt=class extends Kt{expected(){return"true or false"}validate(e){return"boolean"==typeof e}};function Yt(e,t){let u=Object.create(null);for(let r of e){let e=r[t];if(u[e])throw new Error(`Duplicate ${t} ${JSON.stringify(e)}`);u[e]=r}return u}function Zt(e,t){if(e===t)return 0;let u=typeof e,r=typeof t,n=["undefined","object","boolean","number","string"];return u!==r?n.indexOf(u)-n.indexOf(r):"string"!==u?Number(e)-Number(t):e.localeCompare(t)}function Qt(e){return void 0===e?{}:e}function eu(e){if("string"==typeof e)return{text:e};let{text:t,list:u}=e;return function(e){if(!e)throw new Error("Unexpected `expected` result, there should be at least one field.")}(void 0!==(t||u)),u?{text:t,list:{title:u.title,values:u.values.map(eu)}}:{text:t}}function tu(e,t){return!0===e||(!1===e?{value:t}:e)}function uu(e,t,u=!1){return!1!==e&&(!0===e?!!u||[{value:t}]:"value"in e?[e]:0!==e.length&&e)}function ru(e,t){return"string"==typeof e||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function nu(e,t){return void 0===e?[]:Array.isArray(e)?e.map(e=>ru(e,t)):[ru(e,t)]}function Du(e,t){let u=nu("object"==typeof e&&"redirect"in e?e.redirect:e,t);return 0===u.length?{remain:t,redirect:u}:"object"==typeof e&&"remain"in e?{remain:e.remain,redirect:u}:{redirect:u}}var iu,ou=class extends Kt{constructor(e){super(e),this._choices=function(e,t){let u=new Map;for(let r of e){let e=r[t];if(u.has(e))throw new Error(`Duplicate ${t} ${JSON.stringify(e)}`);u.set(e,r)}return u}(e.choices.map(e=>e&&"object"==typeof e?e:{value:e}),"value")}expected({descriptor:e}){let t=Array.from(this._choices.keys()).map(e=>this._choices.get(e)).filter(({hidden:e})=>!e).map(e=>e.value).sort(Zt).map(e.value),u=t.slice(0,-2),r=t.slice(-2);return{text:u.concat(r.join(" or ")).join(", "),list:{title:"one of the following values",values:t}}}validate(e){return this._choices.has(e)}deprecated(e){let t=this._choices.get(e);return!(!t||!t.deprecated)&&{value:e}}forward(e){let t=this._choices.get(e);return t?t.forward:void 0}redirect(e){let t=this._choices.get(e);return t?t.redirect:void 0}},au=class extends Kt{expected(){return"a number"}validate(e,t){return"number"==typeof e}},su=class extends au{expected(){return"an integer"}validate(e,t){return!0===t.normalizeValidateResult(super.validate(e,t),e)&&function(e){return e===Math.floor(e)}(e)}},lu=class extends Kt{expected(){return"a string"}validate(e){return"string"==typeof e}},cu=St,fu=Vt,Fu=(e,t,u)=>{let{text:r,list:n}=u.normalizeExpectedResult(u.schemas[e].expected(u)),D=[];return r&&D.push(jt(e,t,r,u.descriptor)),n&&D.push([jt(e,t,n.title,u.descriptor)].concat(n.values.map(e=>Lt(e,u.loggerPrintWidth))).join("\n")),$t(D,u.loggerPrintWidth)},du=(e,t,{descriptor:u})=>{let r=[`${Nt.yellow("string"==typeof e?u.key(e):u.pair(e))} is deprecated`];return t&&r.push(`we now treat it as ${Nt.blue("string"==typeof t?u.key(t):u.pair(t))}`),r.join("; ")+"."},pu=class{constructor(e,t){let{logger:u=console,loggerPrintWidth:r=80,descriptor:n=cu,unknown:D=fu,invalid:i=Fu,deprecated:o=du,missing:a=()=>!1,required:s=()=>!1,preprocess:l=e=>e,postprocess:c=()=>Tt}=t||{};this._utils={descriptor:n,logger:u||{warn:()=>{}},loggerPrintWidth:r,schemas:Yt(e,"name"),normalizeDefaultResult:Qt,normalizeExpectedResult:eu,normalizeDeprecatedResult:uu,normalizeForwardResult:nu,normalizeRedirectResult:Du,normalizeValidateResult:tu},this._unknownHandler=D,this._invalidHandler=function(e){return(...t)=>{let u=e(...t);return"string"==typeof u?new Error(u):u}}(i),this._deprecatedHandler=o,this._identifyMissing=(e,t)=>!(e in t)||a(e,t),this._identifyRequired=s,this._preprocess=l,this._postprocess=c,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=function(){let e=Object.create(null);return t=>{let u=JSON.stringify(t);return!!e[u]||(e[u]=!0,!1)}}()}normalize(e){let t={},u=[this._preprocess(e,this._utils)],r=()=>{for(;0!==u.length;){let e=u.shift(),r=this._applyNormalization(e,t);u.push(...r)}};r();for(let e of Object.keys(this._utils.schemas)){let r=this._utils.schemas[e];if(!(e in t)){let t=Qt(r.default(this._utils));"value"in t&&u.push({[e]:t.value})}}r();for(let e of Object.keys(this._utils.schemas)){if(!(e in t))continue;let u=this._utils.schemas[e],r=t[e],n=u.postprocess(r,this._utils);n!==Tt&&(this._applyValidation(n,e,u),t[e]=n)}return this._applyPostprocess(t),this._applyRequiredCheck(t),t}_applyNormalization(e,t){let u=[],{knownKeys:r,unknownKeys:n}=this._partitionOptionKeys(e);for(let n of r){let r=this._utils.schemas[n],D=r.preprocess(e[n],this._utils);this._applyValidation(D,n,r);let i=({from:e,to:t})=>{u.push("string"==typeof t?{[t]:e}:{[t.key]:t.value})},o=({value:e,redirectTo:t})=>{let u=uu(r.deprecated(e,this._utils),D,!0);if(!1!==u)if(!0===u)this._hasDeprecationWarned(n)||this._utils.logger.warn(this._deprecatedHandler(n,t,this._utils));else for(let{value:e}of u){let u={key:n,value:e};if(!this._hasDeprecationWarned(u)){let r="string"==typeof t?{key:t,value:e}:t;this._utils.logger.warn(this._deprecatedHandler(u,r,this._utils))}}};nu(r.forward(D,this._utils),D).forEach(i);let a=Du(r.redirect(D,this._utils),D);if(a.redirect.forEach(i),"remain"in a){let e=a.remain;t[n]=n in t?r.overlap(t[n],e,this._utils):e,o({value:e})}for(let{from:e,to:t}of a.redirect)o({value:e,redirectTo:t})}for(let r of n){let n=e[r];this._applyUnknownHandler(r,n,t,(e,t)=>{u.push({[e]:t})})}return u}_applyRequiredCheck(e){for(let t of Object.keys(this._utils.schemas))if(this._identifyMissing(t,e)&&this._identifyRequired(t))throw this._invalidHandler(t,_t,this._utils)}_partitionOptionKeys(e){let[t,u]=function(e,t){let u=[],r=[];for(let n of e)t(n)?u.push(n):r.push(n);return[u,r]}(Object.keys(e).filter(t=>!this._identifyMissing(t,e)),e=>e in this._utils.schemas);return{knownKeys:t,unknownKeys:u}}_applyValidation(e,t,u){let r=tu(u.validate(e,this._utils),e);if(!0!==r)throw this._invalidHandler(t,r.value,this._utils)}_applyUnknownHandler(e,t,u,r){let n=this._unknownHandler(e,t,this._utils);if(n)for(let e of Object.keys(n)){if(this._identifyMissing(e,n))continue;let t=n[e];e in this._utils.schemas?r(e,t):u[e]=t}}_applyPostprocess(e){let t=this._postprocess(e,this._utils);if(t!==Tt){if(t.delete)for(let u of t.delete)delete e[u];if(t.override){let{knownKeys:u,unknownKeys:r}=this._partitionOptionKeys(t.override);for(let r of u){let u=t.override[r];this._applyValidation(u,r,this._utils.schemas[r]),e[r]=u}for(let u of r){let r=t.override[u];this._applyUnknownHandler(u,r,e,(t,u)=>{let r=this._utils.schemas[t];this._applyValidation(u,t,r),e[t]=u})}}}}};function hu(e,{isCLI:t,optionInfos:u,FlagSchema:r}){let n,{name:D}=e,i={name:D},o={};switch(e.type){case"int":n=su,t&&(i.preprocess=Number);break;case"string":case"path":n=lu;break;case"choice":n=ou,i.choices=e.choices.map(t=>t?.redirect?{...t,redirect:{to:{key:e.name,value:t.redirect}}}:t);break;case"boolean":n=Gt;break;case"flag":n=r,i.flags=u.flatMap(e=>[e.alias,e.description&&e.name,e.oppositeDescription&&`no-${e.name}`].filter(Boolean));break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?i.validate=(t,u,r)=>e.exception(t)||u.validate(t,r):i.validate=(e,t,u)=>void 0===e||t.validate(e,u),e.redirect&&(o.redirect=t=>t?{to:"string"==typeof e.redirect?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(o.deprecated=!0),t&&!e.array){let e=i.preprocess||(e=>e);i.preprocess=(t,u,r)=>u.preprocess(e(Array.isArray(t)?k(0,t,-1):t),r)}return e.array?qt.create({...t?{preprocess:e=>Array.isArray(e)?e:[e]}:{},...o,valueSchema:n.create(i)}):n.create({...i,...o})}var Cu=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let u=this[t];if(e(u,t,this))return u}},gu=F("findLast",function(){if(Array.isArray(this))return Cu}),Eu=Symbol.for("PRETTIER_IS_FRONT_MATTER"),mu=[],yu=function(e){return!!e?.[Eu]},Bu=new Set(["yaml","toml"]),bu=({node:e})=>yu(e)&&Bu.has(e.language);async function vu(e,t,u,r){let{node:n}=u,{language:D}=n;if(!Bu.has(D))return;let i,o=n.value.trim();if(o){let t="yaml"===D?D:xt(r,{language:D});if(!t)return;i=o?await e(o,{parser:t}):""}else i=o;return ce([n.startDelimiter,n.explicitLanguage??"",me,i,i?me:"",n.endDelimiter])}var Au=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),wu=e=>Object.keys(e).filter(e=>!Au.has(e)),ku=function(e,t){let u=e?t=>e(t,Au):wu;return t?new Proxy(u,{apply:(e,t,u)=>yu(u[0])?mu:Reflect.apply(e,t,u)}):u};function xu(e,t){if(!t)throw new Error("parserName is required.");let u=gu(0,e,e=>e.parsers&&Object.prototype.hasOwnProperty.call(e.parsers,t));if(u)return u;let r=`Couldn't resolve parser "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new Ct(r)}function Su({plugins:e,parser:t}){return Iu(xu(e,t),t)}function Iu(e,t){let u=e.parsers[t];return"function"==typeof u?u():u}async function Nu(e,t){let u=e.printers[t];return function(e){if(Ou.has(e))return Ou.get(e);let{features:t,getVisitorKeys:u,embed:r,massageAstNode:n,print:D,...i}=e;t=function(e){return{experimental_avoidAstMutation:!1,...e,experimental_frontMatterSupport:Tu(e?.experimental_frontMatterSupport)}}(t);let o=t.experimental_frontMatterSupport;u=ku(u,o.massageAstNode||o.embed||o.print);let a=n;n&&o.massageAstNode&&(a=new Proxy(n,{apply:(e,t,u)=>(function(e,t){bu({node:e})&&(delete t.end,delete t.raw,delete t.value)}(...u),Reflect.apply(e,t,u))}));let s=r;if(r){let e;s=new Proxy(r,{get:(t,n,D)=>"getVisitorKeys"===n?(e??(e=r.getVisitorKeys?ku(r.getVisitorKeys,o.massageAstNode||o.embed):u),e):Reflect.get(t,n,D),apply:(e,t,u)=>o.embed&&bu(...u)?vu:Reflect.apply(e,t,u)})}let l=D;o.print&&(l=new Proxy(D,{apply(e,t,u){let[r]=u;return yu(r.node)?function({node:e}){return e.raw}(r):Reflect.apply(e,t,u)}}));let c={features:t,getVisitorKeys:u,embed:s,massageAstNode:a,print:l,...i};return Ou.set(e,c),c}("function"==typeof u?await u():u)}var Ou=new WeakMap;Symbol("PRINTER_NORMALIZED_MARK");var _u=Object.fromEntries(["clean","embed","print"].map(e=>[e,!1]));function Tu(e){return{..._u,...e}}var Pu={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null},ju=async function(e,t={}){let u={...e};if(!u.parser){if(!u.filepath)throw new gt("No parser and no file path given, couldn't infer a parser.");if(u.parser=xt(u,{physicalFile:u.filepath}),!u.parser)throw new gt(`No parser could be inferred for file "${u.filepath}".`)}let r=mt({plugins:e.plugins,showDeprecated:!0}).options,n={...Pu,...Object.fromEntries(r.filter(e=>void 0!==e.default).map(e=>[e.name,e.default]))},D=xu(u.plugins,u.parser),i=await Iu(D,u.parser);u.astFormat=i.astFormat,u.locEnd=i.locEnd,u.locStart=i.locStart;let o=D.printers?.[i.astFormat]?D:function(e,t){if(!t)throw new Error("astFormat is required.");let u=gu(0,e,e=>e.printers&&Object.prototype.hasOwnProperty.call(e.printers,t));if(u)return u;let r=`Couldn't find plugin for AST format "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new Ct(r)}(u.plugins,i.astFormat),a=await Nu(o,i.astFormat);u.printer=a,u.getVisitorKeys=a.getVisitorKeys;let s={...n,...o.defaultOptions?Object.fromEntries(Object.entries(o.defaultOptions).filter(([,e])=>void 0!==e)):{}};for(let[e,t]of Object.entries(s))(null===u[e]||void 0===u[e])&&(u[e]=t);return"json"===u.parser&&(u.trailingComma="none"),function(e,t,{logger:u=!1,isCLI:r=!1,passThrough:n=!1,FlagSchema:D,descriptor:i}={}){if(r){if(!D)throw new Error("'FlagSchema' option is required.");if(!i)throw new Error("'descriptor' option is required.")}else i=St;let o=n?Array.isArray(n)?(e,t)=>n.includes(e)?{[e]:t}:void 0:(e,t)=>({[e]:t}):(e,t,u)=>{let{_:r,...n}=u.schemas;return Vt(e,t,{...u,schemas:n})},a=function(e,{isCLI:t,FlagSchema:u}){let r=[];t&&r.push(Ut.create({name:"_"}));for(let n of e)r.push(hu(n,{isCLI:t,optionInfos:e,FlagSchema:u})),n.alias&&t&&r.push(Xt.create({name:n.alias,sourceName:n.name}));return r}(t,{isCLI:r,FlagSchema:D}),s=new pu(a,{logger:u,unknown:o,descriptor:i}),l=!1!==u;l&&iu&&(s._hasDeprecationWarned=iu);let c=s.normalize(e);return l&&(iu=s._hasDeprecationWarned),c}(u,r,{passThrough:Object.keys(Pu),...t})},Lu=(((e,t,u)=>{u=null!=e?D(s(e)):{},((e,t,u,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let u of a(t))!l.call(e,u)&&undefined!==u&&i(e,u,{get:()=>t[u],enumerable:!(r=o(t,u))||r.enumerable})})(i(u,"default",{value:e,enumerable:!0}),e)})(f()),"ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"),$u="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";new RegExp("["+Lu+"]"),new RegExp("["+Lu+$u+"]"),Lu=$u=null;var Ru=(new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"]),new Set(["implements","interface","let","package","private","protected","public","static","yield"]),new Set(["eval","arguments"]),(e,t)=>u=>e(t(u)));function Mu(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.gray,invalid:Ru(Ru(e.white,e.bgRed),e.bold),gutter:e.gray,marker:Ru(e.red,e.bold),message:Ru(e.red,e.bold),reset:e.reset}}Mu(Ot()),Mu(Ot());var Ju=/\r\n|[\n\r\u2028\u2029]/;var Vu=async function(e,t){let u,r=await Su(t),n=r.preprocess?await r.preprocess(e,t):e;t.originalText=n;try{u=await r.parse(n,t,t)}catch(t){!function(e,t){let{loc:u}=e;if(u){let r=function(e,t,u={}){let r=new Proxy({},{get:()=>e=>e}),n=e.split(Ju),{start:D,end:i,markerLines:o}=function(e,t,u){let r=Object.assign({column:0,line:-1},e.start),n=Object.assign({},r,e.end),{linesAbove:D=2,linesBelow:i=3}=u||{},o=r.line,a=r.column,s=n.line,l=n.column,c=Math.max(o-(D+1),0),f=Math.min(t.length,s+i);-1===o&&(c=0),-1===s&&(f=t.length);let F=s-o,d={};if(F)for(let e=0;e<=F;e++){let u=e+o;if(a)if(0===e){let e=t[u-1].length;d[u]=[a,e-a+1]}else if(e===F)d[u]=[0,l];else{let r=t[u-e].length;d[u]=[0,r]}else d[u]=!0}else d[o]=a===l?!a||[a,0]:[a,l-a];return{start:c,end:f,markerLines:d}}(t,n,u),a=t.start&&"number"==typeof t.start.column,s=String(i).length,l=e.split(Ju,i).slice(D,i).map((e,t)=>{let n=D+1+t,i=` ${` ${n}`.slice(-s)} |`,a=o[n],l=!o[n+1];if(a){let t="";if(Array.isArray(a)){let n=e.slice(0,Math.max(a[0]-1,0)).replace(/[^\t]/g," "),D=a[1]||1;t=["\n ",r.gutter(i.replace(/\d/g," "))," ",n,r.marker("^").repeat(D)].join(""),l&&u.message&&(t+=" "+r.message(u.message))}return[r.marker(">"),r.gutter(i),e.length>0?` ${e}`:"",t].join("")}return` ${r.gutter(i)}${e.length>0?` ${e}`:""}`}).join("\n");return u.message&&!a&&(l=`${" ".repeat(s+1)}${u.message}\n${l}`),l}(t,u,{highlightCode:!0});throw e.message+="\n"+r,e.codeFrame=r,e}throw e}(t,e)}return{text:n,ast:u}};async function Wu(e,t){({ast:e}=await zu(e,t));let u=new Map,r=new ze(e),n=g,D=new Map;await async function(e,t,u,r,n){if("auto"!==u.embeddedLanguageFormatting)return;let{printer:D}=u,{embed:i}=D;if(!i)return;if(i.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");let{hasPrettierIgnore:o}=D,{getVisitorKeys:a}=i,s=[];!function t(){let{node:r}=e;if(null===r||"object"!=typeof r||o?.(e))return;for(let u of a(r))Array.isArray(r[u])?e.each(t,u):e.call(t,u);let D=i(e,u);if(D){if("function"==typeof D)return void s.push({print:D,node:r,pathStack:[...e.stack]});n.set(r,D)}}();let l=e.stack;for(let{print:r,node:D,pathStack:i}of s)try{e.stack=i;let o=await r(c,t,e,u);o&&n.set(D,o)}catch(e){if(globalThis.PRETTIER_DEBUG)throw e}function c(e,t){return async function(e,t,u,r){let n=await ju({...u,...t,parentParser:u.parser,originalText:e,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:D}=await Vu(e,n);return ue(await r(D,n))}(e,t,u,r)}e.stack=l}(r,o,t,Wu,D);let i=await Ku(r,t,o,void 0,D);if(function(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:u}=e;for(let e of t){if(!e.printed&&!u.has(e))throw new Error('Comment "'+e.value.trim()+'" was not printed. Please report this error!');delete e.printed}}(t),t.cursorOffset>=0){if(t.nodeAfterCursor&&!t.nodeBeforeCursor)return[de,i];if(t.nodeBeforeCursor&&!t.nodeAfterCursor)return[i,de]}return i;function o(e,t){return void 0===e||e===r?a(t):Array.isArray(e)?r.call(()=>a(t),...e):r.call(()=>a(t),e)}function a(e){n(r);let i=r.node;if(null==i)return"";let a=Xe(i)&&void 0===e;if(a&&u.has(i))return u.get(i);let s=Ku(r,t,o,e,D);return a&&u.set(i,s),s}}function Ku(e,t,u,r,n){let D,{node:i}=e,{printer:o}=t;switch(D=o.hasPrettierIgnore?.(e)?function(e,t,u,r){let{originalText:n,[Symbol.for("comments")]:D,locStart:i,locEnd:o,[Symbol.for("printedComments")]:a}=t,{node:s}=e,l=i(s),c=o(s);for(let e of D)i(e)>=l&&o(e)<=c&&a.add(e);let{printPrettierIgnored:f}=t.printer;return f?f(e,t,u,r):n.slice(l,c)}(e,t,u,r):n.has(i)?n.get(i):o.print(e,t,u,r),i){case t.cursorNode:D=ne(D,e=>[de,e,de]);break;case t.nodeBeforeCursor:D=ne(D,e=>[e,de]);break;case t.nodeAfterCursor:D=ne(D,e=>[de,e])}return o.printComment&&!o.willPrintOwnComments?.(e,t)&&(D=function(e,t,u){let{leading:r,trailing:n}=function(e,t){let u=e.node;if(!u)return{};let r=t[Symbol.for("printedComments")];if(0===(u.comments||[]).filter(e=>!r.has(e)).length)return{leading:"",trailing:""};let n,D=[],i=[];return e.each(()=>{let u=e.node;if(r?.has(u))return;let{leading:o,trailing:a}=u;o?D.push(function(e,t){let u=e.node,r=[ht(e,t)],{printer:n,originalText:D,locStart:i,locEnd:o}=t;if(n.isBlockComment?.(u)){let e=et(D,o(u))?et(D,i(u),{backwards:!0})?me:Ce:" ";r.push(e)}else r.push(me);let a=Qe(D,He(D,o(u)));return!1!==a&&et(D,a)&&r.push(me),r}(e,t)):a&&(n=function(e,t,u){let r=e.node,n=ht(e,t),{printer:D,originalText:i,locStart:o}=t,a=D.isBlockComment?.(r);if(u?.hasLineSuffix&&!u?.isBlock||et(i,o(r),{backwards:!0})){let e=pt(i,o(r));return{doc:be([me,e?me:"",n]),isBlock:a,hasLineSuffix:!0}}return!a||u?.hasLineSuffix?{doc:[be([" ",n]),Fe],isBlock:a,hasLineSuffix:!0}:{doc:[" ",n],isBlock:a,hasLineSuffix:!1}}(e,t,n),i.push(n.doc))},"comments"),{leading:D,trailing:i}}(e,u);return r||n?ne(t,e=>[r,e,n]):t}(e,D,t)),D}async function zu(e,t){let u=e.comments??[];t[Symbol.for("comments")]=u,t[Symbol.for("printedComments")]=new Set,function(e,t){let{comments:u}=e;if(delete e.comments,!function(e){return Array.isArray(e)&&e.length>0}(u)||!t.printer.canAttachComment)return;let r=[],{printer:{features:{experimental_avoidAstMutation:n},handleComments:D={}},originalText:i}=t,{ownLine:o=st,endOfLine:a=st,remaining:s=st}=D,l=u.map((r,n)=>({...at(e,r,t),comment:r,text:i,options:t,ast:e,isLastComment:u.length-1===n}));for(let[e,t]of l.entries()){let u,{comment:D,precedingNode:i,enclosingNode:c,followingNode:f,text:F,options:d,ast:p,isLastComment:h}=t;if(n?u=[t]:(D.enclosingNode=c,D.precedingNode=i,D.followingNode=f,u=[D,F,d,p,h]),ct(F,d,l,e))D.placement="ownLine",o(...u)||(f?nt(f,D):i?it(i,D):Dt(c||p,D));else if(ft(F,d,l,e))D.placement="endOfLine",a(...u)||(i?it(i,D):f?nt(f,D):Dt(c||p,D));else if(D.placement="remaining",!s(...u))if(i&&f){let e=r.length;e>0&&r[e-1].followingNode!==f&&Ft(r,d),r.push(t)}else i?it(i,D):f?nt(f,D):Dt(c||p,D)}if(Ft(r,t),!n)for(let e of u)delete e.precedingNode,delete e.enclosingNode,delete e.followingNode}(e,t);let{printer:{preprocess:r}}=t;return{ast:e=r?await r(e,t):e,comments:u}}var Xu=function(e,t){let{cursorOffset:u,locStart:r,locEnd:n,getVisitorKeys:D}=t,i=e=>r(e)<=u&&n(e)>=u,o=e,a=[e];for(let t of function*(e,t){let u=[e];for(let e=0;e<u.length;e++){let r=u[e];for(let e of tt(r,t))yield e,u.push(e)}}(e,{getVisitorKeys:D,filter:i}))a.push(t),o=t;if(function(e,t){return tt(e,t).next().done}(o,{getVisitorKeys:D}))return{cursorNode:o};let s,l,c=-1,f=Number.POSITIVE_INFINITY;for(;a.length>0&&(void 0===s||void 0===l);){o=a.pop();let e=void 0!==s,t=void 0!==l;for(let i of tt(o,{getVisitorKeys:D})){if(!e){let e=n(i);e<=u&&e>c&&(s=i,c=e)}if(!t){let e=r(i);e>=u&&e<f&&(l=i,f=e)}}}return{nodeBeforeCursor:s,nodeAfterCursor:l}},Uu=Array.prototype.findLastIndex??function(e){for(let t=this.length-1;t>=0;t--)if(e(this[t],t,this))return t;return-1},qu=F("findLastIndex",function(){if(Array.isArray(this))return Uu});function Hu(e){let t=qu(0,e,e=>"Program"!==e.type&&"File"!==e.type);return-1===t?e:e.slice(0,t+1)}function Gu(e,t,u,r,n=[],D){let{locStart:i,locEnd:o}=u,a=i(e),s=o(e);if(t>s||t<a||"rangeEnd"===D&&t===a||"rangeStart"===D&&t===s)return;let l=[e,...n],c=ut(e,l,{cache:ot,locStart:i,locEnd:o,getVisitorKeys:u.getVisitorKeys,filter:u.printer.canAttachComment,getChildren:u.printer.getCommentChildNodes});for(let e of c){let n=Gu(e,t,u,r,l,D);if(n)return n}return r(e,n[0])?l:void 0}var Yu=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),Zu=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);function Qu(e,t,u){if(!t)return!1;switch(e.parser){case"flow":case"hermes":case"babel":case"babel-flow":case"babel-ts":case"typescript":case"acorn":case"espree":case"meriyah":case"oxc":case"oxc-ts":case"__babel_estree":return function(e,t){return"DeclareExportDeclaration"!==t&&"TypeParameterDeclaration"!==e&&("Directive"===e||"TypeAlias"===e||"TSExportAssignment"===e||e.startsWith("Declare")||e.startsWith("TSDeclare")||e.endsWith("Statement")||e.endsWith("Declaration"))}(t.type,u?.type);case"json":case"json5":case"jsonc":case"json-stringify":return Yu.has(t.type);case"graphql":return Zu.has(t.kind);case"vue":return"root"!==t.tag}return!1}var er=Symbol("cursor");async function tr(e,t,u=0){if(!e||0===e.trim().length)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:r,text:n}=await Vu(e,t);t.cursorOffset>=0&&(t={...t,...Xu(r,t)});let D=await Wu(r,t);u>0&&(D=fe([me,D],u,t.tabWidth));let i=We(D,t);if(u>0){let e=i.formatted.trim();void 0!==i.cursorNodeStart&&(i.cursorNodeStart-=i.formatted.indexOf(e),i.cursorNodeStart<0&&(i.cursorNodeStart=0,i.cursorNodeText=i.cursorNodeText.trimStart()),i.cursorNodeStart+i.cursorNodeText.length>e.length&&(i.cursorNodeText=i.cursorNodeText.trimEnd())),i.formatted=e+B(t.endOfLine)}let o=t[Symbol.for("comments")];if(t.cursorOffset>=0){let e,u,r,D;if((t.cursorNode||t.nodeBeforeCursor||t.nodeAfterCursor)&&i.cursorNodeText)if(r=i.cursorNodeStart,D=i.cursorNodeText,t.cursorNode)e=t.locStart(t.cursorNode),u=n.slice(e,t.locEnd(t.cursorNode));else{if(!t.nodeBeforeCursor&&!t.nodeAfterCursor)throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");e=t.nodeBeforeCursor?t.locEnd(t.nodeBeforeCursor):0;let r=t.nodeAfterCursor?t.locStart(t.nodeAfterCursor):n.length;u=n.slice(e,r)}else e=0,u=n,r=0,D=i.formatted;let a=t.cursorOffset-e;if(u===D)return{formatted:i.formatted,cursorOffset:r+a,comments:o};let s=u.split("");s.splice(a,0,er);let l=function(e,t){return C.diff(e,t,void 0)}(s,D.split("")),c=r;for(let e of l)if(e.removed){if(e.value.includes(er))break}else c+=e.count;return{formatted:i.formatted,cursorOffset:c,comments:o}}return{formatted:i.formatted,cursorOffset:-1,comments:o}}function ur(e,t,u){return"number"!=typeof t||Number.isNaN(t)||t<0||t>e.length?u:t}function rr(e,t){let{cursorOffset:u,rangeStart:r,rangeEnd:n}=t;return u=ur(e,u,-1),r=ur(e,r,0),n=ur(e,n,e.length),{...t,cursorOffset:u,rangeStart:r,rangeEnd:n}}function nr(e,t){let{cursorOffset:u,rangeStart:r,rangeEnd:n,endOfLine:D}=rr(e,t),i="\ufeff"===e.charAt(0);if(i&&(e=e.slice(1),u--,r--,n--),"auto"===D&&(D=function(e){let t=e.indexOf("\r");return-1!==t?e.charAt(t+1)===m?E:"cr":"lf"}(e)),e.includes("\r")){let t=t=>v(e.slice(0,Math.max(t,0)),"\r\n");u-=t(u),r-=t(r),n-=t(n),e=function(e){return p(0,e,A,m)}(e)}return{hasBOM:i,text:e,options:rr(e,{...t,cursorOffset:u,rangeStart:r,rangeEnd:n,endOfLine:D})}}async function Dr(e,t){let u=await Su(t);return!u.hasPragma||u.hasPragma(e)}async function ir(e,t){let u,{hasBOM:r,text:n,options:D}=nr(e,await ju(t));return D.rangeStart>=D.rangeEnd&&""!==n||D.requirePragma&&!await Dr(n,D)||D.checkIgnorePragma&&await async function(e,t){return(await Su(t)).hasIgnorePragma?.(e)}(n,D)?{formatted:e,cursorOffset:t.cursorOffset,comments:[]}:(D.rangeStart>0||D.rangeEnd<n.length?u=await async function(e,t){let{ast:u,text:r}=await Vu(e,t),[n,D]=function(e,t,u){let{rangeStart:r,rangeEnd:n,locStart:D,locEnd:i}=t,o=e.slice(r,n).search(/\S/u),a=-1===o;if(!a)for(r+=o;n>r&&!/\S/u.test(e[n-1]);--n);let s=Gu(u,r,t,(e,u)=>Qu(t,e,u),[],"rangeStart");if(!s)return;let l,c,f=a?s:Gu(u,n,t,e=>Qu(t,e),[],"rangeEnd");if(f){if((({parser:e})=>"json"===e||"json5"===e||"jsonc"===e||"json-stringify"===e)(t)){let e=function(e,t){return t=new Set(t),e.find(e=>Yu.has(e.type)&&t.has(e))}(s,f);l=e,c=e}else[l,c]=function(e,t,{locStart:u,locEnd:r}){let[n,...D]=e,[i,...o]=t;if(n===i)return[n,i];let a=u(n);for(let e of Hu(o)){if(!(u(e)>=a))break;i=e}let s=r(i);for(let e of Hu(D)){if(!(r(e)<=s))break;if(n=e,n===i)break}return[n,i]}(s,f,t);return[Math.min(D(l),D(c)),Math.max(i(l),i(c))]}}(r,t,u)??[0,0],i=r.slice(n,D),o=Math.min(n,r.lastIndexOf("\n",n)+1),a=r.slice(o,n).match(/^\s*/u)[0],s=Ke(a,t.tabWidth),l=await tr(i,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>n&&t.cursorOffset<=D?t.cursorOffset-n:-1,endOfLine:"lf"},s),c=l.formatted.trimEnd(),{cursorOffset:f}=t;f>D?f+=c.length-i.length:l.cursorOffset>=0&&(f=l.cursorOffset+n);let F=r.slice(0,n)+c+r.slice(D);if("lf"!==t.endOfLine){let e=B(t.endOfLine);f>=0&&"\r\n"===e&&(f+=v(F.slice(0,f),"\n")),F=p(0,F,"\n",e)}return{formatted:F,cursorOffset:f,comments:l.comments}}(n,D):(!D.requirePragma&&D.insertPragma&&D.printer.insertPragma&&!await Dr(n,D)&&(n=D.printer.insertPragma(n)),u=await tr(n,D)),r&&(u.formatted="\ufeff"+u.formatted,u.cursorOffset>=0&&u.cursorOffset++),u)}var or={};c(or,{builders:()=>ar,printer:()=>sr,utils:()=>lr});var ar={join:he,line:Ce,softline:ge,hardline:me,literalline:Be,group:pe,conditionalGroup:function(e,t){return pe(e[0],{...t,expandedStates:e})},fill:function(e){return oe(e),{type:P,parts:e}},lineSuffix:be,lineSuffixBoundary:ve,cursor:de,breakParent:Fe,ifBreak:function(e,t="",u={}){return De(e),""!==t&&De(t),{type:j,breakContents:e,flatContents:t,groupId:u.groupId}},trim:Ae,indent:se,indentIfBreak:function(e,t){return De(e),{type:L,contents:e,groupId:t.groupId,negate:t.negate}},align:le,addAlignmentToDoc:fe,markAsRoot:ce,dedentToRoot:function(e){return le(Number.NEGATIVE_INFINITY,e)},dedent:function(e){return le(-1,e)},hardlineWithoutBreakParent:Ee,literallineWithoutBreakParent:ye,label:function(e,t){return De(t),e?{type:J,label:e,contents:t}:t},concat:e=>e},sr={printDocToString:We},lr={willBreak:function(e){return G(e,Y,!1)},traverseDoc:q,findInDoc:G,mapDoc:H,removeLines:function(e){return H(e,Q)},stripTrailingHardline:ue,replaceEndOfLine:function(e,t=Be){return H(e,e=>"string"==typeof e?he(t,e.split("\n")):e)},canBreak:function(e){return G(e,re,!1)}},cr="3.8.1",fr={};c(fr,{addDanglingComment:()=>Dt,addLeadingComment:()=>nt,addTrailingComment:()=>it,getAlignmentSize:()=>Ke,getIndentSize:()=>Cr,getMaxContinuousCount:()=>gr,getNextNonSpaceNonCommentCharacter:()=>Er,getNextNonSpaceNonCommentCharacterIndex:()=>kr,getPreferredQuote:()=>vr,getStringWidth:()=>Ne,hasNewline:()=>et,hasNewlineInRange:()=>Ar,hasSpaces:()=>wr,isNextLineEmpty:()=>Ir,isNextLineEmptyAfterIndex:()=>hr,isPreviousLineEmpty:()=>xr,makeString:()=>Sr,skip:()=>Ue,skipEverythingButNewLine:()=>Ye,skipInlineComment:()=>Fr,skipNewline:()=>Qe,skipSpaces:()=>He,skipToLineEnd:()=>Ge,skipTrailingComment:()=>dr,skipWhitespace:()=>qe});var Fr=function(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let u=t+2;u<e.length;++u)if("*"===e.charAt(u)&&"/"===e.charAt(u+1))return u+2;return t},dr=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?Ye(e,t):t)},pr=function(e,t){let u=null,r=t;for(;r!==u;)u=r,r=He(e,r),r=Fr(e,r),r=dr(e,r),r=Qe(e,r);return r},hr=function(e,t){let u=null,r=t;for(;r!==u;)u=r,r=Ge(e,r),r=Fr(e,r),r=He(e,r);return r=dr(e,r),r=Qe(e,r),!1!==r&&et(e,r)},Cr=function(e,t){let u=e.lastIndexOf("\n");return-1===u?0:Ke(e.slice(u+1).match(/^[\t ]*/u)[0],t)},gr=function(e,t){let u=e.matchAll(new RegExp(`(?:${function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(t)})+`,"gu"));return u.reduce||(u=[...u]),u.reduce((e,[t])=>Math.max(e,t.length),0)/t.length},Er=function(e,t){let u=pr(e,t);return!1===u?"":e.charAt(u)},mr=Object.freeze({character:"'",codePoint:39}),yr=Object.freeze({character:'"',codePoint:34}),Br=Object.freeze({preferred:mr,alternate:yr}),br=Object.freeze({preferred:yr,alternate:mr}),vr=function(e,t){let{preferred:u,alternate:r}=!0===t||"'"===t?Br:br,{length:n}=e,D=0,i=0;for(let t=0;t<n;t++){let n=e.charCodeAt(t);n===u.codePoint?D++:n===r.codePoint&&i++}return(D>i?r:u).character},Ar=function(e,t,u){for(let r=t;r<u;++r)if("\n"===e.charAt(r))return!0;return!1},wr=function(e,t,u={}){return He(e,u.backwards?t-1:t,u)!==t};function kr(e,t){return 2===arguments.length||"number"==typeof t?pr(e,t):function(e,t,u){return pr(e,u(t))}(...arguments)}function xr(e,t){return 2===arguments.length||"number"==typeof t?pt(e,t):function(e,t,u){return pt(e,u(t))}(...arguments)}function Sr(e,t,u){let r='"'===t?"'":'"',n=p(0,e,/\\(.)|(["'])/gsu,(e,n,D)=>n===r?n:D===t?"\\"+D:D||(u&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(n)?n:"\\"+n));return t+n+t}function Ir(e,t){return 2===arguments.length||"number"==typeof t?hr(e,t):function(e,t,u){return hr(e,u(t))}(...arguments)}function Nr(e,t=1){return async(...u)=>{let r=u[t]??{},n=r.plugins??[];return u[t]={...r,plugins:Array.isArray(n)?n:Object.values(n)},e(...u)}}var Or=Nr(ir);async function _r(e,t){let{formatted:u}=await Or(e,{...t,cursorOffset:-1});return u}async function Tr(e,t){return await _r(e,t)===e}var Pr=Nr(mt,0),jr={parse:Nr(async function(e,t,u){let{text:r,options:n}=nr(e,await ju(t)),D=await Vu(r,n);return u&&(u.preprocessForPrint&&(D.ast=await zu(D.ast,n)),u.massage&&(D.ast=function(e,t){let{printer:u}=t,r=u.massageAstNode;if(!r)return e;let{getVisitorKeys:n}=u,{ignoredProperties:D}=r;return function e(t,u){if(!Xe(t))return t;if(Array.isArray(t))return t.map(t=>e(t,u)).filter(Boolean);let i={},o=new Set(n(t));for(let u in t)!Object.prototype.hasOwnProperty.call(t,u)||D?.has(u)||(o.has(u)?i[u]=e(t[u],t):i[u]=t[u]);let a=r(t,i,u);return null!==a?a??i:void 0}(e)}(D.ast,n))),D}),formatAST:Nr(async function(e,t){return t=await ju(t),We(await Wu(e,t),t)}),formatDoc:Nr(async function(e,t){let u=function(e){let t=Object.create(null),u=new Set;return function e(t,u,n){if("string"==typeof t)return JSON.stringify(t);if(Array.isArray(t)){let u=t.map(e).filter(Boolean);return 1===u.length?u[0]:`[${u.join(", ")}]`}if(t.type===M){let e=n?.[u+1]?.type===V;return t.literal?e?"literalline":"literallineWithoutBreakParent":t.hard?e?"hardline":"hardlineWithoutBreakParent":t.soft?"softline":"line"}if(t.type===V)return n?.[u-1]?.type===M&&n[u-1].hard?void 0:"breakParent";if(t.type===_)return"trim";if(t.type===N)return"indent("+e(t.contents)+")";if(t.type===O)return t.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+e(t.contents)+")":t.n<0?"dedent("+e(t.contents)+")":"root"===t.n.type?"markAsRoot("+e(t.contents)+")":"align("+JSON.stringify(t.n)+", "+e(t.contents)+")";if(t.type===j)return"ifBreak("+e(t.breakContents)+(t.flatContents?", "+e(t.flatContents):"")+(t.groupId?(t.flatContents?"":', ""')+`, { groupId: ${r(t.groupId)} }`:"")+")";if(t.type===L){let u=[];t.negate&&u.push("negate: true"),t.groupId&&u.push(`groupId: ${r(t.groupId)}`);let n=u.length>0?`, { ${u.join(", ")} }`:"";return`indentIfBreak(${e(t.contents)}${n})`}if(t.type===T){let u=[];t.break&&"propagated"!==t.break&&u.push("shouldBreak: true"),t.id&&u.push(`id: ${r(t.id)}`);let n=u.length>0?`, { ${u.join(", ")} }`:"";return t.expandedStates?`conditionalGroup([${t.expandedStates.map(t=>e(t)).join(",")}]${n})`:`group(${e(t.contents)}${n})`}if(t.type===P)return`fill([${t.parts.map(t=>e(t)).join(", ")}])`;if(t.type===$)return"lineSuffix("+e(t.contents)+")";if(t.type===R)return"lineSuffixBoundary";if(t.type===J)return`label(${JSON.stringify(t.label)}, ${e(t.contents)})`;if(t.type===I)return"cursor";throw new Error("Unknown doc type "+t.type)}(we(e));function r(e){if("symbol"!=typeof e)return JSON.stringify(String(e));if(e in t)return t[e];let r=e.description||"symbol";for(let n=0;;n++){let D=r+(n>0?` #${n}`:"");if(!u.has(D))return u.add(D),t[e]=`Symbol.for(${JSON.stringify(D)})`}}}(e),{formatted:r}=await ir(u,{...t,parser:"__js_expression"});return r}),printToDoc:Nr(async function(e,t){t=await ju(t);let{ast:u}=await Vu(e,t);return t.cursorOffset>=0&&(t={...t,...Xu(u,t)}),Wu(u,t)}),printDocToString:Nr(async function(e,t){return We(e,await ju(t))})}}}]);