zen-gitsync 2.12.6 → 2.12.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/README.md +695 -695
  2. package/package.json +1 -1
  3. package/scripts/README_COLOR_CONVERTER.md +196 -196
  4. package/scripts/README_FONTSIZE_CONVERTER.md +278 -278
  5. package/scripts/README_SPACING_CONVERTER.md +126 -126
  6. package/scripts/README_STYLE_VARS.md +180 -180
  7. package/src/ui/public/assets/EditorView-DDyMmxPI.js +0 -0
  8. package/src/ui/public/assets/{EditorView-DEd8QuPp.css → EditorView-DK-Xgt7r.css} +1 -1
  9. package/src/ui/public/assets/SourceMapView-DakscAmd.js +3 -0
  10. package/src/ui/public/assets/{css.worker-Wv5dxAWO.js → css.worker-CvXBzhp8.js} +1 -1
  11. package/src/ui/public/assets/{html.worker-CQP8QQsS.js → html.worker-BO6WuOEO.js} +1 -1
  12. package/src/ui/public/assets/index-CPUqt5Ue.js +73 -0
  13. package/src/ui/public/assets/index-a-r8YYZJ.css +1 -0
  14. package/src/ui/public/assets/{json.worker-DzV-CpCQ.js → json.worker-BkJRGcCJ.js} +1 -1
  15. package/src/ui/public/assets/{ts.worker-Dth06zuC.js → ts.worker-B0J26iPs.js} +15 -15
  16. package/src/ui/public/assets/{vendor-BB71wW_m.js → vendor-BMFU1ekz.js} +249 -242
  17. package/src/ui/public/assets/vendor-BPPhhD0O.css +1 -0
  18. package/src/ui/public/favicon.svg +75 -75
  19. package/src/ui/public/index.html +22 -22
  20. package/src/ui/public/logo.svg +74 -74
  21. package/src/ui/public/assets/EditorView-CItjMDNe.js +0 -0
  22. package/src/ui/public/assets/SourceMapView-qlixRY_C.js +0 -3
  23. package/src/ui/public/assets/index-BFhllyJb.js +0 -73
  24. package/src/ui/public/assets/index-wBVvNuoD.css +0 -1
  25. package/src/ui/public/assets/vendor-B2yudN8R.css +0 -1
  26. /package/src/ui/public/assets/{editor.worker-Bd9IXS8d.js → editor.worker-Cn2oRESe.js} +0 -0
  27. /package/src/ui/public/assets/{rolldown-runtime-BM3Ffeng.js → rolldown-runtime-CMxvf4Kt.js} +0 -0
@@ -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))}})();