@weapp-vite/dashboard 6.16.18 → 6.16.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,7 +67,7 @@ You passed in: '`+this.raw_options[e]+`'`);return r},t.prototype._is_valid_selec
67
67
  `,indent_scripts:$(n,`indentScripts`,`normal`),templating:Lc(n,`all`),unformatted_content_delimiter:$(n,`unformattedContentDelimiter`,``)},c=Nc(Fc(r),s);if(a>0){let e=n.insertSpaces?sc(` `,o*a):sc(` `,a);c=c.split(`
68
68
  `).join(`
69
69
  `+e),t.start.character===0&&(c=e+c)}return[{range:t,newText:c}]}function Fc(e){return e.replace(/^\s+/,``)}function $(e,t,n){if(e&&e.hasOwnProperty(t)){let n=e[t];if(n!==null)return n}return n}function Ic(e,t,n){let r=$(e,t,null);return typeof r==`string`?r.length>0?r.split(`,`).map(e=>e.trim().toLowerCase()):[]:n}function Lc(e,t){let n=$(e,`templating`,t);return n===!0?[`auto`]:n===!1||n===t||Array.isArray(n)===!1?[`none`]:n}function Rc(e,t,n){let r=t,i=0,a=n.tabSize||4;for(;r<e.length;){let t=e.charAt(r);if(t===` `)i++;else if(t===` `)i+=a;else break;r++}return Math.floor(i/a)}function zc(e,t){return`\r
70
- `.indexOf(e.charAt(t))!==-1}function Bc(e,t){return` `.indexOf(e.charAt(t))!==-1}var Vc;(()=>{var e={470:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===47)break;n=47}if(n===47){if(!(a===s-1||o===1))if(a!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}var r={resolve:function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},normalize:function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},isAbsolute:function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,o=a-i,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var c=n.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(n.charCodeAt(s+d)===47)return n.slice(s+d+1);if(d===0)return n.slice(s+d)}else o>l&&(e.charCodeAt(i+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=i+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r}(0,e)},parse:function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(n.base=n.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(s,o),n.base=e.slice(s,c)),n.ext=e.slice(o,c)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.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=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})};var r={};(()=>{let e;n.r(r),n.d(r,{URI:()=>c,Utils:()=>x}),typeof process==`object`?e=process.platform===`win32`:typeof navigator==`object`&&(e=navigator.userAgent.indexOf(`Windows`)>=0);let t=/^\w[\w\d+.-]*$/,i=/^\//,a=/^\/\//;function o(e,n){if(!e.scheme&&n)throw 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 Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!i.test(e.path))throw 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(a.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class c{static isUri(e){return e instanceof c||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=function(e,t){return e||t?e:`file`}(e,a),this.authority=t||``,this.path=function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t}(this.scheme,n||``),this.query=r||``,this.fragment=i||``,o(this,a))}get fsPath(){return m(this)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new u(t,n,r,i,a)}static parse(e,t=!1){let n=s.exec(e);return n?new u(n[2]||``,v(n[4]||``),v(n[5]||``),v(n[7]||``),v(n[9]||``),t):new u(``,``,``,``,``)}static file(t){let n=``;if(e&&(t=t.replace(/\\/g,`/`)),t[0]===`/`&&t[1]===`/`){let e=t.indexOf(`/`,2);e===-1?(n=t.substring(2),t=`/`):(n=t.substring(2,e),t=t.substring(e)||`/`)}return new u(`file`,n,t,``,``)}static from(e){let t=new u(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return h(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof c)return e;{let t=new u(e);return t._formatted=e.external,t._fsPath=e._sep===l?e.fsPath:null,t}}return e}}let l=e?1:void 0;class u extends c{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=m(this),this._fsPath}toString(e=!1){return e?h(this,!0):(this._formatted||=h(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=l),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}}let 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 f(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=d[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}function p(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=d[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}function m(t,n){let r;return r=t.authority&&t.path.length>1&&t.scheme===`file`?`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,`\\`)),r}function h(e,t){let n=t?p:f,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:f(c,!1,!1)),r}function g(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+g(e.substr(3)):e}}let _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(_)?e.replace(_,(e=>g(e))):e}var y=n(470);let b=y.posix||y;var x;(function(e){e.joinPath=function(e,...t){return e.with({path:b.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=b.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=b.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return b.basename(e.path)},e.extname=function(e){return b.extname(e.path)}})(x||={})})(),Vc=r})();let{URI:Hc,Utils:Uc}=Vc;function Wc(e){let t=e[0];return t===e[e.length-1]&&(t===`'`||t===`"`)&&(e=e.substring(1,e.length-1)),e}function Gc(e,t){return!e.length||t===`handlebars`&&/{{|}}/.test(e)?!1:/\b(w[\w\d+.-]*:\/\/)?[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))/.test(e)}function Kc(e,t,n,r){if(/^\s*javascript\:/i.test(t)||/[\n\r]/.test(t))return;t=t.replace(/^\s*/g,``);let i=t.match(/^(\w[\w\d+.-]*):/);if(i){let e=i[1].toLowerCase();return e===`http`||e===`https`||e===`file`?t:void 0}return/^\#/i.test(t)?e+t:/^\/\//i.test(t)?(ac(e,`https://`)?`https`:`http`)+`:`+t.replace(/^\s*/g,``):n?n.resolveReference(t,r||e):t}function qc(e,t,n,r,i,a){let o=Wc(n);if(!Gc(o,e.languageId))return;o.length<n.length&&(r++,i--);let s=Kc(e.uri,o,t,a);if(!s)return;let c=Jc(s,e);return{range:G.create(e.positionAt(r),e.positionAt(i)),target:c}}function Jc(e,t){try{let n=Hc.parse(e);return n.scheme===`file`&&n.query&&(n=n.with({query:null}),e=n.toString(!0)),n.scheme===`file`&&n.fragment&&!(e.startsWith(t.uri)&&e.charCodeAt(t.uri.length)===35)?n.with({fragment:null}).toString(!0):e}catch{return}}var Yc=class{constructor(e){this.dataManager=e}findDocumentLinks(e,t){let n=[],r=Q(e.getText(),0),i=r.scan(),a,o,s=!1,c,l={};for(;i!==X.EOS;){switch(i){case X.StartTag:o=r.getTokenText().toLowerCase(),c||(s=o===`base`);break;case X.AttributeName:a=r.getTokenText().toLowerCase();break;case X.AttributeValue:if(o&&a&&this.dataManager.isPathAttribute(o,a)){let i=r.getTokenText();if(!s){let a=qc(e,t,i,r.getTokenOffset(),r.getTokenEnd(),c);a&&n.push(a)}s&&c===void 0&&(c=Wc(i),c&&t&&(c=t.resolveReference(c,e.uri))),s=!1,a=void 0}else if(a===`id`){let e=Wc(r.getTokenText());l[e]=r.getTokenOffset()}break}i=r.scan()}for(let t of n){let n=e.uri+`#`;if(t.target&&ac(t.target,n)){let r=l[t.target.substring(n.length)];if(r!==void 0){let i=e.positionAt(r);t.target=`${n}${i.line+1},${i.character+1}`}else t.target=e.uri}}return n}};function Xc(e,t,n){let r=e.offsetAt(t),i=n.findNodeAt(r);if(!i.tag)return[];let a=[],o=$c(X.StartTag,e,i.start),s=typeof i.endTagStart==`number`&&$c(X.EndTag,e,i.endTagStart);return(o&&Qc(o,t)||s&&Qc(s,t))&&(o&&a.push({kind:as.Read,range:o}),s&&a.push({kind:as.Read,range:s})),a}function Zc(e,t){return e.line<t.line||e.line===t.line&&e.character<=t.character}function Qc(e,t){return Zc(e.start,t)&&Zc(t,e.end)}function $c(e,t,n){let r=Q(t.getText(),n),i=r.scan();for(;i!==X.EOS&&i!==e;)i=r.scan();return i===X.EOS?null:{start:t.positionAt(r.getTokenOffset()),end:t.positionAt(r.getTokenEnd())}}function el(e,t){let n=[],r=tl(e,t);for(let e of r)i(e,void 0);return n;function i(t,r){let a=ls.create(t.name,t.kind,t.range,e.uri,r?.name);if(a.containerName??=``,n.push(a),t.children)for(let e of t.children)i(e,t)}}function tl(e,t){let n=[];return t.roots.forEach(t=>{nl(e,t,n)}),n}function nl(e,t,n){let r=rl(t),i=G.create(e.positionAt(t.start),e.positionAt(t.end)),a=ds.create(r,void 0,ss.Field,i,i);n.push(a),t.children.forEach(t=>{a.children??=[],nl(e,t,a.children)})}function rl(e){let t=e.tag;if(e.attributes){let n=e.attributes.id,r=e.attributes.class;n&&(t+=`#${n.replace(/[\"\']/g,``)}`),r&&(t+=r.replace(/[\"\']/g,``).split(/\s+/).map(e=>`.${e}`).join(``))}return t||`?`}function il(e,t,n,r){let i=e.offsetAt(t),a=r.findNodeAt(i);if(!a.tag||!al(a,i,a.tag))return null;let o=[],s={start:e.positionAt(a.start+1),end:e.positionAt(a.start+1+a.tag.length)};if(o.push({range:s,newText:n}),a.endTagStart){let t={start:e.positionAt(a.endTagStart+2),end:e.positionAt(a.endTagStart+2+a.tag.length)};o.push({range:t,newText:n})}return{changes:{[e.uri.toString()]:o}}}function al(e,t,n){return e.endTagStart&&e.endTagStart+2<=t&&t<=e.endTagStart+2+n.length?!0:e.start+1<=t&&t<=e.start+1+n.length}function ol(e,t,n){let r=e.offsetAt(t),i=n.findNodeAt(r);if(!i.tag||!i.endTagStart)return null;if(i.start+1<=r&&r<=i.start+1+i.tag.length){let t=r-1-i.start+i.endTagStart+2;return e.positionAt(t)}if(i.endTagStart+2<=r&&r<=i.endTagStart+2+i.tag.length){let t=r-2-i.endTagStart+i.start+1;return e.positionAt(t)}return null}function sl(e,t,n){let r=e.offsetAt(t),i=n.findNodeAt(r),a=i.tag?i.tag.length:0;return i.endTagStart&&(i.start+1<=r&&r<=i.start+1+a||i.endTagStart+2<=r&&r<=i.endTagStart+2+a)?[G.create(e.positionAt(i.start+1),e.positionAt(i.start+1+a)),G.create(e.positionAt(i.endTagStart+2),e.positionAt(i.endTagStart+2+a))]:null}var cl=class{constructor(e){this.dataManager=e}limitRanges(e,t){e=e.sort((e,t)=>{let n=e.startLine-t.startLine;return n===0&&(n=e.endLine-t.endLine),n});let n,r=[],i=[],a=[],o=(e,t)=>{i[e]=t,t<30&&(a[t]=(a[t]||0)+1)};for(let t=0;t<e.length;t++){let i=e[t];if(!n)n=i,o(t,0);else if(i.startLine>n.startLine){if(i.endLine<=n.endLine)r.push(n),n=i,o(t,r.length);else if(i.startLine>n.endLine){do n=r.pop();while(n&&i.startLine>n.endLine);n&&r.push(n),n=i,o(t,r.length)}}}let s=0,c=0;for(let e=0;e<a.length;e++){let n=a[e];if(n){if(n+s>t){c=e;break}s+=n}}let l=[];for(let n=0;n<e.length;n++){let r=i[n];typeof r==`number`&&(r<c||r===c&&s++<t)&&l.push(e[n])}return l}getFoldingRanges(e,t){let n=this.dataManager.getVoidElements(e.languageId),r=Q(e.getText()),i=r.scan(),a=[],o=[],s=null,c=-1;function l(e){a.push(e),c=e.startLine}for(;i!==X.EOS;){switch(i){case X.StartTag:{let t=r.getTokenText(),n=e.positionAt(r.getTokenOffset()).line;o.push({startLine:n,tagName:t}),s=t;break}case X.EndTag:s=r.getTokenText();break;case X.StartTagClose:if(!s||!this.dataManager.isVoidElement(s,n))break;case X.EndTagClose:case X.StartTagSelfClose:{let t=o.length-1;for(;t>=0&&o[t].tagName!==s;)t--;if(t>=0){let n=o[t];o.length=t;let i=e.positionAt(r.getTokenOffset()).line,a=n.startLine,s=i-1;s>a&&c!==a&&l({startLine:a,endLine:s})}break}case X.Comment:{let t=e.positionAt(r.getTokenOffset()).line,n=r.getTokenText().match(/^\s*#(region\b)|(endregion\b)/);if(n)if(n[1])o.push({startLine:t,tagName:``});else{let e=o.length-1;for(;e>=0&&o[e].tagName.length;)e--;if(e>=0){let n=o[e];o.length=e;let r=t;t=n.startLine,r>t&&c!==t&&l({startLine:t,endLine:r,kind:Do.Region})}}else{let n=e.positionAt(r.getTokenOffset()+r.getTokenLength()).line;t<n&&l({startLine:t,endLine:n,kind:Do.Comment})}break}}i=r.scan()}let u=t&&t.rangeLimit||Number.MAX_VALUE;return a.length>u?this.limitRanges(a,u):a}},ll=class{constructor(e){this.htmlParser=e}getSelectionRanges(e,t){let n=this.htmlParser.parseDocument(e);return t.map(t=>this.getSelectionRange(t,e,n))}getSelectionRange(e,t,n){let r=this.getApplicableRanges(t,e,n),i,a;for(let e=r.length-1;e>=0;e--){let n=r[e];(!i||n[0]!==i[0]||n[1]!==i[1])&&(a=ys.create(G.create(t.positionAt(r[e][0]),t.positionAt(r[e][1])),a)),i=n}return a||=ys.create(G.create(e,e)),a}getApplicableRanges(e,t,n){let r=e.offsetAt(t),i=n.findNodeAt(r),a=this.getAllParentTagRanges(i);if(i.startTagEnd&&!i.endTagStart){if(i.startTagEnd!==i.end)return[[i.start,i.end]];let t=G.create(e.positionAt(i.startTagEnd-2),e.positionAt(i.startTagEnd));return e.getText(t)===`/>`?a.unshift([i.start+1,i.startTagEnd-2]):a.unshift([i.start+1,i.startTagEnd-1]),a=this.getAttributeLevelRanges(e,i,r).concat(a),a}return!i.startTagEnd||!i.endTagStart?a:(a.unshift([i.start,i.end]),i.start<r&&r<i.startTagEnd?(a.unshift([i.start+1,i.startTagEnd-1]),a=this.getAttributeLevelRanges(e,i,r).concat(a),a):i.startTagEnd<=r&&r<=i.endTagStart?(a.unshift([i.startTagEnd,i.endTagStart]),a):(r>=i.endTagStart+2&&a.unshift([i.endTagStart+2,i.end-1]),a))}getAllParentTagRanges(e){let t=e,n=[];for(;t.parent;)t=t.parent,this.getNodeRanges(t).forEach(e=>n.push(e));return n}getNodeRanges(e){return e.startTagEnd&&e.endTagStart&&e.startTagEnd<e.endTagStart?[[e.startTagEnd,e.endTagStart],[e.start,e.end]]:[[e.start,e.end]]}getAttributeLevelRanges(e,t,n){let r=G.create(e.positionAt(t.start),e.positionAt(t.end)),i=e.getText(r),a=n-t.start,o=Q(i),s=o.scan(),c=t.start,l=[],u=!1,d=-1;for(;s!==X.EOS;){switch(s){case X.AttributeName:if(a<o.getTokenOffset()){u=!1;break}a<=o.getTokenEnd()&&l.unshift([o.getTokenOffset(),o.getTokenEnd()]),u=!0,d=o.getTokenOffset();break;case X.AttributeValue:{if(!u)break;let e=o.getTokenText();if(a<o.getTokenOffset()){l.push([d,o.getTokenEnd()]);break}a>=o.getTokenOffset()&&a<=o.getTokenEnd()&&(l.unshift([o.getTokenOffset(),o.getTokenEnd()]),(e[0]===`"`&&e[e.length-1]===`"`||e[0]===`'`&&e[e.length-1]===`'`)&&a>=o.getTokenOffset()+1&&a<=o.getTokenEnd()-1&&l.unshift([o.getTokenOffset()+1,o.getTokenEnd()-1]),l.push([d,o.getTokenEnd()]));break}}s=o.scan()}return l.map(e=>[e[0]+c,e[1]+c])}};let ul={version:1.1,tags:[{name:`html`,description:{kind:`markdown`,value:`The html element represents the root of an HTML document.`},attributes:[{name:`manifest`,description:{kind:`markdown`,value:`Specifies the URI of a resource manifest indicating resources that should be cached locally. See [Using the application cache](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache) for details.`}},{name:`version`,description:`Specifies the version of the HTML [Document Type Definition](https://developer.mozilla.org/en-US/docs/Glossary/DTD "Document Type Definition: In HTML, the doctype is the required "<!DOCTYPE html>" preamble found at the top of all documents. Its sole purpose is to prevent a browser from switching into so-called “quirks mode” when rendering a document; that is, the "<!DOCTYPE html>" doctype ensures that the browser makes a best-effort attempt at following the relevant specifications, rather than using a different rendering mode that is incompatible with some specifications.") that governs the current document. This attribute is not needed, because it is redundant with the version information in the document type declaration.`},{name:`xmlns`,description:'Specifies the XML Namespace of the document. Default value is `"http://www.w3.org/1999/xhtml"`. This is required in documents parsed with XML parsers, and optional in text/html documents.'}],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/html`}]},{name:`head`,description:{kind:`markdown`,value:`The head element represents a collection of metadata for the Document.`},attributes:[{name:`profile`,description:`The URIs of one or more metadata profiles, separated by white space.`}],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/head`}]},{name:`title`,description:{kind:`markdown`,value:`The title element represents the document's title or name. Authors should use titles that identify their documents even when they are used out of context, for example in a user's history or bookmarks, or in search results. The document's title is often different from its first heading, since the first heading does not have to stand alone when taken out of context.`},attributes:[],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/title`}]},{name:`base`,description:{kind:`markdown`,value:`The base element allows authors to specify the document base URL for the purposes of resolving relative URLs, and the name of the default browsing context for the purposes of following hyperlinks. The element does not represent any content beyond this information.`},void:!0,attributes:[{name:`href`,description:{kind:`markdown`,value:`The base URL to be used throughout the document for relative URL addresses. If this attribute is specified, this element must come before any other elements with attributes whose values are URLs. Absolute and relative URLs are allowed.`}},{name:`target`,valueSet:`target`,description:{kind:`markdown`,value:"A name or keyword indicating the default location to display the result when hyperlinks or forms cause navigation, for elements that do not have an explicit target reference. It is a name of, or keyword for, a _browsing context_ (for example: tab, window, or inline frame). The following keywords have special meanings:\n\n* `_self`: Load the result into the same browsing context as the current one. This value is the default if the attribute is not specified.\n* `_blank`: Load the result into a new unnamed browsing context.\n* `_parent`: Load the result into the parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n* `_top`: Load the result into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`.\n\nIf this attribute is specified, this element must come before any other elements with attributes whose values are URLs."}}],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/base`}]},{name:`link`,description:{kind:`markdown`,value:`The link element allows authors to link their document to other resources.`},void:!0,attributes:[{name:`href`,description:{kind:`markdown`,value:`This attribute specifies the [URL](https://developer.mozilla.org/en-US/docs/Glossary/URL "URL: Uniform Resource Locator (URL) is a text string specifying where a resource can be found on the Internet.") of the linked resource. A URL can be absolute or relative.`}},{name:`crossorigin`,valueSet:`xo`,description:{kind:`markdown`,value:'This enumerated attribute indicates whether [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS "CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.") must be used when fetching the resource. [CORS-enabled images](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas "Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.") element without being _tainted_. The allowed values are:\n\n`anonymous`\n\nA cross-origin request (i.e. with an [`Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin "The Origin request header indicates where a fetch originates from. It doesn\'t include any path information, but only the server name. It is sent with CORS requests, as well as with POST requests. It is similar to the Referer header, but, unlike this header, it doesn\'t disclose the whole path.") HTTP header) is performed, but no credential is sent (i.e. no cookie, X.509 certificate, or HTTP Basic authentication). If the server does not give credentials to the origin site (by not setting the [`Access-Control-Allow-Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin "The Access-Control-Allow-Origin response header indicates whether the response can be shared with requesting code from the given origin.") HTTP header) the image will be tainted and its usage restricted.\n\n`use-credentials`\n\nA cross-origin request (i.e. with an `Origin` HTTP header) is performed along with a credential sent (i.e. a cookie, certificate, and/or HTTP Basic authentication is performed). If the server does not give credentials to the origin site (through [`Access-Control-Allow-Credentials`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials "The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to frontend JavaScript code when the request\'s credentials mode (Request.credentials) is "include".") HTTP header), the resource will be _tainted_ and its usage restricted.\n\nIf the attribute is not present, the resource is fetched without a [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS "CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.") request (i.e. without sending the `Origin` HTTP header), preventing its non-tainted usage. If invalid, it is handled as if the enumerated keyword **anonymous** was used. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for additional information.'}},{name:`rel`,description:{kind:`markdown`,value:`This attribute names a relationship of the linked document to the current document. The attribute must be a space-separated list of the [link types values](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).`}},{name:`media`,description:{kind:`markdown`,value:"This attribute specifies the media that the linked resource applies to. Its value must be a media type / [media query](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries). This attribute is mainly useful when linking to external stylesheets — it allows the user agent to pick the best adapted one for the device it runs on.\n\n**Notes:**\n\n* In HTML 4, this can only be a simple white-space-separated list of media description literals, i.e., [media types and groups](https://developer.mozilla.org/en-US/docs/Web/CSS/@media), where defined and allowed as values for this attribute, such as `print`, `screen`, `aural`, `braille`. HTML5 extended this to any kind of [media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries), which are a superset of the allowed values of HTML 4.\n* Browsers not supporting [CSS3 Media Queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries) won't necessarily recognize the adequate link; do not forget to set fallback links, the restricted set of media queries defined in HTML 4."}},{name:`hreflang`,description:{kind:`markdown`,value:"This attribute indicates the language of the linked resource. It is purely advisory. Allowed values are determined by [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt). Use this attribute only if the [`href`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href) attribute is present."}},{name:`type`,description:{kind:`markdown`,value:'This attribute is used to define the type of the content linked to. The value of the attribute should be a MIME type such as **text/html**, **text/css**, and so on. The common use of this attribute is to define the type of stylesheet being referenced (such as **text/css**), but given that CSS is the only stylesheet language used on the web, not only is it possible to omit the `type` attribute, but is actually now recommended practice. It is also used on `rel="preload"` link types, to make sure the browser only downloads file types that it supports.'}},{name:`sizes`,description:{kind:`markdown`,value:"This attribute defines the sizes of the icons for visual media contained in the resource. It must be present only if the [`rel`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-rel) contains a value of `icon` or a non-standard type such as Apple's `apple-touch-icon`. It may have the following values:\n\n* `any`, meaning that the icon can be scaled to any size as it is in a vector format, like `image/svg+xml`.\n* a white-space separated list of sizes, each in the format `_<width in pixels>_x_<height in pixels>_` or `_<width in pixels>_X_<height in pixels>_`. Each of these sizes must be contained in the resource.\n\n**Note:** Most icon formats are only able to store one single icon; therefore most of the time the [`sizes`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-sizes) contains only one entry. MS's ICO format does, as well as Apple's ICNS. ICO is more ubiquitous; you should definitely use it."}},{name:`as`,description:'This attribute is only used when `rel="preload"` or `rel="prefetch"` has been set on the `<link>` element. It specifies the type of content being loaded by the `<link>`, which is necessary for content prioritization, request matching, application of correct [content security policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP), and setting of correct [`Accept`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept "The Accept request HTTP header advertises which content types, expressed as MIME types, the client is able to understand. Using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the Content-Type response header. Browsers set adequate values for this header depending on\xA0the context where the request is done: when fetching a CSS stylesheet a different value is set for the request than when fetching an image,\xA0video or a script.") request header.'},{name:`importance`,description:`Indicates the relative importance of the resource. Priority hints are delegated using the values:`},{name:`importance`,description:'**`auto`**: Indicates\xA0**no\xA0preference**. The browser may use its own heuristics to decide the priority of the resource.\n\n**`high`**: Indicates to the\xA0browser\xA0that the resource is of\xA0**high** priority.\n\n**`low`**:\xA0Indicates to the\xA0browser\xA0that the resource is of\xA0**low** priority.\n\n**Note:** The `importance` attribute may only be used for the `<link>` element if `rel="preload"` or `rel="prefetch"` is present.'},{name:`integrity`,description:`Contains inline metadata — a base64-encoded cryptographic hash of the resource (file) you’re telling the browser to fetch. The browser can use this to verify that the fetched resource has been delivered free of unexpected manipulation. See [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).`},{name:`referrerpolicy`,description:'A string indicating which referrer to use when fetching the resource:\n\n* `no-referrer` means that the [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer "The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.") header will not be sent.\n* `no-referrer-when-downgrade` means that no [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer "The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.") header will be sent when navigating to an origin without TLS (HTTPS). This is a user agent’s default behavior, if no policy is otherwise specified.\n* `origin` means that the referrer will be the origin of the page, which is roughly the scheme, the host, and the port.\n* `origin-when-cross-origin` means that navigating to other origins will be limited to the scheme, the host, and the port, while navigating on the same origin will include the referrer\'s path.\n* `unsafe-url` means that the referrer will include the origin and the path (but not the fragment, password, or username). This case is unsafe because it can leak origins and paths from TLS-protected resources to insecure origins.'},{name:`title`,description:'The `title` attribute has special semantics on the `<link>` element. When used on a `<link rel="stylesheet">` it defines a [preferred or an alternate stylesheet](https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets). Incorrectly using it may [cause the stylesheet to be ignored](https://developer.mozilla.org/en-US/docs/Correctly_Using_Titles_With_External_Stylesheets).'}],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/link`}]},{name:`meta`,description:{kind:`markdown`,value:`The meta element represents various kinds of metadata that cannot be expressed using the title, base, link, style, and script elements.`},void:!0,attributes:[{name:`name`,description:{kind:`markdown`,value:`This attribute defines the name of a piece of document-level metadata. It should not be set if one of the attributes [\`itemprop\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-itemprop), [\`http-equiv\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-http-equiv) or [\`charset\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) is also set.
70
+ `.indexOf(e.charAt(t))!==-1}function Bc(e,t){return` `.indexOf(e.charAt(t))!==-1}var Vc;(()=>{var e={470:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===47)break;n=47}if(n===47){if(!(a===s-1||o===1))if(a!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}var r={resolve:function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},normalize:function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},isAbsolute:function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,o=a-i,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var c=n.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(n.charCodeAt(s+d)===47)return n.slice(s+d+1);if(d===0)return n.slice(s+d)}else o>l&&(e.charCodeAt(i+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=i+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r}(0,e)},parse:function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(n.base=n.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(s,o),n.base=e.slice(s,c)),n.ext=e.slice(o,c)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.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=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{let e;n.r(r),n.d(r,{URI:()=>c,Utils:()=>x}),typeof process==`object`?e=process.platform===`win32`:typeof navigator==`object`&&(e=navigator.userAgent.indexOf(`Windows`)>=0);let t=/^\w[\w\d+.-]*$/,i=/^\//,a=/^\/\//;function o(e,n){if(!e.scheme&&n)throw 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 Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!i.test(e.path))throw 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(a.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class c{static isUri(e){return e instanceof c||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=function(e,t){return e||t?e:`file`}(e,a),this.authority=t||``,this.path=function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t}(this.scheme,n||``),this.query=r||``,this.fragment=i||``,o(this,a))}get fsPath(){return m(this)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new u(t,n,r,i,a)}static parse(e,t=!1){let n=s.exec(e);return n?new u(n[2]||``,v(n[4]||``),v(n[5]||``),v(n[7]||``),v(n[9]||``),t):new u(``,``,``,``,``)}static file(t){let n=``;if(e&&(t=t.replace(/\\/g,`/`)),t[0]===`/`&&t[1]===`/`){let e=t.indexOf(`/`,2);e===-1?(n=t.substring(2),t=`/`):(n=t.substring(2,e),t=t.substring(e)||`/`)}return new u(`file`,n,t,``,``)}static from(e){let t=new u(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return h(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof c)return e;{let t=new u(e);return t._formatted=e.external,t._fsPath=e._sep===l?e.fsPath:null,t}}return e}}let l=e?1:void 0;class u extends c{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=m(this),this._fsPath}toString(e=!1){return e?h(this,!0):(this._formatted||=h(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=l),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}}let 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 f(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=d[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}function p(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=d[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}function m(t,n){let r;return r=t.authority&&t.path.length>1&&t.scheme===`file`?`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,`\\`)),r}function h(e,t){let n=t?p:f,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:f(c,!1,!1)),r}function g(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+g(e.substr(3)):e}}let _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(_)?e.replace(_,(e=>g(e))):e}var y=n(470);let b=y.posix||y;var x;(function(e){e.joinPath=function(e,...t){return e.with({path:b.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=b.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=b.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return b.basename(e.path)},e.extname=function(e){return b.extname(e.path)}})(x||={})})(),Vc=r})();let{URI:Hc,Utils:Uc}=Vc;function Wc(e){let t=e[0];return t===e[e.length-1]&&(t===`'`||t===`"`)&&(e=e.substring(1,e.length-1)),e}function Gc(e,t){return!e.length||t===`handlebars`&&/{{|}}/.test(e)?!1:/\b(w[\w\d+.-]*:\/\/)?[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))/.test(e)}function Kc(e,t,n,r){if(/^\s*javascript\:/i.test(t)||/[\n\r]/.test(t))return;t=t.replace(/^\s*/g,``);let i=t.match(/^(\w[\w\d+.-]*):/);if(i){let e=i[1].toLowerCase();return e===`http`||e===`https`||e===`file`?t:void 0}return/^\#/i.test(t)?e+t:/^\/\//i.test(t)?(ac(e,`https://`)?`https`:`http`)+`:`+t.replace(/^\s*/g,``):n?n.resolveReference(t,r||e):t}function qc(e,t,n,r,i,a){let o=Wc(n);if(!Gc(o,e.languageId))return;o.length<n.length&&(r++,i--);let s=Kc(e.uri,o,t,a);if(!s)return;let c=Jc(s,e);return{range:G.create(e.positionAt(r),e.positionAt(i)),target:c}}function Jc(e,t){try{let n=Hc.parse(e);return n.scheme===`file`&&n.query&&(n=n.with({query:null}),e=n.toString(!0)),n.scheme===`file`&&n.fragment&&!(e.startsWith(t.uri)&&e.charCodeAt(t.uri.length)===35)?n.with({fragment:null}).toString(!0):e}catch{return}}var Yc=class{constructor(e){this.dataManager=e}findDocumentLinks(e,t){let n=[],r=Q(e.getText(),0),i=r.scan(),a,o,s=!1,c,l={};for(;i!==X.EOS;){switch(i){case X.StartTag:o=r.getTokenText().toLowerCase(),c||(s=o===`base`);break;case X.AttributeName:a=r.getTokenText().toLowerCase();break;case X.AttributeValue:if(o&&a&&this.dataManager.isPathAttribute(o,a)){let i=r.getTokenText();if(!s){let a=qc(e,t,i,r.getTokenOffset(),r.getTokenEnd(),c);a&&n.push(a)}s&&c===void 0&&(c=Wc(i),c&&t&&(c=t.resolveReference(c,e.uri))),s=!1,a=void 0}else if(a===`id`){let e=Wc(r.getTokenText());l[e]=r.getTokenOffset()}break}i=r.scan()}for(let t of n){let n=e.uri+`#`;if(t.target&&ac(t.target,n)){let r=l[t.target.substring(n.length)];if(r!==void 0){let i=e.positionAt(r);t.target=`${n}${i.line+1},${i.character+1}`}else t.target=e.uri}}return n}};function Xc(e,t,n){let r=e.offsetAt(t),i=n.findNodeAt(r);if(!i.tag)return[];let a=[],o=$c(X.StartTag,e,i.start),s=typeof i.endTagStart==`number`&&$c(X.EndTag,e,i.endTagStart);return(o&&Qc(o,t)||s&&Qc(s,t))&&(o&&a.push({kind:as.Read,range:o}),s&&a.push({kind:as.Read,range:s})),a}function Zc(e,t){return e.line<t.line||e.line===t.line&&e.character<=t.character}function Qc(e,t){return Zc(e.start,t)&&Zc(t,e.end)}function $c(e,t,n){let r=Q(t.getText(),n),i=r.scan();for(;i!==X.EOS&&i!==e;)i=r.scan();return i===X.EOS?null:{start:t.positionAt(r.getTokenOffset()),end:t.positionAt(r.getTokenEnd())}}function el(e,t){let n=[],r=tl(e,t);for(let e of r)i(e,void 0);return n;function i(t,r){let a=ls.create(t.name,t.kind,t.range,e.uri,r?.name);if(a.containerName??=``,n.push(a),t.children)for(let e of t.children)i(e,t)}}function tl(e,t){let n=[];return t.roots.forEach(t=>{nl(e,t,n)}),n}function nl(e,t,n){let r=rl(t),i=G.create(e.positionAt(t.start),e.positionAt(t.end)),a=ds.create(r,void 0,ss.Field,i,i);n.push(a),t.children.forEach(t=>{a.children??=[],nl(e,t,a.children)})}function rl(e){let t=e.tag;if(e.attributes){let n=e.attributes.id,r=e.attributes.class;n&&(t+=`#${n.replace(/[\"\']/g,``)}`),r&&(t+=r.replace(/[\"\']/g,``).split(/\s+/).map(e=>`.${e}`).join(``))}return t||`?`}function il(e,t,n,r){let i=e.offsetAt(t),a=r.findNodeAt(i);if(!a.tag||!al(a,i,a.tag))return null;let o=[],s={start:e.positionAt(a.start+1),end:e.positionAt(a.start+1+a.tag.length)};if(o.push({range:s,newText:n}),a.endTagStart){let t={start:e.positionAt(a.endTagStart+2),end:e.positionAt(a.endTagStart+2+a.tag.length)};o.push({range:t,newText:n})}return{changes:{[e.uri.toString()]:o}}}function al(e,t,n){return e.endTagStart&&e.endTagStart+2<=t&&t<=e.endTagStart+2+n.length?!0:e.start+1<=t&&t<=e.start+1+n.length}function ol(e,t,n){let r=e.offsetAt(t),i=n.findNodeAt(r);if(!i.tag||!i.endTagStart)return null;if(i.start+1<=r&&r<=i.start+1+i.tag.length){let t=r-1-i.start+i.endTagStart+2;return e.positionAt(t)}if(i.endTagStart+2<=r&&r<=i.endTagStart+2+i.tag.length){let t=r-2-i.endTagStart+i.start+1;return e.positionAt(t)}return null}function sl(e,t,n){let r=e.offsetAt(t),i=n.findNodeAt(r),a=i.tag?i.tag.length:0;return i.endTagStart&&(i.start+1<=r&&r<=i.start+1+a||i.endTagStart+2<=r&&r<=i.endTagStart+2+a)?[G.create(e.positionAt(i.start+1),e.positionAt(i.start+1+a)),G.create(e.positionAt(i.endTagStart+2),e.positionAt(i.endTagStart+2+a))]:null}var cl=class{constructor(e){this.dataManager=e}limitRanges(e,t){e=e.sort((e,t)=>{let n=e.startLine-t.startLine;return n===0&&(n=e.endLine-t.endLine),n});let n,r=[],i=[],a=[],o=(e,t)=>{i[e]=t,t<30&&(a[t]=(a[t]||0)+1)};for(let t=0;t<e.length;t++){let i=e[t];if(!n)n=i,o(t,0);else if(i.startLine>n.startLine){if(i.endLine<=n.endLine)r.push(n),n=i,o(t,r.length);else if(i.startLine>n.endLine){do n=r.pop();while(n&&i.startLine>n.endLine);n&&r.push(n),n=i,o(t,r.length)}}}let s=0,c=0;for(let e=0;e<a.length;e++){let n=a[e];if(n){if(n+s>t){c=e;break}s+=n}}let l=[];for(let n=0;n<e.length;n++){let r=i[n];typeof r==`number`&&(r<c||r===c&&s++<t)&&l.push(e[n])}return l}getFoldingRanges(e,t){let n=this.dataManager.getVoidElements(e.languageId),r=Q(e.getText()),i=r.scan(),a=[],o=[],s=null,c=-1;function l(e){a.push(e),c=e.startLine}for(;i!==X.EOS;){switch(i){case X.StartTag:{let t=r.getTokenText(),n=e.positionAt(r.getTokenOffset()).line;o.push({startLine:n,tagName:t}),s=t;break}case X.EndTag:s=r.getTokenText();break;case X.StartTagClose:if(!s||!this.dataManager.isVoidElement(s,n))break;case X.EndTagClose:case X.StartTagSelfClose:{let t=o.length-1;for(;t>=0&&o[t].tagName!==s;)t--;if(t>=0){let n=o[t];o.length=t;let i=e.positionAt(r.getTokenOffset()).line,a=n.startLine,s=i-1;s>a&&c!==a&&l({startLine:a,endLine:s})}break}case X.Comment:{let t=e.positionAt(r.getTokenOffset()).line,n=r.getTokenText().match(/^\s*#(region\b)|(endregion\b)/);if(n)if(n[1])o.push({startLine:t,tagName:``});else{let e=o.length-1;for(;e>=0&&o[e].tagName.length;)e--;if(e>=0){let n=o[e];o.length=e;let r=t;t=n.startLine,r>t&&c!==t&&l({startLine:t,endLine:r,kind:Do.Region})}}else{let n=e.positionAt(r.getTokenOffset()+r.getTokenLength()).line;t<n&&l({startLine:t,endLine:n,kind:Do.Comment})}break}}i=r.scan()}let u=t&&t.rangeLimit||Number.MAX_VALUE;return a.length>u?this.limitRanges(a,u):a}},ll=class{constructor(e){this.htmlParser=e}getSelectionRanges(e,t){let n=this.htmlParser.parseDocument(e);return t.map(t=>this.getSelectionRange(t,e,n))}getSelectionRange(e,t,n){let r=this.getApplicableRanges(t,e,n),i,a;for(let e=r.length-1;e>=0;e--){let n=r[e];(!i||n[0]!==i[0]||n[1]!==i[1])&&(a=ys.create(G.create(t.positionAt(r[e][0]),t.positionAt(r[e][1])),a)),i=n}return a||=ys.create(G.create(e,e)),a}getApplicableRanges(e,t,n){let r=e.offsetAt(t),i=n.findNodeAt(r),a=this.getAllParentTagRanges(i);if(i.startTagEnd&&!i.endTagStart){if(i.startTagEnd!==i.end)return[[i.start,i.end]];let t=G.create(e.positionAt(i.startTagEnd-2),e.positionAt(i.startTagEnd));return e.getText(t)===`/>`?a.unshift([i.start+1,i.startTagEnd-2]):a.unshift([i.start+1,i.startTagEnd-1]),a=this.getAttributeLevelRanges(e,i,r).concat(a),a}return!i.startTagEnd||!i.endTagStart?a:(a.unshift([i.start,i.end]),i.start<r&&r<i.startTagEnd?(a.unshift([i.start+1,i.startTagEnd-1]),a=this.getAttributeLevelRanges(e,i,r).concat(a),a):i.startTagEnd<=r&&r<=i.endTagStart?(a.unshift([i.startTagEnd,i.endTagStart]),a):(r>=i.endTagStart+2&&a.unshift([i.endTagStart+2,i.end-1]),a))}getAllParentTagRanges(e){let t=e,n=[];for(;t.parent;)t=t.parent,this.getNodeRanges(t).forEach(e=>n.push(e));return n}getNodeRanges(e){return e.startTagEnd&&e.endTagStart&&e.startTagEnd<e.endTagStart?[[e.startTagEnd,e.endTagStart],[e.start,e.end]]:[[e.start,e.end]]}getAttributeLevelRanges(e,t,n){let r=G.create(e.positionAt(t.start),e.positionAt(t.end)),i=e.getText(r),a=n-t.start,o=Q(i),s=o.scan(),c=t.start,l=[],u=!1,d=-1;for(;s!==X.EOS;){switch(s){case X.AttributeName:if(a<o.getTokenOffset()){u=!1;break}a<=o.getTokenEnd()&&l.unshift([o.getTokenOffset(),o.getTokenEnd()]),u=!0,d=o.getTokenOffset();break;case X.AttributeValue:{if(!u)break;let e=o.getTokenText();if(a<o.getTokenOffset()){l.push([d,o.getTokenEnd()]);break}a>=o.getTokenOffset()&&a<=o.getTokenEnd()&&(l.unshift([o.getTokenOffset(),o.getTokenEnd()]),(e[0]===`"`&&e[e.length-1]===`"`||e[0]===`'`&&e[e.length-1]===`'`)&&a>=o.getTokenOffset()+1&&a<=o.getTokenEnd()-1&&l.unshift([o.getTokenOffset()+1,o.getTokenEnd()-1]),l.push([d,o.getTokenEnd()]));break}}s=o.scan()}return l.map(e=>[e[0]+c,e[1]+c])}};let ul={version:1.1,tags:[{name:`html`,description:{kind:`markdown`,value:`The html element represents the root of an HTML document.`},attributes:[{name:`manifest`,description:{kind:`markdown`,value:`Specifies the URI of a resource manifest indicating resources that should be cached locally. See [Using the application cache](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache) for details.`}},{name:`version`,description:`Specifies the version of the HTML [Document Type Definition](https://developer.mozilla.org/en-US/docs/Glossary/DTD "Document Type Definition: In HTML, the doctype is the required "<!DOCTYPE html>" preamble found at the top of all documents. Its sole purpose is to prevent a browser from switching into so-called “quirks mode” when rendering a document; that is, the "<!DOCTYPE html>" doctype ensures that the browser makes a best-effort attempt at following the relevant specifications, rather than using a different rendering mode that is incompatible with some specifications.") that governs the current document. This attribute is not needed, because it is redundant with the version information in the document type declaration.`},{name:`xmlns`,description:'Specifies the XML Namespace of the document. Default value is `"http://www.w3.org/1999/xhtml"`. This is required in documents parsed with XML parsers, and optional in text/html documents.'}],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/html`}]},{name:`head`,description:{kind:`markdown`,value:`The head element represents a collection of metadata for the Document.`},attributes:[{name:`profile`,description:`The URIs of one or more metadata profiles, separated by white space.`}],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/head`}]},{name:`title`,description:{kind:`markdown`,value:`The title element represents the document's title or name. Authors should use titles that identify their documents even when they are used out of context, for example in a user's history or bookmarks, or in search results. The document's title is often different from its first heading, since the first heading does not have to stand alone when taken out of context.`},attributes:[],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/title`}]},{name:`base`,description:{kind:`markdown`,value:`The base element allows authors to specify the document base URL for the purposes of resolving relative URLs, and the name of the default browsing context for the purposes of following hyperlinks. The element does not represent any content beyond this information.`},void:!0,attributes:[{name:`href`,description:{kind:`markdown`,value:`The base URL to be used throughout the document for relative URL addresses. If this attribute is specified, this element must come before any other elements with attributes whose values are URLs. Absolute and relative URLs are allowed.`}},{name:`target`,valueSet:`target`,description:{kind:`markdown`,value:"A name or keyword indicating the default location to display the result when hyperlinks or forms cause navigation, for elements that do not have an explicit target reference. It is a name of, or keyword for, a _browsing context_ (for example: tab, window, or inline frame). The following keywords have special meanings:\n\n* `_self`: Load the result into the same browsing context as the current one. This value is the default if the attribute is not specified.\n* `_blank`: Load the result into a new unnamed browsing context.\n* `_parent`: Load the result into the parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n* `_top`: Load the result into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`.\n\nIf this attribute is specified, this element must come before any other elements with attributes whose values are URLs."}}],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/base`}]},{name:`link`,description:{kind:`markdown`,value:`The link element allows authors to link their document to other resources.`},void:!0,attributes:[{name:`href`,description:{kind:`markdown`,value:`This attribute specifies the [URL](https://developer.mozilla.org/en-US/docs/Glossary/URL "URL: Uniform Resource Locator (URL) is a text string specifying where a resource can be found on the Internet.") of the linked resource. A URL can be absolute or relative.`}},{name:`crossorigin`,valueSet:`xo`,description:{kind:`markdown`,value:'This enumerated attribute indicates whether [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS "CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.") must be used when fetching the resource. [CORS-enabled images](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas "Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.") element without being _tainted_. The allowed values are:\n\n`anonymous`\n\nA cross-origin request (i.e. with an [`Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin "The Origin request header indicates where a fetch originates from. It doesn\'t include any path information, but only the server name. It is sent with CORS requests, as well as with POST requests. It is similar to the Referer header, but, unlike this header, it doesn\'t disclose the whole path.") HTTP header) is performed, but no credential is sent (i.e. no cookie, X.509 certificate, or HTTP Basic authentication). If the server does not give credentials to the origin site (by not setting the [`Access-Control-Allow-Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin "The Access-Control-Allow-Origin response header indicates whether the response can be shared with requesting code from the given origin.") HTTP header) the image will be tainted and its usage restricted.\n\n`use-credentials`\n\nA cross-origin request (i.e. with an `Origin` HTTP header) is performed along with a credential sent (i.e. a cookie, certificate, and/or HTTP Basic authentication is performed). If the server does not give credentials to the origin site (through [`Access-Control-Allow-Credentials`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials "The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to frontend JavaScript code when the request\'s credentials mode (Request.credentials) is "include".") HTTP header), the resource will be _tainted_ and its usage restricted.\n\nIf the attribute is not present, the resource is fetched without a [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS "CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.") request (i.e. without sending the `Origin` HTTP header), preventing its non-tainted usage. If invalid, it is handled as if the enumerated keyword **anonymous** was used. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for additional information.'}},{name:`rel`,description:{kind:`markdown`,value:`This attribute names a relationship of the linked document to the current document. The attribute must be a space-separated list of the [link types values](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).`}},{name:`media`,description:{kind:`markdown`,value:"This attribute specifies the media that the linked resource applies to. Its value must be a media type / [media query](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries). This attribute is mainly useful when linking to external stylesheets — it allows the user agent to pick the best adapted one for the device it runs on.\n\n**Notes:**\n\n* In HTML 4, this can only be a simple white-space-separated list of media description literals, i.e., [media types and groups](https://developer.mozilla.org/en-US/docs/Web/CSS/@media), where defined and allowed as values for this attribute, such as `print`, `screen`, `aural`, `braille`. HTML5 extended this to any kind of [media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries), which are a superset of the allowed values of HTML 4.\n* Browsers not supporting [CSS3 Media Queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries) won't necessarily recognize the adequate link; do not forget to set fallback links, the restricted set of media queries defined in HTML 4."}},{name:`hreflang`,description:{kind:`markdown`,value:"This attribute indicates the language of the linked resource. It is purely advisory. Allowed values are determined by [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt). Use this attribute only if the [`href`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href) attribute is present."}},{name:`type`,description:{kind:`markdown`,value:'This attribute is used to define the type of the content linked to. The value of the attribute should be a MIME type such as **text/html**, **text/css**, and so on. The common use of this attribute is to define the type of stylesheet being referenced (such as **text/css**), but given that CSS is the only stylesheet language used on the web, not only is it possible to omit the `type` attribute, but is actually now recommended practice. It is also used on `rel="preload"` link types, to make sure the browser only downloads file types that it supports.'}},{name:`sizes`,description:{kind:`markdown`,value:"This attribute defines the sizes of the icons for visual media contained in the resource. It must be present only if the [`rel`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-rel) contains a value of `icon` or a non-standard type such as Apple's `apple-touch-icon`. It may have the following values:\n\n* `any`, meaning that the icon can be scaled to any size as it is in a vector format, like `image/svg+xml`.\n* a white-space separated list of sizes, each in the format `_<width in pixels>_x_<height in pixels>_` or `_<width in pixels>_X_<height in pixels>_`. Each of these sizes must be contained in the resource.\n\n**Note:** Most icon formats are only able to store one single icon; therefore most of the time the [`sizes`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-sizes) contains only one entry. MS's ICO format does, as well as Apple's ICNS. ICO is more ubiquitous; you should definitely use it."}},{name:`as`,description:'This attribute is only used when `rel="preload"` or `rel="prefetch"` has been set on the `<link>` element. It specifies the type of content being loaded by the `<link>`, which is necessary for content prioritization, request matching, application of correct [content security policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP), and setting of correct [`Accept`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept "The Accept request HTTP header advertises which content types, expressed as MIME types, the client is able to understand. Using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the Content-Type response header. Browsers set adequate values for this header depending on\xA0the context where the request is done: when fetching a CSS stylesheet a different value is set for the request than when fetching an image,\xA0video or a script.") request header.'},{name:`importance`,description:`Indicates the relative importance of the resource. Priority hints are delegated using the values:`},{name:`importance`,description:'**`auto`**: Indicates\xA0**no\xA0preference**. The browser may use its own heuristics to decide the priority of the resource.\n\n**`high`**: Indicates to the\xA0browser\xA0that the resource is of\xA0**high** priority.\n\n**`low`**:\xA0Indicates to the\xA0browser\xA0that the resource is of\xA0**low** priority.\n\n**Note:** The `importance` attribute may only be used for the `<link>` element if `rel="preload"` or `rel="prefetch"` is present.'},{name:`integrity`,description:`Contains inline metadata — a base64-encoded cryptographic hash of the resource (file) you’re telling the browser to fetch. The browser can use this to verify that the fetched resource has been delivered free of unexpected manipulation. See [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).`},{name:`referrerpolicy`,description:'A string indicating which referrer to use when fetching the resource:\n\n* `no-referrer` means that the [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer "The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.") header will not be sent.\n* `no-referrer-when-downgrade` means that no [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer "The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.") header will be sent when navigating to an origin without TLS (HTTPS). This is a user agent’s default behavior, if no policy is otherwise specified.\n* `origin` means that the referrer will be the origin of the page, which is roughly the scheme, the host, and the port.\n* `origin-when-cross-origin` means that navigating to other origins will be limited to the scheme, the host, and the port, while navigating on the same origin will include the referrer\'s path.\n* `unsafe-url` means that the referrer will include the origin and the path (but not the fragment, password, or username). This case is unsafe because it can leak origins and paths from TLS-protected resources to insecure origins.'},{name:`title`,description:'The `title` attribute has special semantics on the `<link>` element. When used on a `<link rel="stylesheet">` it defines a [preferred or an alternate stylesheet](https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets). Incorrectly using it may [cause the stylesheet to be ignored](https://developer.mozilla.org/en-US/docs/Correctly_Using_Titles_With_External_Stylesheets).'}],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/link`}]},{name:`meta`,description:{kind:`markdown`,value:`The meta element represents various kinds of metadata that cannot be expressed using the title, base, link, style, and script elements.`},void:!0,attributes:[{name:`name`,description:{kind:`markdown`,value:`This attribute defines the name of a piece of document-level metadata. It should not be set if one of the attributes [\`itemprop\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-itemprop), [\`http-equiv\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-http-equiv) or [\`charset\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) is also set.
71
71
 
72
72
  This metadata name is associated with the value contained by the [\`content\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute. The possible values for the name attribute are:
73
73
 
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./monaco.css"])))=>i.map(i=>d[i]);
2
- import{A as e,C as t,K as n,L as r,M as i,N as a,P as o,R as s,S as c,T as l,U as u,W as d,X as f,_ as p,a as ee,c as m,g as h,h as g,i as _,j as v,k as y,n as te,p as b,q as x,r as S,s as C,t as w,v as T,x as E,y as D,z as O}from"./vue.js";import{n as ne,t as k}from"./vendor.js";import{Rt as A}from"./monaco.js";function re(e,t){if(e){if(Array.isArray(e)){for(let n of e)re(n,t);return}if(typeof e==`object`){for(let[n,r]of Object.entries(e))r&&t.push(n);return}t.push(String(e))}}function j(...e){let t=[];for(let n of e)re(n,t);return ne(t.join(` `))}var M=t({__name:`DashboardIcon`,props:{name:{}},setup(e){let t=e,n={"theme-system":`icon-[mdi--theme-light-dark]`,"theme-light":`icon-[mdi--white-balance-sunny]`,"theme-dark":`icon-[mdi--moon-waning-crescent]`,"nav-menu":`icon-[mdi--menu]`,"nav-home":`icon-[mdi--view-grid-outline]`,"nav-analyze":`icon-[mdi--chart-box-outline]`,"nav-activity":`icon-[mdi--timeline-text-outline]`,"nav-tokens":`icon-[mdi--palette-outline]`,"tab-overview":`icon-[mdi--view-dashboard-outline]`,"tab-packages":`icon-[mdi--package-variant-closed]`,"tab-modules":`icon-[mdi--vector-link]`,"tab-source":`icon-[mdi--source-branch]`,"status-dark":`icon-[mdi--circle-slice-8]`,"status-light":`icon-[mdi--checkbox-blank-circle]`,"status-live":`icon-[mdi--motion-play-outline]`,"metric-packages":`icon-[mdi--package-variant]`,"metric-subpackages":`icon-[mdi--layers-triple-outline]`,"metric-chunks":`icon-[mdi--chart-tree]`,"metric-assets":`icon-[mdi--file-document-multiple-outline]`,"metric-size-outline":`icon-[mdi--database-outline]`,"metric-modules":`icon-[mdi--cube-outline]`,"metric-duplicates":`icon-[mdi--vector-link]`,"metric-sources":`icon-[mdi--source-branch]`,"metric-copy":`icon-[mdi--content-copy]`,"metric-time":`icon-[mdi--clock-outline]`,"metric-entries":`icon-[mdi--export-variant]`,"metric-size":`icon-[mdi--database]`,treemap:`icon-[mdi--chart-box-outline]`,"top-files":`icon-[mdi--file-star-outline]`,subpackages:`icon-[mdi--layers-triple-outline]`,"duplicate-modules":`icon-[mdi--vector-link]`,"module-sources":`icon-[mdi--source-branch]`,"file-samples":`icon-[mdi--file-document-outline]`,"hero-workspace":`icon-[mdi--view-quilt-outline]`,"hero-commands":`icon-[mdi--console-line]`,"hero-system":`icon-[mdi--shape-outline]`,"metric-ready":`icon-[mdi--rocket-launch-outline]`,"metric-health":`icon-[mdi--heart-pulse]`,"metric-latency":`icon-[mdi--timer-sand]`,"metric-quality":`icon-[mdi--shield-check-outline]`,"metric-search":`icon-[mdi--magnify]`,"metric-history":`icon-[mdi--history]`,"metric-bookmark":`icon-[mdi--bookmark-check-outline]`,"metric-link":`icon-[mdi--link-variant]`,"metric-reset":`icon-[mdi--restore]`,"token-color":`icon-[mdi--palette-outline]`,"token-surface":`icon-[mdi--card-bulleted-outline]`,"token-type":`icon-[mdi--format-letter-spacing]`},r=g(()=>n[t.name]??`icon-[mdi--file-document-multiple-outline]`);return(e,t)=>(v(),D(`span`,{class:x([`h-full w-full`,r.value])},null,2))}}),ie={class:`grid gap-2 overflow-y-auto pr-1`},ae={class:`flex items-start gap-3`},oe={class:`h-5 w-5`},se={class:`min-w-0`},ce={class:`font-medium text-(--dashboard-text)`},le={key:0,class:`ml-5 grid gap-1 border-l border-(--dashboard-border) pl-3`},ue={class:`h-4 w-4 shrink-0`},de={class:`min-w-0 truncate`},N=t({__name:`AppNavigationList`,props:{currentAnalyzeTab:{},currentPath:{},items:{},mobile:{type:Boolean,default:!1}},emits:[`navigate`],setup(e,{emit:t}){let r=e,i=t;function o(e){return e===`/`?r.currentPath===`/`:r.currentPath===e||r.currentPath.startsWith(`${e}/`)}function s(e){let t=e.indexOf(`?`);return t===-1?`overview`:new URLSearchParams(e.slice(t+1)).get(`tab`)??`overview`}function l(e){return e.startsWith(`/analyze`)?r.currentPath===`/analyze`&&s(e)===r.currentAnalyzeTab:o(e)}function u(e){return o(e.to)||!!e.children?.some(e=>l(e.to))}return(t,r)=>(v(),D(`nav`,ie,[(v(!0),D(b,null,a(e.items,t=>(v(),D(`div`,{key:t.to,class:`grid gap-1`},[c(n(w),{to:t.to,class:x(n(j)(`group rounded-md border px-3 py-3 transition`,u(t)?`border-(--dashboard-border-strong) bg-(--dashboard-panel-strong) shadow-(--dashboard-shadow)`:`border-(--dashboard-border) bg-(--dashboard-panel-muted) hover:border-(--dashboard-border-strong) hover:bg-(--dashboard-panel)`)),onClick:r[0]||=e=>i(`navigate`)},{default:O(()=>[h(`div`,ae,[h(`span`,{class:x(n(j)(`flex h-10 w-10 shrink-0 items-center justify-center rounded-md`,u(t)?`bg-(--dashboard-accent-soft) text-(--dashboard-accent)`:`bg-(--dashboard-panel) text-(--dashboard-text-soft) group-hover:text-(--dashboard-accent)`))},[h(`span`,oe,[c(M,{name:t.iconName},null,8,[`name`])])],2),h(`div`,se,[h(`p`,ce,f(t.label),1),h(`p`,{class:x([`text-xs leading-5 text-(--dashboard-text-soft)`,e.mobile?`mt-1`:`mt-0.5 truncate`])},f(t.caption),3)])])]),_:2},1032,[`to`,`class`]),t.children?.length&&u(t)?(v(),D(`div`,le,[(v(!0),D(b,null,a(t.children,e=>(v(),p(n(w),{key:e.to,to:e.to,class:x(n(j)(`group flex min-w-0 items-center gap-2 rounded-md px-2.5 py-2 text-sm transition`,l(e.to)?`bg-(--dashboard-accent-soft) text-(--dashboard-accent)`:`text-(--dashboard-text-soft) hover:bg-(--dashboard-panel-muted) hover:text-(--dashboard-text)`)),onClick:r[1]||=e=>i(`navigate`)},{default:O(()=>[h(`span`,ue,[c(M,{name:e.iconName},null,8,[`name`])]),h(`span`,de,f(e.label),1)]),_:2},1032,[`to`,`class`]))),128))])):T(``,!0)]))),128))]))}}),fe={key:0,class:`mr-1.5 h-4 w-4 text-(--dashboard-accent)`},P=t({__name:`AppInfoPill`,props:{label:{},iconName:{},uppercase:{type:Boolean}},setup(e){return(t,n)=>(v(),D(`span`,{class:x([`inline-flex items-center rounded-full border border-(--dashboard-border) bg-(--dashboard-panel-muted) px-2.5 py-1 text-xs font-medium text-(--dashboard-text-soft)`,e.uppercase?`tracking-[0.18em] uppercase`:void 0])},[e.iconName?(v(),D(`span`,fe,[c(M,{name:e.iconName},null,8,[`name`])])):T(``,!0),E(` `+f(e.label),1)],2))}}),pe={class:`flex flex-col gap-3 rounded-lg border border-(--dashboard-border-strong) bg-(--dashboard-panel-strong) px-4 py-3 shadow-(--dashboard-shadow) md:px-5`},me={class:`flex items-start justify-between gap-3`},he={class:`flex items-start gap-3`},ge={class:`h-5 w-5`},_e={class:`mt-1 text-2xl font-semibold tracking-tight md:text-[1.8rem]`},ve={key:0,class:`mt-1 max-w-3xl text-sm leading-6 text-(--dashboard-text-muted)`},ye={key:0,class:`hidden items-center gap-2 rounded-full border border-(--dashboard-border) bg-(--dashboard-panel-muted) px-3 py-2 text-xs font-medium text-(--dashboard-text-soft) md:inline-flex`,for:`dashboard-global-theme`},be={class:`h-4 w-4 text-(--dashboard-accent)`},xe=[`value`],Se=[`value`],Ce={class:`flex flex-wrap items-center gap-2 md:hidden`},we={key:0,class:`inline-flex items-center gap-2 rounded-full border border-(--dashboard-border) bg-(--dashboard-panel-muted) px-3 py-2 text-xs font-medium text-(--dashboard-text-soft)`,for:`dashboard-mobile-theme`},Te={class:`h-4 w-4 text-(--dashboard-accent)`},Ee=[`value`],De=[`value`],Oe=t({__name:`AppShellHeader`,props:{title:{},description:{},themeOptions:{},themePreference:{}},emits:[`menu`,`setTheme`],setup(e,{emit:t}){let n=e,r=t,i=g(()=>n.themeOptions.find(e=>e.value===n.themePreference)?.iconName??`theme-system`),o=g(()=>n.themeOptions.length>0);function s(e){r(`setTheme`,e.target.value)}return(t,n)=>(v(),D(`header`,pe,[h(`div`,me,[h(`div`,he,[h(`button`,{class:`inline-flex h-11 w-11 shrink-0 items-center justify-center rounded-md border border-(--dashboard-border) bg-(--dashboard-panel-muted) text-(--dashboard-text) md:hidden`,type:`button`,onClick:n[0]||=e=>r(`menu`)},[h(`span`,ge,[c(M,{name:`nav-menu`})])]),h(`div`,null,[n[1]||=h(`p`,{class:`text-[11px] uppercase tracking-[0.28em] text-(--dashboard-accent)`},` weapp-vite dashboard `,-1),h(`h1`,_e,f(e.title),1),e.description?(v(),D(`p`,ve,f(e.description),1)):T(``,!0)])]),o.value?(v(),D(`label`,ye,[h(`span`,be,[c(M,{name:i.value},null,8,[`name`])]),h(`select`,{id:`dashboard-global-theme`,class:`min-w-32 bg-transparent text-(--dashboard-text) outline-none`,value:e.themePreference,onChange:s},[(v(!0),D(b,null,a(e.themeOptions,e=>(v(),D(`option`,{key:e.value,value:e.value},f(e.label),9,Se))),128))],40,xe)])):T(``,!0)]),h(`div`,Ce,[o.value?(v(),D(`label`,we,[h(`span`,Te,[c(M,{name:i.value},null,8,[`name`])]),h(`select`,{id:`dashboard-mobile-theme`,class:`min-w-32 bg-transparent text-(--dashboard-text) outline-none`,value:e.themePreference,onChange:s},[(v(!0),D(b,null,a(e.themeOptions,e=>(v(),D(`option`,{key:e.value,value:e.value},f(e.label),9,De))),128))],40,Ee)])):T(``,!0),o.value?(v(),p(P,{key:1,"icon-name":`status-live`,label:`shell ready`,uppercase:``})):T(``,!0)])]))}}),F=k({base:`flex flex-col rounded-lg border shadow-(--dashboard-shadow)`,variants:{tone:{default:`border-(--dashboard-border) bg-(--dashboard-panel)`,strong:`border-(--dashboard-border-strong) bg-(--dashboard-panel-strong)`,muted:`border-(--dashboard-border) bg-(--dashboard-panel-muted)`},padding:{none:``,sm:`p-3`,md:`p-4`,header:`px-4 py-4 md:px-5`}},defaultVariants:{tone:`default`,padding:`md`}}),I=k({base:`flex items-center justify-center rounded-md bg-(--dashboard-accent-soft) text-(--dashboard-accent)`,variants:{size:{sm:`h-8 w-8`,md:`h-9 w-9`,lg:`h-10 w-10`}},defaultVariants:{size:`md`}}),ke=k({base:`rounded-md border border-(--dashboard-border) bg-(--dashboard-panel-muted)`,variants:{padding:{sm:`px-4 py-3`,md:`p-4`},interactive:{true:`transition hover:border-(--dashboard-border-strong) hover:bg-(--dashboard-panel)`,false:``}},defaultVariants:{padding:`md`,interactive:!1}}),Ae=k({base:`inline-flex items-center gap-2 rounded-full border transition`,variants:{kind:{nav:`px-3.5 py-1.5 text-sm`,theme:`px-3 py-1.5 text-xs font-medium`,badge:`px-2.5 py-1 text-[11px] uppercase tracking-[0.18em]`},active:{true:`border-(--dashboard-accent) bg-(--dashboard-accent-soft) text-(--dashboard-text)`,false:`border-(--dashboard-border) bg-(--dashboard-panel-muted) text-(--dashboard-text-soft) hover:border-(--dashboard-border-strong) hover:text-(--dashboard-text)`}},defaultVariants:{kind:`nav`,active:!1}}),je=k({base:`rounded-full border px-2.5 py-1 text-[11px] font-medium uppercase tracking-[0.16em]`,variants:{tone:{neutral:`border-(--dashboard-border) bg-(--dashboard-panel-muted) text-(--dashboard-text-soft)`,info:`border-(--dashboard-border-strong) bg-(--dashboard-accent-soft) text-(--dashboard-accent)`,success:`border-emerald-200 bg-emerald-100 text-emerald-700 dark:border-emerald-500/30 dark:bg-emerald-500/12 dark:text-emerald-300`,warning:`border-amber-200 bg-amber-100 text-amber-700 dark:border-amber-500/30 dark:bg-amber-500/12 dark:text-amber-300`,error:`border-rose-200 bg-rose-100 text-rose-700 dark:border-rose-500/30 dark:bg-rose-500/12 dark:text-rose-300`}},defaultVariants:{tone:`neutral`}});k({base:`rounded-lg border border-(--dashboard-border) bg-(--dashboard-panel) px-4 py-3 text-[11px] uppercase tracking-[0.24em] text-(--dashboard-text-soft) shadow-(--dashboard-shadow)`});var Me={key:0,class:`flex items-start justify-between gap-4`},Ne={class:`flex min-w-0 items-start gap-3`},Pe={class:`h-5 w-5`},Fe={class:`min-w-0`},Ie={key:0,class:`text-[11px] uppercase tracking-[0.24em] text-(--dashboard-accent)`},Le={key:1,class:`text-lg font-semibold tracking-tight`},Re={key:2,class:`mt-1 text-sm leading-6 text-(--dashboard-text-muted)`},L=t({__name:`AppSurfaceCard`,props:{title:{default:void 0},description:{default:void 0},eyebrow:{default:void 0},iconName:{default:void 0},tone:{default:`default`},padding:{default:`md`},contentClass:{default:``}},setup(e){let t=e,i=r(),a=!!(t.title||t.description||i.header);return(t,r)=>(v(),D(`section`,{class:x(n(j)(n(F)({tone:e.tone,padding:e.padding}),e.contentClass))},[n(a)?(v(),D(`header`,Me,[h(`div`,Ne,[e.iconName?(v(),D(`span`,{key:0,class:x([n(I)({size:`md`}),`shrink-0`])},[h(`span`,Pe,[c(M,{name:e.iconName},null,8,[`name`])])],2)):T(``,!0),h(`div`,Fe,[e.eyebrow?(v(),D(`p`,Ie,f(e.eyebrow),1)):T(``,!0),e.title?(v(),D(`h2`,Le,f(e.title),1)):T(``,!0),e.description?(v(),D(`p`,Re,f(e.description),1)):T(``,!0)])]),o(t.$slots,`header`)])):T(``,!0),h(`div`,{class:x(n(j)(`min-h-0 flex-1`,n(a)?`mt-4`:``))},[o(t.$slots,`default`)],2)],2))}}),R=`weapp-vite-dashboard-theme`;function ze(){if(typeof window>`u`)return`system`;let e=window.localStorage.getItem(R);return e===`light`||e===`dark`||e===`system`?e:`system`}function Be(e,t){return e===`light`||e===`dark`?e:t?.matches?`dark`:`light`}function z(){let t=u(ze()),n=typeof window<`u`?window.matchMedia(`(prefers-color-scheme: dark)`):null,r=g(()=>Be(t.value,n)),i=e=>{typeof document>`u`||(document.documentElement.dataset.theme=e,document.documentElement.style.colorScheme=e)},a=e=>{typeof window>`u`||window.localStorage.setItem(R,e)},o=()=>{i(r.value)};return s(t,e=>{a(e),i(r.value)},{immediate:!0}),e(()=>{n?.addEventListener(`change`,o),i(r.value)}),y(()=>{n?.removeEventListener(`change`,o)}),{themePreference:t,resolvedTheme:r,setThemePreference(e){t.value=e}}}var B=Symbol(`dashboard-theme`);function Ve(e){i(B,e)}function He(){return l(B,null)||z()}var V=`weapp-vite-dashboard:analyze-result-history`;function Ue(e){return e.toLocaleString(`zh-CN`,{month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1})}function H(e){return e?JSON.stringify({packages:e.packages,modules:e.modules,subPackages:e.subPackages,budgets:e.metadata?.budgets}):``}function U(e,t){return H(e)===H(t)}function W(e){return e.packages.flatMap(e=>e.files).reduce((e,t)=>e+(t.size??0),0)}function We(e){return e.packages.flatMap(e=>e.files).reduce((e,t)=>e+(t.brotliSize??t.gzipSize??Math.round((t.size??0)*.32)),0)}function Ge(e,t){let n=W(e);return`${Date.parse(t).toString(36)}-${n.toString(36)}-${e.modules.length.toString(36)}`}function G(e,t=new Date().toISOString()){let n=e.modules.filter(e=>e.packages.length>1).length;return{id:Ge(e,t),capturedAt:t,label:Ue(new Date(t)),result:e,totalBytes:W(e),compressedBytes:We(e),packageCount:e.packages.length,moduleCount:e.modules.length,duplicateCount:n}}function Ke(e){let t=[...e.snapshots??[]];e.previous&&t.push(G(e.previous)),t.push(G(e.current));let n=new Map;for(let e of t){let t=H(e.result);n.has(t)||n.set(t,e)}return[...n.values()].sort((e,t)=>Date.parse(t.capturedAt)-Date.parse(e.capturedAt)).slice(0,12)}function qe(){try{let e=window.localStorage.getItem(V);if(!e)return null;let t=JSON.parse(e);return!t?.current?.packages||!Array.isArray(t.current.packages)?null:{current:t.current,previous:t.previous?.packages?t.previous:null,snapshots:Array.isArray(t.snapshots)?t.snapshots.filter(e=>e?.result?.packages&&Array.isArray(e.result.packages)):void 0,baselineSnapshotId:typeof t.baselineSnapshotId==`string`?t.baselineSnapshotId:null,comparisonMode:t.comparisonMode===`baseline`?`baseline`:`previous`}}catch{return null}}function K(e){try{window.localStorage.setItem(V,JSON.stringify(e))}catch{}}function Je(e,t,n){return t||(e&&n?.current&&!U(e,n.current)?n.current:n?.previous??null)}var Ye=[{value:`system`,label:`跟随系统`,iconName:`theme-system`},{value:`light`,label:`亮色`,iconName:`theme-light`},{value:`dark`,label:`暗色`,iconName:`theme-dark`}],Xe=[{key:`overview`,label:`总览`,iconName:`tab-overview`},{key:`diagnostics`,label:`诊断`,iconName:`metric-health`},{key:`review`,label:`评审清单`,iconName:`metric-bookmark`},{key:`treemap`,label:`体积地图`,iconName:`treemap`},{key:`files`,label:`文件详情`,iconName:`top-files`},{key:`source`,label:`源码对比`,iconName:`tab-source`},{key:`packages`,label:`包与产物`,iconName:`tab-packages`},{key:`modules`,label:`模块与复用`,iconName:`tab-modules`}],Ze=[{value:`all`,label:`全部`},{value:`growth`,label:`增长`},{value:`duplicates`,label:`重复`},{value:`node_modules`,label:`依赖`},{value:`source`,label:`业务`},{value:`selected-package`,label:`当前包`}],q=[{to:`/`,label:`工作台`,caption:`应用入口与状态总览`,iconName:`nav-home`},{to:`/analyze`,label:`分析视图`,caption:`包体、模块与分包结构`,iconName:`nav-analyze`,children:Xe.map(e=>({to:e.key===`overview`?`/analyze`:`/analyze?tab=${e.key}`,label:e.label,caption:e.key===`overview`?`全局摘要和建议动作`:e.key===`diagnostics`?`预算、增量和历史基线`:e.key===`review`?`PR 风险和评审清单`:e.key===`treemap`?`产物体积地图`:e.key===`files`?`文件、预算和模块明细`:e.key===`source`?`源码与产物 Diff`:e.key===`packages`?`包体和产物列表`:`模块复用与来源`,iconName:e.iconName}))},{to:`/activity`,label:`活动流`,caption:`命令、诊断与运行事件`,iconName:`nav-activity`},{to:`/tokens`,label:`设计令牌`,caption:`主题、表面与组件状态`,iconName:`nav-tokens`}],Qe=[{label:`启动开发`,command:`pnpm --filter @weapp-vite/dashboard dev`,note:`本地预览完整 UI 壳子`,category:`dev`},{label:`生产构建`,command:`pnpm --filter @weapp-vite/dashboard build`,note:`验证静态产物可发布`,category:`build`},{label:`主包联调`,command:`weapp-vite build --ui`,note:`从 CLI 注入真实分析数据`,category:`analyze`}],$e=["`analyze` payload 契约保持兼容,CLI 注入无需迁移。",`工作台可在无 payload 状态下展示稳定空态和示例事件。`,`主题偏好在应用级共享,页面之间状态一致。`],et=[{time:`09:12`,title:`analyze payload synced`,summary:`CLI 已把最新构建结果注入 dashboard,全局状态已完成一次同步。`,tone:`live`},{time:`09:26`,title:`workspace shell extended`,summary:`工作台、活动流、设计令牌已经拆成独立页面。`,tone:`default`},{time:`10:03`,title:`theme system unified`,summary:`主题偏好收敛到应用根部,所有页面共享同一套明暗模式。`,tone:`default`}],tt=[{label:`CLI 注入链路`,detail:"保留 `window.__WEAPP_VITE_ANALYZE_RESULT__` 兼容层。",status:`兼容`},{label:`路由拓展性`,detail:`页面采用文件路由,主路由表保持稳定。`,status:`可扩展`},{label:`组件复用`,detail:`通用卡片与区块标题已独立,避免页面继续拷贝结构。`,status:`已落地`},{label:`视觉令牌`,detail:`颜色、表面、排版预览集中在 tokens 页面统一检查。`,status:`可验证`}],nt=[{id:`evt-command-build-ui`,kind:`command`,level:`success`,title:`build --ui completed`,detail:`示例事件: dashboard 已经准备好承接来自 CLI 的真实命令生命周期事件。`,timestamp:`10:18:12`,source:`cli`,durationMs:842,tags:[`build`,`ui`]},{id:`evt-hmr-shell`,kind:`hmr`,level:`info`,title:`workspace shell hot updated`,detail:`工作台页面已完成一次热更新并记录到事件流。`,timestamp:`10:19:44`,source:`vite-hmr`,tags:[`hmr`,`shell`]},{id:`evt-diagnostic-payload`,kind:`diagnostic`,level:`warning`,title:`analyze payload pending`,detail:`当前页面支持在没有 payload 时进入空态。`,timestamp:`10:20:07`,source:`dashboard`,tags:[`diagnostic`]}],rt=[{title:`Accent`,iconName:`token-color`,tokens:[{name:`--dashboard-accent`,sample:`var(--dashboard-accent)`},{name:`--dashboard-accent-soft`,sample:`var(--dashboard-accent-soft)`},{name:`--dashboard-border-strong`,sample:`var(--dashboard-border-strong)`}]},{title:`Surfaces`,iconName:`token-surface`,tokens:[{name:`--dashboard-panel`,sample:`var(--dashboard-panel)`},{name:`--dashboard-panel-strong`,sample:`var(--dashboard-panel-strong)`},{name:`--dashboard-panel-muted`,sample:`var(--dashboard-panel-muted)`}]},{title:`Typography`,iconName:`token-type`,tokens:[{name:`--dashboard-text`,sample:`var(--dashboard-text)`},{name:`--dashboard-text-muted`,sample:`var(--dashboard-text-muted)`},{name:`--dashboard-text-soft`,sample:`var(--dashboard-text-soft)`}]}];function J(e){if(!e||Number.isNaN(e))return`—`;let t=1024,n=[`B`,`KB`,`MB`,`GB`],r=e,i=0;for(;r>=t&&i<n.length-1;)r/=t,i++;return`${r.toFixed(r>=100||i===0?0:2)} ${n[i]}`}function it(e,t=``,n=``){if(!e||Number.isNaN(e)||e<=0)return 0;let r=t.toLowerCase().split(`.`).pop()??``,i=new Set([`cjs`,`css`,`html`,`js`,`json`,`map`,`mjs`,`svg`,`txt`,`wxml`,`wxss`,`xml`]),a=new Set([`avif`,`br`,`gif`,`gz`,`jpeg`,`jpg`,`mp3`,`mp4`,`ogg`,`otf`,`png`,`webp`,`woff`,`woff2`,`zip`]);return i.has(r)?Math.max(1,Math.round(e*.34)):a.has(r)?Math.max(1,Math.round(e*.92)):n===`chunk`?Math.max(1,Math.round(e*.38)):Math.max(1,Math.round(e*.72))}function at(e){switch(e){case`main`:return`主包`;case`subPackage`:return`分包`;case`independent`:return`独立分包`;case`virtual`:return`虚拟包`;default:return e}}function ot(e){return e===`independent`?`独立构建`:`主构建`}function st(e){switch(e){case`src`:return`业务源码`;case`workspace`:return`工作区包`;case`plugin`:return`插件`;case`node_modules`:return`依赖`;default:return e}}function ct(e){switch(e){case`command`:return`命令`;case`build`:return`构建`;case`diagnostic`:return`诊断`;case`hmr`:return`HMR`;case`system`:return`系统`;default:return e}}function lt(e){switch(e){case`info`:return`信息`;case`success`:return`成功`;case`warning`:return`警告`;case`error`:return`错误`;default:return e}}function ut(e){return e??`dashboard`}function dt(e){return e}function ft(e){return{label:lt(e.level),tone:dt(e.level)}}function pt(e){return e>0?`error`:`info`}function mt(e){return{label:e.latestTimestamp?`${e.count} 条`:`错误 ${e.errorCount}`,tone:pt(e.errorCount)}}function Y(e){return typeof e!=`number`||Number.isNaN(e)||e<0?`未记录`:e>=1e3?`${(e/1e3).toFixed(e>=1e4?1:2)} s`:`${e} ms`}function ht(e){let t=[ct(e.kind),ut(e.source),e.timestamp];return typeof e.durationMs==`number`&&Number.isFinite(e.durationMs)&&e.durationMs>=0&&t.push(Y(e.durationMs)),t.join(` · `)}function X(e,t){return{label:e,value:t}}function gt(){return new Date().toLocaleTimeString(`zh-CN`,{hour12:!1})}function _t(e){if(!e)return{packageCount:0,moduleCount:0,duplicateCount:0,totalBytes:0};let t=e.packages.flatMap(e=>e.files);return{packageCount:e.packages.length,moduleCount:e.modules.length,duplicateCount:e.modules.filter(e=>e.packages.length>1).length,totalBytes:t.reduce((e,t)=>e+(t.size??0),0)}}function vt(e){let t=e.filter(e=>e.level===`error`).length,n=e.filter(e=>e.level===`warning`).length,r=e.filter(e=>e.kind===`command`).length,i=e.filter(e=>typeof e.durationMs==`number`),a=i.length>0?Math.round(i.reduce((e,t)=>e+(t.durationMs??0),0)/i.length):void 0;return[X(`总事件数`,String(e.length)),X(`命令事件`,String(r)),X(`已记录耗时`,String(i.length)),X(`平均耗时`,Y(a)),X(`警告事件`,String(n)),X(`错误事件`,String(t))]}function yt(e){return[{label:`页面骨架`,value:`4 个`,iconName:`metric-ready`},{label:`连接状态`,value:e.result?`已接入 payload`:`等待注入`,iconName:e.result?`status-live`:`metric-health`},{label:`数据同步`,value:`${e.updateCount} 次`,iconName:`metric-latency`},{label:`产物体积`,value:e.result?J(e.summary.totalBytes):`未载入`,iconName:`metric-quality`},{label:`运行事件`,value:`${e.runtimeEventCount} 条`,iconName:e.latestRuntimeEvent?.level===`error`?`metric-health`:`metric-time`}]}function bt(e){return e.result?[{label:`重新分析当前工程`,command:`weapp-vite analyze`,note:`最近同步于 ${e.lastUpdatedAt},当前可读取 ${e.summary.packageCount} 个包。`,category:`analyze`},{label:`进入构建联调`,command:`weapp-vite build --ui`,note:`当前产物总体积 ${J(e.summary.totalBytes)},适合继续核对 chunk 结构。`,category:`build`},{label:`观察开发态更新`,command:`weapp-vite dev --ui`,note:`已记录 ${e.updateCount} 次 payload 同步,后续可继续接入更细粒度事件。`,category:`dev`}]:Qe}function xt(e){let t=[...et];for(let n of e.runtimeEvents.slice(0,4))t.unshift({time:n.timestamp,title:n.title,summary:n.detail,tone:n.level===`error`||n.level===`warning`?`default`:`live`});return e.result&&t.unshift({time:e.lastUpdatedAt,title:`workspace payload received`,summary:`已收到一份真实 analyze 结果,包含 ${e.summary.packageCount} 个包和 ${e.summary.moduleCount} 个模块。`,tone:`live`}),t}function St(e){let t=[...tt];return e.latestRuntimeEvent&&t.unshift({label:`最新运行事件`,detail:`${e.latestRuntimeEvent.title} · ${e.latestRuntimeEvent.detail}`,status:e.latestRuntimeEvent.level}),e.result?[{label:`实时分析状态`,detail:`已接入 payload,当前记录 ${e.summary.duplicateCount} 个跨包复用模块。`,status:`在线`},{label:`产物规模`,detail:`总产物体积 ${J(e.summary.totalBytes)},可继续进入分析页查看 treemap 与最大文件。`,status:`可分析`},...t]:[{label:`CLI 注入链路`,detail:`尚未接收到 analyze payload,当前页面以空态方式工作。`,status:`待接入`},...t]}var Ct=Symbol(`dashboard-workspace`),wt=[`command`,`build`,`diagnostic`,`hmr`,`system`],Tt=[`info`,`success`,`warning`,`error`];function Et(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Dt(e){return typeof e==`string`&&wt.includes(e)?e:`system`}function Ot(e){return typeof e==`string`&&Tt.includes(e)?e:`info`}function Z(e,t){return typeof e==`string`&&e.trim()?e:t}function Q(e){return typeof e==`number`&&Number.isFinite(e)&&e>=0?e:void 0}function kt(e){if(!Array.isArray(e))return;let t=e.filter(e=>typeof e==`string`&&e.trim()).map(e=>String(e));return t.length>0?t:void 0}function At(e){if(!Array.isArray(e))return;let t=e.filter(e=>typeof e==`string`&&e.trim()).map(e=>String(e));return t.length>0?t:void 0}function jt(e){if(!Et(e))return;let t={timestamp:typeof e.timestamp==`string`?e.timestamp:void 0,totalMs:Q(e.totalMs),eventId:typeof e.eventId==`string`?e.eventId:void 0,event:typeof e.event==`string`?e.event:void 0,file:typeof e.file==`string`?e.file:void 0,relativeFile:typeof e.relativeFile==`string`?e.relativeFile:void 0,sourceRootFile:typeof e.sourceRootFile==`string`?e.sourceRootFile:void 0,buildCoreMs:Q(e.buildCoreMs),transformMs:Q(e.transformMs),writeMs:Q(e.writeMs),watchToDirtyMs:Q(e.watchToDirtyMs),emitMs:Q(e.emitMs),sharedChunkResolveMs:Q(e.sharedChunkResolveMs),dirtyCount:Q(e.dirtyCount),pendingCount:Q(e.pendingCount),emittedCount:Q(e.emittedCount),dirtyReasonSummary:At(e.dirtyReasonSummary),pendingReasonSummary:At(e.pendingReasonSummary)};return Object.values(t).some(e=>e!==void 0)?t:void 0}function Mt(e,t){return{id:Z(e.id,`dashboard-runtime-event-${t}`),kind:Dt(e.kind),level:Ot(e.level),title:Z(e.title,`untitled event`),detail:Z(e.detail,`no event detail`),timestamp:Z(e.timestamp,`—`),source:Z(e.source,`dashboard`),durationMs:Q(e.durationMs),tags:kt(e.tags),profile:jt(e.profile)}}function Nt(e){return{count:1,errorCount:+(e.level===`error`),latestTimestamp:e.timestamp,durationTotal:e.durationMs??0,timedCount:+(typeof e.durationMs==`number`)}}function Pt(e,t){return{count:e.count+1,errorCount:e.errorCount+ +(t.level===`error`),latestTimestamp:e.latestTimestamp,durationTotal:e.durationTotal+(t.durationMs??0),timedCount:e.timedCount+ +(typeof t.durationMs==`number`)}}function Ft(e,t){return{source:e,count:t.count,errorCount:t.errorCount,latestTimestamp:t.latestTimestamp,averageDurationMs:t.timedCount>0?Math.round(t.durationTotal/t.timedCount):void 0}}function It(e){return{...e,averageDuration:Y(e.averageDurationMs)}}function Lt(e,t){return Et(e)?Mt(e,t):null}function $(e){let t=(Array.isArray(e)?e:[e]).map((e,t)=>Lt(e,t)).filter(e=>!!e),n=new Map;for(let e of t)n.set(e.id,e);return[...n.values()]}function Rt(e){let t=new Map;for(let n of e){let e=n.source??`dashboard`,r=t.get(e);if(!r){t.set(e,Nt(n));continue}t.set(e,Pt(r,n))}return Array.from(t,([e,t])=>Ft(e,t)).sort((e,t)=>t.count-e.count||e.source.localeCompare(t.source,`zh-CN`))}function zt(e){return e.map(e=>It(e))}function Bt(){return window.__WEAPP_VITE_DASHBOARD_EVENTS__?.length?$(window.__WEAPP_VITE_DASHBOARD_EVENTS__):$(nt)}function Vt(t){let n=g(()=>t.value[0]??null),r=g(()=>vt(t.value)),i=g(()=>Rt(t.value)),a=e=>{let n=$(e);if(n.length===0)return;let r=[...n,...t.value],i=new Map;for(let e of r)i.set(e.id,e);t.value=[...i.values()].slice(0,24),window.__WEAPP_VITE_DASHBOARD_EVENTS__=[...t.value]},o=e=>{let t=e instanceof CustomEvent?e.detail:null;a(Array.isArray(t)?t:t?[t]:null)};return e(()=>{window.addEventListener(`weapp-dashboard:event`,o),a(window.__WEAPP_VITE_DASHBOARD_EVENTS__)}),y(()=>{window.removeEventListener(`weapp-dashboard:event`,o)}),{eventSummary:r,latestRuntimeEvent:n,runtimeSourceSummary:i}}function Ht(){let t=window.__WEAPP_VITE_ANALYZE_RESULT__??null,n=window.__WEAPP_VITE_PREVIOUS_ANALYZE_RESULT__??null,r=qe(),i=d(t),a=d(Je(t,n,r)),o=d(r?Ke(r):t?[G(t)]:[]),s=d(r?.baselineSnapshotId&&o.value.some(e=>e.id===r.baselineSnapshotId)?r.baselineSnapshotId:null),c=d(r?.comparisonMode===`baseline`&&s.value?`baseline`:`previous`),l=d(Bt()),u=d(0),f=d(i.value?gt():`—`);t&&K({current:t,previous:a.value,snapshots:o.value,baselineSnapshotId:s.value,comparisonMode:c.value});let p=g(()=>_t(i.value)),{eventSummary:ee,latestRuntimeEvent:m,runtimeSourceSummary:h}=Vt(l),_=g(()=>i.value?`payload ready`:`awaiting payload`),v=g(()=>i.value?`${p.value.packageCount} 个包 · ${p.value.moduleCount} 个模块`:`尚未接收到 CLI analyze 数据`),te=g(()=>o.value.find(e=>e.id===s.value)??null),b=g(()=>c.value===`baseline`?te.value?.result??a.value:a.value),x=g(()=>yt({result:i.value,updateCount:u.value,summary:p.value,runtimeEventCount:l.value.length,latestRuntimeEvent:m.value})),S=g(()=>bt({result:i.value,lastUpdatedAt:f.value,summary:p.value,updateCount:u.value})),C=g(()=>xt({runtimeEvents:l.value,result:i.value,lastUpdatedAt:f.value,summary:p.value})),w=g(()=>St({result:i.value,latestRuntimeEvent:m.value,summary:p.value})),T=()=>{let e=window.__WEAPP_VITE_ANALYZE_RESULT__;if(!e)return;let t=window.__WEAPP_VITE_PREVIOUS_ANALYZE_RESULT__??null,n=qe(),r=n?.previous??a.value;n?.current&&!U(e,n.current)&&(r=n.current),i.value&&!U(e,i.value)&&(r=i.value),t&&!U(e,t)&&(r=t),a.value=U(e,r)?null:r,i.value=e;let l=G(e),d=Ke({current:e,previous:a.value,snapshots:[l,...o.value]});o.value=d,s.value&&!d.some(e=>e.id===s.value)&&(s.value=d[d.length-1]?.id??null),c.value===`baseline`&&!s.value&&(c.value=`previous`),K({current:e,previous:a.value,snapshots:o.value,baselineSnapshotId:s.value,comparisonMode:c.value}),u.value+=1,f.value=gt()},E=()=>{i.value&&K({current:i.value,previous:a.value,snapshots:o.value,baselineSnapshotId:s.value,comparisonMode:c.value})};return e(()=>{window.addEventListener(`weapp-analyze:update`,T),T()}),y(()=>{window.removeEventListener(`weapp-analyze:update`,T)}),{resultRef:i,previousResultRef:a,comparisonResultRef:b,historySnapshots:o,baselineSnapshotId:s,comparisonMode:c,updateCount:u,lastUpdatedAt:f,statusLabel:_,statusSummary:v,commandItems:S,activityItems:C,diagnostics:w,signals:x,runtimeEvents:l,latestRuntimeEvent:m,eventSummary:ee,runtimeSourceSummary:h,setBaselineSnapshot:e=>{o.value.some(t=>t.id===e)&&(s.value=e,c.value=`baseline`,E())},setComparisonMode:e=>{c.value=e===`baseline`&&!s.value?`previous`:e,E()}}}function Ut(e){i(Ct,e)}function Wt(){let e=l(Ct,null);if(!e)throw Error(`[dashboard] workspace context is not available`);return e}var Gt={class:`h-dvh overflow-hidden px-3 py-3 text-(--dashboard-text) md:px-4 md:py-4 lg:px-5`},Kt={class:`mx-auto grid h-full max-w-400 gap-3 overflow-hidden lg:grid-cols-[17rem_minmax(0,1fr)]`},qt={class:`hidden min-h-0 overflow-hidden lg:block`},Jt={class:`grid h-full grid-rows-[minmax(0,1fr)_auto] gap-3`},Yt={class:`grid min-h-0 min-w-0 grid-rows-[auto_minmax(0,1fr)] gap-3 overflow-hidden`},Xt={class:`min-h-0 overflow-hidden`},Zt={key:0,class:`fixed inset-y-3 left-3 z-50 w-[min(22rem,calc(100vw-1.5rem))] lg:hidden`},Qt=t({__name:`App`,setup(e){let t=ee(),r=u(!1),{themePreference:i,resolvedTheme:a,setThemePreference:o}=z(),l=Ht(),d=g(()=>!!l.resultRef.value),f=g(()=>typeof t.query.tab==`string`?t.query.tab:`overview`);Ve({themePreference:i,resolvedTheme:a,setThemePreference:o}),Ut(l);let p=g(()=>t.path.startsWith(`/analyze`)?{title:`Analyze Workspace`}:t.path.startsWith(`/activity`)?{title:`Activity Stream`}:t.path.startsWith(`/tokens`)?{title:`Design Tokens`}:{title:`Workspace Console`});return s(()=>t.fullPath,()=>{r.value=!1}),(e,s)=>(v(),D(`div`,Gt,[h(`div`,Kt,[h(`aside`,qt,[h(`div`,Jt,[c(L,{eyebrow:`Shell`,title:`weapp-vite dashboard`,"icon-name":`hero-system`,tone:`strong`,"content-class":`min-h-0 overflow-hidden`},{default:O(()=>[c(N,{"current-analyze-tab":f.value,"current-path":n(t).path,items:n(q)},null,8,[`current-analyze-tab`,`current-path`,`items`])]),_:1}),c(L,{eyebrow:`Status`,title:n(l).statusLabel.value,description:n(l).statusSummary.value,"icon-name":d.value?`status-live`:n(a)===`dark`?`theme-dark`:`theme-light`,padding:`sm`},null,8,[`title`,`description`,`icon-name`])])]),h(`div`,Yt,[c(Oe,{title:p.value.title,description:p.value.description,"theme-options":n(Ye),"theme-preference":n(i),onMenu:s[0]||=e=>r.value=!0,onSetTheme:n(o)},null,8,[`title`,`description`,`theme-options`,`theme-preference`,`onSetTheme`]),h(`div`,Xt,[c(n(te))])])]),c(C,{"enter-active-class":`transition duration-200 ease-out`,"enter-from-class":`opacity-0`,"enter-to-class":`opacity-100`,"leave-active-class":`transition duration-150 ease-in`,"leave-from-class":`opacity-100`,"leave-to-class":`opacity-0`},{default:O(()=>[r.value?(v(),D(`div`,{key:0,class:`fixed inset-0 z-40 bg-slate-950/35 backdrop-blur-sm lg:hidden`,onClick:s[1]||=e=>r.value=!1})):T(``,!0)]),_:1}),c(C,{"enter-active-class":`transition duration-200 ease-out`,"enter-from-class":`-translate-x-6 opacity-0`,"enter-to-class":`translate-x-0 opacity-100`,"leave-active-class":`transition duration-150 ease-in`,"leave-from-class":`translate-x-0 opacity-100`,"leave-to-class":`-translate-x-6 opacity-0`},{default:O(()=>[r.value?(v(),D(`aside`,Zt,[c(L,{eyebrow:`Navigation`,title:`Workspace Modules`,description:`选择要查看的工作区。`,"icon-name":`nav-menu`,tone:`strong`,"content-class":`h-full`},{default:O(()=>[c(N,{mobile:``,"current-analyze-tab":f.value,"current-path":n(t).path,items:n(q),onNavigate:s[2]||=e=>r.value=!1},null,8,[`current-analyze-tab`,`current-path`,`items`])]),_:1})])):T(``,!0)]),_:1})]))}}),$t=S({history:_(),routes:[{path:`/`,name:`/`,component:()=>A(()=>import(`./pages.js`),[],import.meta.url)},{path:`/activity`,name:`/activity`,component:()=>A(()=>import(`./activity.js`),[],import.meta.url)},{path:`/analyze`,name:`/analyze`,component:()=>A(()=>import(`./analyze.js`),__vite__mapDeps([0]),import.meta.url)},{path:`/tokens`,name:`/tokens`,component:()=>A(()=>import(`./tokens.js`),[],import.meta.url)}]});function en(){let e=m(Qt);e.config.errorHandler=(e,t,n)=>{},e.use($t),e.mount(`#app`)}try{en()}catch{}export{ke as C,P as D,F as E,M as O,I as S,je as T,q as _,mt as a,He as b,J as c,ct as d,lt as f,rt as g,$e as h,ft as i,Y as l,st as m,zt as n,it as o,ht as p,Rt as r,ot as s,Wt as t,at as u,Ye as v,Ae as w,L as x,Ze as y};
2
+ import{A as e,C as t,K as n,L as r,M as i,N as a,P as o,R as s,S as c,T as l,U as u,W as d,X as f,_ as p,a as ee,c as m,g as h,h as g,i as _,j as v,k as y,n as te,p as b,q as x,r as S,s as C,t as w,v as T,x as E,y as D,z as O}from"./vue.js";import{n as ne,t as k}from"./vendor.js";import{s as A}from"./monaco.js";function re(e,t){if(e){if(Array.isArray(e)){for(let n of e)re(n,t);return}if(typeof e==`object`){for(let[n,r]of Object.entries(e))r&&t.push(n);return}t.push(String(e))}}function j(...e){let t=[];for(let n of e)re(n,t);return ne(t.join(` `))}var M=t({__name:`DashboardIcon`,props:{name:{}},setup(e){let t=e,n={"theme-system":`icon-[mdi--theme-light-dark]`,"theme-light":`icon-[mdi--white-balance-sunny]`,"theme-dark":`icon-[mdi--moon-waning-crescent]`,"nav-menu":`icon-[mdi--menu]`,"nav-home":`icon-[mdi--view-grid-outline]`,"nav-analyze":`icon-[mdi--chart-box-outline]`,"nav-activity":`icon-[mdi--timeline-text-outline]`,"nav-tokens":`icon-[mdi--palette-outline]`,"tab-overview":`icon-[mdi--view-dashboard-outline]`,"tab-packages":`icon-[mdi--package-variant-closed]`,"tab-modules":`icon-[mdi--vector-link]`,"tab-source":`icon-[mdi--source-branch]`,"status-dark":`icon-[mdi--circle-slice-8]`,"status-light":`icon-[mdi--checkbox-blank-circle]`,"status-live":`icon-[mdi--motion-play-outline]`,"metric-packages":`icon-[mdi--package-variant]`,"metric-subpackages":`icon-[mdi--layers-triple-outline]`,"metric-chunks":`icon-[mdi--chart-tree]`,"metric-assets":`icon-[mdi--file-document-multiple-outline]`,"metric-size-outline":`icon-[mdi--database-outline]`,"metric-modules":`icon-[mdi--cube-outline]`,"metric-duplicates":`icon-[mdi--vector-link]`,"metric-sources":`icon-[mdi--source-branch]`,"metric-copy":`icon-[mdi--content-copy]`,"metric-time":`icon-[mdi--clock-outline]`,"metric-entries":`icon-[mdi--export-variant]`,"metric-size":`icon-[mdi--database]`,treemap:`icon-[mdi--chart-box-outline]`,"top-files":`icon-[mdi--file-star-outline]`,subpackages:`icon-[mdi--layers-triple-outline]`,"duplicate-modules":`icon-[mdi--vector-link]`,"module-sources":`icon-[mdi--source-branch]`,"file-samples":`icon-[mdi--file-document-outline]`,"hero-workspace":`icon-[mdi--view-quilt-outline]`,"hero-commands":`icon-[mdi--console-line]`,"hero-system":`icon-[mdi--shape-outline]`,"metric-ready":`icon-[mdi--rocket-launch-outline]`,"metric-health":`icon-[mdi--heart-pulse]`,"metric-latency":`icon-[mdi--timer-sand]`,"metric-quality":`icon-[mdi--shield-check-outline]`,"metric-search":`icon-[mdi--magnify]`,"metric-history":`icon-[mdi--history]`,"metric-bookmark":`icon-[mdi--bookmark-check-outline]`,"metric-link":`icon-[mdi--link-variant]`,"metric-reset":`icon-[mdi--restore]`,"token-color":`icon-[mdi--palette-outline]`,"token-surface":`icon-[mdi--card-bulleted-outline]`,"token-type":`icon-[mdi--format-letter-spacing]`},r=g(()=>n[t.name]??`icon-[mdi--file-document-multiple-outline]`);return(e,t)=>(v(),D(`span`,{class:x([`h-full w-full`,r.value])},null,2))}}),ie={class:`grid gap-2 overflow-y-auto pr-1`},ae={class:`flex items-start gap-3`},oe={class:`h-5 w-5`},se={class:`min-w-0`},ce={class:`font-medium text-(--dashboard-text)`},le={key:0,class:`ml-5 grid gap-1 border-l border-(--dashboard-border) pl-3`},ue={class:`h-4 w-4 shrink-0`},de={class:`min-w-0 truncate`},N=t({__name:`AppNavigationList`,props:{currentAnalyzeTab:{},currentPath:{},items:{},mobile:{type:Boolean,default:!1}},emits:[`navigate`],setup(e,{emit:t}){let r=e,i=t;function o(e){return e===`/`?r.currentPath===`/`:r.currentPath===e||r.currentPath.startsWith(`${e}/`)}function s(e){let t=e.indexOf(`?`);return t===-1?`overview`:new URLSearchParams(e.slice(t+1)).get(`tab`)??`overview`}function l(e){return e.startsWith(`/analyze`)?r.currentPath===`/analyze`&&s(e)===r.currentAnalyzeTab:o(e)}function u(e){return o(e.to)||!!e.children?.some(e=>l(e.to))}return(t,r)=>(v(),D(`nav`,ie,[(v(!0),D(b,null,a(e.items,t=>(v(),D(`div`,{key:t.to,class:`grid gap-1`},[c(n(w),{to:t.to,class:x(n(j)(`group rounded-md border px-3 py-3 transition`,u(t)?`border-(--dashboard-border-strong) bg-(--dashboard-panel-strong) shadow-(--dashboard-shadow)`:`border-(--dashboard-border) bg-(--dashboard-panel-muted) hover:border-(--dashboard-border-strong) hover:bg-(--dashboard-panel)`)),onClick:r[0]||=e=>i(`navigate`)},{default:O(()=>[h(`div`,ae,[h(`span`,{class:x(n(j)(`flex h-10 w-10 shrink-0 items-center justify-center rounded-md`,u(t)?`bg-(--dashboard-accent-soft) text-(--dashboard-accent)`:`bg-(--dashboard-panel) text-(--dashboard-text-soft) group-hover:text-(--dashboard-accent)`))},[h(`span`,oe,[c(M,{name:t.iconName},null,8,[`name`])])],2),h(`div`,se,[h(`p`,ce,f(t.label),1),h(`p`,{class:x([`text-xs leading-5 text-(--dashboard-text-soft)`,e.mobile?`mt-1`:`mt-0.5 truncate`])},f(t.caption),3)])])]),_:2},1032,[`to`,`class`]),t.children?.length&&u(t)?(v(),D(`div`,le,[(v(!0),D(b,null,a(t.children,e=>(v(),p(n(w),{key:e.to,to:e.to,class:x(n(j)(`group flex min-w-0 items-center gap-2 rounded-md px-2.5 py-2 text-sm transition`,l(e.to)?`bg-(--dashboard-accent-soft) text-(--dashboard-accent)`:`text-(--dashboard-text-soft) hover:bg-(--dashboard-panel-muted) hover:text-(--dashboard-text)`)),onClick:r[1]||=e=>i(`navigate`)},{default:O(()=>[h(`span`,ue,[c(M,{name:e.iconName},null,8,[`name`])]),h(`span`,de,f(e.label),1)]),_:2},1032,[`to`,`class`]))),128))])):T(``,!0)]))),128))]))}}),fe={key:0,class:`mr-1.5 h-4 w-4 text-(--dashboard-accent)`},P=t({__name:`AppInfoPill`,props:{label:{},iconName:{},uppercase:{type:Boolean}},setup(e){return(t,n)=>(v(),D(`span`,{class:x([`inline-flex items-center rounded-full border border-(--dashboard-border) bg-(--dashboard-panel-muted) px-2.5 py-1 text-xs font-medium text-(--dashboard-text-soft)`,e.uppercase?`tracking-[0.18em] uppercase`:void 0])},[e.iconName?(v(),D(`span`,fe,[c(M,{name:e.iconName},null,8,[`name`])])):T(``,!0),E(` `+f(e.label),1)],2))}}),pe={class:`flex flex-col gap-3 rounded-lg border border-(--dashboard-border-strong) bg-(--dashboard-panel-strong) px-4 py-3 shadow-(--dashboard-shadow) md:px-5`},me={class:`flex items-start justify-between gap-3`},he={class:`flex items-start gap-3`},ge={class:`h-5 w-5`},_e={class:`mt-1 text-2xl font-semibold tracking-tight md:text-[1.8rem]`},ve={key:0,class:`mt-1 max-w-3xl text-sm leading-6 text-(--dashboard-text-muted)`},ye={key:0,class:`hidden items-center gap-2 rounded-full border border-(--dashboard-border) bg-(--dashboard-panel-muted) px-3 py-2 text-xs font-medium text-(--dashboard-text-soft) md:inline-flex`,for:`dashboard-global-theme`},be={class:`h-4 w-4 text-(--dashboard-accent)`},xe=[`value`],Se=[`value`],Ce={class:`flex flex-wrap items-center gap-2 md:hidden`},we={key:0,class:`inline-flex items-center gap-2 rounded-full border border-(--dashboard-border) bg-(--dashboard-panel-muted) px-3 py-2 text-xs font-medium text-(--dashboard-text-soft)`,for:`dashboard-mobile-theme`},Te={class:`h-4 w-4 text-(--dashboard-accent)`},Ee=[`value`],De=[`value`],Oe=t({__name:`AppShellHeader`,props:{title:{},description:{},themeOptions:{},themePreference:{}},emits:[`menu`,`setTheme`],setup(e,{emit:t}){let n=e,r=t,i=g(()=>n.themeOptions.find(e=>e.value===n.themePreference)?.iconName??`theme-system`),o=g(()=>n.themeOptions.length>0);function s(e){r(`setTheme`,e.target.value)}return(t,n)=>(v(),D(`header`,pe,[h(`div`,me,[h(`div`,he,[h(`button`,{class:`inline-flex h-11 w-11 shrink-0 items-center justify-center rounded-md border border-(--dashboard-border) bg-(--dashboard-panel-muted) text-(--dashboard-text) md:hidden`,type:`button`,onClick:n[0]||=e=>r(`menu`)},[h(`span`,ge,[c(M,{name:`nav-menu`})])]),h(`div`,null,[n[1]||=h(`p`,{class:`text-[11px] uppercase tracking-[0.28em] text-(--dashboard-accent)`},` weapp-vite dashboard `,-1),h(`h1`,_e,f(e.title),1),e.description?(v(),D(`p`,ve,f(e.description),1)):T(``,!0)])]),o.value?(v(),D(`label`,ye,[h(`span`,be,[c(M,{name:i.value},null,8,[`name`])]),h(`select`,{id:`dashboard-global-theme`,class:`min-w-32 bg-transparent text-(--dashboard-text) outline-none`,value:e.themePreference,onChange:s},[(v(!0),D(b,null,a(e.themeOptions,e=>(v(),D(`option`,{key:e.value,value:e.value},f(e.label),9,Se))),128))],40,xe)])):T(``,!0)]),h(`div`,Ce,[o.value?(v(),D(`label`,we,[h(`span`,Te,[c(M,{name:i.value},null,8,[`name`])]),h(`select`,{id:`dashboard-mobile-theme`,class:`min-w-32 bg-transparent text-(--dashboard-text) outline-none`,value:e.themePreference,onChange:s},[(v(!0),D(b,null,a(e.themeOptions,e=>(v(),D(`option`,{key:e.value,value:e.value},f(e.label),9,De))),128))],40,Ee)])):T(``,!0),o.value?(v(),p(P,{key:1,"icon-name":`status-live`,label:`shell ready`,uppercase:``})):T(``,!0)])]))}}),F=k({base:`flex flex-col rounded-lg border shadow-(--dashboard-shadow)`,variants:{tone:{default:`border-(--dashboard-border) bg-(--dashboard-panel)`,strong:`border-(--dashboard-border-strong) bg-(--dashboard-panel-strong)`,muted:`border-(--dashboard-border) bg-(--dashboard-panel-muted)`},padding:{none:``,sm:`p-3`,md:`p-4`,header:`px-4 py-4 md:px-5`}},defaultVariants:{tone:`default`,padding:`md`}}),I=k({base:`flex items-center justify-center rounded-md bg-(--dashboard-accent-soft) text-(--dashboard-accent)`,variants:{size:{sm:`h-8 w-8`,md:`h-9 w-9`,lg:`h-10 w-10`}},defaultVariants:{size:`md`}}),ke=k({base:`rounded-md border border-(--dashboard-border) bg-(--dashboard-panel-muted)`,variants:{padding:{sm:`px-4 py-3`,md:`p-4`},interactive:{true:`transition hover:border-(--dashboard-border-strong) hover:bg-(--dashboard-panel)`,false:``}},defaultVariants:{padding:`md`,interactive:!1}}),Ae=k({base:`inline-flex items-center gap-2 rounded-full border transition`,variants:{kind:{nav:`px-3.5 py-1.5 text-sm`,theme:`px-3 py-1.5 text-xs font-medium`,badge:`px-2.5 py-1 text-[11px] uppercase tracking-[0.18em]`},active:{true:`border-(--dashboard-accent) bg-(--dashboard-accent-soft) text-(--dashboard-text)`,false:`border-(--dashboard-border) bg-(--dashboard-panel-muted) text-(--dashboard-text-soft) hover:border-(--dashboard-border-strong) hover:text-(--dashboard-text)`}},defaultVariants:{kind:`nav`,active:!1}}),je=k({base:`rounded-full border px-2.5 py-1 text-[11px] font-medium uppercase tracking-[0.16em]`,variants:{tone:{neutral:`border-(--dashboard-border) bg-(--dashboard-panel-muted) text-(--dashboard-text-soft)`,info:`border-(--dashboard-border-strong) bg-(--dashboard-accent-soft) text-(--dashboard-accent)`,success:`border-emerald-200 bg-emerald-100 text-emerald-700 dark:border-emerald-500/30 dark:bg-emerald-500/12 dark:text-emerald-300`,warning:`border-amber-200 bg-amber-100 text-amber-700 dark:border-amber-500/30 dark:bg-amber-500/12 dark:text-amber-300`,error:`border-rose-200 bg-rose-100 text-rose-700 dark:border-rose-500/30 dark:bg-rose-500/12 dark:text-rose-300`}},defaultVariants:{tone:`neutral`}});k({base:`rounded-lg border border-(--dashboard-border) bg-(--dashboard-panel) px-4 py-3 text-[11px] uppercase tracking-[0.24em] text-(--dashboard-text-soft) shadow-(--dashboard-shadow)`});var Me={key:0,class:`flex items-start justify-between gap-4`},Ne={class:`flex min-w-0 items-start gap-3`},Pe={class:`h-5 w-5`},Fe={class:`min-w-0`},Ie={key:0,class:`text-[11px] uppercase tracking-[0.24em] text-(--dashboard-accent)`},Le={key:1,class:`text-lg font-semibold tracking-tight`},Re={key:2,class:`mt-1 text-sm leading-6 text-(--dashboard-text-muted)`},L=t({__name:`AppSurfaceCard`,props:{title:{default:void 0},description:{default:void 0},eyebrow:{default:void 0},iconName:{default:void 0},tone:{default:`default`},padding:{default:`md`},contentClass:{default:``}},setup(e){let t=e,i=r(),a=!!(t.title||t.description||i.header);return(t,r)=>(v(),D(`section`,{class:x(n(j)(n(F)({tone:e.tone,padding:e.padding}),e.contentClass))},[n(a)?(v(),D(`header`,Me,[h(`div`,Ne,[e.iconName?(v(),D(`span`,{key:0,class:x([n(I)({size:`md`}),`shrink-0`])},[h(`span`,Pe,[c(M,{name:e.iconName},null,8,[`name`])])],2)):T(``,!0),h(`div`,Fe,[e.eyebrow?(v(),D(`p`,Ie,f(e.eyebrow),1)):T(``,!0),e.title?(v(),D(`h2`,Le,f(e.title),1)):T(``,!0),e.description?(v(),D(`p`,Re,f(e.description),1)):T(``,!0)])]),o(t.$slots,`header`)])):T(``,!0),h(`div`,{class:x(n(j)(`min-h-0 flex-1`,n(a)?`mt-4`:``))},[o(t.$slots,`default`)],2)],2))}}),R=`weapp-vite-dashboard-theme`;function ze(){if(typeof window>`u`)return`system`;let e=window.localStorage.getItem(R);return e===`light`||e===`dark`||e===`system`?e:`system`}function Be(e,t){return e===`light`||e===`dark`?e:t?.matches?`dark`:`light`}function z(){let t=u(ze()),n=typeof window<`u`?window.matchMedia(`(prefers-color-scheme: dark)`):null,r=g(()=>Be(t.value,n)),i=e=>{typeof document>`u`||(document.documentElement.dataset.theme=e,document.documentElement.style.colorScheme=e)},a=e=>{typeof window>`u`||window.localStorage.setItem(R,e)},o=()=>{i(r.value)};return s(t,e=>{a(e),i(r.value)},{immediate:!0}),e(()=>{n?.addEventListener(`change`,o),i(r.value)}),y(()=>{n?.removeEventListener(`change`,o)}),{themePreference:t,resolvedTheme:r,setThemePreference(e){t.value=e}}}var B=Symbol(`dashboard-theme`);function Ve(e){i(B,e)}function He(){return l(B,null)||z()}var V=`weapp-vite-dashboard:analyze-result-history`;function Ue(e){return e.toLocaleString(`zh-CN`,{month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1})}function H(e){return e?JSON.stringify({packages:e.packages,modules:e.modules,subPackages:e.subPackages,budgets:e.metadata?.budgets}):``}function U(e,t){return H(e)===H(t)}function W(e){return e.packages.flatMap(e=>e.files).reduce((e,t)=>e+(t.size??0),0)}function We(e){return e.packages.flatMap(e=>e.files).reduce((e,t)=>e+(t.brotliSize??t.gzipSize??Math.round((t.size??0)*.32)),0)}function Ge(e,t){let n=W(e);return`${Date.parse(t).toString(36)}-${n.toString(36)}-${e.modules.length.toString(36)}`}function G(e,t=new Date().toISOString()){let n=e.modules.filter(e=>e.packages.length>1).length;return{id:Ge(e,t),capturedAt:t,label:Ue(new Date(t)),result:e,totalBytes:W(e),compressedBytes:We(e),packageCount:e.packages.length,moduleCount:e.modules.length,duplicateCount:n}}function Ke(e){let t=[...e.snapshots??[]];e.previous&&t.push(G(e.previous)),t.push(G(e.current));let n=new Map;for(let e of t){let t=H(e.result);n.has(t)||n.set(t,e)}return[...n.values()].sort((e,t)=>Date.parse(t.capturedAt)-Date.parse(e.capturedAt)).slice(0,12)}function qe(){try{let e=window.localStorage.getItem(V);if(!e)return null;let t=JSON.parse(e);return!t?.current?.packages||!Array.isArray(t.current.packages)?null:{current:t.current,previous:t.previous?.packages?t.previous:null,snapshots:Array.isArray(t.snapshots)?t.snapshots.filter(e=>e?.result?.packages&&Array.isArray(e.result.packages)):void 0,baselineSnapshotId:typeof t.baselineSnapshotId==`string`?t.baselineSnapshotId:null,comparisonMode:t.comparisonMode===`baseline`?`baseline`:`previous`}}catch{return null}}function K(e){try{window.localStorage.setItem(V,JSON.stringify(e))}catch{}}function Je(e,t,n){return t||(e&&n?.current&&!U(e,n.current)?n.current:n?.previous??null)}var Ye=[{value:`system`,label:`跟随系统`,iconName:`theme-system`},{value:`light`,label:`亮色`,iconName:`theme-light`},{value:`dark`,label:`暗色`,iconName:`theme-dark`}],Xe=[{key:`overview`,label:`总览`,iconName:`tab-overview`},{key:`diagnostics`,label:`诊断`,iconName:`metric-health`},{key:`review`,label:`评审清单`,iconName:`metric-bookmark`},{key:`treemap`,label:`体积地图`,iconName:`treemap`},{key:`files`,label:`文件详情`,iconName:`top-files`},{key:`source`,label:`源码对比`,iconName:`tab-source`},{key:`packages`,label:`包与产物`,iconName:`tab-packages`},{key:`modules`,label:`模块与复用`,iconName:`tab-modules`}],Ze=[{value:`all`,label:`全部`},{value:`growth`,label:`增长`},{value:`duplicates`,label:`重复`},{value:`node_modules`,label:`依赖`},{value:`source`,label:`业务`},{value:`selected-package`,label:`当前包`}],q=[{to:`/`,label:`工作台`,caption:`应用入口与状态总览`,iconName:`nav-home`},{to:`/analyze`,label:`分析视图`,caption:`包体、模块与分包结构`,iconName:`nav-analyze`,children:Xe.map(e=>({to:e.key===`overview`?`/analyze`:`/analyze?tab=${e.key}`,label:e.label,caption:e.key===`overview`?`全局摘要和建议动作`:e.key===`diagnostics`?`预算、增量和历史基线`:e.key===`review`?`PR 风险和评审清单`:e.key===`treemap`?`产物体积地图`:e.key===`files`?`文件、预算和模块明细`:e.key===`source`?`源码与产物 Diff`:e.key===`packages`?`包体和产物列表`:`模块复用与来源`,iconName:e.iconName}))},{to:`/activity`,label:`活动流`,caption:`命令、诊断与运行事件`,iconName:`nav-activity`},{to:`/tokens`,label:`设计令牌`,caption:`主题、表面与组件状态`,iconName:`nav-tokens`}],Qe=[{label:`启动开发`,command:`pnpm --filter @weapp-vite/dashboard dev`,note:`本地预览完整 UI 壳子`,category:`dev`},{label:`生产构建`,command:`pnpm --filter @weapp-vite/dashboard build`,note:`验证静态产物可发布`,category:`build`},{label:`主包联调`,command:`weapp-vite build --ui`,note:`从 CLI 注入真实分析数据`,category:`analyze`}],$e=["`analyze` payload 契约保持兼容,CLI 注入无需迁移。",`工作台可在无 payload 状态下展示稳定空态和示例事件。`,`主题偏好在应用级共享,页面之间状态一致。`],et=[{time:`09:12`,title:`analyze payload synced`,summary:`CLI 已把最新构建结果注入 dashboard,全局状态已完成一次同步。`,tone:`live`},{time:`09:26`,title:`workspace shell extended`,summary:`工作台、活动流、设计令牌已经拆成独立页面。`,tone:`default`},{time:`10:03`,title:`theme system unified`,summary:`主题偏好收敛到应用根部,所有页面共享同一套明暗模式。`,tone:`default`}],tt=[{label:`CLI 注入链路`,detail:"保留 `window.__WEAPP_VITE_ANALYZE_RESULT__` 兼容层。",status:`兼容`},{label:`路由拓展性`,detail:`页面采用文件路由,主路由表保持稳定。`,status:`可扩展`},{label:`组件复用`,detail:`通用卡片与区块标题已独立,避免页面继续拷贝结构。`,status:`已落地`},{label:`视觉令牌`,detail:`颜色、表面、排版预览集中在 tokens 页面统一检查。`,status:`可验证`}],nt=[{id:`evt-command-build-ui`,kind:`command`,level:`success`,title:`build --ui completed`,detail:`示例事件: dashboard 已经准备好承接来自 CLI 的真实命令生命周期事件。`,timestamp:`10:18:12`,source:`cli`,durationMs:842,tags:[`build`,`ui`]},{id:`evt-hmr-shell`,kind:`hmr`,level:`info`,title:`workspace shell hot updated`,detail:`工作台页面已完成一次热更新并记录到事件流。`,timestamp:`10:19:44`,source:`vite-hmr`,tags:[`hmr`,`shell`]},{id:`evt-diagnostic-payload`,kind:`diagnostic`,level:`warning`,title:`analyze payload pending`,detail:`当前页面支持在没有 payload 时进入空态。`,timestamp:`10:20:07`,source:`dashboard`,tags:[`diagnostic`]}],rt=[{title:`Accent`,iconName:`token-color`,tokens:[{name:`--dashboard-accent`,sample:`var(--dashboard-accent)`},{name:`--dashboard-accent-soft`,sample:`var(--dashboard-accent-soft)`},{name:`--dashboard-border-strong`,sample:`var(--dashboard-border-strong)`}]},{title:`Surfaces`,iconName:`token-surface`,tokens:[{name:`--dashboard-panel`,sample:`var(--dashboard-panel)`},{name:`--dashboard-panel-strong`,sample:`var(--dashboard-panel-strong)`},{name:`--dashboard-panel-muted`,sample:`var(--dashboard-panel-muted)`}]},{title:`Typography`,iconName:`token-type`,tokens:[{name:`--dashboard-text`,sample:`var(--dashboard-text)`},{name:`--dashboard-text-muted`,sample:`var(--dashboard-text-muted)`},{name:`--dashboard-text-soft`,sample:`var(--dashboard-text-soft)`}]}];function J(e){if(!e||Number.isNaN(e))return`—`;let t=1024,n=[`B`,`KB`,`MB`,`GB`],r=e,i=0;for(;r>=t&&i<n.length-1;)r/=t,i++;return`${r.toFixed(r>=100||i===0?0:2)} ${n[i]}`}function it(e,t=``,n=``){if(!e||Number.isNaN(e)||e<=0)return 0;let r=t.toLowerCase().split(`.`).pop()??``,i=new Set([`cjs`,`css`,`html`,`js`,`json`,`map`,`mjs`,`svg`,`txt`,`wxml`,`wxss`,`xml`]),a=new Set([`avif`,`br`,`gif`,`gz`,`jpeg`,`jpg`,`mp3`,`mp4`,`ogg`,`otf`,`png`,`webp`,`woff`,`woff2`,`zip`]);return i.has(r)?Math.max(1,Math.round(e*.34)):a.has(r)?Math.max(1,Math.round(e*.92)):n===`chunk`?Math.max(1,Math.round(e*.38)):Math.max(1,Math.round(e*.72))}function at(e){switch(e){case`main`:return`主包`;case`subPackage`:return`分包`;case`independent`:return`独立分包`;case`virtual`:return`虚拟包`;default:return e}}function ot(e){return e===`independent`?`独立构建`:`主构建`}function st(e){switch(e){case`src`:return`业务源码`;case`workspace`:return`工作区包`;case`plugin`:return`插件`;case`node_modules`:return`依赖`;default:return e}}function ct(e){switch(e){case`command`:return`命令`;case`build`:return`构建`;case`diagnostic`:return`诊断`;case`hmr`:return`HMR`;case`system`:return`系统`;default:return e}}function lt(e){switch(e){case`info`:return`信息`;case`success`:return`成功`;case`warning`:return`警告`;case`error`:return`错误`;default:return e}}function ut(e){return e??`dashboard`}function dt(e){return e}function ft(e){return{label:lt(e.level),tone:dt(e.level)}}function pt(e){return e>0?`error`:`info`}function mt(e){return{label:e.latestTimestamp?`${e.count} 条`:`错误 ${e.errorCount}`,tone:pt(e.errorCount)}}function Y(e){return typeof e!=`number`||Number.isNaN(e)||e<0?`未记录`:e>=1e3?`${(e/1e3).toFixed(e>=1e4?1:2)} s`:`${e} ms`}function ht(e){let t=[ct(e.kind),ut(e.source),e.timestamp];return typeof e.durationMs==`number`&&Number.isFinite(e.durationMs)&&e.durationMs>=0&&t.push(Y(e.durationMs)),t.join(` · `)}function X(e,t){return{label:e,value:t}}function gt(){return new Date().toLocaleTimeString(`zh-CN`,{hour12:!1})}function _t(e){if(!e)return{packageCount:0,moduleCount:0,duplicateCount:0,totalBytes:0};let t=e.packages.flatMap(e=>e.files);return{packageCount:e.packages.length,moduleCount:e.modules.length,duplicateCount:e.modules.filter(e=>e.packages.length>1).length,totalBytes:t.reduce((e,t)=>e+(t.size??0),0)}}function vt(e){let t=e.filter(e=>e.level===`error`).length,n=e.filter(e=>e.level===`warning`).length,r=e.filter(e=>e.kind===`command`).length,i=e.filter(e=>typeof e.durationMs==`number`),a=i.length>0?Math.round(i.reduce((e,t)=>e+(t.durationMs??0),0)/i.length):void 0;return[X(`总事件数`,String(e.length)),X(`命令事件`,String(r)),X(`已记录耗时`,String(i.length)),X(`平均耗时`,Y(a)),X(`警告事件`,String(n)),X(`错误事件`,String(t))]}function yt(e){return[{label:`页面骨架`,value:`4 个`,iconName:`metric-ready`},{label:`连接状态`,value:e.result?`已接入 payload`:`等待注入`,iconName:e.result?`status-live`:`metric-health`},{label:`数据同步`,value:`${e.updateCount} 次`,iconName:`metric-latency`},{label:`产物体积`,value:e.result?J(e.summary.totalBytes):`未载入`,iconName:`metric-quality`},{label:`运行事件`,value:`${e.runtimeEventCount} 条`,iconName:e.latestRuntimeEvent?.level===`error`?`metric-health`:`metric-time`}]}function bt(e){return e.result?[{label:`重新分析当前工程`,command:`weapp-vite analyze`,note:`最近同步于 ${e.lastUpdatedAt},当前可读取 ${e.summary.packageCount} 个包。`,category:`analyze`},{label:`进入构建联调`,command:`weapp-vite build --ui`,note:`当前产物总体积 ${J(e.summary.totalBytes)},适合继续核对 chunk 结构。`,category:`build`},{label:`观察开发态更新`,command:`weapp-vite dev --ui`,note:`已记录 ${e.updateCount} 次 payload 同步,后续可继续接入更细粒度事件。`,category:`dev`}]:Qe}function xt(e){let t=[...et];for(let n of e.runtimeEvents.slice(0,4))t.unshift({time:n.timestamp,title:n.title,summary:n.detail,tone:n.level===`error`||n.level===`warning`?`default`:`live`});return e.result&&t.unshift({time:e.lastUpdatedAt,title:`workspace payload received`,summary:`已收到一份真实 analyze 结果,包含 ${e.summary.packageCount} 个包和 ${e.summary.moduleCount} 个模块。`,tone:`live`}),t}function St(e){let t=[...tt];return e.latestRuntimeEvent&&t.unshift({label:`最新运行事件`,detail:`${e.latestRuntimeEvent.title} · ${e.latestRuntimeEvent.detail}`,status:e.latestRuntimeEvent.level}),e.result?[{label:`实时分析状态`,detail:`已接入 payload,当前记录 ${e.summary.duplicateCount} 个跨包复用模块。`,status:`在线`},{label:`产物规模`,detail:`总产物体积 ${J(e.summary.totalBytes)},可继续进入分析页查看 treemap 与最大文件。`,status:`可分析`},...t]:[{label:`CLI 注入链路`,detail:`尚未接收到 analyze payload,当前页面以空态方式工作。`,status:`待接入`},...t]}var Ct=Symbol(`dashboard-workspace`),wt=[`command`,`build`,`diagnostic`,`hmr`,`system`],Tt=[`info`,`success`,`warning`,`error`];function Et(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Dt(e){return typeof e==`string`&&wt.includes(e)?e:`system`}function Ot(e){return typeof e==`string`&&Tt.includes(e)?e:`info`}function Z(e,t){return typeof e==`string`&&e.trim()?e:t}function Q(e){return typeof e==`number`&&Number.isFinite(e)&&e>=0?e:void 0}function kt(e){if(!Array.isArray(e))return;let t=e.filter(e=>typeof e==`string`&&e.trim()).map(e=>String(e));return t.length>0?t:void 0}function At(e){if(!Array.isArray(e))return;let t=e.filter(e=>typeof e==`string`&&e.trim()).map(e=>String(e));return t.length>0?t:void 0}function jt(e){if(!Et(e))return;let t={timestamp:typeof e.timestamp==`string`?e.timestamp:void 0,totalMs:Q(e.totalMs),eventId:typeof e.eventId==`string`?e.eventId:void 0,event:typeof e.event==`string`?e.event:void 0,file:typeof e.file==`string`?e.file:void 0,relativeFile:typeof e.relativeFile==`string`?e.relativeFile:void 0,sourceRootFile:typeof e.sourceRootFile==`string`?e.sourceRootFile:void 0,buildCoreMs:Q(e.buildCoreMs),transformMs:Q(e.transformMs),writeMs:Q(e.writeMs),watchToDirtyMs:Q(e.watchToDirtyMs),emitMs:Q(e.emitMs),sharedChunkResolveMs:Q(e.sharedChunkResolveMs),dirtyCount:Q(e.dirtyCount),pendingCount:Q(e.pendingCount),emittedCount:Q(e.emittedCount),dirtyReasonSummary:At(e.dirtyReasonSummary),pendingReasonSummary:At(e.pendingReasonSummary)};return Object.values(t).some(e=>e!==void 0)?t:void 0}function Mt(e,t){return{id:Z(e.id,`dashboard-runtime-event-${t}`),kind:Dt(e.kind),level:Ot(e.level),title:Z(e.title,`untitled event`),detail:Z(e.detail,`no event detail`),timestamp:Z(e.timestamp,`—`),source:Z(e.source,`dashboard`),durationMs:Q(e.durationMs),tags:kt(e.tags),profile:jt(e.profile)}}function Nt(e){return{count:1,errorCount:+(e.level===`error`),latestTimestamp:e.timestamp,durationTotal:e.durationMs??0,timedCount:+(typeof e.durationMs==`number`)}}function Pt(e,t){return{count:e.count+1,errorCount:e.errorCount+ +(t.level===`error`),latestTimestamp:e.latestTimestamp,durationTotal:e.durationTotal+(t.durationMs??0),timedCount:e.timedCount+ +(typeof t.durationMs==`number`)}}function Ft(e,t){return{source:e,count:t.count,errorCount:t.errorCount,latestTimestamp:t.latestTimestamp,averageDurationMs:t.timedCount>0?Math.round(t.durationTotal/t.timedCount):void 0}}function It(e){return{...e,averageDuration:Y(e.averageDurationMs)}}function Lt(e,t){return Et(e)?Mt(e,t):null}function $(e){let t=(Array.isArray(e)?e:[e]).map((e,t)=>Lt(e,t)).filter(e=>!!e),n=new Map;for(let e of t)n.set(e.id,e);return[...n.values()]}function Rt(e){let t=new Map;for(let n of e){let e=n.source??`dashboard`,r=t.get(e);if(!r){t.set(e,Nt(n));continue}t.set(e,Pt(r,n))}return Array.from(t,([e,t])=>Ft(e,t)).sort((e,t)=>t.count-e.count||e.source.localeCompare(t.source,`zh-CN`))}function zt(e){return e.map(e=>It(e))}function Bt(){return window.__WEAPP_VITE_DASHBOARD_EVENTS__?.length?$(window.__WEAPP_VITE_DASHBOARD_EVENTS__):$(nt)}function Vt(t){let n=g(()=>t.value[0]??null),r=g(()=>vt(t.value)),i=g(()=>Rt(t.value)),a=e=>{let n=$(e);if(n.length===0)return;let r=[...n,...t.value],i=new Map;for(let e of r)i.set(e.id,e);t.value=[...i.values()].slice(0,24),window.__WEAPP_VITE_DASHBOARD_EVENTS__=[...t.value]},o=e=>{let t=e instanceof CustomEvent?e.detail:null;a(Array.isArray(t)?t:t?[t]:null)};return e(()=>{window.addEventListener(`weapp-dashboard:event`,o),a(window.__WEAPP_VITE_DASHBOARD_EVENTS__)}),y(()=>{window.removeEventListener(`weapp-dashboard:event`,o)}),{eventSummary:r,latestRuntimeEvent:n,runtimeSourceSummary:i}}function Ht(){let t=window.__WEAPP_VITE_ANALYZE_RESULT__??null,n=window.__WEAPP_VITE_PREVIOUS_ANALYZE_RESULT__??null,r=qe(),i=d(t),a=d(Je(t,n,r)),o=d(r?Ke(r):t?[G(t)]:[]),s=d(r?.baselineSnapshotId&&o.value.some(e=>e.id===r.baselineSnapshotId)?r.baselineSnapshotId:null),c=d(r?.comparisonMode===`baseline`&&s.value?`baseline`:`previous`),l=d(Bt()),u=d(0),f=d(i.value?gt():`—`);t&&K({current:t,previous:a.value,snapshots:o.value,baselineSnapshotId:s.value,comparisonMode:c.value});let p=g(()=>_t(i.value)),{eventSummary:ee,latestRuntimeEvent:m,runtimeSourceSummary:h}=Vt(l),_=g(()=>i.value?`payload ready`:`awaiting payload`),v=g(()=>i.value?`${p.value.packageCount} 个包 · ${p.value.moduleCount} 个模块`:`尚未接收到 CLI analyze 数据`),te=g(()=>o.value.find(e=>e.id===s.value)??null),b=g(()=>c.value===`baseline`?te.value?.result??a.value:a.value),x=g(()=>yt({result:i.value,updateCount:u.value,summary:p.value,runtimeEventCount:l.value.length,latestRuntimeEvent:m.value})),S=g(()=>bt({result:i.value,lastUpdatedAt:f.value,summary:p.value,updateCount:u.value})),C=g(()=>xt({runtimeEvents:l.value,result:i.value,lastUpdatedAt:f.value,summary:p.value})),w=g(()=>St({result:i.value,latestRuntimeEvent:m.value,summary:p.value})),T=()=>{let e=window.__WEAPP_VITE_ANALYZE_RESULT__;if(!e)return;let t=window.__WEAPP_VITE_PREVIOUS_ANALYZE_RESULT__??null,n=qe(),r=n?.previous??a.value;n?.current&&!U(e,n.current)&&(r=n.current),i.value&&!U(e,i.value)&&(r=i.value),t&&!U(e,t)&&(r=t),a.value=U(e,r)?null:r,i.value=e;let l=G(e),d=Ke({current:e,previous:a.value,snapshots:[l,...o.value]});o.value=d,s.value&&!d.some(e=>e.id===s.value)&&(s.value=d[d.length-1]?.id??null),c.value===`baseline`&&!s.value&&(c.value=`previous`),K({current:e,previous:a.value,snapshots:o.value,baselineSnapshotId:s.value,comparisonMode:c.value}),u.value+=1,f.value=gt()},E=()=>{i.value&&K({current:i.value,previous:a.value,snapshots:o.value,baselineSnapshotId:s.value,comparisonMode:c.value})};return e(()=>{window.addEventListener(`weapp-analyze:update`,T),T()}),y(()=>{window.removeEventListener(`weapp-analyze:update`,T)}),{resultRef:i,previousResultRef:a,comparisonResultRef:b,historySnapshots:o,baselineSnapshotId:s,comparisonMode:c,updateCount:u,lastUpdatedAt:f,statusLabel:_,statusSummary:v,commandItems:S,activityItems:C,diagnostics:w,signals:x,runtimeEvents:l,latestRuntimeEvent:m,eventSummary:ee,runtimeSourceSummary:h,setBaselineSnapshot:e=>{o.value.some(t=>t.id===e)&&(s.value=e,c.value=`baseline`,E())},setComparisonMode:e=>{c.value=e===`baseline`&&!s.value?`previous`:e,E()}}}function Ut(e){i(Ct,e)}function Wt(){let e=l(Ct,null);if(!e)throw Error(`[dashboard] workspace context is not available`);return e}var Gt={class:`h-dvh overflow-hidden px-3 py-3 text-(--dashboard-text) md:px-4 md:py-4 lg:px-5`},Kt={class:`mx-auto grid h-full max-w-400 gap-3 overflow-hidden lg:grid-cols-[17rem_minmax(0,1fr)]`},qt={class:`hidden min-h-0 overflow-hidden lg:block`},Jt={class:`grid h-full grid-rows-[minmax(0,1fr)_auto] gap-3`},Yt={class:`grid min-h-0 min-w-0 grid-rows-[auto_minmax(0,1fr)] gap-3 overflow-hidden`},Xt={class:`min-h-0 overflow-hidden`},Zt={key:0,class:`fixed inset-y-3 left-3 z-50 w-[min(22rem,calc(100vw-1.5rem))] lg:hidden`},Qt=t({__name:`App`,setup(e){let t=ee(),r=u(!1),{themePreference:i,resolvedTheme:a,setThemePreference:o}=z(),l=Ht(),d=g(()=>!!l.resultRef.value),f=g(()=>typeof t.query.tab==`string`?t.query.tab:`overview`);Ve({themePreference:i,resolvedTheme:a,setThemePreference:o}),Ut(l);let p=g(()=>t.path.startsWith(`/analyze`)?{title:`Analyze Workspace`}:t.path.startsWith(`/activity`)?{title:`Activity Stream`}:t.path.startsWith(`/tokens`)?{title:`Design Tokens`}:{title:`Workspace Console`});return s(()=>t.fullPath,()=>{r.value=!1}),(e,s)=>(v(),D(`div`,Gt,[h(`div`,Kt,[h(`aside`,qt,[h(`div`,Jt,[c(L,{eyebrow:`Shell`,title:`weapp-vite dashboard`,"icon-name":`hero-system`,tone:`strong`,"content-class":`min-h-0 overflow-hidden`},{default:O(()=>[c(N,{"current-analyze-tab":f.value,"current-path":n(t).path,items:n(q)},null,8,[`current-analyze-tab`,`current-path`,`items`])]),_:1}),c(L,{eyebrow:`Status`,title:n(l).statusLabel.value,description:n(l).statusSummary.value,"icon-name":d.value?`status-live`:n(a)===`dark`?`theme-dark`:`theme-light`,padding:`sm`},null,8,[`title`,`description`,`icon-name`])])]),h(`div`,Yt,[c(Oe,{title:p.value.title,description:p.value.description,"theme-options":n(Ye),"theme-preference":n(i),onMenu:s[0]||=e=>r.value=!0,onSetTheme:n(o)},null,8,[`title`,`description`,`theme-options`,`theme-preference`,`onSetTheme`]),h(`div`,Xt,[c(n(te))])])]),c(C,{"enter-active-class":`transition duration-200 ease-out`,"enter-from-class":`opacity-0`,"enter-to-class":`opacity-100`,"leave-active-class":`transition duration-150 ease-in`,"leave-from-class":`opacity-100`,"leave-to-class":`opacity-0`},{default:O(()=>[r.value?(v(),D(`div`,{key:0,class:`fixed inset-0 z-40 bg-slate-950/35 backdrop-blur-sm lg:hidden`,onClick:s[1]||=e=>r.value=!1})):T(``,!0)]),_:1}),c(C,{"enter-active-class":`transition duration-200 ease-out`,"enter-from-class":`-translate-x-6 opacity-0`,"enter-to-class":`translate-x-0 opacity-100`,"leave-active-class":`transition duration-150 ease-in`,"leave-from-class":`translate-x-0 opacity-100`,"leave-to-class":`-translate-x-6 opacity-0`},{default:O(()=>[r.value?(v(),D(`aside`,Zt,[c(L,{eyebrow:`Navigation`,title:`Workspace Modules`,description:`选择要查看的工作区。`,"icon-name":`nav-menu`,tone:`strong`,"content-class":`h-full`},{default:O(()=>[c(N,{mobile:``,"current-analyze-tab":f.value,"current-path":n(t).path,items:n(q),onNavigate:s[2]||=e=>r.value=!1},null,8,[`current-analyze-tab`,`current-path`,`items`])]),_:1})])):T(``,!0)]),_:1})]))}}),$t=S({history:_(),routes:[{path:`/`,name:`/`,component:()=>A(()=>import(`./pages.js`),[],import.meta.url)},{path:`/activity`,name:`/activity`,component:()=>A(()=>import(`./activity.js`),[],import.meta.url)},{path:`/analyze`,name:`/analyze`,component:()=>A(()=>import(`./analyze.js`),__vite__mapDeps([0]),import.meta.url)},{path:`/tokens`,name:`/tokens`,component:()=>A(()=>import(`./tokens.js`),[],import.meta.url)}]});function en(){let e=m(Qt);e.config.errorHandler=(e,t,n)=>{},e.use($t),e.mount(`#app`)}try{en()}catch{}export{ke as C,P as D,F as E,M as O,I as S,je as T,q as _,mt as a,He as b,J as c,ct as d,lt as f,rt as g,$e as h,ft as i,Y as l,st as m,zt as n,it as o,ht as p,Rt as r,ot as s,Wt as t,at as u,Ye as v,Ae as w,L as x,Ze as y};
@@ -54,5 +54,5 @@
54
54
 
55
55
  `),l+=`\`${al(c)}\`: ${o}`),s([l])}return null})}};function il(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
56
56
 
57
- $3`).replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}function al(e){return e.indexOf("`")===-1?e:"`` "+e+" ``"}var ol=class{constructor(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=e.validate!==!1,this.commentSeverity=e.allowComments?void 0:U.Error)}doValidation(e,t,n,r){if(!this.validationEnabled)return this.promise.resolve([]);let i=[],a={},o=e=>{let t=e.range.start.line+` `+e.range.start.character+` `+e.message;a[t]||(a[t]=!0,i.push(e))},s=r=>{let a=n?.trailingCommas?ul(n.trailingCommas):U.Error,s=n?.comments?ul(n.comments):this.commentSeverity,c=n?.schemaValidation?ul(n.schemaValidation):U.Warning,l=n?.schemaRequest?ul(n.schemaRequest):U.Warning;if(r){let i=(n,r)=>{if(t.root&&l){let i=t.root,a=i.type===`object`?i.properties[0]:void 0;if(a&&a.keyNode.value===`$schema`){let t=a.valueNode||a,i=H.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length));o(_s.create(i,n,l,r))}else{let t=H.create(e.positionAt(i.offset),e.positionAt(i.offset+1));o(_s.create(t,n,l,r))}}};if(r.errors.length)i(r.errors[0],q.SchemaResolveError);else if(c){for(let e of r.warnings)i(e,q.SchemaUnsupportedFeature);let a=t.validate(e,r.schema,c,n?.schemaDraft);a&&a.forEach(o)}cl(r.schema)&&(s=void 0),ll(r.schema)&&(a=void 0)}for(let e of t.syntaxErrors){if(e.code===q.TrailingComma){if(typeof a!=`number`)continue;e.severity=a}o(e)}if(typeof s==`number`){let e=J(`Comments are not permitted in JSON.`);t.comments.forEach(t=>{o(_s.create(t,e,s,q.CommentNotPermitted))})}return i};if(r){let e=r.id||`schemaservice://untitled/`+ sl++;return this.jsonSchemaService.registerExternalSchema({uri:e,schema:r}).getResolvedSchema().then(e=>s(e))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then(e=>s(e))}getLanguageStatus(e,t){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,t)}}};let sl=0;function cl(e){if(e&&typeof e==`object`){if(Xo(e.allowComments))return e.allowComments;if(e.allOf)for(let t of e.allOf){let e=cl(t);if(Xo(e))return e}}}function ll(e){if(e&&typeof e==`object`){if(Xo(e.allowTrailingCommas))return e.allowTrailingCommas;let t=e;if(Xo(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(let t of e.allOf){let e=ll(t);if(Xo(e))return e}}}function ul(e){switch(e){case`error`:return U.Error;case`warning`:return U.Warning;case`ignore`:return}}function Q(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function dl(e){if(e[0]===`#`)switch(e.length){case 4:return{red:Q(e.charCodeAt(1))*17/255,green:Q(e.charCodeAt(2))*17/255,blue:Q(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Q(e.charCodeAt(1))*17/255,green:Q(e.charCodeAt(2))*17/255,blue:Q(e.charCodeAt(3))*17/255,alpha:Q(e.charCodeAt(4))*17/255};case 7:return{red:(Q(e.charCodeAt(1))*16+Q(e.charCodeAt(2)))/255,green:(Q(e.charCodeAt(3))*16+Q(e.charCodeAt(4)))/255,blue:(Q(e.charCodeAt(5))*16+Q(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Q(e.charCodeAt(1))*16+Q(e.charCodeAt(2)))/255,green:(Q(e.charCodeAt(3))*16+Q(e.charCodeAt(4)))/255,blue:(Q(e.charCodeAt(5))*16+Q(e.charCodeAt(6)))/255,alpha:(Q(e.charCodeAt(7))*16+Q(e.charCodeAt(8)))/255}}}var fl=class{constructor(e){this.schemaService=e}findDocumentSymbols(e,t,n={resultLimit:Number.MAX_VALUE}){let r=t.root;if(!r)return[];let i=n.resultLimit||Number.MAX_VALUE,a=e.uri;if((a===`vscode://defaultsettings/keybindings.json`||es(a.toLowerCase(),`/user/keybindings.json`))&&r.type===`array`){let t=[];for(let o of r.items)if(o.type===`object`){for(let r of o.properties)if(r.keyNode.value===`key`&&r.valueNode){let s=ss.create(e.uri,pl(e,o));if(t.push({name:ml(r.valueNode),kind:Ks.Function,location:s}),i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),t}}return t}let o=[{node:r,containerName:``}],s=0,c=!1,l=[],u=(t,n)=>{t.type===`array`?t.items.forEach(e=>{e&&o.push({node:e,containerName:n})}):t.type===`object`&&t.properties.forEach(t=>{let r=t.valueNode;if(r)if(i>0){i--;let a=ss.create(e.uri,pl(e,t)),s=n?n+`.`+t.keyNode.value:t.keyNode.value;l.push({name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),location:a,containerName:n}),o.push({node:r,containerName:s})}else c=!0})};for(;s<o.length;){let e=o[s++];u(e.node,e.containerName)}return c&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),l}findDocumentSymbols2(e,t,n={resultLimit:Number.MAX_VALUE}){let r=t.root;if(!r)return[];let i=n.resultLimit||Number.MAX_VALUE,a=e.uri;if((a===`vscode://defaultsettings/keybindings.json`||es(a.toLowerCase(),`/user/keybindings.json`))&&r.type===`array`){let t=[];for(let o of r.items)if(o.type===`object`){for(let r of o.properties)if(r.keyNode.value===`key`&&r.valueNode){let s=pl(e,o),c=pl(e,r.keyNode);if(t.push({name:ml(r.valueNode),kind:Ks.Function,range:s,selectionRange:c}),i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),t}}return t}let o=[],s=[{node:r,result:o}],c=0,l=!1,u=(t,n)=>{t.type===`array`?t.items.forEach((t,r)=>{if(t)if(i>0){i--;let a=pl(e,t),o=a,c={name:String(r),kind:this.getSymbolKind(t.type),range:a,selectionRange:o,children:[]};n.push(c),s.push({result:c.children,node:t})}else l=!0}):t.type===`object`&&t.properties.forEach(t=>{let r=t.valueNode;if(r)if(i>0){i--;let a=pl(e,t),o=pl(e,t.keyNode),c=[],l={name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),range:a,selectionRange:o,children:c,detail:this.getDetail(r)};n.push(l),s.push({result:c,node:r})}else l=!0})};for(;c<s.length;){let e=s[c++];u(e.node,e.result)}return l&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),o}getSymbolKind(e){switch(e){case`object`:return Ks.Module;case`string`:return Ks.String;case`number`:return Ks.Number;case`array`:return Ks.Array;case`boolean`:return Ks.Boolean;default:return Ks.Variable}}getKeyLabel(e){let t=e.keyNode.value;return t&&=t.replace(/[\n]/g,`↵`),t&&t.trim()?t:`"${t}"`}getDetail(e){if(e){if(e.type===`boolean`||e.type===`number`||e.type===`null`||e.type===`string`)return String(e.value);if(e.type===`array`)return e.children.length?void 0:`[]`;if(e.type===`object`)return e.children.length?void 0:`{}`}}findDocumentColors(e,t,n){return this.schemaService.getSchemaForResource(e.uri,t).then(r=>{let i=[];if(r){let a=n&&typeof n.resultLimit==`number`?n.resultLimit:Number.MAX_VALUE,o=t.getMatchingSchemas(r.schema),s={};for(let t of o)if(!t.inverted&&t.schema&&(t.schema.format===`color`||t.schema.format===`color-hex`)&&t.node&&t.node.type===`string`){let r=String(t.node.offset);if(!s[r]){let o=dl(Yc(t.node));if(o){let n=pl(e,t.node);i.push({color:o,range:n})}if(s[r]=!0,a--,a<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),i}}}return i})}getColorPresentations(e,t,n,r){let i=[],a=Math.round(n.red*255),o=Math.round(n.green*255),s=Math.round(n.blue*255);function c(e){let t=e.toString(16);return t.length===2?t:`0`+t}let l;return l=n.alpha===1?`#${c(a)}${c(o)}${c(s)}`:`#${c(a)}${c(o)}${c(s)}${c(Math.round(n.alpha*255))}`,i.push({label:l,textEdit:ys.replace(r,JSON.stringify(l))}),i}};function pl(e,t){return H.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function ml(e){return Yc(e)||J(`<empty>`)}let hl={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}}},gl={id:J(`A unique identifier for the schema.`),$schema:J(`The schema to verify this document against.`),title:J(`A descriptive title of the element.`),description:J(`A long description of the element. Used in hover menus and suggestions.`),default:J(`A default value. Used by suggestions.`),multipleOf:J(`A number that should cleanly divide the current value (i.e. have no remainder).`),maximum:J(`The maximum numerical value, inclusive by default.`),exclusiveMaximum:J(`Makes the maximum property exclusive.`),minimum:J(`The minimum numerical value, inclusive by default.`),exclusiveMinimum:J(`Makes the minimum property exclusive.`),maxLength:J(`The maximum length of a string.`),minLength:J(`The minimum length of a string.`),pattern:J(`A regular expression to match the string against. It is not implicitly anchored.`),additionalItems:J(`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:J(`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:J(`The maximum number of items that can be inside an array. Inclusive.`),minItems:J(`The minimum number of items that can be inside an array. Inclusive.`),uniqueItems:J(`If all of the items in the array must be unique. Defaults to false.`),maxProperties:J(`The maximum number of properties an object can have. Inclusive.`),minProperties:J(`The minimum number of properties an object can have. Inclusive.`),required:J(`An array of strings that lists the names of all properties required on this object.`),additionalProperties:J(`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:J(`Not used for validation. Place subschemas here that you wish to reference inline with $ref.`),properties:J(`A map of property names to schemas for each property.`),patternProperties:J(`A map of regular expressions on property names to schemas for matching properties.`),dependencies:J(`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:J(`The set of literal values that are valid.`),type:J(`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:J(`Describes the format expected for the value.`),allOf:J(`An array of schemas, all of which must match.`),anyOf:J(`An array of schemas, where at least one must match.`),oneOf:J(`An array of schemas, exactly one of which must match.`),not:J(`A schema which must not match.`),$id:J(`A unique identifier for the schema.`),$ref:J(`Reference a definition hosted on any location.`),$comment:J(`Comments from schema authors to readers or maintainers of the schema.`),readOnly:J(`Indicates that the value of the instance is managed exclusively by the owning authority.`),examples:J(`Sample JSON values associated with a particular schema, for the purpose of illustrating usage.`),contains:J(`An array instance is valid against "contains" if at least one of its elements is valid against the given schema.`),propertyNames:J(`If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema.`),const:J(`An instance validates successfully against this keyword if its value is equal to the value of the keyword.`),contentMediaType:J(`Describes the media type of a string property.`),contentEncoding:J(`Describes the content encoding of a string property.`),if:J(`The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.`),then:J(`The "if" subschema is used for validation when the "if" subschema succeeds.`),else:J(`The "else" subschema is used for validation when the "if" subschema fails.`)};for(let e in hl.schemas){let t=hl.schemas[e];for(let e in t.properties){let n=t.properties[e];typeof n==`boolean`&&(n=t.properties[e]={});let r=gl[e];r&&(n.description=r)}}var _l;(()=>{var e={470:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===47)break;n=47}if(n===47){if(!(a===s-1||o===1))if(a!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}var r={resolve:function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},normalize:function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},isAbsolute:function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,o=a-i,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var c=n.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(n.charCodeAt(s+d)===47)return n.slice(s+d+1);if(d===0)return n.slice(s+d)}else o>l&&(e.charCodeAt(i+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=i+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r}(0,e)},parse:function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(n.base=n.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(s,o),n.base=e.slice(s,c)),n.ext=e.slice(o,c)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.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=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})};var r={};(()=>{let e;n.r(r),n.d(r,{URI:()=>c,Utils:()=>x}),typeof process==`object`?e=process.platform===`win32`:typeof navigator==`object`&&(e=navigator.userAgent.indexOf(`Windows`)>=0);let t=/^\w[\w\d+.-]*$/,i=/^\//,a=/^\/\//;function o(e,n){if(!e.scheme&&n)throw 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 Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!i.test(e.path))throw 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(a.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class c{static isUri(e){return e instanceof c||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=function(e,t){return e||t?e:`file`}(e,a),this.authority=t||``,this.path=function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t}(this.scheme,n||``),this.query=r||``,this.fragment=i||``,o(this,a))}get fsPath(){return m(this)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new u(t,n,r,i,a)}static parse(e,t=!1){let n=s.exec(e);return n?new u(n[2]||``,v(n[4]||``),v(n[5]||``),v(n[7]||``),v(n[9]||``),t):new u(``,``,``,``,``)}static file(t){let n=``;if(e&&(t=t.replace(/\\/g,`/`)),t[0]===`/`&&t[1]===`/`){let e=t.indexOf(`/`,2);e===-1?(n=t.substring(2),t=`/`):(n=t.substring(2,e),t=t.substring(e)||`/`)}return new u(`file`,n,t,``,``)}static from(e){let t=new u(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return h(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof c)return e;{let t=new u(e);return t._formatted=e.external,t._fsPath=e._sep===l?e.fsPath:null,t}}return e}}let l=e?1:void 0;class u extends c{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=m(this),this._fsPath}toString(e=!1){return e?h(this,!0):(this._formatted||=h(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=l),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}}let 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 f(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=d[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}function p(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=d[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}function m(t,n){let r;return r=t.authority&&t.path.length>1&&t.scheme===`file`?`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,`\\`)),r}function h(e,t){let n=t?p:f,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:f(c,!1,!1)),r}function g(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+g(e.substr(3)):e}}let _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(_)?e.replace(_,(e=>g(e))):e}var y=n(470);let b=y.posix||y;var x;(function(e){e.joinPath=function(e,...t){return e.with({path:b.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=b.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=b.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return b.basename(e.path)},e.extname=function(e){return b.extname(e.path)}})(x||={})})(),_l=r})();let{URI:vl,Utils:yl}=_l;function bl(e,t){if(typeof e!=`string`)throw TypeError(`Expected a string`);let n=String(e),r=``,i=!!t,a=!!t,o=!1,s=t&&typeof t.flags==`string`?t.flags:``,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`*`:let t=n[e-1],s=1;for(;n[e+1]===`*`;)s++,e++;let l=n[e+1];a?s>1&&(t===`/`||t===void 0||t===`{`||t===`,`)&&(l===`/`||l===void 0||l===`,`||l===`}`)?(l===`/`?e++:t===`/`&&r.endsWith(`\\/`)&&(r=r.substr(0,r.length-2)),r+=`((?:[^/]*(?:/|$))*)`):r+=`([^/]*)`:r+=`.*`;break;default:r+=c}return(!s||!~s.indexOf(`g`))&&(r=`^`+r+`$`),new RegExp(r,s)}var xl=class{constructor(e,t,n){this.folderUri=t,this.uris=n,this.globWrappers=[];try{for(let t of e){let e=t[0]!==`!`;e||(t=t.substring(1)),t.length>0&&(t[0]===`/`&&(t=t.substring(1)),this.globWrappers.push({regexp:bl(`**/`+t,{extended:!0,globstar:!0}),include:e}))}t&&(t=Ol(t),t.endsWith(`/`)||(t+=`/`),this.folderUri=t)}catch{this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let t=!1;for(let{regexp:n,include:r}of this.globWrappers)n.test(e)&&(t=r);return t}getURIs(){return this.uris}},Sl=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 Cl(n)))}getUnresolvedSchema(){return this.unresolvedSchema||=this.service.loadSchema(this.uri),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||=this.getUnresolvedSchema().then(e=>this.service.resolveSchemaContent(e,this)),this.resolvedSchema}clearSchema(){let e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}},Cl=class{constructor(e,t=[]){this.schema=e,this.errors=t}},wl=class{constructor(e,t=[],n=[],r){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=r}getSection(e){let t=this.getSectionRecursive(e,this.schema);if(t)return Y(t)}getSectionRecursive(e,t){if(!t||typeof t==`boolean`||e.length===0)return t;let n=e.shift();if(t.properties&&typeof t.properties[n])return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties){for(let r of Object.keys(t.patternProperties))if(ts(r)?.test(n))return this.getSectionRecursive(e,t.patternProperties[r])}else if(typeof t.additionalProperties==`object`)return this.getSectionRecursive(e,t.additionalProperties);else if(n.match(`[0-9]+`)){if(Array.isArray(t.items)){let 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)}}},Tl=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=>{let n=vl.parse(t).scheme;return n!==`schemaservice`&&(!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;e=Dl(e);let n=[e],r=Object.keys(this.schemasById).map(e=>this.schemasById[e]);for(;n.length;){let e=n.pop();for(let i=0;i<r.length;i++){let a=r[i];a&&(a.uri===e||a.dependencies.has(e))&&(a.uri!==e&&n.push(a.uri),a.clearSchema()&&(t=!0),r[i]=void 0)}}return t}setSchemaContributions(e){if(e.schemas){let t=e.schemas;for(let e in t){let n=Dl(e);this.contributionSchemas[n]=this.addSchemaHandle(n,t[e])}}if(Array.isArray(e.schemaAssociations)){let t=e.schemaAssociations;for(let e of t){let t=e.uris.map(Dl),n=this.addFilePatternAssociation(e.pattern,e.folderUri,t);this.contributionAssociations.push(n)}}}addSchemaHandle(e,t){let n=new Sl(this,e,t);return this.schemasById[e]=n,n}getOrAddSchemaHandle(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)}addFilePatternAssociation(e,t,n){let r=new xl(e,t,n);return this.filePatternAssociations.push(r),r}registerExternalSchema(e){let t=Dl(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(let e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(let e of this.contributionAssociations)this.filePatternAssociations.push(e)}getResolvedSchema(e){let t=Dl(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(e){if(!this.requestService){let t=J(`Unable to load schema from '{0}'. No schema request service available`,kl(e));return this.promise.resolve(new Cl({},[t]))}return e.startsWith(`http://json-schema.org/`)&&(e=`https`+e.substring(4)),this.requestService(e).then(t=>{if(!t)return new Cl({},[J(`Unable to load schema from '{0}': No content.`,kl(e))]);let n=[];t.charCodeAt(0)===65279&&(n.push(J(`Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.`,kl(e))),t=t.trimStart());let r={},i=[];return r=Ho(t,i),i.length&&n.push(J(`Unable to parse content from '{0}': Parse error at offset {1}.`,kl(e),i[0].offset)),new Cl(r,n)},t=>{let n=t.toString(),r=t.toString().split(`Error: `);return r.length>1&&(n=r[1]),es(n,`.`)&&(n=n.substr(0,n.length-1)),new Cl({},[J(`Unable to load schema from '{0}': {1}.`,kl(e),n)])})}resolveSchemaContent(e,t){let n=e.errors.slice(0),r=e.schema,i=r.$schema?Dl(r.$schema):void 0;if(i===`http://json-schema.org/draft-03/schema`)return this.promise.resolve(new wl({},[J(`Draft-03 schemas are not supported.`)],[],i));let a=new Set,o=this.contextService,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},c=(e,t,n)=>(t.anchors||=p(e),t.anchors.get(n)),l=(e,t)=>{for(let n in t)t.hasOwnProperty(n)&&n!==`id`&&n!==`$id`&&(e[n]=t[n])},u=(e,t,r,i)=>{let a;a=i===void 0||i.length===0?t:i.charAt(0)===`/`?s(t,i):c(t,r,i),a?l(e,a):n.push(J(`$ref '{0}' in '{1}' can not be resolved.`,i||``,r.uri))},d=(e,t,r,i)=>{o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(t)&&(t=o.resolveRelativePath(t,i.uri)),t=Dl(t);let a=this.getOrAddSchemaHandle(t);return a.getUnresolvedSchema().then(o=>{if(i.dependencies.add(t),o.errors.length){let e=r?t+`#`+r:t;n.push(J(`Problems loading reference '{0}': {1}`,e,o.errors[0]))}return u(e,o.schema,a,r),f(e,o.schema,a)})},f=(e,t,n)=>{let r=[];return this.traverseNodes(e,e=>{let i=new Set;for(;e.$ref;){let a=e.$ref,o=a.split(`#`,2);if(delete e.$ref,o[0].length>0){r.push(d(e,o[0],o[1],n));return}else if(!i.has(a)){let r=o[1];u(e,t,n,r),i.add(a)}}e.$recursiveRef&&a.add(`$recursiveRef`),e.$dynamicRef&&a.add(`$dynamicRef`)}),this.promise.all(r)},p=e=>{let t=new Map;return this.traverseNodes(e,e=>{let r=e.$id||e.id,i=Zo(r)&&r.charAt(0)===`#`?r.substring(1):e.$anchor;i&&(t.has(i)?n.push(J(`Duplicate anchor declaration: '{0}'`,i)):t.set(i,e)),e.$recursiveAnchor&&a.add(`$recursiveAnchor`),e.$dynamicAnchor&&a.add(`$dynamicAnchor`)}),t};return f(r,r,t).then(e=>{let t=[];return a.size&&t.push(J(`The schema uses meta-schema features ({0}) that are not yet supported by the validator.`,Array.from(a.keys()).join(`, `))),new wl(r,n,t,i)})}traverseNodes(e,t){if(!e||typeof e!=`object`)return Promise.resolve(null);let n=new Set,r=(...e)=>{for(let t of e)Qo(t)&&s.push(t)},i=(...e)=>{for(let t of e)if(Qo(t))for(let e in t){let n=t[e];Qo(n)&&s.push(n)}},a=(...e)=>{for(let t of e)if(Array.isArray(t))for(let e of t)Qo(e)&&s.push(e)},o=e=>{if(Array.isArray(e))for(let t of e)Qo(t)&&s.push(t);else Qo(e)&&s.push(e)},s=[e],c=s.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),a(c.anyOf,c.allOf,c.oneOf,c.prefixItems),o(c.items)),c=s.pop()}getSchemaFromProperty(e,t){if(t.root?.type===`object`){for(let n of t.root.properties)if(n.keyNode.value===`$schema`&&n.valueNode?.type===`string`){let t=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(t)&&(t=this.contextService.resolveRelativePath(t,e)),t}}}getAssociatedSchemas(e){let t=Object.create(null),n=[],r=Ol(e);for(let e of this.filePatternAssociations)if(e.matchesPattern(r))for(let 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){let e=Dl(n);return this.getOrAddSchemaHandle(e).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;let 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(t.length===1)return this.getOrAddSchemaHandle(t[0]);{let n=`schemaservice://combinedSchema/`+encodeURIComponent(e),r={allOf:t.map(e=>({$ref:e}))};return this.addSchemaHandle(n,r)}}getMatchingSchemas(e,t,n){if(n){let e=n.id||`schemaservice://untitled/matchingSchemas/`+ El++;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):[])}};let El=0;function Dl(e){try{return vl.parse(e).toString(!0)}catch{return e}}function Ol(e){try{return vl.parse(e).with({fragment:null,query:null}).toString(!0)}catch{return e}}function kl(e){try{let t=vl.parse(e);if(t.scheme===`file`)return t.fsPath}catch{}return e}function Al(e,t){let n=[],r=[],i=[],a=-1,o=zo(e.getText(),!1),s=o.scan();function c(e){n.push(e),r.push(i.length)}for(;s!==17;){switch(s){case 1:case 3:{let t=e.positionAt(o.getTokenOffset()).line,n={startLine:t,endLine:t,kind:s===1?`object`:`array`};i.push(n);break}case 2:case 4:{let t=s===2?`object`:`array`;if(i.length>0&&i[i.length-1].kind===t){let t=i.pop(),n=e.positionAt(o.getTokenOffset()).line;t&&n>t.startLine+1&&a!==t.startLine&&(t.endLine=n-1,c(t),a=t.startLine)}break}case 13:{let t=e.positionAt(o.getTokenOffset()).line,n=e.positionAt(o.getTokenOffset()+o.getTokenLength()).line;o.getTokenError()===1&&t+1<e.lineCount?o.setPosition(e.offsetAt(V.create(t+1,0))):t<n&&(c({startLine:t,endLine:n,kind:fs.Comment}),a=t);break}case 12:{let t=e.getText().substr(o.getTokenOffset(),o.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(t){let n=e.positionAt(o.getTokenOffset()).line;if(t[1]){let e={startLine:n,endLine:n,kind:fs.Region};i.push(e)}else{let e=i.length-1;for(;e>=0&&i[e].kind!==fs.Region;)e--;if(e>=0){let t=i[e];i.length=e,n>t.startLine&&a!==t.startLine&&(t.endLine=n,c(t),a=t.startLine)}}}break}}s=o.scan()}let l=t&&t.rangeLimit;if(typeof l!=`number`||n.length<=l)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);let u=[];for(let e of r)e<30&&(u[e]=(u[e]||0)+1);let d=0,f=0;for(let e=0;e<u.length;e++){let t=u[e];if(t){if(t+d>l){f=e;break}d+=t}}let p=[];for(let e=0;e<n.length;e++){let t=r[e];typeof t==`number`&&(t<f||t===f&&d++<l)&&p.push(n[e])}return p}function jl(e,t,n){function r(t){let r=e.offsetAt(t),a=n.getNodeFromOffset(r,!0),s=[];for(;a;){switch(a.type){case`string`:case`object`:case`array`:let e=a.offset+1,t=a.offset+a.length-1;e<t&&r>=e&&r<=t&&s.push(i(e,t)),s.push(i(a.offset,a.offset+a.length));break;case`number`:case`boolean`:case`null`:case`property`:s.push(i(a.offset,a.offset+a.length));break}if(a.type===`property`||a.parent&&a.parent.type===`array`){let e=o(a.offset+a.length,5);e!==-1&&s.push(i(a.offset,e))}a=a.parent}let c;for(let e=s.length-1;e>=0;e--)c=ic.create(s[e],c);return c||=ic.create(H.create(t,t)),c}function i(t,n){return H.create(e.positionAt(t),e.positionAt(n))}let a=zo(e.getText(),!0);function o(e,t){return a.setPosition(e),a.scan()===t?a.getTokenOffset()+a.getTokenLength():-1}return t.map(r)}function Ml(e,t,n){let r;if(n){let t=e.offsetAt(n.start);r={offset:t,length:e.offsetAt(n.end)-t}}let i={tabSize:t?t.tabSize:4,insertSpaces:t?.insertSpaces===!0,insertFinalNewline:t?.insertFinalNewline===!0,eol:`
57
+ $3`).replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}function al(e){return e.indexOf("`")===-1?e:"`` "+e+" ``"}var ol=class{constructor(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=e.validate!==!1,this.commentSeverity=e.allowComments?void 0:U.Error)}doValidation(e,t,n,r){if(!this.validationEnabled)return this.promise.resolve([]);let i=[],a={},o=e=>{let t=e.range.start.line+` `+e.range.start.character+` `+e.message;a[t]||(a[t]=!0,i.push(e))},s=r=>{let a=n?.trailingCommas?ul(n.trailingCommas):U.Error,s=n?.comments?ul(n.comments):this.commentSeverity,c=n?.schemaValidation?ul(n.schemaValidation):U.Warning,l=n?.schemaRequest?ul(n.schemaRequest):U.Warning;if(r){let i=(n,r)=>{if(t.root&&l){let i=t.root,a=i.type===`object`?i.properties[0]:void 0;if(a&&a.keyNode.value===`$schema`){let t=a.valueNode||a,i=H.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length));o(_s.create(i,n,l,r))}else{let t=H.create(e.positionAt(i.offset),e.positionAt(i.offset+1));o(_s.create(t,n,l,r))}}};if(r.errors.length)i(r.errors[0],q.SchemaResolveError);else if(c){for(let e of r.warnings)i(e,q.SchemaUnsupportedFeature);let a=t.validate(e,r.schema,c,n?.schemaDraft);a&&a.forEach(o)}cl(r.schema)&&(s=void 0),ll(r.schema)&&(a=void 0)}for(let e of t.syntaxErrors){if(e.code===q.TrailingComma){if(typeof a!=`number`)continue;e.severity=a}o(e)}if(typeof s==`number`){let e=J(`Comments are not permitted in JSON.`);t.comments.forEach(t=>{o(_s.create(t,e,s,q.CommentNotPermitted))})}return i};if(r){let e=r.id||`schemaservice://untitled/`+ sl++;return this.jsonSchemaService.registerExternalSchema({uri:e,schema:r}).getResolvedSchema().then(e=>s(e))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then(e=>s(e))}getLanguageStatus(e,t){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,t)}}};let sl=0;function cl(e){if(e&&typeof e==`object`){if(Xo(e.allowComments))return e.allowComments;if(e.allOf)for(let t of e.allOf){let e=cl(t);if(Xo(e))return e}}}function ll(e){if(e&&typeof e==`object`){if(Xo(e.allowTrailingCommas))return e.allowTrailingCommas;let t=e;if(Xo(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(let t of e.allOf){let e=ll(t);if(Xo(e))return e}}}function ul(e){switch(e){case`error`:return U.Error;case`warning`:return U.Warning;case`ignore`:return}}function Q(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function dl(e){if(e[0]===`#`)switch(e.length){case 4:return{red:Q(e.charCodeAt(1))*17/255,green:Q(e.charCodeAt(2))*17/255,blue:Q(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Q(e.charCodeAt(1))*17/255,green:Q(e.charCodeAt(2))*17/255,blue:Q(e.charCodeAt(3))*17/255,alpha:Q(e.charCodeAt(4))*17/255};case 7:return{red:(Q(e.charCodeAt(1))*16+Q(e.charCodeAt(2)))/255,green:(Q(e.charCodeAt(3))*16+Q(e.charCodeAt(4)))/255,blue:(Q(e.charCodeAt(5))*16+Q(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Q(e.charCodeAt(1))*16+Q(e.charCodeAt(2)))/255,green:(Q(e.charCodeAt(3))*16+Q(e.charCodeAt(4)))/255,blue:(Q(e.charCodeAt(5))*16+Q(e.charCodeAt(6)))/255,alpha:(Q(e.charCodeAt(7))*16+Q(e.charCodeAt(8)))/255}}}var fl=class{constructor(e){this.schemaService=e}findDocumentSymbols(e,t,n={resultLimit:Number.MAX_VALUE}){let r=t.root;if(!r)return[];let i=n.resultLimit||Number.MAX_VALUE,a=e.uri;if((a===`vscode://defaultsettings/keybindings.json`||es(a.toLowerCase(),`/user/keybindings.json`))&&r.type===`array`){let t=[];for(let o of r.items)if(o.type===`object`){for(let r of o.properties)if(r.keyNode.value===`key`&&r.valueNode){let s=ss.create(e.uri,pl(e,o));if(t.push({name:ml(r.valueNode),kind:Ks.Function,location:s}),i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),t}}return t}let o=[{node:r,containerName:``}],s=0,c=!1,l=[],u=(t,n)=>{t.type===`array`?t.items.forEach(e=>{e&&o.push({node:e,containerName:n})}):t.type===`object`&&t.properties.forEach(t=>{let r=t.valueNode;if(r)if(i>0){i--;let a=ss.create(e.uri,pl(e,t)),s=n?n+`.`+t.keyNode.value:t.keyNode.value;l.push({name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),location:a,containerName:n}),o.push({node:r,containerName:s})}else c=!0})};for(;s<o.length;){let e=o[s++];u(e.node,e.containerName)}return c&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),l}findDocumentSymbols2(e,t,n={resultLimit:Number.MAX_VALUE}){let r=t.root;if(!r)return[];let i=n.resultLimit||Number.MAX_VALUE,a=e.uri;if((a===`vscode://defaultsettings/keybindings.json`||es(a.toLowerCase(),`/user/keybindings.json`))&&r.type===`array`){let t=[];for(let o of r.items)if(o.type===`object`){for(let r of o.properties)if(r.keyNode.value===`key`&&r.valueNode){let s=pl(e,o),c=pl(e,r.keyNode);if(t.push({name:ml(r.valueNode),kind:Ks.Function,range:s,selectionRange:c}),i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),t}}return t}let o=[],s=[{node:r,result:o}],c=0,l=!1,u=(t,n)=>{t.type===`array`?t.items.forEach((t,r)=>{if(t)if(i>0){i--;let a=pl(e,t),o=a,c={name:String(r),kind:this.getSymbolKind(t.type),range:a,selectionRange:o,children:[]};n.push(c),s.push({result:c.children,node:t})}else l=!0}):t.type===`object`&&t.properties.forEach(t=>{let r=t.valueNode;if(r)if(i>0){i--;let a=pl(e,t),o=pl(e,t.keyNode),c=[],l={name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),range:a,selectionRange:o,children:c,detail:this.getDetail(r)};n.push(l),s.push({result:c,node:r})}else l=!0})};for(;c<s.length;){let e=s[c++];u(e.node,e.result)}return l&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),o}getSymbolKind(e){switch(e){case`object`:return Ks.Module;case`string`:return Ks.String;case`number`:return Ks.Number;case`array`:return Ks.Array;case`boolean`:return Ks.Boolean;default:return Ks.Variable}}getKeyLabel(e){let t=e.keyNode.value;return t&&=t.replace(/[\n]/g,`↵`),t&&t.trim()?t:`"${t}"`}getDetail(e){if(e){if(e.type===`boolean`||e.type===`number`||e.type===`null`||e.type===`string`)return String(e.value);if(e.type===`array`)return e.children.length?void 0:`[]`;if(e.type===`object`)return e.children.length?void 0:`{}`}}findDocumentColors(e,t,n){return this.schemaService.getSchemaForResource(e.uri,t).then(r=>{let i=[];if(r){let a=n&&typeof n.resultLimit==`number`?n.resultLimit:Number.MAX_VALUE,o=t.getMatchingSchemas(r.schema),s={};for(let t of o)if(!t.inverted&&t.schema&&(t.schema.format===`color`||t.schema.format===`color-hex`)&&t.node&&t.node.type===`string`){let r=String(t.node.offset);if(!s[r]){let o=dl(Yc(t.node));if(o){let n=pl(e,t.node);i.push({color:o,range:n})}if(s[r]=!0,a--,a<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),i}}}return i})}getColorPresentations(e,t,n,r){let i=[],a=Math.round(n.red*255),o=Math.round(n.green*255),s=Math.round(n.blue*255);function c(e){let t=e.toString(16);return t.length===2?t:`0`+t}let l;return l=n.alpha===1?`#${c(a)}${c(o)}${c(s)}`:`#${c(a)}${c(o)}${c(s)}${c(Math.round(n.alpha*255))}`,i.push({label:l,textEdit:ys.replace(r,JSON.stringify(l))}),i}};function pl(e,t){return H.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function ml(e){return Yc(e)||J(`<empty>`)}let hl={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}}},gl={id:J(`A unique identifier for the schema.`),$schema:J(`The schema to verify this document against.`),title:J(`A descriptive title of the element.`),description:J(`A long description of the element. Used in hover menus and suggestions.`),default:J(`A default value. Used by suggestions.`),multipleOf:J(`A number that should cleanly divide the current value (i.e. have no remainder).`),maximum:J(`The maximum numerical value, inclusive by default.`),exclusiveMaximum:J(`Makes the maximum property exclusive.`),minimum:J(`The minimum numerical value, inclusive by default.`),exclusiveMinimum:J(`Makes the minimum property exclusive.`),maxLength:J(`The maximum length of a string.`),minLength:J(`The minimum length of a string.`),pattern:J(`A regular expression to match the string against. It is not implicitly anchored.`),additionalItems:J(`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:J(`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:J(`The maximum number of items that can be inside an array. Inclusive.`),minItems:J(`The minimum number of items that can be inside an array. Inclusive.`),uniqueItems:J(`If all of the items in the array must be unique. Defaults to false.`),maxProperties:J(`The maximum number of properties an object can have. Inclusive.`),minProperties:J(`The minimum number of properties an object can have. Inclusive.`),required:J(`An array of strings that lists the names of all properties required on this object.`),additionalProperties:J(`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:J(`Not used for validation. Place subschemas here that you wish to reference inline with $ref.`),properties:J(`A map of property names to schemas for each property.`),patternProperties:J(`A map of regular expressions on property names to schemas for matching properties.`),dependencies:J(`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:J(`The set of literal values that are valid.`),type:J(`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:J(`Describes the format expected for the value.`),allOf:J(`An array of schemas, all of which must match.`),anyOf:J(`An array of schemas, where at least one must match.`),oneOf:J(`An array of schemas, exactly one of which must match.`),not:J(`A schema which must not match.`),$id:J(`A unique identifier for the schema.`),$ref:J(`Reference a definition hosted on any location.`),$comment:J(`Comments from schema authors to readers or maintainers of the schema.`),readOnly:J(`Indicates that the value of the instance is managed exclusively by the owning authority.`),examples:J(`Sample JSON values associated with a particular schema, for the purpose of illustrating usage.`),contains:J(`An array instance is valid against "contains" if at least one of its elements is valid against the given schema.`),propertyNames:J(`If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema.`),const:J(`An instance validates successfully against this keyword if its value is equal to the value of the keyword.`),contentMediaType:J(`Describes the media type of a string property.`),contentEncoding:J(`Describes the content encoding of a string property.`),if:J(`The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.`),then:J(`The "if" subschema is used for validation when the "if" subschema succeeds.`),else:J(`The "else" subschema is used for validation when the "if" subschema fails.`)};for(let e in hl.schemas){let t=hl.schemas[e];for(let e in t.properties){let n=t.properties[e];typeof n==`boolean`&&(n=t.properties[e]={});let r=gl[e];r&&(n.description=r)}}var _l;(()=>{var e={470:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===47)break;n=47}if(n===47){if(!(a===s-1||o===1))if(a!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}var r={resolve:function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},normalize:function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},isAbsolute:function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,o=a-i,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var c=n.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(n.charCodeAt(s+d)===47)return n.slice(s+d+1);if(d===0)return n.slice(s+d)}else o>l&&(e.charCodeAt(i+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=i+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r}(0,e)},parse:function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(n.base=n.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(s,o),n.base=e.slice(s,c)),n.ext=e.slice(o,c)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.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=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{let e;n.r(r),n.d(r,{URI:()=>c,Utils:()=>x}),typeof process==`object`?e=process.platform===`win32`:typeof navigator==`object`&&(e=navigator.userAgent.indexOf(`Windows`)>=0);let t=/^\w[\w\d+.-]*$/,i=/^\//,a=/^\/\//;function o(e,n){if(!e.scheme&&n)throw 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 Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!i.test(e.path))throw 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(a.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class c{static isUri(e){return e instanceof c||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=function(e,t){return e||t?e:`file`}(e,a),this.authority=t||``,this.path=function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t}(this.scheme,n||``),this.query=r||``,this.fragment=i||``,o(this,a))}get fsPath(){return m(this)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new u(t,n,r,i,a)}static parse(e,t=!1){let n=s.exec(e);return n?new u(n[2]||``,v(n[4]||``),v(n[5]||``),v(n[7]||``),v(n[9]||``),t):new u(``,``,``,``,``)}static file(t){let n=``;if(e&&(t=t.replace(/\\/g,`/`)),t[0]===`/`&&t[1]===`/`){let e=t.indexOf(`/`,2);e===-1?(n=t.substring(2),t=`/`):(n=t.substring(2,e),t=t.substring(e)||`/`)}return new u(`file`,n,t,``,``)}static from(e){let t=new u(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return h(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof c)return e;{let t=new u(e);return t._formatted=e.external,t._fsPath=e._sep===l?e.fsPath:null,t}}return e}}let l=e?1:void 0;class u extends c{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=m(this),this._fsPath}toString(e=!1){return e?h(this,!0):(this._formatted||=h(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=l),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}}let 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 f(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=d[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}function p(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=d[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}function m(t,n){let r;return r=t.authority&&t.path.length>1&&t.scheme===`file`?`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,`\\`)),r}function h(e,t){let n=t?p:f,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:f(c,!1,!1)),r}function g(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+g(e.substr(3)):e}}let _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(_)?e.replace(_,(e=>g(e))):e}var y=n(470);let b=y.posix||y;var x;(function(e){e.joinPath=function(e,...t){return e.with({path:b.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=b.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=b.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return b.basename(e.path)},e.extname=function(e){return b.extname(e.path)}})(x||={})})(),_l=r})();let{URI:vl,Utils:yl}=_l;function bl(e,t){if(typeof e!=`string`)throw TypeError(`Expected a string`);let n=String(e),r=``,i=!!t,a=!!t,o=!1,s=t&&typeof t.flags==`string`?t.flags:``,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`*`:let t=n[e-1],s=1;for(;n[e+1]===`*`;)s++,e++;let l=n[e+1];a?s>1&&(t===`/`||t===void 0||t===`{`||t===`,`)&&(l===`/`||l===void 0||l===`,`||l===`}`)?(l===`/`?e++:t===`/`&&r.endsWith(`\\/`)&&(r=r.substr(0,r.length-2)),r+=`((?:[^/]*(?:/|$))*)`):r+=`([^/]*)`:r+=`.*`;break;default:r+=c}return(!s||!~s.indexOf(`g`))&&(r=`^`+r+`$`),new RegExp(r,s)}var xl=class{constructor(e,t,n){this.folderUri=t,this.uris=n,this.globWrappers=[];try{for(let t of e){let e=t[0]!==`!`;e||(t=t.substring(1)),t.length>0&&(t[0]===`/`&&(t=t.substring(1)),this.globWrappers.push({regexp:bl(`**/`+t,{extended:!0,globstar:!0}),include:e}))}t&&(t=Ol(t),t.endsWith(`/`)||(t+=`/`),this.folderUri=t)}catch{this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let t=!1;for(let{regexp:n,include:r}of this.globWrappers)n.test(e)&&(t=r);return t}getURIs(){return this.uris}},Sl=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 Cl(n)))}getUnresolvedSchema(){return this.unresolvedSchema||=this.service.loadSchema(this.uri),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||=this.getUnresolvedSchema().then(e=>this.service.resolveSchemaContent(e,this)),this.resolvedSchema}clearSchema(){let e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}},Cl=class{constructor(e,t=[]){this.schema=e,this.errors=t}},wl=class{constructor(e,t=[],n=[],r){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=r}getSection(e){let t=this.getSectionRecursive(e,this.schema);if(t)return Y(t)}getSectionRecursive(e,t){if(!t||typeof t==`boolean`||e.length===0)return t;let n=e.shift();if(t.properties&&typeof t.properties[n])return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties){for(let r of Object.keys(t.patternProperties))if(ts(r)?.test(n))return this.getSectionRecursive(e,t.patternProperties[r])}else if(typeof t.additionalProperties==`object`)return this.getSectionRecursive(e,t.additionalProperties);else if(n.match(`[0-9]+`)){if(Array.isArray(t.items)){let 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)}}},Tl=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=>{let n=vl.parse(t).scheme;return n!==`schemaservice`&&(!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;e=Dl(e);let n=[e],r=Object.keys(this.schemasById).map(e=>this.schemasById[e]);for(;n.length;){let e=n.pop();for(let i=0;i<r.length;i++){let a=r[i];a&&(a.uri===e||a.dependencies.has(e))&&(a.uri!==e&&n.push(a.uri),a.clearSchema()&&(t=!0),r[i]=void 0)}}return t}setSchemaContributions(e){if(e.schemas){let t=e.schemas;for(let e in t){let n=Dl(e);this.contributionSchemas[n]=this.addSchemaHandle(n,t[e])}}if(Array.isArray(e.schemaAssociations)){let t=e.schemaAssociations;for(let e of t){let t=e.uris.map(Dl),n=this.addFilePatternAssociation(e.pattern,e.folderUri,t);this.contributionAssociations.push(n)}}}addSchemaHandle(e,t){let n=new Sl(this,e,t);return this.schemasById[e]=n,n}getOrAddSchemaHandle(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)}addFilePatternAssociation(e,t,n){let r=new xl(e,t,n);return this.filePatternAssociations.push(r),r}registerExternalSchema(e){let t=Dl(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(let e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(let e of this.contributionAssociations)this.filePatternAssociations.push(e)}getResolvedSchema(e){let t=Dl(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(e){if(!this.requestService){let t=J(`Unable to load schema from '{0}'. No schema request service available`,kl(e));return this.promise.resolve(new Cl({},[t]))}return e.startsWith(`http://json-schema.org/`)&&(e=`https`+e.substring(4)),this.requestService(e).then(t=>{if(!t)return new Cl({},[J(`Unable to load schema from '{0}': No content.`,kl(e))]);let n=[];t.charCodeAt(0)===65279&&(n.push(J(`Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.`,kl(e))),t=t.trimStart());let r={},i=[];return r=Ho(t,i),i.length&&n.push(J(`Unable to parse content from '{0}': Parse error at offset {1}.`,kl(e),i[0].offset)),new Cl(r,n)},t=>{let n=t.toString(),r=t.toString().split(`Error: `);return r.length>1&&(n=r[1]),es(n,`.`)&&(n=n.substr(0,n.length-1)),new Cl({},[J(`Unable to load schema from '{0}': {1}.`,kl(e),n)])})}resolveSchemaContent(e,t){let n=e.errors.slice(0),r=e.schema,i=r.$schema?Dl(r.$schema):void 0;if(i===`http://json-schema.org/draft-03/schema`)return this.promise.resolve(new wl({},[J(`Draft-03 schemas are not supported.`)],[],i));let a=new Set,o=this.contextService,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},c=(e,t,n)=>(t.anchors||=p(e),t.anchors.get(n)),l=(e,t)=>{for(let n in t)t.hasOwnProperty(n)&&n!==`id`&&n!==`$id`&&(e[n]=t[n])},u=(e,t,r,i)=>{let a;a=i===void 0||i.length===0?t:i.charAt(0)===`/`?s(t,i):c(t,r,i),a?l(e,a):n.push(J(`$ref '{0}' in '{1}' can not be resolved.`,i||``,r.uri))},d=(e,t,r,i)=>{o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(t)&&(t=o.resolveRelativePath(t,i.uri)),t=Dl(t);let a=this.getOrAddSchemaHandle(t);return a.getUnresolvedSchema().then(o=>{if(i.dependencies.add(t),o.errors.length){let e=r?t+`#`+r:t;n.push(J(`Problems loading reference '{0}': {1}`,e,o.errors[0]))}return u(e,o.schema,a,r),f(e,o.schema,a)})},f=(e,t,n)=>{let r=[];return this.traverseNodes(e,e=>{let i=new Set;for(;e.$ref;){let a=e.$ref,o=a.split(`#`,2);if(delete e.$ref,o[0].length>0){r.push(d(e,o[0],o[1],n));return}else if(!i.has(a)){let r=o[1];u(e,t,n,r),i.add(a)}}e.$recursiveRef&&a.add(`$recursiveRef`),e.$dynamicRef&&a.add(`$dynamicRef`)}),this.promise.all(r)},p=e=>{let t=new Map;return this.traverseNodes(e,e=>{let r=e.$id||e.id,i=Zo(r)&&r.charAt(0)===`#`?r.substring(1):e.$anchor;i&&(t.has(i)?n.push(J(`Duplicate anchor declaration: '{0}'`,i)):t.set(i,e)),e.$recursiveAnchor&&a.add(`$recursiveAnchor`),e.$dynamicAnchor&&a.add(`$dynamicAnchor`)}),t};return f(r,r,t).then(e=>{let t=[];return a.size&&t.push(J(`The schema uses meta-schema features ({0}) that are not yet supported by the validator.`,Array.from(a.keys()).join(`, `))),new wl(r,n,t,i)})}traverseNodes(e,t){if(!e||typeof e!=`object`)return Promise.resolve(null);let n=new Set,r=(...e)=>{for(let t of e)Qo(t)&&s.push(t)},i=(...e)=>{for(let t of e)if(Qo(t))for(let e in t){let n=t[e];Qo(n)&&s.push(n)}},a=(...e)=>{for(let t of e)if(Array.isArray(t))for(let e of t)Qo(e)&&s.push(e)},o=e=>{if(Array.isArray(e))for(let t of e)Qo(t)&&s.push(t);else Qo(e)&&s.push(e)},s=[e],c=s.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),a(c.anyOf,c.allOf,c.oneOf,c.prefixItems),o(c.items)),c=s.pop()}getSchemaFromProperty(e,t){if(t.root?.type===`object`){for(let n of t.root.properties)if(n.keyNode.value===`$schema`&&n.valueNode?.type===`string`){let t=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(t)&&(t=this.contextService.resolveRelativePath(t,e)),t}}}getAssociatedSchemas(e){let t=Object.create(null),n=[],r=Ol(e);for(let e of this.filePatternAssociations)if(e.matchesPattern(r))for(let 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){let e=Dl(n);return this.getOrAddSchemaHandle(e).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;let 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(t.length===1)return this.getOrAddSchemaHandle(t[0]);{let n=`schemaservice://combinedSchema/`+encodeURIComponent(e),r={allOf:t.map(e=>({$ref:e}))};return this.addSchemaHandle(n,r)}}getMatchingSchemas(e,t,n){if(n){let e=n.id||`schemaservice://untitled/matchingSchemas/`+ El++;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):[])}};let El=0;function Dl(e){try{return vl.parse(e).toString(!0)}catch{return e}}function Ol(e){try{return vl.parse(e).with({fragment:null,query:null}).toString(!0)}catch{return e}}function kl(e){try{let t=vl.parse(e);if(t.scheme===`file`)return t.fsPath}catch{}return e}function Al(e,t){let n=[],r=[],i=[],a=-1,o=zo(e.getText(),!1),s=o.scan();function c(e){n.push(e),r.push(i.length)}for(;s!==17;){switch(s){case 1:case 3:{let t=e.positionAt(o.getTokenOffset()).line,n={startLine:t,endLine:t,kind:s===1?`object`:`array`};i.push(n);break}case 2:case 4:{let t=s===2?`object`:`array`;if(i.length>0&&i[i.length-1].kind===t){let t=i.pop(),n=e.positionAt(o.getTokenOffset()).line;t&&n>t.startLine+1&&a!==t.startLine&&(t.endLine=n-1,c(t),a=t.startLine)}break}case 13:{let t=e.positionAt(o.getTokenOffset()).line,n=e.positionAt(o.getTokenOffset()+o.getTokenLength()).line;o.getTokenError()===1&&t+1<e.lineCount?o.setPosition(e.offsetAt(V.create(t+1,0))):t<n&&(c({startLine:t,endLine:n,kind:fs.Comment}),a=t);break}case 12:{let t=e.getText().substr(o.getTokenOffset(),o.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(t){let n=e.positionAt(o.getTokenOffset()).line;if(t[1]){let e={startLine:n,endLine:n,kind:fs.Region};i.push(e)}else{let e=i.length-1;for(;e>=0&&i[e].kind!==fs.Region;)e--;if(e>=0){let t=i[e];i.length=e,n>t.startLine&&a!==t.startLine&&(t.endLine=n,c(t),a=t.startLine)}}}break}}s=o.scan()}let l=t&&t.rangeLimit;if(typeof l!=`number`||n.length<=l)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);let u=[];for(let e of r)e<30&&(u[e]=(u[e]||0)+1);let d=0,f=0;for(let e=0;e<u.length;e++){let t=u[e];if(t){if(t+d>l){f=e;break}d+=t}}let p=[];for(let e=0;e<n.length;e++){let t=r[e];typeof t==`number`&&(t<f||t===f&&d++<l)&&p.push(n[e])}return p}function jl(e,t,n){function r(t){let r=e.offsetAt(t),a=n.getNodeFromOffset(r,!0),s=[];for(;a;){switch(a.type){case`string`:case`object`:case`array`:let e=a.offset+1,t=a.offset+a.length-1;e<t&&r>=e&&r<=t&&s.push(i(e,t)),s.push(i(a.offset,a.offset+a.length));break;case`number`:case`boolean`:case`null`:case`property`:s.push(i(a.offset,a.offset+a.length));break}if(a.type===`property`||a.parent&&a.parent.type===`array`){let e=o(a.offset+a.length,5);e!==-1&&s.push(i(a.offset,e))}a=a.parent}let c;for(let e=s.length-1;e>=0;e--)c=ic.create(s[e],c);return c||=ic.create(H.create(t,t)),c}function i(t,n){return H.create(e.positionAt(t),e.positionAt(n))}let a=zo(e.getText(),!0);function o(e,t){return a.setPosition(e),a.scan()===t?a.getTokenOffset()+a.getTokenLength():-1}return t.map(r)}function Ml(e,t,n){let r;if(n){let t=e.offsetAt(n.start);r={offset:t,length:e.offsetAt(n.end)-t}}let i={tabSize:t?t.tabSize:4,insertSpaces:t?.insertSpaces===!0,insertFinalNewline:t?.insertFinalNewline===!0,eol:`
58
58
  `,keepLines:t?.keepLines===!0};return qo(e.getText(),r,i).map(t=>ys.replace(H.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content))}var $;(function(e){e[e.Object=0]=`Object`,e[e.Array=1]=`Array`})($||={});var Nl=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:Fl(this.childrenProperties,e,Pl),t<0&&(t=t*-1-1),this.childrenProperties.splice(t,0,e)}else this.childrenProperties.push(e);return e}};function Pl(e,t){let n=e.propertyName.toLowerCase(),r=t.propertyName.toLowerCase();return n<r?-1:+(n>r)}function Fl(e,t,n){let r=t.propertyName.toLowerCase(),i=e[0].propertyName.toLowerCase(),a=e[e.length-1].propertyName.toLowerCase();if(r<i)return 0;if(r>a)return e.length;let o=0,s=e.length-1;for(;o<=s;){let r=s+o>>1,i=n(t,e[r]);if(i>0)o=r+1;else if(i<0)s=r-1;else return r}return-o-1}function Il(e,t){let n={...t,keepLines:!1},r=Tc.applyEdits(e,Ml(e,n,void 0)),i=Tc.create(`test://test.json`,`json`,0,r),a=Rl(i,Ll(i)),o=Ml(a,n,void 0),s=Tc.applyEdits(a,o);return[ys.replace(H.create(V.create(0,0),e.positionAt(e.getText().length)),s)]}function Ll(e){let t=zo(e.getText(),!1),n=new Nl,r=n,i=n,a=n,o,s=0,c=0,l,u,d=-1,f=-1,p=0,m=0,h=[],g=!1,_=!1;for(;(o=t.scan())!==17;){if(g===!0&&o!==14&&o!==15&&o!==12&&o!==13&&i.endLineNumber===void 0){let e=t.getTokenStartLine();u===2||u===4?a.endLineNumber=e-1:i.endLineNumber=e-1,p=e,g=!1}if(_===!0&&o!==14&&o!==15&&o!==12&&o!==13&&(p=t.getTokenStartLine(),_=!1),t.getTokenStartLine()!==s){for(let n=s;n<t.getTokenStartLine();n++){let t=e.getText(H.create(V.create(n,0),V.create(n+1,0))).length;c+=t}s=t.getTokenStartLine()}switch(o){case 10:if(l===void 0||l===1||l===5&&h[h.length-1]===$.Object){let e=new Nl(t.getTokenValue(),p);a=i,i=r.addChildProperty(e)}break;case 3:if(n.beginningLineNumber===void 0&&(n.beginningLineNumber=t.getTokenStartLine()),h[h.length-1]===$.Object)r=i;else if(h[h.length-1]===$.Array){let e=new Nl(t.getTokenValue(),p);e.noKeyName=!0,a=i,i=r.addChildProperty(e),r=i}h.push($.Array),i.type=$.Array,p=t.getTokenStartLine(),p++;break;case 1:if(n.beginningLineNumber===void 0)n.beginningLineNumber=t.getTokenStartLine();else if(h[h.length-1]===$.Array){let e=new Nl(t.getTokenValue(),p);e.noKeyName=!0,a=i,i=r.addChildProperty(e)}i.type=$.Object,h.push($.Object),r=i,p=t.getTokenStartLine(),p++;break;case 4:m=t.getTokenStartLine(),h.pop(),i.endLineNumber===void 0&&(l===2||l===4)&&(i.endLineNumber=m-1,i.lastProperty=!0,i.lineWhereToAddComma=d,i.indexWhereToAddComa=f,a=i,i=i?i.parent:void 0,r=i),n.endLineNumber=m,p=m+1;break;case 2:m=t.getTokenStartLine(),h.pop(),l!==1&&(i.endLineNumber===void 0&&(i.endLineNumber=m-1,i.lastProperty=!0,i.lineWhereToAddComma=d,i.indexWhereToAddComa=f),a=i,i=i?i.parent:void 0,r=i),n.endLineNumber=t.getTokenStartLine(),p=m+1;break;case 5:m=t.getTokenStartLine(),i.endLineNumber===void 0&&(h[h.length-1]===$.Object||h[h.length-1]===$.Array&&(l===2||l===4))&&(i.endLineNumber=m,i.commaIndex=t.getTokenOffset()-c,i.commaLine=m),(l===2||l===4)&&(a=i,i=i?i.parent:void 0,r=i),p=m+1;break;case 13:l===5&&d===t.getTokenStartLine()&&(h[h.length-1]===$.Array&&(u===2||u===4)||h[h.length-1]===$.Object)&&(h[h.length-1]===$.Array&&(u===2||u===4)||h[h.length-1]===$.Object)&&(i.endLineNumber=void 0,g=!0),(l===1||l===3)&&d===t.getTokenStartLine()&&(_=!0);break}o!==14&&o!==13&&o!==12&&o!==15&&(u=l,l=o,d=t.getTokenStartLine(),f=t.getTokenOffset()+t.getTokenLength()-c)}return n}function Rl(e,t){if(t.childrenProperties.length===0)return e;let n=Tc.create(`test://test.json`,`json`,0,e.getText()),r=[];for(zl(r,t,t.beginningLineNumber);r.length>0;){let t=r.shift(),i=t.propertyTreeArray,a=t.beginningLineNumber;for(let t=0;t<i.length;t++){let o=i[t],s=H.create(V.create(o.beginningLineNumber,0),V.create(o.endLineNumber+1,0)),c=e.getText(s),l=Tc.create(`test://test.json`,`json`,0,c);if(o.lastProperty===!0&&t!==i.length-1){let e=o.lineWhereToAddComma-o.beginningLineNumber,t=o.indexWhereToAddComa,n={range:H.create(V.create(e,t),V.create(e,t)),text:`,`};Tc.update(l,[n],1)}else if(o.lastProperty===!1&&t===i.length-1){let e=o.commaIndex,t=o.commaLine-o.beginningLineNumber,n={range:H.create(V.create(t,e),V.create(t,e+1)),text:``};Tc.update(l,[n],1)}let u=o.endLineNumber-o.beginningLineNumber+1,d={range:H.create(V.create(a,0),V.create(a+u,0)),text:l.getText()};Tc.update(n,[d],1),zl(r,o,a),a+=u}}return n}function zl(e,t,n){if(t.childrenProperties.length!==0)if(t.type===$.Object){let r=1/0;for(let e of t.childrenProperties)e.beginningLineNumber<r&&(r=e.beginningLineNumber);let i=r-t.beginningLineNumber;n+=i,e.push(new Vl(n,t.childrenProperties))}else t.type===$.Array&&Bl(e,t,n)}function Bl(e,t,n){for(let r of t.childrenProperties){if(r.type===$.Object){let i=1/0;for(let e of r.childrenProperties)e.beginningLineNumber<i&&(i=e.beginningLineNumber);let a=i-r.beginningLineNumber;e.push(new Vl(n+r.beginningLineNumber-t.beginningLineNumber+a,r.childrenProperties))}r.type===$.Array&&Bl(e,r,n+r.beginningLineNumber-t.beginningLineNumber)}}var Vl=class{constructor(e,t){this.beginningLineNumber=e,this.propertyTreeArray=t}};function Hl(e,t){let n=[];return t.visit(r=>{if(r.type===`property`&&r.keyNode.value===`$ref`&&r.valueNode?.type===`string`){let i=r.valueNode.value,a=Wl(t,i);if(a){let t=e.positionAt(a.offset);n.push({target:`${e.uri}#${t.line+1},${t.character+1}`,range:Ul(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function Ul(e,t){return H.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function Wl(e,t){let n=Kl(t);return n?Gl(n,e.root):null}function Gl(e,t){if(!t)return null;if(e.length===0)return t;let n=e.shift();if(t&&t.type===`object`){let r=t.properties.find(e=>e.keyNode.value===n);return r?Gl(e,r.valueNode):null}else if(t&&t.type===`array`&&n.match(/^(0|[1-9][0-9]*)$/)){let r=Number.parseInt(n),i=t.items[r];return i?Gl(e,i):null}return null}function Kl(e){return e===`#`?[]:e[0]!==`#`||e[1]!==`/`?null:e.substring(2).split(/\//).map(ql)}function ql(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function Jl(e){let t=e.promiseConstructor||Promise,n=new Tl(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(hl);let r=new nl(n,e.contributions,t,e.clientCapabilities),i=new rl(n,e.contributions,t),a=new fl(n),o=new ol(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=>el(e,{collectComments:!0}),newJSONDocument:(e,t)=>Jc(e,t),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:a.findDocumentSymbols.bind(a),findDocumentSymbols2:a.findDocumentSymbols2.bind(a),findDocumentColors:a.findDocumentColors.bind(a),getColorPresentations:a.getColorPresentations.bind(a),doHover:i.doHover.bind(i),getFoldingRanges:Al,getSelectionRanges:jl,findDefinition:()=>Promise.resolve([]),findLinks:Hl,format:(e,t,n)=>Ml(e,n,t),sort:(e,t)=>Il(e,t)}}let Yl;typeof fetch<`u`&&(Yl=function(e){return fetch(e).then(e=>e.text())});var Xl=class{constructor(e,t){this._ctx=e,this._languageSettings=t.languageSettings,this._languageId=t.languageId,this._languageService=Jl({workspaceContext:{resolveRelativePath:(e,t)=>Ql(t.substr(0,t.lastIndexOf(`/`)+1),e)},schemaRequestService:t.enableSchemaRequest?Yl:void 0,clientCapabilities:jc.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),a=this._languageService.getColorPresentations(r,i,t,n);return Promise.resolve(a)}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 Tc.create(e,this._languageId,n.version,n.getValue());return null}};function Zl(e){return e.charCodeAt(0)===47}function Ql(e,t){if(Zl(t)){let n=vl.parse(e),r=t.split(`/`);return n.with({path:$l(r)}).toString()}return eu(e,t)}function $l(e){let t=[];for(let n of e)n.length===0||n.length===1&&n.charCodeAt(0)===46||(n.length===2&&n.charCodeAt(0)===46&&n.charCodeAt(1)===46?t.pop():t.push(n));e.length>1&&e[e.length-1].length===0&&t.push(``);let n=t.join(`/`);return e[0].length===0&&(n=`/`+n),n}function eu(e,...t){let n=vl.parse(e),r=n.path.split(`/`);for(let e of t)r.push(...e.split(`/`));return n.with({path:$l(r)}).toString()}self.onmessage=()=>{yo((e,t)=>new Xl(e,t))}})();